修复限时折扣会员价下单
This commit is contained in:
@@ -76,7 +76,7 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
is_temporary: !!item.is_temporary,
|
||||
is_gift: !!item.is_gift,
|
||||
returnNum: item.returnNum || 0,
|
||||
memberPrice: item.is_time_discount == 1 ? item.limitDiscountPrice : (item.memberPrice || 0),
|
||||
memberPrice: item.memberPrice,
|
||||
discountSaleAmount: item.discount_sale_amount || 0,
|
||||
packFee: item.packFee || 0,
|
||||
packNumber: item.pack_number || 0,
|
||||
@@ -115,12 +115,16 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
// ------------------------------ 2. Store 内部原有响应式变量 ------------------------------
|
||||
// 选择用户
|
||||
const vipUser = ref<{ id?: string | number, isVip?: boolean }>({});
|
||||
function changeUser(user: any) {
|
||||
async function changeUser(user: any) {
|
||||
vipUser.value = {
|
||||
...user,
|
||||
isMemberPrice: shopUser.userInfo.isMemberPrice
|
||||
};
|
||||
getGoods({})
|
||||
await getGoods({})
|
||||
allGoods.value = getAllGoodsList()
|
||||
|
||||
console.log('选择用户后刷新所有订单购物车数据====', allGoods.value);
|
||||
|
||||
payParamsInit()
|
||||
}
|
||||
|
||||
@@ -392,12 +396,9 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
coupons.value = cps;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 优惠券列表
|
||||
const coupons = ref<BackendCoupon[]>([]);
|
||||
|
||||
|
||||
// 商品加入购物车顺序
|
||||
const cartOrder = ref<Record<string, number>>({});
|
||||
let allGoods = ref<BaseCartItem[]>([]);
|
||||
@@ -420,7 +421,6 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
return costSummary;
|
||||
});
|
||||
|
||||
|
||||
// 赠菜总价(调用内部的 getAllGoodsList)
|
||||
const giftMoney = computed(() => {
|
||||
const allGoods = getAllGoodsList();
|
||||
|
||||
Reference in New Issue
Block a user