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 @@