1
This commit is contained in:
@@ -21,6 +21,7 @@ const AdminPaymentConfig: React.FC = () => {
|
||||
const map: Record<string, string> = {};
|
||||
data.forEach((c: any) => { map[c.key] = c.value; });
|
||||
form.setFieldsValue({
|
||||
wechat_appid: map['payment_wechat_appid'] || '',
|
||||
wechat_mch_id: map['payment_wechat_mch_id'] || '',
|
||||
wechat_private_key: map['payment_wechat_private_key'] || '',
|
||||
wechat_cert_serial_no: map['payment_wechat_cert_serial_no'] || '',
|
||||
@@ -52,6 +53,7 @@ const AdminPaymentConfig: React.FC = () => {
|
||||
await batchUpdatePaymentConfigs({
|
||||
payment_mock: String(mockMode),
|
||||
payment_wechat_enabled: String(wechatEnabled),
|
||||
payment_wechat_appid: values.wechat_appid || '',
|
||||
payment_wechat_mch_id: values.wechat_mch_id || '',
|
||||
payment_wechat_private_key: values.wechat_private_key || '',
|
||||
payment_wechat_cert_serial_no: values.wechat_cert_serial_no || '',
|
||||
@@ -151,6 +153,9 @@ const AdminPaymentConfig: React.FC = () => {
|
||||
</div>
|
||||
|
||||
<Form form={form} layout="vertical">
|
||||
<Form.Item name="wechat_appid" label="AppID">
|
||||
<Input placeholder="微信支付 AppID" size="large" disabled={!wechatEnabled} />
|
||||
</Form.Item>
|
||||
<Form.Item name="wechat_mch_id" label="商户号 (MchID)">
|
||||
<Input placeholder="微信支付商户号" size="large" disabled={!wechatEnabled} />
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user