修复订单结算私域引流弹窗问题,修复后付费模式下确认订单显示问题
This commit is contained in:
@@ -61,7 +61,9 @@
|
||||
:shopInfo="shopInfo"
|
||||
idKey="product_id"
|
||||
></goodsPrice>
|
||||
<view class="old-price" v-if="showLimitDiscount(item)">¥{{ item.salePrice }}</view>
|
||||
<view class="old-price" v-if="showLimitDiscount(item)"
|
||||
>¥{{ item.salePrice }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="num">x{{ item.num }}</view>
|
||||
</view>
|
||||
@@ -110,16 +112,24 @@ const shopUserInfo = inject("shopUserInfo");
|
||||
const shopInfo = inject("shopInfo");
|
||||
|
||||
function showLimitDiscount(item) {
|
||||
if (!props.limitDiscount || !props.limitDiscount.id) {
|
||||
return false;
|
||||
if (
|
||||
(item.is_time_discount || item.isTimeDiscount) &&
|
||||
props.limitDiscount &&
|
||||
props.limitDiscount.id
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return orderUtils.canUseLimitTimeDiscount(
|
||||
item,
|
||||
props.limitDiscount,
|
||||
shopInfo.value,
|
||||
shopUserInfo.value,
|
||||
"productId"
|
||||
);
|
||||
return false;
|
||||
// if (!props.limitDiscount || !props.limitDiscount.id) {
|
||||
// return false;
|
||||
// }
|
||||
// return orderUtils.canUseLimitTimeDiscount(
|
||||
// item,
|
||||
// props.limitDiscount,
|
||||
// shopInfo.value,
|
||||
// shopUserInfo.value,
|
||||
// "productId"
|
||||
// );
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log("props.nowCarts");
|
||||
@@ -542,4 +552,4 @@ const showOldPrice = computed(() => {});
|
||||
text-decoration: line-through;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -158,7 +158,10 @@
|
||||
"
|
||||
>
|
||||
<view class="u-m-t-40 u-p-l-20 u-p-r-20">
|
||||
<view class="youhui-item" v-if="cartStore.orderCostSummary.fullReduction.actualAmount">
|
||||
<view
|
||||
class="youhui-item"
|
||||
v-if="cartStore.orderCostSummary.fullReduction.actualAmount"
|
||||
>
|
||||
<view class="u-flex align-center">
|
||||
<image
|
||||
src="/static/icon/coup.png"
|
||||
@@ -169,10 +172,15 @@
|
||||
</view>
|
||||
|
||||
<view class="red font-12 u-flex align-center"
|
||||
>-¥{{ cartStore.orderCostSummary.fullReduction.actualAmount }}</view
|
||||
>-¥{{
|
||||
cartStore.orderCostSummary.fullReduction.actualAmount
|
||||
}}</view
|
||||
>
|
||||
</view>
|
||||
<view class="youhui-item" v-if="cartStore.orderCostSummary.vipDiscountAmount">
|
||||
<view
|
||||
class="youhui-item"
|
||||
v-if="cartStore.orderCostSummary.vipDiscountAmount"
|
||||
>
|
||||
<view class="u-flex align-center">
|
||||
<image
|
||||
src="/static/icon/newUserDiscount.png"
|
||||
@@ -685,17 +693,17 @@ async function getMaxPointsDiscount() {
|
||||
res.equivalentPoints || 0,
|
||||
res.maxDeductionAmount || 0
|
||||
);
|
||||
}
|
||||
Object.assign(pointsRes, res);
|
||||
maxPointDiscount.value = res.maxDeductionAmount || 0;
|
||||
console.log("积分可抵扣最大金额", maxPointDiscount.value);
|
||||
Object.assign(pointsRes, res);
|
||||
maxPointDiscount.value = res.maxDeductionAmount || 0;
|
||||
console.log("积分可抵扣最大金额", maxPointDiscount.value);
|
||||
|
||||
if (usePoints.value && res.usable) {
|
||||
console.log("积分抵扣金额", res.maxDeductionAmount);
|
||||
cartStore.setUserPoints(res.maxUsablePoints || 0);
|
||||
}
|
||||
if (!res.usable) {
|
||||
cartStore.setUserPoints(0);
|
||||
if (usePoints.value && res.usable) {
|
||||
console.log("积分抵扣金额", res.maxDeductionAmount);
|
||||
cartStore.setUserPoints(res.maxUsablePoints || 0);
|
||||
}
|
||||
if (!res.usable) {
|
||||
cartStore.setUserPoints(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
watch(
|
||||
@@ -852,8 +860,13 @@ function calcDiscountActivity() {
|
||||
const res = discountActivityRes.value;
|
||||
const user = uni.cache.get("shopUserInfo");
|
||||
|
||||
const usedFullReductionActivityFullAmount=cartStore.orderCostSummary.fullReduction.usedFullReductionActivityFullAmount;
|
||||
console.log("usedFullReductionActivityFullAmount", usedFullReductionActivityFullAmount);
|
||||
const usedFullReductionActivityFullAmount =
|
||||
cartStore.orderCostSummary.fullReduction
|
||||
.usedFullReductionActivityFullAmount;
|
||||
console.log(
|
||||
"usedFullReductionActivityFullAmount",
|
||||
usedFullReductionActivityFullAmount
|
||||
);
|
||||
|
||||
if (res && res.thresholds && res.thresholds.length > 0) {
|
||||
const canUseThresholds = res.thresholds
|
||||
@@ -874,8 +887,6 @@ function calcDiscountActivity() {
|
||||
return;
|
||||
}
|
||||
console.log("当前满减门槛", discountActivity.value);
|
||||
|
||||
|
||||
}
|
||||
async function getDiscountActivity() {
|
||||
const res = await discountActivityApi.config({
|
||||
@@ -1593,4 +1604,4 @@ onMounted(async () => {
|
||||
z-index: 9;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user