fix: some
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Failing after 11m29s

This commit is contained in:
luo
2026-09-20 11:37:47 +08:00
parent a6ce24f2f2
commit 94764b0e0a
5 changed files with 51 additions and 50 deletions

View File

@@ -40,8 +40,7 @@ export interface H5PopupConfiguration {
starts_at: string // 生效开始时间(ISO 8601)
ends_at: string // 生效结束时间(ISO 8601)
version: number // 配置版本,每次更新递增;版本参与频率去重,旧版本通知保留原快照
creator: number // 创建人账号ID
updater: number // 最近更新人账号ID
creator_name: string // 创建人名称
created_at: string // 创建时间(ISO 8601)
updated_at: string // 最近更新时间(ISO 8601);启停同样刷新该时间
}

View File

@@ -307,6 +307,7 @@ export function buildPaymentCredentials(
): PaymentCredentialValidationResult {
const spec = getPaymentCredentialFieldSpec(providerType)
const allowedKeys = [...spec.required, ...spec.optional]
const optionalKeys = new Set(spec.optional)
const credentials: Record<string, PaymentCredentialValue> = {}
for (const entry of entries) {
@@ -318,6 +319,7 @@ export function buildPaymentCredentials(
return { credentials: null, error: `凭证字段 ${key} 不属于当前服务商支持的字段` }
}
if (!entry.value) {
if (optionalKeys.has(key)) continue
return { credentials: null, error: `请填写凭证字段 ${key} 的值` }
}
if (Object.prototype.hasOwnProperty.call(credentials, key)) {