fix: 优惠券修改

This commit is contained in:
2025-09-28 13:26:39 +08:00
parent a82f116918
commit 0df2d7198f
6 changed files with 376 additions and 277 deletions

View File

@@ -269,7 +269,7 @@ export function convertBackendCouponToToolCoupon(
currentTime: Date = new Date()
): Coupon | null {
// 1. 基础校验必选字段缺失直接返回null
if (!backendCoupon.id || backendCoupon.couponType === undefined || !backendCoupon.title) {
if (!backendCoupon.id || backendCoupon.type === undefined || !backendCoupon.title) {
console.warn('优惠券必选字段缺失', backendCoupon);
return null;
}