代客下单修改,问题修复

This commit is contained in:
2025-11-18 14:55:26 +08:00
parent 67ec915181
commit 93273b796f
17 changed files with 174 additions and 117 deletions

View File

@@ -29,6 +29,9 @@ export function canUseLimitTimeDiscount(
) {
shopInfo = shopInfo || {};
shopUserInfo = shopUserInfo || {};
if(shopInfo.isMemberPrice){
shopUserInfo.isMemberPrice=1
}
if (!limitTimeDiscountRes || !limitTimeDiscountRes.id) {
return false;
}
@@ -45,17 +48,15 @@ export function canUseLimitTimeDiscount(
return true;
}
if (limitTimeDiscountRes.discountPriority == "vip-price") {
if (shopUserInfo.isVip != 1 || shopUserInfo.isMemberPrice != 1) {
return true;
}
if (
shopUserInfo.isVip == 1 &&
shopUserInfo.isMemberPrice == 1 &&
goods.memberPrice * 1 <= 0
goods.memberPrice * 1 > 0
) {
return true;
return false;
}
return true;
}
return false;
@@ -138,7 +139,6 @@ export function returnPrice(args: returnPriceArgs) {
return memberPrice;
}
} else {
// console.log('不是会员或者没有启用会员价',goods,limitTimeDiscountRes);
//不是会员或者没有启用会员价
if (limitTimeDiscountRes && limitTimeDiscountRes.id && includesGoods) {
const price = returnLimitPrice({