This commit is contained in:
@fawn-nine
2024-09-27 17:04:35 +08:00
parent eedeb5c37f
commit 806c08174f
10 changed files with 107 additions and 54 deletions

View File

@@ -52,7 +52,7 @@
商品总价
<text>{{totalPrice}}</text>
</view>
<view class="yq_youhui" @click="youhuiShow = true">
<!-- <view class="yq_youhui" @click="youhuiShow = true">
<u-icon name="red-packet-fill" color="#e74141" size="18" class="yqLeft"></u-icon>
优惠券
<u-icon name="arrow-right" color="#aaa" size="18" class="yqRight"></u-icon>
@@ -60,7 +60,7 @@
<text class="dagnqian" v-else style="background-color: #999;">暂无优惠券</text>
<text class="dagnqian" v-if="youhuiContent.id!=undefined">
- {{youhuiContent.coupons.couponAmount}}</text>
</view>
</view> -->
<view class="yq_yunfei">
<u-icon name="car-fill" color="#e0880c" size="18" class="yqLeft"></u-icon>
运费
@@ -411,6 +411,8 @@
'&type=0')
.then(res => {
this.youhuiList = res.userCoupons
}).catch( e => {
console.log('获取优惠券报错',);
});
},
@@ -433,7 +435,7 @@
}
prodCont.weight = res.shopProduct.weight
this.cartList.push(prodCont)
this.getCourpe()
// this.getCourpe()
this.getUserAddress()
//this.getYunFei()
// this.getYunFei()
@@ -450,7 +452,7 @@
this.cartList.push(res.cartList[this.cartIDNum[i]])
}
console.log(this.cartList, '购物车列表')
this.getCourpe()
// this.getCourpe()
this.getUserAddress()
})
@@ -505,11 +507,11 @@
allprice += price
})
this.totalPrice = allprice
if (this.youhuiContent.id != undefined) {
this.realPrice = this.totalPrice - this.youhuiContent.coupons.couponAmount
} else {
this.realPrice = this.totalPrice
}
// if (this.youhuiContent.id != undefined) {
// this.realPrice = this.totalPrice - this.youhuiContent.coupons.couponAmount
// } else {
this.realPrice = this.totalPrice
// }
this.realPrice = this.realPrice + this.farePrice
},
// 超出阈值时
@@ -528,7 +530,7 @@
this.updateCart(productItem)
this.$nextTick(() => {
this.getYunFei()
this.getCourpe()
// this.getCourpe()
})
},