Browse Source

用户选择不同规格,商品详情页上的价格应根据规格进行变化输入图片说明

zyh
Gao xiaosong 4 years ago
parent
commit
bc02f4d844
  1. 9
      pages/shop/GoodsCon/index.vue

9
pages/shop/GoodsCon/index.vue

@ -9,8 +9,8 @@
<view class="share acea-row row-between row-bottom"> <view class="share acea-row row-between row-bottom">
<view class="money font-color-red"> <view class="money font-color-red">
<text></text> <text></text>
<text class="num">{{ storeInfo.price }}</text> <text class="num">{{ attr.productSelect.price || storeInfo.price }}</text>
<text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">{{ storeInfo.vipPrice }}</text> <text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">{{ attr.productSelect.vipPrice || storeInfo.vipPrice }}</text>
<image src="@/static/images/vip.png" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" /> <image src="@/static/images/vip.png" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" />
</view> </view>
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
@ -312,7 +312,7 @@
let url = handleQrCode(); let url = handleQrCode();
if (!url) { if (!url) {
url = handleUrlParam(getCurrentPageUrlWithArgs()) url = handleUrlParam(getCurrentPageUrlWithArgs())
} }
this.coupons(); this.coupons();
if (url && url.id) { if (url && url.id) {
this.id = url.id; this.id = url.id;
@ -593,7 +593,7 @@
page: 1, page: 1,
limit: 20, limit: 20,
}; };
getCoupon(q).then((res) => { getCoupon(q).then((res) => {
that.$set(that, "couponList", res.data || []); that.$set(that, "couponList", res.data || []);
that.$set(that.coupon, "list", res.data); that.$set(that.coupon, "list", res.data);
@ -615,6 +615,7 @@
// //
let productSelect = this.productValue[res.value]; let productSelect = this.productValue[res.value];
console.log(productSelect)
if (productSelect) { if (productSelect) {
this.attr.productAttr[res.indexw].index = res.indexn; this.attr.productAttr[res.indexw].index = res.indexn;
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);

Loading…
Cancel
Save