feat:去掉优惠券判断

This commit is contained in:
2026-07-09 14:09:28 +08:00
parent 7a55d303da
commit b95d54001f
2 changed files with 5 additions and 23 deletions
@@ -61,7 +61,7 @@
<view class="content_right_total">
<view>¥<text style="font-size: 36rpx">{{
pItem.totalPrice
}}</text></view>
}}</text></view>
<view>每件到手价¥{{ pItem.unitPrice }}</view>
</view>
<view class="shopping_info_quantity">
@@ -85,7 +85,7 @@
<view class="content_right_total">
<view>¥<text style="font-size: 36rpx">{{
pItem.totalPrice
}}</text></view>
}}</text></view>
<view>每件到手价¥{{ pItem.unitPrice }}</view>
</view>
<view class="shopping_info_quantity">
@@ -109,7 +109,7 @@
<view class="order_freight_item">
<view>运费<text style="color: #c0c3c6; margin-left: 20rpx">{{
getValue(PRODUCT_DELIVERY_TIME, addItem.deliveryTime)
}}</text></view>
}}</text></view>
<view class="value_">
{{ orderInfo.postage ? "¥" + orderInfo.postage : "包邮" }}
</view>
@@ -583,7 +583,7 @@ export default {
const params = {
id: this.sed.id,
};
if(this.isCoupon){
if (this.isCoupon) {
params.type = -1;
}
const resp = await getGoodsDetail(params);
@@ -592,7 +592,7 @@ export default {
this.isPoints = data.type == 3 ? 1 : 0;
this.orderInfo = {
address: null,
amount: this.sed.goodsNum * this.sed.specsId.price,
amount: this.sed.goodsNum * this.sed.specsId.price,
postage: 0,
shops: [
{
@@ -815,13 +815,6 @@ export default {
console.log("orderInfo----", arr);
if (arr.length) {
if (this.isCoupon) {
if (this.buyCouponvalue > this.couponData.balance) {
this.$refs.uToastRef.show({
type: "error",
message: "您当前优惠券金额不足",
});
return;
}
this.show = true;
} else if (arr[0].type == "balance" || arr[0].type == "redpacket") {
this.show = true;
@@ -1063,18 +1063,7 @@ export default {
console.log("selectTempl", selectTempl);
if (this.isShowCart == 1 || this.isCoupon) {
params["specsId"] = selectTempl;
console.log("----------", params, this.isCoupon, this.orderInfo.buyDeductionValue, this.orderInfo.quantity, this.curAmount);
const buyCouponvalue = Number((this.orderInfo.buyDeductionValue * (this.orderInfo.quantity || 1)).toFixed(2)) || 0;
if (this.isCoupon && buyCouponvalue > this.curAmount) {
uni.showToast({
title: `您当前优惠券金额不足`,
icon: "none", // 可选 success/loading/none
duration: 2000, // 持续时长,单位ms
});
return;
}
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(
params