fix: 修改订单计算逻辑

This commit is contained in:
2025-09-19 18:32:44 +08:00
parent f76dff67d4
commit 4934f20446
5 changed files with 343 additions and 239 deletions

View File

@@ -231,9 +231,13 @@ export const useCartsStore = defineStore("carts", () => {
return [];
});
const coupons = ref<BackendCoupon[]>([]);
function setCoupons(cps: BackendCoupon[]) {
coupons.value = cps;
}
// 优惠券列表
const backendCoupons = computed<BackendCoupon[]>(() => {
return [];
return coupons.value;
});
// 商品加入购物车顺序
@@ -759,7 +763,8 @@ export const useCartsStore = defineStore("carts", () => {
clearMerchantReduction,
seatFeeConfig,
pointDeductionRule,
userPoints
userPoints,
setCoupons
};
});