From dd71a0f32a381d877a8ec784e8fab09672bdc4ee Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Fri, 24 Jul 2020 19:48:57 +0800 Subject: [PATCH] comment 7.2 --- common/api/shop.js | 9 +- components/comment/index.vue | 100 ++++ components/shop/group/index.vue | 40 +- components/shop/group/item.vue | 33 +- components/shop/list/index.vue | 40 +- components/shop/list/item.vue | 33 +- components/shop/recommend/index.vue | 2 +- components/shop/recommend/pintuan.vue | 39 +- components/shop/seckill/index.vue | 3 + components/shop/seckill/item.vue | 35 +- components/shop/special-shop/index.vue | 68 ++- components/shop/youhq/index.vue | 11 +- pageB/comment/index.vue | 79 +++ pageB/components/sdetails/guige.vue | 2 +- pageB/components/sdetails/tloos.vue | 176 ++++-- pageB/sdetails/index.vue | 430 +++++++++++---- pageB/sdetails/index1.vue | 723 +++++++++++++++++++++++++ pageC/cart/ConfirmOrder.vue | 13 +- pageC/cart/cashier.vue | 34 +- pageE/order/Comment.vue | 8 +- pages.json | 11 + pages/shop/index.vue | 91 ++-- static/image/common/20.png | Bin 0 -> 3205 bytes 23 files changed, 1630 insertions(+), 350 deletions(-) create mode 100644 components/comment/index.vue create mode 100644 pageB/comment/index.vue create mode 100644 pageB/sdetails/index1.vue create mode 100644 static/image/common/20.png diff --git a/common/api/shop.js b/common/api/shop.js index ae8b05a..a56f116 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -259,7 +259,14 @@ export default { }, getStoreInfo({id}){ return vm.$u.post('Store/getStoreInfo',{id}) - } + }, + // 获取商品评论 + getAllEvalue({ goods_id, page }) { + return vm.$u.post('Specialci/getAllEvalue', { + goods_id: goods_id, + page: page, + }) + }, } } diff --git a/components/comment/index.vue b/components/comment/index.vue new file mode 100644 index 0000000..fcdb680 --- /dev/null +++ b/components/comment/index.vue @@ -0,0 +1,100 @@ + + + \ No newline at end of file diff --git a/components/shop/group/index.vue b/components/shop/group/index.vue index f13d33c..fba5f4f 100644 --- a/components/shop/group/index.vue +++ b/components/shop/group/index.vue @@ -11,7 +11,7 @@ - + @@ -24,16 +24,33 @@ export default { sitem }, props: { - groupList: Array, classifyList: Array, }, data(){ return { - current: 0, + current: -1, swiperCurrent: 0, + groupList: [], // 拼团商品 } }, + watch: { + current(value) { + this.getPinTuanList(this.classifyList[value].gc_id); + } + }, + created() { + this.current = 0; + }, methods: { + // 拼团列表 + getPinTuanList(id) { + this.$u.api.getPinTuanList({ + page: 0, + gc_id: id, + }).then(res => { + this.groupList = res.data; + }) + }, tabsChange(index) { this.swiperCurrent = index; }, @@ -52,7 +69,9 @@ export default { \ No newline at end of file diff --git a/components/shop/group/item.vue b/components/shop/group/item.vue index 1dc51fe..141f0e9 100644 --- a/components/shop/group/item.vue +++ b/components/shop/group/item.vue @@ -16,19 +16,26 @@ export default { }, methods: { toDetailsPage() { - this.$u.api.getPinTuanDetails({ - pintuan_id: this.info.pintuan_id, - }).then(res => { - if(res.errCode == 0) { - const goods = { - goods: res.data.data, - type: 2, - } - this.$store.commit('setGoodsDetails', goods); - this.$store.commit('setGoodsId', this.info.pintuan_id); - this.$u.route({ - url: 'pageB/sdetails/index', - }) + // this.$u.api.getPinTuanDetails({ + // pintuan_id: this.info.pintuan_id, + // }).then(res => { + // if(res.errCode == 0) { + // const goods = { + // goods: res.data.data, + // type: 2, + // } + // this.$store.commit('setGoodsDetails', goods); + // this.$store.commit('setGoodsId', this.info.pintuan_id); + // this.$u.route({ + // url: 'pageB/sdetails/index', + // }) + // } + // }) + this.$u.route({ + url: 'pageB/sdetails/index', + params: { + id: this.info.pintuan_id, + type: 2, } }) } diff --git a/components/shop/list/index.vue b/components/shop/list/index.vue index 89cdc9c..9a0d72f 100644 --- a/components/shop/list/index.vue +++ b/components/shop/list/index.vue @@ -1,25 +1,21 @@ \ No newline at end of file diff --git a/pageB/components/sdetails/guige.vue b/pageB/components/sdetails/guige.vue index 59a695b..7ba8a6e 100644 --- a/pageB/components/sdetails/guige.vue +++ b/pageB/components/sdetails/guige.vue @@ -50,7 +50,7 @@ export default { name:"guige", data(){ return { - select:0 + select: 0 } }, props:['item','title'], diff --git a/pageB/components/sdetails/tloos.vue b/pageB/components/sdetails/tloos.vue index 8039406..d1e37bd 100644 --- a/pageB/components/sdetails/tloos.vue +++ b/pageB/components/sdetails/tloos.vue @@ -1,6 +1,7 @@