order 7.22
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="item">
|
||||
<view class="item" @click="spikeGoods">
|
||||
<image class="head" :src="item.groupbuy_image1"></image>
|
||||
<text class="title u-line-2">{{ item.goods_name }}</text>
|
||||
<view class="price">
|
||||
<text>¥{{ item.groupbuy_price }}</text>
|
||||
<text>¥{{ item.goods_price }}</text>
|
||||
<text class="origin">¥{{ item.goods_price }}</text>
|
||||
</view>
|
||||
<view class="info">
|
||||
<text>剩余{{ item.inventory | formatValue }}件</text>
|
||||
@@ -22,6 +22,27 @@ export default {
|
||||
if(temp > 999) temp = '999+';
|
||||
return temp;
|
||||
}
|
||||
},
|
||||
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',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -36,12 +36,12 @@ export default {
|
||||
type: String,
|
||||
},
|
||||
created() {
|
||||
console.log(this.item);
|
||||
console.log(this.type);
|
||||
// console.log(this.item);
|
||||
// console.log(this.type);
|
||||
},
|
||||
methods: {
|
||||
spikeGoods() {
|
||||
console.log(this.item.groupbuy_id);
|
||||
// console.log(this.item.groupbuy_id);
|
||||
this.$u.api.getSpikeInfo({
|
||||
groupbuy_id: this.item.groupbuy_id
|
||||
}).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user