diff --git a/App.vue b/App.vue
index 2f31198..8b16486 100644
--- a/App.vue
+++ b/App.vue
@@ -113,6 +113,10 @@
diff --git a/components/custom-bar/module-bar.vue b/components/custom-bar/module-bar.vue
index abae37f..b6b4f63 100644
--- a/components/custom-bar/module-bar.vue
+++ b/components/custom-bar/module-bar.vue
@@ -3,10 +3,10 @@
-
+
{{item.name}}
-
+
{{item.countTag > 99 ? '99+' : item.countTag}}
@@ -39,11 +39,5 @@
}
-
diff --git a/components/goods-card/classify-goods-card.vue b/components/goods-card/classify-goods-card.vue
index 7e8a90b..a4d3ebc 100644
--- a/components/goods-card/classify-goods-card.vue
+++ b/components/goods-card/classify-goods-card.vue
@@ -2,10 +2,10 @@
- {{title}}
+ {{title}}
-
+
diff --git a/components/goods-card/comments-card.vue b/components/goods-card/comments-card.vue
new file mode 100644
index 0000000..d5e79d7
--- /dev/null
+++ b/components/goods-card/comments-card.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ {{reviewer.comments}}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data.js b/data.js
index a84899e..0209244 100644
--- a/data.js
+++ b/data.js
@@ -5,7 +5,7 @@
const swiperList = [{
id: 0,
type: 'image',
- url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg'
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big17000.jpg'
}, {
id: 1,
type: 'image',
@@ -188,12 +188,173 @@ const hotGoods = {
tag: ['自营直选', '不满意重新服务', '全程上险'],
price: '283起'
}]
-}
+}
+
+const productDetail = {
+ productDetailImgUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big37006.jpg',
+ swiperList: [{
+ id: 0,
+ type: 'video',
+ // url: 'https://v.quanjing.com/movie/default/bottom/1.mp4'
+ url: 'https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4'
+ }, {
+ id: 1,
+ type: 'image',
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big37006.jpg',
+ }, {
+ id: 2,
+ type: 'image',
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big1000.jpg'
+ }, {
+ id: 3,
+ type: 'image',
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big2001.jpg'
+ }, {
+ id: 4,
+ type: 'image',
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big2002.jpg'
+ }, {
+ id: 5,
+ type: 'image',
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big1002.jpg'
+ }, {
+ id: 6,
+ type: 'image',
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big3002.jpg'
+ }],
+ productInfo: {
+ name: '十五平米擦玻璃服务',
+ desc: '15平米起擦玻璃服务,超过15平米按照15/平米现场另收费',
+ isGoldServ: true
+ },
+ guaranteeList: [{
+ id: 1,
+ name: '服务保障',
+ desc: '服务保障描述......',
+ icon: 'repairfill'
+ }, {
+ id: 2,
+ name: '服务区域',
+ desc: '服务区域描述......',
+ icon: 'deliver_fill'
+ }, {
+ id: 3,
+ name: '备注',
+ desc: '备注描述......',
+ icon: 'commentfill'
+ },],
+ specsList: [{
+ id: 1,
+ name: '挂机内机拆洗(不分匹)',
+ salePrice: 199.00,
+ price: 300,
+ saledCount: 370,
+ commission: 12
+ }, {
+ id: 2,
+ name: '柜机拆洗(方型)含拆风轮',
+ salePrice: 240.00,
+ price: 350,
+ saledCount: 400,
+ commission: 16
+ }, {
+ id: 3,
+ name: '柜机圆柱型拆洗',
+ salePrice: 242.00,
+ price: 352,
+ saledCount: 350,
+ commission: 13
+ }, {
+ id: 4,
+ name: '中央风口机(单个风口)',
+ salePrice: 243.00,
+ price: 353,
+ saledCount: 100,
+ commission: 14
+ }, {
+ id: 5,
+ name: '天花机深度拆洗',
+ salePrice: 244.00,
+ price: 354,
+ saledCount: 109,
+ commission: 15
+ }, {
+ id: 6,
+ name: '多台套餐xxx自命名',
+ salePrice: 244.00,
+ price: 354,
+ saledCount: 109,
+ commission: 15
+ }, {
+ id: 7,
+ name: '多台套餐xxxxxx自命名',
+ salePrice: 244.00,
+ price: 354,
+ saledCount: 109,
+ commission: 15
+ }, {
+ id: 8,
+ name: '多台套餐xxxxxxxx自命名',
+ salePrice: 244.00,
+ price: 354,
+ saledCount: 109,
+ commission: 15
+ }, {
+ id: 9,
+ name: '多台套餐xxxxxxxx自命名',
+ salePrice: 244.00,
+ price: 354,
+ saledCount: 109,
+ commission: 15
+ }, {
+ id: 10,
+ name: '多台套餐xxxxxxxx自命名',
+ salePrice: 244.00,
+ price: 354,
+ saledCount: 109,
+ commission: 15
+ }],
+ reviewers: [{
+ id: 1,
+ avatarUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big3002.jpg',
+ name: 'e**1',
+ reviewTime: '2022年03月17日',
+ comments: '很好用啊......',
+ picList: []
+ }, {
+ id: 2,
+ avatarUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big20001.jpg',
+ name: 'e**1',
+ reviewTime: '2022年03月17日',
+ comments: '很好用啊......',
+ picList: [{
+ id: 21,
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big3004.jpg'
+ }, {
+ id: 22,
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big1010.jpg'
+ }, {
+ id: 23,
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big1010.jpg'
+ }, {
+ id: 24,
+ url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big1010.jpg'
+ }]
+ }],
+ shopInfo: {
+ id: 1,
+ name: '艺鑫到家(售后无忧)',
+ avatarUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big17005.jpg'
+ }
+}
+
export default {
swiperList,
categories,
subCategories,
moduleBarInfos,
discountGoods,
- hotGoods
+ hotGoods,
+
+ productDetail
}
diff --git a/main.js b/main.js
index 30ce85a..b79fa3c 100644
--- a/main.js
+++ b/main.js
@@ -11,7 +11,7 @@ const data = type=>{
return new Promise(resolve=>{
setTimeout(()=>{
resolve(Data[type]);
- }, 500)
+ }, 0)
})
}
Vue.prototype.$api = {data}
diff --git a/manifest.json b/manifest.json
index 6313c5d..d4dedf7 100644
--- a/manifest.json
+++ b/manifest.json
@@ -49,7 +49,7 @@
/* 快应用特有相关 */
"mp-weixin" : {
/* 小程序特有相关 */
- "appid" : "wx7245cee0986fa0ac",
+ "appid" : "wxc39c2af3ea24cd37",
"setting" : {
"urlCheck" : false,
"minified" : false,
diff --git a/pages.json b/pages.json
index e13f313..b3f385e 100644
--- a/pages.json
+++ b/pages.json
@@ -1,10 +1,19 @@
{
"pages": [{
- "path": "pages/index/index"
- }],
- "globalStyle": {
+ "path": "pages/index/index"
+ },
+ {
+ "path": "pages/product/product-detail",
+ "style": {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ],
+ "globalStyle": {
"navigationStyle": "custom",
- // "navigationBarTextStyle": "black",
+ "navigationBarTextStyle": "black",
// "navigationBarTitleText": "uni-app",
// "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 94614f9..e0cbf38 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,13 +1,13 @@
-
-
-
-
-
+
+
+
+
+
@@ -26,13 +26,13 @@
分类
-
+
-
{{item.name}}
@@ -85,7 +85,7 @@
},
data() {
return {
- dotStyle: false,
+ dotStyle: true,
swiperList: [],
tabCur: 0,
categories: [],
@@ -96,7 +96,8 @@
}
},
onLoad() {
- this.loadData();
+ this.loadData();
+ this.bindEvent();
},
methods: {
async loadData() {
@@ -106,6 +107,9 @@
this.moduleBarInfos = await this.$api.data('moduleBarInfos');
this.hotGoods = await this.$api.data('hotGoods');
this.discountGoods = await this.$api.data('discountGoods');
+ },
+ bindEvent() {
+ uni.$on('showProductDetail', this.showDetails);
},
inputFocus(e) {
this.InputBottom = e.detail.height
@@ -124,6 +128,11 @@
searchGoods(item) {
console.log("搜索条件信息: " + item)
console.log("商品搜索中...");
+ },
+ showDetails(productItem) {
+ uni.navigateTo({
+ url: '../product/product-detail'
+ });
}
}
}
diff --git a/pages/product/product-detail.vue b/pages/product/product-detail.vue
new file mode 100644
index 0000000..b2ef720
--- /dev/null
+++ b/pages/product/product-detail.vue
@@ -0,0 +1,232 @@
+
+
+
+
+ 返回
+
+
+
+
+
+ 服务
+ 评价
+ 详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{curProductSpecs.salePrice}}
+
+ ¥{{curProductSpecs.price}}
+
+
+
+ 已售:{{curProductSpecs.saledCount}}
+
+
+
+
+ 佣金:{{curProductSpecs.commission}}
+
+
+
+
+ 距结束:
+
+
+
+
+
+
+
+
+
+
+ 金牌服务
+
+ {{productInfo.name}}
+
+ {{productInfo.desc}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.desc}}
+
+
+ 选择品类
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ 商品评价
+ 好评率95%
+
+
+
+
+
+
+
+
+ {{shopInfo.name}}
+
+ 查看
+
+
+
+
+
+ 详情图片......
+
+
+
+
+
+
+
+ 99
+
+ 购物车
+
+ 加入购物车
+ 立即订购
+
+
+
+
+
+
+
diff --git a/style/blue/blue-topic.css b/style/blue/blue-topic.css
new file mode 100644
index 0000000..bb7e2cb
--- /dev/null
+++ b/style/blue/blue-topic.css
@@ -0,0 +1,23 @@
+.line-default {
+ color: #aaaaaa;
+}
+
+.line-main-color,
+.text-main-color {
+ color: #0081ff;
+}
+
+.bg-main-color {
+ background-color: #0081ff;
+ color: #ffffff;
+}
+
+.bg-main-color.light {
+ color: #0081ff;
+ background-color: #cce6ff;
+}
+
+.bg-gradual-color {
+ background-image: linear-gradient(45deg, #0081ff, #1cbbb4);
+ color: #ffffff;
+}
\ No newline at end of file
diff --git a/style/default.css b/style/default.css
new file mode 100644
index 0000000..bee73cc
--- /dev/null
+++ b/style/default.css
@@ -0,0 +1,17 @@
+.margin-bottom-with-bar {
+ margin-bottom: 130rpx;
+}
+
+.fixed-bottom-bar {
+ position: fixed !important;
+ width: 100% !important;
+ bottom: 0 !important;
+ margin-bottom: 0 !important;
+ z-index: 210000000;
+}
+
+.fixed-top-bar {
+ position: fixed !important;
+ z-index: 210000000;
+ width: 100%;
+}
\ No newline at end of file