fix: 修改订单计算逻辑

This commit is contained in:
2025-09-19 18:32:25 +08:00
parent 37f1079b1f
commit f76dff67d4
20 changed files with 1800 additions and 701 deletions

View File

@@ -161,6 +161,7 @@ const testBackendCoupons: BackendCoupon[] = [
{
id: 1,
title: "满减券",
status: 1,
couponType: 1,
fullAmount: 2,
discountAmount: 1,
@@ -172,6 +173,9 @@ const testBackendCoupons: BackendCoupon[] = [
validEndTime: '2025-09-30 16:00:00',
useDays: '周一,周二,周三,周四,周五',
useTimeType: 'all',
shopId: 101,
createTime: '2025-09-16 13:30:50',
validDays: 2
},
];
const testOrderConfig = {
@@ -192,7 +196,7 @@ const testOrderConfig = {
additionalFee: 0,
};
const testActivities: ActivityConfig[] = [];
const testCurrentTime = new Date("2024-06-01 12:00:00");
const testCurrentTime = new Date();
// 调用函数(此时类型完全匹配)
const result = OrderPriceCalculator.calculateOrderCostSummary(