merge: 同步 origin/ui-optimization(d224d5b6),保留 weiyuan 功能与 Semi 迁移
- 冲突以 weiyuan 功能(小程序登录、i18n 文案)为准,并保留远端 lint 重构与依赖收敛 - 删除 weiyuan 已移除、远端仅做 lint 修正的 3 个图片相关文件 - 适配远端零警告 ESLint:Monitoring/Subscription 改用 useEffectEvent,EditChannelModal 注明 t 依赖 - effect-events 单测补充 react-i18next mock - 对合并后仍不符合 Prettier 的文件做纯格式化
This commit is contained in:
@@ -17,13 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Form,
|
||||
Button,
|
||||
Typography,
|
||||
Space,
|
||||
Divider,
|
||||
} from '@/components/ui';
|
||||
import { Form, Button, Typography, Space, Divider } from '@/components/ui';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -136,7 +130,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
href='https://pay.weixin.qq.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>{t('微信支付商户平台')}</a>{' '}
|
||||
>
|
||||
{t('微信支付商户平台')}
|
||||
</a>{' '}
|
||||
{t('获取相关配置信息。')}
|
||||
</Text>
|
||||
|
||||
@@ -227,7 +223,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
placeholder={
|
||||
options.WechatPrivateKey === '***ALREADY_SET***'
|
||||
? t('已设置(留空不修改,填写新内容则更新)')
|
||||
: t('请粘贴完整的 PEM 格式私钥内容(包含 -----BEGIN PRIVATE KEY----- 等)')
|
||||
: t(
|
||||
'请粘贴完整的 PEM 格式私钥内容(包含 -----BEGIN PRIVATE KEY----- 等)',
|
||||
)
|
||||
}
|
||||
rows={6}
|
||||
extraText={
|
||||
@@ -239,7 +237,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
|
||||
<Divider margin='12px' />
|
||||
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>{t('公钥模式(2024年新商户必选)')}</Title>
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>
|
||||
{t('公钥模式(2024年新商户必选)')}
|
||||
</Title>
|
||||
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>
|
||||
{t(
|
||||
'2024年后注册的微信支付商户默认使用公钥模式。如果初始化失败提示"无可用的平台证书",请从商户平台下载微信支付公钥并启用此模式。',
|
||||
@@ -256,7 +256,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
field='WechatPublicKeyID'
|
||||
label={t('微信支付公钥 ID')}
|
||||
placeholder='PUB_KEY_ID_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
extraText={t('从商户平台【API安全】→【微信支付公钥】获取,格式如 PUB_KEY_ID_xxx')}
|
||||
extraText={t(
|
||||
'从商户平台【API安全】→【微信支付公钥】获取,格式如 PUB_KEY_ID_xxx',
|
||||
)}
|
||||
/>
|
||||
|
||||
<Form.TextArea
|
||||
@@ -265,7 +267,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
placeholder={
|
||||
options.WechatPublicKeyPEM === '***ALREADY_SET***'
|
||||
? t('已设置(留空不修改,填写新内容则更新)')
|
||||
: t('请粘贴完整的微信支付公钥 PEM 内容(包含 -----BEGIN PUBLIC KEY----- 等)')
|
||||
: t(
|
||||
'请粘贴完整的微信支付公钥 PEM 内容(包含 -----BEGIN PUBLIC KEY----- 等)',
|
||||
)
|
||||
}
|
||||
rows={6}
|
||||
extraText={
|
||||
@@ -277,13 +281,21 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
|
||||
<Divider margin='12px' />
|
||||
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>{t('高级配置:手动平台证书模式(可选)')}</Title>
|
||||
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>{t('默认情况下,SDK 会自动下载微信平台证书,无需手动配置。仅在离线环境或网络受限时启用此选项。')}</Text>
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>
|
||||
{t('高级配置:手动平台证书模式(可选)')}
|
||||
</Title>
|
||||
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>
|
||||
{t(
|
||||
'默认情况下,SDK 会自动下载微信平台证书,无需手动配置。仅在离线环境或网络受限时启用此选项。',
|
||||
)}
|
||||
</Text>
|
||||
|
||||
<Form.Switch
|
||||
field='WechatUseManualCert'
|
||||
label={t('启用手动证书模式')}
|
||||
extraText={t('开启后需要手动配置平台证书,关闭则使用自动下载模式(推荐)')}
|
||||
extraText={t(
|
||||
'开启后需要手动配置平台证书,关闭则使用自动下载模式(推荐)',
|
||||
)}
|
||||
/>
|
||||
|
||||
<Form.Input
|
||||
@@ -299,7 +311,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
placeholder={
|
||||
options.WechatPlatformCertPEM === '***ALREADY_SET***'
|
||||
? t('已设置(留空不修改,填写新内容则更新)')
|
||||
: t('请粘贴完整的平台证书 PEM 内容(包含 -----BEGIN CERTIFICATE----- 等)')
|
||||
: t(
|
||||
'请粘贴完整的平台证书 PEM 内容(包含 -----BEGIN CERTIFICATE----- 等)',
|
||||
)
|
||||
}
|
||||
rows={6}
|
||||
extraText={
|
||||
@@ -348,7 +362,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
/>
|
||||
|
||||
<Space style={{ marginTop: 20 }}>
|
||||
<Button type='primary' htmlType='submit' loading={loading}>{t('保存配置')}</Button>
|
||||
<Button type='primary' htmlType='submit' loading={loading}>
|
||||
{t('保存配置')}
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user