comment 7.2

This commit is contained in:
2020-07-24 19:48:57 +08:00
parent 4196f545fd
commit dd71a0f32a
23 changed files with 1630 additions and 350 deletions

View File

@@ -42,37 +42,51 @@ export default {
methods: {
spikeGoods() {
// console.log(this.item.groupbuy_id);
this.$u.api.getSpikeInfo({
groupbuy_id: this.item.groupbuy_id
}).then(res => {
if(res.errCode == 0) {
const goods = {
goods: res.data.goodsInfo,
type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
}
this.$store.commit('setGoodsDetails', goods);
this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
this.$store.commit('setGoodsId', this.item.groupbuy_id);
this.$u.route({
url: 'pageB/sdetails/index',
})
// this.$u.api.getSpikeInfo({
// groupbuy_id: this.item.groupbuy_id
// }).then(res => {
// if(res.errCode == 0) {
// const goods = {
// goods: res.data.goodsInfo,
// type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
// }
// this.$store.commit('setGoodsDetails', goods);
// this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
// this.$store.commit('setGoodsId', this.item.groupbuy_id);
// this.$u.route({
// url: 'pageB/sdetails/index',
// })
// }
// })
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: this.item.groupbuy_id,
type: 3,
}
})
},
toDetailsPage() {
this.$u.api.getPinTuanDetails({
pintuan_id: this.item.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.item.pintuan_id);
this.$u.route({
url: 'pageB/sdetails/index',
})
// this.$u.api.getPinTuanDetails({
// pintuan_id: this.item.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.item.pintuan_id);
// this.$u.route({
// url: 'pageB/sdetails/index',
// })
// }
// })
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: this.item.pintuan_id,
type: 2,
}
})
}