From 94764b0e0a950fb841fd6c1e88578af34461f24c Mon Sep 17 00:00:00 2001 From: luo Date: Sun, 20 Sep 2026 11:37:47 +0800 Subject: [PATCH] fix: some --- src/types/api/h5PopupConfiguration.ts | 3 +- src/types/api/paymentMerchantPools.ts | 2 + .../h5-popup-configuration/detail.vue | 3 +- .../settings/h5-popup-configuration/index.vue | 15 +--- .../components/MerchantManagement.vue | 78 ++++++++++--------- 5 files changed, 51 insertions(+), 50 deletions(-) diff --git a/src/types/api/h5PopupConfiguration.ts b/src/types/api/h5PopupConfiguration.ts index 4fca182..2995d1a 100644 --- a/src/types/api/h5PopupConfiguration.ts +++ b/src/types/api/h5PopupConfiguration.ts @@ -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);启停同样刷新该时间 } diff --git a/src/types/api/paymentMerchantPools.ts b/src/types/api/paymentMerchantPools.ts index f13013a..5ac9351 100644 --- a/src/types/api/paymentMerchantPools.ts +++ b/src/types/api/paymentMerchantPools.ts @@ -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 = {} 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)) { diff --git a/src/views/settings/h5-popup-configuration/detail.vue b/src/views/settings/h5-popup-configuration/detail.vue index a086922..70c5af6 100644 --- a/src/views/settings/h5-popup-configuration/detail.vue +++ b/src/views/settings/h5-popup-configuration/detail.vue @@ -153,13 +153,12 @@ formatList(data.card_types, (value) => cardTypeNames[value] || value), fullWidth: true }, - { label: '创建人', prop: 'creator' }, + { label: '创建人', prop: 'creator_name' }, { label: '创建时间', formatter: (_value: unknown, data: H5PopupConfiguration) => formatDateTime(data.created_at) }, - { label: '最近更新人', prop: 'updater' }, { label: '最近更新时间', formatter: (_value: unknown, data: H5PopupConfiguration) => diff --git a/src/views/settings/h5-popup-configuration/index.vue b/src/views/settings/h5-popup-configuration/index.vue index 1146c6b..76eb2bf 100644 --- a/src/views/settings/h5-popup-configuration/index.vue +++ b/src/views/settings/h5-popup-configuration/index.vue @@ -303,8 +303,7 @@ { label: '受控动作', prop: 'action_type' }, { label: '生效时间', prop: 'effective_time' }, { label: '版本', prop: 'version' }, - { label: '创建人', prop: 'creator' }, - { label: '最近更新人', prop: 'updater' }, + { label: '创建人', prop: 'creator_name' }, { label: '最近更新时间', prop: 'updated_at' } ] @@ -408,16 +407,10 @@ }, { prop: 'version', label: '版本', width: 70 }, { - prop: 'creator', + prop: 'creator_name', label: '创建人', - width: 90, - formatter: (row: H5PopupConfiguration) => String(row.creator || 0) - }, - { - prop: 'updater', - label: '最近更新人', - width: 110, - formatter: (row: H5PopupConfiguration) => String(row.updater || 0) + width: 120, + formatter: (row: H5PopupConfiguration) => row.creator_name || '-' }, { prop: 'updated_at', diff --git a/src/views/settings/payment-merchant-pools/components/MerchantManagement.vue b/src/views/settings/payment-merchant-pools/components/MerchantManagement.vue index 0bb52d0..5edc6b6 100644 --- a/src/views/settings/payment-merchant-pools/components/MerchantManagement.vue +++ b/src/views/settings/payment-merchant-pools/components/MerchantManagement.vue @@ -72,6 +72,7 @@ v-model="form.provider_type" :disabled="formMode === 'edit'" style="width: 100%" + @change="handleProviderTypeChange" > 写入支付凭证
- 必填字段:{{ credentialFieldSpec.required.join('、') || '-' }} + 字段名已按所选服务商预置,请填写对应的凭证值。必填字段:{{ + credentialFieldSpec.required.join('、') || '-' + }}
-
+
+ > + +