rewrite tab swiper 8.7
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
||||
<view class="num">
|
||||
<text>购买数量</text>
|
||||
<u-number-box v-model="goodsNumber" @change="valChange"></u-number-box>
|
||||
<u-number-box v-model="goodsNumber"></u-number-box>
|
||||
</view>
|
||||
<view style="height:100rpx"></view>
|
||||
</view>
|
||||
@@ -230,7 +230,6 @@ export default {
|
||||
// this.type = Number(option.type);
|
||||
// this.type = 1;
|
||||
this.id = option.id;
|
||||
this.setTitle();
|
||||
// 先请求普通商品详情获取商品类型再渲染页面
|
||||
this.ordinaryDetails(this.id);
|
||||
},
|
||||
@@ -299,9 +298,9 @@ export default {
|
||||
},
|
||||
getGoodsDetails(id) {
|
||||
switch (this.type) {
|
||||
// case 1:
|
||||
// this.ordinaryDetails(id);
|
||||
// break;
|
||||
case 1:
|
||||
this.ordinaryDetails(id);
|
||||
break;
|
||||
case 2:
|
||||
this.pinTuanDetails(id);
|
||||
break;
|
||||
@@ -322,7 +321,16 @@ export default {
|
||||
this.setSwiperList(res.data.goods_image);
|
||||
this.glist = res.data.spec_list;
|
||||
this.type = res.data.view_type;
|
||||
this.getGoodsDetails(this.type);
|
||||
this.setTitle();
|
||||
if(this.type == 1) {
|
||||
this.id = res.data.goods.goods_id;
|
||||
} else if(this.type == 2) {
|
||||
this.id = res.data.goods.pintuan_id;
|
||||
this.getGoodsDetails(this.id);
|
||||
} else if(this.type == 3) {
|
||||
this.id = res.data.goods.groupbuy_id;
|
||||
this.getGoodsDetails(this.id);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -338,7 +346,7 @@ export default {
|
||||
this.glist = res.data.data.spec_list;
|
||||
this.user_suc = res.data.data.user_suc;
|
||||
this.groupUser =res.data.data.user;
|
||||
console.log(this.groupUser);
|
||||
// console.log(this.groupUser);
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -348,6 +356,7 @@ export default {
|
||||
groupbuy_id: id
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.id = res.data.groupbuy_id;
|
||||
this.groupbuyInfo = res.data.groupbuyInfo;
|
||||
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
||||
this.goodsInfo = res.data.goodsInfo.goods;
|
||||
@@ -361,7 +370,7 @@ export default {
|
||||
this.$u.route({
|
||||
url: '/pageB/triedDress/index',
|
||||
params: {
|
||||
id: this.id,
|
||||
id: this.goodsInfo.goods_id,
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -412,9 +421,6 @@ export default {
|
||||
this.showInvolvementUser = true;
|
||||
// console.log(this.involvemenGroupInfo);
|
||||
},
|
||||
valChange(e) {
|
||||
// console.log(this.value)
|
||||
},
|
||||
self(){
|
||||
// console.log(this.$refs.guige)
|
||||
let index = 0;
|
||||
@@ -490,7 +496,7 @@ export default {
|
||||
}
|
||||
},
|
||||
addFavoriteGoods() {
|
||||
this.$u.api.addFavoriteGoods({ fid: this.id }).then(res => {
|
||||
this.$u.api.addFavoriteGoods({ fid: this.goodsInfo.goods_id }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.getGoodsDetails(this.id);
|
||||
} else {
|
||||
@@ -499,7 +505,7 @@ export default {
|
||||
})
|
||||
},
|
||||
removeFavorite() {
|
||||
this.$u.api.removeFavorite({ fid: this.id, type: 'goods' }).then(res => {
|
||||
this.$u.api.removeFavorite({ fid: this.goodsInfo.goods_id, type: 'goods' }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.getGoodsDetails(this.id);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user