mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-11 23:25:33 +08:00
refactor(admin): 清理国际化元注释并润色二次验证文案
批量删除 // 国际化 元注释行,去掉中文注释前缀,二次验证相关表述改为人话。
This commit is contained in:
@@ -37,7 +37,7 @@ export const AuthApi = {
|
||||
return requestClient.post('/token/logout');
|
||||
},
|
||||
/**
|
||||
* 双因素认证二次验证(密码通过后凭预认证令牌 + 动态码完成登录)
|
||||
* 二次验证(密码通过后凭临时凭证 + 动态码完成登录)
|
||||
*/
|
||||
secondVerify(data: SecondVerifyParams): Promise<Result<string>> {
|
||||
return requestClient.post('/token/second-verify', data);
|
||||
@@ -103,10 +103,10 @@ export interface CaptchaDataResult {
|
||||
}
|
||||
|
||||
/**
|
||||
* 双因素认证二次验证参数
|
||||
* 二次验证参数
|
||||
*/
|
||||
export interface SecondVerifyParams {
|
||||
/** 预认证令牌 */
|
||||
/** 临时凭证 preAuthToken */
|
||||
preAuthToken: string;
|
||||
/** 动态码或备用验证码 */
|
||||
code: string;
|
||||
@@ -114,5 +114,5 @@ export interface SecondVerifyParams {
|
||||
codeType?: string;
|
||||
}
|
||||
|
||||
/** 需双因素二次验证的业务码(后端 TwoFactorRequiredException.CODE) */
|
||||
/** 需二次验证的业务码(后端 TwoFactorRequiredException.CODE) */
|
||||
export const TWO_FACTOR_REQUIRED_CODE = 40_101;
|
||||
|
||||
@@ -20,8 +20,8 @@ import { useAuthStore } from '#/store';
|
||||
|
||||
const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
|
||||
|
||||
// 需双因素二次验证的业务码(与后端 TwoFactorRequiredException.CODE 对齐)
|
||||
// 表示密码已通过但仍需二次验证, 不是真正错误; 应把响应体(含 preAuthToken)交给业务层
|
||||
// 需二次验证的业务码(与后端 TwoFactorRequiredException.CODE 对齐)
|
||||
// 密码已通过但仍需输动态码, 不是真正错误; 把响应体(含 preAuthToken)交给业务层
|
||||
const TWO_FACTOR_REQUIRED_CODE = 40_101;
|
||||
|
||||
function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
||||
@@ -76,7 +76,7 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
||||
}),
|
||||
);
|
||||
|
||||
// 双因素二次验证拦截器: code=40101 时不按错误处理, 返回 body 供业务层切换二次验证页
|
||||
// 40101: 密码已过但还要输动态码; 不弹失败, 把 body 交给业务层切二次验证页
|
||||
client.addResponseInterceptor({
|
||||
rejected: (error: any) => {
|
||||
const body = error?.response?.data;
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
*/
|
||||
const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
||||
if (file.size / 1024 > props.maxSize) {
|
||||
// 国际化:文件过大提示
|
||||
message.error(
|
||||
$t('components.upload.fileTooLarge', {
|
||||
name: file.name,
|
||||
@@ -86,11 +85,9 @@
|
||||
const result = await uploadImage(file, props.accessType);
|
||||
emit('update:modelValue', result.filename);
|
||||
emit('change', result.filename);
|
||||
// 国际化:上传成功提示
|
||||
message.success($t('components.upload.uploadSuccess', { name: file.name }));
|
||||
onSuccess?.(result);
|
||||
} catch (error: any) {
|
||||
// 国际化:上传失败提示
|
||||
message.error($t('components.upload.uploadFailed', { name: file.name }));
|
||||
onError?.(error);
|
||||
} finally {
|
||||
|
||||
@@ -67,9 +67,7 @@
|
||||
return;
|
||||
}
|
||||
confirm({
|
||||
// 国际化:再次确认删除
|
||||
title: $t('components.deleteConfirm.finalTitle'),
|
||||
// 国际化:最终确认文案
|
||||
content: $t('components.deleteConfirm.finalContent', { name: deleteConfirmState.name }),
|
||||
okText: $t('components.deleteConfirm.confirmDelete'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
if (typeof placeholder === 'string') {
|
||||
return [placeholder, placeholder];
|
||||
}
|
||||
// 国际化:时间范围占位符
|
||||
return [$t('components.query.startTime'), $t('components.query.endTime')];
|
||||
}
|
||||
|
||||
@@ -69,7 +68,6 @@
|
||||
rangeValue.value = val;
|
||||
}
|
||||
|
||||
// 国际化:日期范围快捷选项
|
||||
const dateRangeShortcuts = [
|
||||
{
|
||||
label: $t('components.query.today'),
|
||||
@@ -80,7 +78,6 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
// 国际化:昨天
|
||||
label: $t('components.query.yesterday'),
|
||||
value: () => {
|
||||
const yesterday = new Date();
|
||||
@@ -90,7 +87,6 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
// 国际化:近7天
|
||||
label: $t('components.query.last7Days'),
|
||||
value: () => {
|
||||
const end = new Date();
|
||||
@@ -100,7 +96,6 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
// 国际化:近30天
|
||||
label: $t('components.query.last30Days'),
|
||||
value: () => {
|
||||
const end = new Date();
|
||||
@@ -110,7 +105,6 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
// 国际化:本月
|
||||
label: $t('components.query.thisMonth'),
|
||||
value: () => {
|
||||
const now = new Date();
|
||||
@@ -120,7 +114,6 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
// 国际化:上月
|
||||
label: $t('components.query.lastMonth'),
|
||||
value: () => {
|
||||
const now = new Date();
|
||||
|
||||
@@ -49,7 +49,6 @@ export enum ProductEnum {
|
||||
*/
|
||||
export const productI18nMap: Record<string, string> = {
|
||||
[ProductEnum.ALIPAY_ISV]: 'payment.product.enum.alipayIsv',
|
||||
// 国际化:支付宝(直连)产品
|
||||
[ProductEnum.ALIPAY]: 'payment.product.enum.alipay',
|
||||
[ProductEnum.WECHAT_ISV]: 'payment.product.enum.wechatIsv',
|
||||
[ProductEnum.WECHAT_PAY]: 'payment.product.enum.wechatPay',
|
||||
@@ -64,13 +63,9 @@ export const productI18nMap: Record<string, string> = {
|
||||
[ProductEnum.LESHUA_PAY]: 'payment.product.enum.leshuaPay',
|
||||
[ProductEnum.ADA_PAY]: 'payment.product.enum.adaPay',
|
||||
[ProductEnum.DOUGONG_PAY]: 'payment.product.enum.dougongPay',
|
||||
// 国际化:海科融通支付产品
|
||||
[ProductEnum.HKRT_PAY]: 'payment.product.enum.hkrtPay',
|
||||
// 国际化:随行付支付产品
|
||||
[ProductEnum.VBILL_PAY]: 'payment.product.enum.vbillPay',
|
||||
// 国际化:河马付(杉德旗下产品)
|
||||
[ProductEnum.HM_PAY]: 'payment.product.enum.hmPay',
|
||||
// 国际化:富友支付产品
|
||||
[ProductEnum.FUYOU_PAY]: 'payment.product.enum.fuyouPay',
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ const DEFAULT_DESCRIPTION_KEY = 'components.deleteConfirm.description';
|
||||
/** 全局单例状态,供 DeleteConfirmModal 绑定 */
|
||||
export const deleteConfirmState = reactive({
|
||||
visible: false,
|
||||
// 国际化:确认删除标题
|
||||
title: $t('components.deleteConfirm.title'),
|
||||
name: '',
|
||||
verificationText: '',
|
||||
@@ -52,7 +51,6 @@ export function closeDeleteConfirm() {
|
||||
deleteConfirmState.verificationText = '';
|
||||
deleteConfirmState.descriptionParams = {};
|
||||
deleteConfirmState.descriptionKey = DEFAULT_DESCRIPTION_KEY;
|
||||
// 国际化:确认删除标题
|
||||
deleteConfirmState.title = $t('components.deleteConfirm.title');
|
||||
}
|
||||
|
||||
@@ -68,7 +66,6 @@ export function useDeleteConfirm() {
|
||||
deleteConfirmState.verificationText = options.verificationText;
|
||||
deleteConfirmState.descriptionKey = options.descriptionKey ?? DEFAULT_DESCRIPTION_KEY;
|
||||
deleteConfirmState.descriptionParams = { ...options.descriptionParams };
|
||||
// 国际化:确认删除标题
|
||||
deleteConfirmState.title = options.title ?? $t('components.deleteConfirm.title');
|
||||
deleteConfirmState.onConfirm = options.onConfirm;
|
||||
deleteConfirmState.onCancel = options.onCancel ?? null;
|
||||
|
||||
@@ -14,7 +14,6 @@ export function useFormEdit() {
|
||||
wrapperCol: {
|
||||
sm: { span: 13 },
|
||||
},
|
||||
// 国际化:新增标题
|
||||
title: $t('hooks.formEdit.add'),
|
||||
modalWidth: 640,
|
||||
confirmLoading: false,
|
||||
@@ -42,17 +41,14 @@ export function useFormEdit() {
|
||||
visible.value = true;
|
||||
switch (formEditType.value) {
|
||||
case FormEditType.Add: {
|
||||
// 国际化:新增标题
|
||||
title.value = $t('hooks.formEdit.add');
|
||||
break;
|
||||
}
|
||||
case FormEditType.Edit: {
|
||||
// 国际化:编辑标题
|
||||
title.value = $t('hooks.formEdit.edit');
|
||||
break;
|
||||
}
|
||||
case FormEditType.Show: {
|
||||
// 国际化:查看标题
|
||||
title.value = $t('hooks.formEdit.view');
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,8 @@ function withConfirmDefaults(config: ModalConfig): ModalConfig {
|
||||
const { title, okText, cancelText, ...rest } = config;
|
||||
return {
|
||||
...rest,
|
||||
// 国际化:提示(与退出登录等通用二次确认一致)
|
||||
title: title ?? $t('common.prompt'),
|
||||
// 国际化:确定
|
||||
okText: okText ?? $t('common.okText'),
|
||||
// 国际化:取消
|
||||
cancelText: cancelText ?? $t('common.cancelText'),
|
||||
};
|
||||
}
|
||||
@@ -39,7 +36,6 @@ function withAlertDefaults(config: ModalConfig, defaultTitleKey: string): ModalC
|
||||
return {
|
||||
...rest,
|
||||
title: title ?? $t(defaultTitleKey),
|
||||
// 国际化:确定
|
||||
okText: okText ?? $t('common.okText'),
|
||||
};
|
||||
}
|
||||
@@ -71,7 +67,6 @@ export function useMessage() {
|
||||
* 提示信息框
|
||||
*/
|
||||
function info(config: ModalConfig) {
|
||||
// 国际化:提示
|
||||
const merged = withAlertDefaults(config, 'common.prompt');
|
||||
if (antdAppContext) {
|
||||
return antdAppContext.modal.info(merged);
|
||||
@@ -83,7 +78,6 @@ export function useMessage() {
|
||||
* 警告信息框
|
||||
*/
|
||||
function warning(config: ModalConfig) {
|
||||
// 国际化:警告
|
||||
const merged = withAlertDefaults(config, 'common.warning');
|
||||
if (antdAppContext) {
|
||||
return antdAppContext.modal.warning(merged);
|
||||
@@ -95,7 +89,6 @@ export function useMessage() {
|
||||
* 错误信息框
|
||||
*/
|
||||
function error(config: ModalConfig) {
|
||||
// 国际化:错误
|
||||
const merged = withAlertDefaults(config, 'common.error');
|
||||
if (antdAppContext) {
|
||||
return antdAppContext.modal.error(merged);
|
||||
@@ -107,7 +100,6 @@ export function useMessage() {
|
||||
* 成功信息框
|
||||
*/
|
||||
function success(config: ModalConfig) {
|
||||
// 国际化:成功
|
||||
const merged = withAlertDefaults(config, 'common.success');
|
||||
if (antdAppContext) {
|
||||
return antdAppContext.modal.success(merged);
|
||||
|
||||
@@ -39,7 +39,6 @@ export function useRequiredRouteQuery<K extends string = string>(options: UseReq
|
||||
|
||||
const isRouteActive = computed(() => route.path === ownedPath);
|
||||
|
||||
// 国际化:query 值经 normalize 处理,保证为非 undefined 的字符串
|
||||
const query = computed((): Record<K, string> => {
|
||||
const result = {} as Record<K, string>;
|
||||
for (const key of options.keys) {
|
||||
@@ -67,7 +66,6 @@ export function useRequiredRouteQuery<K extends string = string>(options: UseReq
|
||||
return;
|
||||
}
|
||||
if (!valid && options.showMessage !== false) {
|
||||
// 国际化:路由必填参数缺失提示
|
||||
message.warning($t(toValue(options.messageKey)));
|
||||
}
|
||||
},
|
||||
|
||||
@@ -27,7 +27,6 @@ async function existsByServer(
|
||||
formEditType: FormEditType | Ref<FormEditType>,
|
||||
existsFun: (value: string) => Promise<Result<boolean>>,
|
||||
existsNotIdFun: (value: string, id: string) => Promise<Result<boolean>>,
|
||||
// 国际化:编码已存在提示
|
||||
errMsg = $t('hooks.validate.codeExists'),
|
||||
): Promise<void> {
|
||||
if (!value) {
|
||||
|
||||
@@ -90,7 +90,7 @@ function setupAccessGuard(router: Router) {
|
||||
await authStore.fetchUserInfo();
|
||||
}
|
||||
|
||||
// 中文注释:每次刷新都重新获取权限码,确保权限变更实时生效
|
||||
// 每次刷新重新拉取权限码,保证权限变更即时生效
|
||||
const { data: permCodes } = await AuthApi.getPermCodes();
|
||||
accessStore.setPermCodes(permCodes);
|
||||
|
||||
@@ -115,7 +115,7 @@ function setupAccessGuard(router: Router) {
|
||||
return { path: LOGIN_PATH, replace: true };
|
||||
}
|
||||
// 网络错误 / 后端服务不可用: token 仍在, 跳服务不可用提示页, 保留登录态供用户手动刷新重试
|
||||
// 中文注释:记录用户原本想访问的页面,网络恢复后重试可回到该页而非首页;
|
||||
// 记下目标页,服务恢复后重试回到该页而不是首页
|
||||
// 排除自身路径,避免 redirect 指向 /service-unavailable 形成循环
|
||||
const redirectPath = to.path === '/service-unavailable' ? HOME_PATH : to.fullPath;
|
||||
return {
|
||||
|
||||
@@ -142,7 +142,6 @@ const coreRoutes: RouteRecordRaw[] = [
|
||||
hideInMenu: true,
|
||||
},
|
||||
},
|
||||
// 国际化:用户协议(公开页,登录前可访问)
|
||||
{
|
||||
name: 'AgreementTerms',
|
||||
path: 'agreement/terms',
|
||||
@@ -153,7 +152,6 @@ const coreRoutes: RouteRecordRaw[] = [
|
||||
hideInMenu: true,
|
||||
},
|
||||
},
|
||||
// 国际化:隐私政策(公开页,登录前可访问)
|
||||
{
|
||||
name: 'AgreementPrivacy',
|
||||
path: 'agreement/privacy',
|
||||
|
||||
@@ -23,7 +23,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
|
||||
const loginLoading = ref(false);
|
||||
|
||||
// 是否处于双因素二次验证
|
||||
// 是否处于二次验证
|
||||
const twoFactorRequired = ref(false);
|
||||
const twoFactorPreAuthToken = ref('');
|
||||
|
||||
@@ -49,7 +49,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
captchaCode: params.captchaCode,
|
||||
});
|
||||
|
||||
// 密码通过但需二次验证: 记录预认证令牌并切到验证界面
|
||||
// 密码通过但需二次验证: 记录临时凭证并切到验证界面
|
||||
if (loginResult.code === TWO_FACTOR_REQUIRED_CODE) {
|
||||
enterTwoFactor((loginResult.data as any)?.preAuthToken ?? '');
|
||||
return { userInfo: null };
|
||||
@@ -91,7 +91,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 双因素认证二次验证, 凭预认证令牌 + 动态码/备用码完成登录
|
||||
* 二次验证: 临时凭证 + 动态码/备用码完成登录
|
||||
*/
|
||||
async function twoFactorVerify(code: string, codeType: string = 'TOTP') {
|
||||
let userInfo: null | UserInfo = null;
|
||||
@@ -106,7 +106,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
accessStore.setAccessToken(accessToken);
|
||||
userInfo = await fetchUserInfo();
|
||||
userStore.setUserInfo(userInfo!);
|
||||
// 清除双因素二次验证状态
|
||||
// 清除二次验证状态
|
||||
twoFactorRequired.value = false;
|
||||
twoFactorPreAuthToken.value = '';
|
||||
await router.push(HOME_PATH);
|
||||
@@ -126,7 +126,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入双因素二次验证(密码登录或社交登录回调共用)
|
||||
* 进入二次验证(密码登录或社交登录回调共用)
|
||||
*/
|
||||
function enterTwoFactor(preAuthToken: string) {
|
||||
twoFactorPreAuthToken.value = preAuthToken ?? '';
|
||||
@@ -134,7 +134,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消双因素认证(返回登录表单)
|
||||
* 取消二次验证(返回登录表单)
|
||||
*/
|
||||
function cancelTwoFactor() {
|
||||
twoFactorRequired.value = false;
|
||||
|
||||
@@ -91,12 +91,11 @@ export function calculatePasswordStrength(password: string, config: PasswordPoli
|
||||
*/
|
||||
export function generatePasswordRules(config: PasswordPolicyValidateConfig) {
|
||||
return [
|
||||
// 国际化:请输入密码
|
||||
{ required: true, message: $t('iam.user.validation.passwordRequired') },
|
||||
{
|
||||
validator: (_rule: any, value: string) => {
|
||||
if (!value) return Promise.resolve();
|
||||
// 中文注释:禁止输入中文字符
|
||||
// 密码不允许中文
|
||||
if (/[\u4E00-\u9FA5]/.test(value)) {
|
||||
return Promise.reject($t('iam.user.validation.passwordNoChinese'));
|
||||
}
|
||||
@@ -104,7 +103,6 @@ export function generatePasswordRules(config: PasswordPolicyValidateConfig) {
|
||||
const conditions = getPasswordConditions(value, config);
|
||||
const allSatisfied = conditions.every((c) => c.satisfied);
|
||||
if (!allSatisfied) {
|
||||
// 国际化:密码不符合要求
|
||||
return Promise.reject($t('iam.user.passwordPolicy.notMeetRequirements'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
@@ -120,9 +118,7 @@ export function generatePasswordRules(config: PasswordPolicyValidateConfig) {
|
||||
export function generateAccountRules() {
|
||||
return [
|
||||
{ required: true, message: $t('common.pleaseInput') },
|
||||
// 国际化:账号长度为6-20个字符
|
||||
{ min: 6, max: 20, message: $t('iam.user.validation.accountLength') },
|
||||
// 国际化:账号只能包含字母、数字、下划线和中划线
|
||||
{ pattern: /^[a-zA-Z0-9_-]+$/, message: $t('iam.user.validation.accountFormat') },
|
||||
];
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
{
|
||||
validator: (_rule, value) => {
|
||||
if (value && !phoneRegex.test(value)) {
|
||||
// 国际化:手机号码格式错误
|
||||
return Promise.reject($t('authentication.mobileErrortip'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
@@ -47,9 +46,7 @@
|
||||
},
|
||||
],
|
||||
code: [
|
||||
// 国际化:请输入{0}位验证码
|
||||
{ required: true, message: $t('authentication.codeTip', [CODE_LENGTH]), trigger: 'blur' },
|
||||
// 国际化:请输入{0}位验证码
|
||||
{ len: CODE_LENGTH, message: $t('authentication.codeTip', [CODE_LENGTH]), trigger: 'blur' },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
const formData = reactive({
|
||||
account: '',
|
||||
password: '',
|
||||
// 国际化:验证码输入值
|
||||
captchaCode: '',
|
||||
// 是否已阅读并同意用户协议和隐私政策(从本地恢复,登录成功后持久化)
|
||||
agreed: localStorage.getItem(AGREEMENT_ACCEPTED_KEY) === 'true',
|
||||
@@ -65,7 +64,6 @@
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
// 国际化:请先阅读并同意用户协议和隐私政策
|
||||
agreed: [
|
||||
{
|
||||
validator: (_rule, value) =>
|
||||
@@ -181,7 +179,7 @@
|
||||
authStore.twoFactorRequired ? $t('_core.authentication.twoFactor.subtitle') : $t('authentication.loginSubtitle')
|
||||
"
|
||||
>
|
||||
<!-- 双因素认证二次验证面板 -->
|
||||
<!-- 二次验证面板 -->
|
||||
<TwoFactorVerifyPanel v-if="authStore.twoFactorRequired" />
|
||||
|
||||
<a-form v-else ref="formRef" :model="formData" :rules="formRules" layout="vertical" @keypress.enter="handleLogin">
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
try {
|
||||
const res = await SocialApi.exchangeLogin(oauthCode, state as string, source.value, CLIENT_CODE);
|
||||
// 需二次验证: 拦截器对 40101 返回 body, 不按失败 reject
|
||||
// 需二次验证: 拦截器对 40101 直接返回响应体, 不抛失败
|
||||
if (res.code === TWO_FACTOR_REQUIRED_CODE) {
|
||||
const preAuthToken = (res.data as any)?.preAuthToken ?? '';
|
||||
authStore.enterTwoFactor(preAuthToken);
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
*/
|
||||
async function sendQueue() {
|
||||
if (!queueContent.value) {
|
||||
// 国际化:请输入消息内容
|
||||
message.warning($t('demos.artemis.messages.contentRequired'));
|
||||
return;
|
||||
}
|
||||
@@ -43,7 +42,6 @@
|
||||
scene: 'QUEUE' as DemoScene,
|
||||
content: queueContent.value,
|
||||
});
|
||||
// 国际化:发送成功
|
||||
message.success($t('demos.artemis.messages.sendSuccess'));
|
||||
queueContent.value = '';
|
||||
await refreshRecords();
|
||||
@@ -89,11 +87,9 @@
|
||||
*/
|
||||
function clearRecords() {
|
||||
confirm({
|
||||
// 国际化:确定要清空全部消费记录吗?
|
||||
title: $t('demos.artemis.messages.clearConfirm'),
|
||||
onOk: async () => {
|
||||
await ArtemisDemoApi.clear();
|
||||
// 国际化:清空成功
|
||||
message.success($t('demos.artemis.messages.clearSuccess'));
|
||||
await refreshRecords();
|
||||
},
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
*/
|
||||
function validateFile(file: File): boolean {
|
||||
if (file.size > MAX_FILE_SIZE) {
|
||||
// 国际化:文件大小超出限制,最大10MB
|
||||
message.error($t('demos.file-upload.fileTooLarge'));
|
||||
return false;
|
||||
}
|
||||
@@ -44,7 +43,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// 国际化:上传中...
|
||||
const hideLoading = message.loading($t('demos.file-upload.uploading'), 0);
|
||||
|
||||
const { filename } = await uploadPlatformFile(file, {
|
||||
@@ -63,7 +61,6 @@
|
||||
publicFileList.value = [...publicFileList.value, uploadFile];
|
||||
|
||||
hideLoading();
|
||||
// 国际化:上传成功
|
||||
message.success($t('demos.file-upload.uploadSuccess'));
|
||||
options.onSuccess?.({}, file);
|
||||
}
|
||||
@@ -78,7 +75,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// 国际化:上传中...
|
||||
const hideLoading = message.loading($t('demos.file-upload.uploading'), 0);
|
||||
|
||||
const { filename } = await uploadPlatformFile(file, {
|
||||
@@ -97,7 +93,6 @@
|
||||
privateFileList.value = [...privateFileList.value, uploadFile];
|
||||
|
||||
hideLoading();
|
||||
// 国际化:上传成功
|
||||
message.success($t('demos.file-upload.uploadSuccess'));
|
||||
options.onSuccess?.({}, file);
|
||||
}
|
||||
@@ -108,12 +103,10 @@
|
||||
async function handleRemovePublic(file: UploadFile) {
|
||||
const filename = file.uid;
|
||||
confirm({
|
||||
// 国际化:确定要删除该文件吗?
|
||||
title: $t('demos.file-upload.deleteConfirm'),
|
||||
onOk: async () => {
|
||||
publicFiles.value = publicFiles.value.filter((f) => f.filename !== filename);
|
||||
publicFileList.value = publicFileList.value.filter((f) => f.uid !== file.uid);
|
||||
// 国际化:删除成功
|
||||
message.success($t('demos.file-upload.deleteSuccess'));
|
||||
},
|
||||
});
|
||||
@@ -126,12 +119,10 @@
|
||||
async function handleRemovePrivate(file: UploadFile) {
|
||||
const filename = file.uid;
|
||||
confirm({
|
||||
// 国际化:确定要删除该文件吗?
|
||||
title: $t('demos.file-upload.deleteConfirm'),
|
||||
onOk: async () => {
|
||||
privateFiles.value = privateFiles.value.filter((f) => f.filename !== filename);
|
||||
privateFileList.value = privateFileList.value.filter((f) => f.uid !== file.uid);
|
||||
// 国际化:删除成功
|
||||
message.success($t('demos.file-upload.deleteSuccess'));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -198,7 +198,6 @@
|
||||
*/
|
||||
function getDisplayTitle(row: Menu): string {
|
||||
if (row.i18nKey) {
|
||||
// 国际化:根据国际化 key 获取显示标题
|
||||
return $t(row.i18nKey);
|
||||
}
|
||||
const locale = i18n.global.locale.value;
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
[MenuTypeEnum.CATALOG, MenuTypeEnum.EMBEDDED, MenuTypeEnum.LINK, MenuTypeEnum.MENU] as string[]
|
||||
).includes(o.value),
|
||||
)
|
||||
// 国际化:获取菜单类型选项的显示标签
|
||||
.map((o) => ({ label: $t(o.label), value: o.value }))
|
||||
);
|
||||
}
|
||||
@@ -84,7 +83,6 @@
|
||||
return (
|
||||
menuTypeOptions
|
||||
.filter((o) => o.value !== MenuTypeEnum.SUBPAGE && o.value !== MenuTypeEnum.SUBPAGE_GROUP)
|
||||
// 国际化:获取菜单类型选项的显示标签
|
||||
.map((o) => ({ label: $t(o.label), value: o.value }))
|
||||
);
|
||||
});
|
||||
@@ -167,7 +165,6 @@
|
||||
if (!value || !form.value.clientCode || !showMenuCode.value) return;
|
||||
const { data: exists } = await MenuApi.checkMenuCodeExists(value, form.value.clientCode, form.value.id!);
|
||||
if (exists) {
|
||||
// 国际化:菜单编码已存在
|
||||
throw $t('iam.menu.menuCodeExists');
|
||||
}
|
||||
}
|
||||
@@ -178,7 +175,6 @@
|
||||
function validatePathFormat(_rule: any, value: string) {
|
||||
if (!value || !showPath.value) return Promise.resolve();
|
||||
if (!value.startsWith('/')) {
|
||||
// 国际化:路径必须以 / 开头
|
||||
return Promise.reject($t('iam.menu.pathStartWith'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
@@ -374,7 +370,6 @@
|
||||
*/
|
||||
function getDisplayTitle(row: Menu): string {
|
||||
if (row.i18nKey) {
|
||||
// 国际化:根据国际化key获取显示标题
|
||||
return $t(row.i18nKey);
|
||||
}
|
||||
const locale = i18n.global.locale.value;
|
||||
|
||||
@@ -183,7 +183,6 @@
|
||||
*/
|
||||
function getDisplayTitle(row: Menu): string {
|
||||
if (row.i18nKey) {
|
||||
// 国际化:根据国际化 key 获取显示标题
|
||||
return $t(row.i18nKey);
|
||||
}
|
||||
const locale = i18n.global.locale.value;
|
||||
@@ -289,7 +288,6 @@
|
||||
*/
|
||||
function handleDeleteConfirm(row: Menu) {
|
||||
confirm({
|
||||
// 国际化:是否删除该条数据
|
||||
title: $t('iam.menu.confirmDelete'),
|
||||
content: `${$t('iam.menu.titleCn')}: ${row.titleCn}`,
|
||||
okText: $t('common.okText'),
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
formEditType.value,
|
||||
RoleApi.existsByCode,
|
||||
RoleApi.existsByCodeNotId,
|
||||
// 国际化:角色编码已存在
|
||||
$t('iam.role.codeExists'),
|
||||
);
|
||||
}
|
||||
@@ -117,7 +116,6 @@
|
||||
formEditType.value,
|
||||
RoleApi.existsByNameCn,
|
||||
RoleApi.existsByNameCnNotId,
|
||||
// 国际化:中文名称已存在
|
||||
$t('iam.role.nameCnExists'),
|
||||
);
|
||||
}
|
||||
@@ -133,7 +131,6 @@
|
||||
formEditType.value,
|
||||
RoleApi.existsByNameEn,
|
||||
RoleApi.existsByNameEnNotId,
|
||||
// 国际化:英文名称已存在
|
||||
$t('iam.role.nameEnExists'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,21 +43,18 @@
|
||||
type: 'string',
|
||||
field: 'code',
|
||||
name: $t('iam.role.code'),
|
||||
// 国际化:请输入角色编码
|
||||
placeholder: $t('iam.role.inputCode'),
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
field: 'nameCn',
|
||||
name: $t('common.chineseName'),
|
||||
// 国际化:请输入名称(中文)
|
||||
placeholder: $t('iam.role.inputNameCn'),
|
||||
},
|
||||
{
|
||||
type: 'list',
|
||||
field: 'clientCode',
|
||||
name: $t('common.clientType'),
|
||||
// 国际化:请选择终端类型
|
||||
placeholder: $t('iam.role.selectClientCode'),
|
||||
selectList: clientCodeSelectOptions.value,
|
||||
},
|
||||
@@ -164,7 +161,6 @@
|
||||
openDeleteConfirm({
|
||||
name: row.nameCn || row.code || '',
|
||||
verificationText: `iam/role/${row.code}`,
|
||||
// 国际化:删除角色
|
||||
title: $t('iam.role.delete'),
|
||||
onConfirm: () =>
|
||||
RoleApi.delete(row.id!).then(() => {
|
||||
|
||||
@@ -93,7 +93,6 @@
|
||||
{ field: 'account', name: $t('iam.user.field.account'), placeholder: $t('common.pleaseInput') },
|
||||
{ field: 'status', type: 'list', name: $t('iam.user.field.status'), selectList: statusOptions.value },
|
||||
{ field: 'phone', name: $t('iam.user.field.phone'), placeholder: $t('common.pleaseInput') },
|
||||
// 国际化:邮箱
|
||||
{ field: 'email', name: $t('iam.user.field.email'), placeholder: $t('common.pleaseInput') },
|
||||
]);
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
loading.value = true;
|
||||
|
||||
try {
|
||||
// 中文注释:对密码进行RSA加密
|
||||
// RSA 加密密码后再提交
|
||||
const encryptedPassword = await encryptPassword(formState.value.password!);
|
||||
await UserApi.add({
|
||||
name: formState.value.name,
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
loading.value = true;
|
||||
|
||||
try {
|
||||
// 中文注释:对密码进行RSA加密
|
||||
// RSA 加密密码后再提交
|
||||
const encryptedPassword = await encryptPassword(formState.value.newPassword!);
|
||||
await (userIds.value.length === 1
|
||||
? UserApi.restartPassword(userIds.value[0]!, encryptedPassword)
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
}
|
||||
confirm({
|
||||
title: $t('common.confirm'),
|
||||
// 国际化:确定要保存角色分配吗?
|
||||
content: $t('iam.user.action.confirmAssignRole'),
|
||||
okText: $t('common.okText'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
|
||||
@@ -29,29 +29,23 @@
|
||||
/** 功能卡片配置(Adapay 首期仅基本信息与密钥配置, 无应用管理) */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 编辑通道商户基本信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'keyConfig',
|
||||
// 国际化: 密钥配置
|
||||
title: $t('payment.channel.adapayManage.cardDirectKeyConfig'),
|
||||
icon: 'ant-design:key-outlined',
|
||||
// 国际化: 配置通道商户密钥
|
||||
description: $t('payment.channel.adapayManage.cardDirectKeyConfigDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -18,16 +18,13 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.channel.alipayManage.groupApp'),
|
||||
color: 'green',
|
||||
cards: [
|
||||
{
|
||||
key: 'isvApp',
|
||||
// 国际化:服务商应用
|
||||
title: $t('payment.channel.alipayManage.cardIsvApp'),
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
// 国际化:查看支付宝开放平台应用列表
|
||||
description: $t('payment.channel.alipayManage.cardIsvAppDesc'),
|
||||
route: '/payment/config/product/app-manage',
|
||||
},
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
formEditType.value,
|
||||
(value) => AlipayIsvAppApi.existsAliAppId(value),
|
||||
(value, excludeId) => AlipayIsvAppApi.existsAliAppIdNotId(value, excludeId),
|
||||
// 国际化:应用 ID 重复
|
||||
$t('payment.channel.alipayManage.aliAppIdDuplicate'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
openDeleteConfirm({
|
||||
name: props.app.appName || props.app.aliAppId || '',
|
||||
verificationText: props.app.aliAppId || '',
|
||||
// 国际化:删除
|
||||
title: $t('payment.channel.alipayManage.delete'),
|
||||
onConfirm: () =>
|
||||
AlipayIsvAppApi.delete(props.app.id!).then(() => {
|
||||
|
||||
@@ -29,27 +29,23 @@
|
||||
/** 功能卡片配置(服务商通道商户:仅基本信息) */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化:基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'authOperation',
|
||||
// 国际化:应用授权令牌
|
||||
title: $t('payment.merchant.channelMerchant.cardAuthOperation'),
|
||||
icon: 'ant-design:safety-certificate-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardAuthOperationDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化:修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -30,20 +30,17 @@
|
||||
/** 功能卡片配置 */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化:基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化:修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
@@ -51,25 +48,20 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.channel.alipayMchManage.groupApp'),
|
||||
color: 'green',
|
||||
cards: [
|
||||
{
|
||||
key: 'mchApp',
|
||||
// 国际化:通道商户应用
|
||||
title: $t('payment.channel.alipayMchManage.cardMchApp'),
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
// 国际化:管理支付宝通道商户应用
|
||||
description: $t('payment.channel.alipayMchManage.cardMchAppDesc'),
|
||||
route: '/payment/merchant/channel-merchant/alipay-app-manage',
|
||||
},
|
||||
{
|
||||
key: 'capabilityBinding',
|
||||
// 国际化:能力应用绑定
|
||||
title: $t('payment.channel.alipayMchManage.cardCapabilityBinding'),
|
||||
icon: 'ant-design:api-outlined',
|
||||
// 国际化:配置各支付能力使用的应用
|
||||
description: $t('payment.channel.alipayMchManage.cardCapabilityBindingDesc'),
|
||||
},
|
||||
],
|
||||
@@ -121,7 +113,6 @@
|
||||
query: {
|
||||
mchNo: mchNo.value,
|
||||
channelMchNo: channelMchNo.value,
|
||||
// 国际化:透传通道商户 id,使应用管理页返回时能回到详情页(product 由应用管理页按渠道常量推断)
|
||||
channelMerchantId: channelMerchant.value.id,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -40,28 +40,23 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 查看通道商户基础配置信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'mchConfig',
|
||||
// 国际化: 商户配置
|
||||
title: $t('payment.channel.dougongIsv.mchConfigTitle'),
|
||||
icon: 'ant-design:setting-outlined',
|
||||
description: $t('payment.channel.dougongIsv.appIdTooltip'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -34,29 +34,23 @@
|
||||
/** 功能卡片配置(按组分组的卡片布局) */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化:基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化:编辑通道商户基本信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'keyConfig',
|
||||
// 国际化:密钥配置
|
||||
title: $t('payment.channel.douyinManage.cardDirectKeyConfig'),
|
||||
icon: 'ant-design:key-outlined',
|
||||
// 国际化:配置通道商户密钥
|
||||
description: $t('payment.channel.douyinManage.cardDirectKeyConfigDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化:修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
@@ -64,24 +58,19 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.merchant.channelMerchant.groupApp'),
|
||||
color: 'green',
|
||||
cards: [
|
||||
{
|
||||
key: 'appManage',
|
||||
// 国际化:通道商户应用
|
||||
title: $t('payment.merchant.channelMerchant.cardApp'),
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
// 国际化:管理通道商户应用
|
||||
description: $t('payment.merchant.channelMerchant.cardAppDesc'),
|
||||
},
|
||||
{
|
||||
key: 'capabilityBinding',
|
||||
// 国际化:能力应用绑定
|
||||
title: $t('payment.channel.douyinManage.cardCapabilityBinding'),
|
||||
icon: 'ant-design:link-outlined',
|
||||
// 国际化:配置支付能力与应用的绑定关系
|
||||
description: $t('payment.channel.douyinManage.cardCapabilityBindingDesc'),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -32,28 +32,23 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 查看通道商户基础配置信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'mchConfig',
|
||||
// 国际化: 商户配置
|
||||
title: $t('payment.channel.hkrtIsv.cardMchConfig'),
|
||||
icon: 'ant-design:setting-outlined',
|
||||
description: $t('payment.channel.hkrtIsv.cardMchConfigDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -39,28 +39,23 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 查看通道商户基础配置信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
},
|
||||
{
|
||||
key: 'mchConfig',
|
||||
// 国际化: 商户配置
|
||||
title: $t('payment.channel.hmpayIsv.cardMchConfig'),
|
||||
icon: 'ant-design:profile-outlined',
|
||||
description: $t('payment.channel.hmpayIsv.cardMchConfigDesc'),
|
||||
|
||||
@@ -32,28 +32,23 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 查看通道商户基础配置信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'mchConfig',
|
||||
// 国际化: 商户配置
|
||||
title: $t('payment.channel.lakalaIsv.cardMchConfig'),
|
||||
icon: 'ant-design:setting-outlined',
|
||||
description: $t('payment.channel.lakalaIsv.cardMchConfigDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -36,21 +36,17 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 查看通道商户基础配置信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -29,29 +29,23 @@
|
||||
/** 功能卡片配置(银联商务首期仅基本信息与密钥配置, 无应用管理) */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 编辑通道商户基本信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'keyConfig',
|
||||
// 国际化: 密钥配置
|
||||
title: $t('payment.channel.umsManage.cardDirectKeyConfig'),
|
||||
icon: 'ant-design:key-outlined',
|
||||
// 国际化: 配置通道商户密钥
|
||||
description: $t('payment.channel.umsManage.cardDirectKeyConfigDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
const rules = {
|
||||
orgId: [{ required: true, message: $t('payment.channel.vbillIsv.validation.orgId') }],
|
||||
// 国际化: 脱敏字段始终必填, 编辑时预填脱敏值, 未修改由 diffForm 比对跳过更新
|
||||
publicKey: [{ required: true, message: $t('payment.channel.vbillIsv.validation.publicKey') }],
|
||||
privateKey: [{ required: true, message: $t('payment.channel.vbillIsv.validation.privateKey') }],
|
||||
};
|
||||
|
||||
@@ -36,21 +36,17 @@
|
||||
*/
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化: 基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化: 基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
// 国际化: 查看通道商户基础配置信息
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化: 修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
|
||||
@@ -19,13 +19,11 @@ const capabilityRef = ref<InstanceType<typeof WechatIsvAppCapability> | null>(nu
|
||||
/** 功能卡片配置 */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:配置管理
|
||||
group: $t('payment.channel.wechatManage.groupConfig'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'mchKey',
|
||||
// 国际化:商户支付密钥
|
||||
title: $t('payment.channel.wechatManage.cardMchKey'),
|
||||
icon: 'ant-design:key-outlined',
|
||||
description: $t('payment.channel.wechatManage.cardMchKeyDesc'),
|
||||
@@ -33,13 +31,11 @@ const capabilityRef = ref<InstanceType<typeof WechatIsvAppCapability> | null>(nu
|
||||
],
|
||||
},
|
||||
{
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.channel.wechatManage.groupApp'),
|
||||
color: 'green',
|
||||
cards: [
|
||||
{
|
||||
key: 'isvApp',
|
||||
// 国际化:微信服务商应用
|
||||
title: $t('payment.channel.wechatManage.cardIsvApp'),
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
description: $t('payment.channel.wechatManage.cardIsvAppDesc'),
|
||||
@@ -47,7 +43,6 @@ const capabilityRef = ref<InstanceType<typeof WechatIsvAppCapability> | null>(nu
|
||||
},
|
||||
{
|
||||
key: 'capabilityBinding',
|
||||
// 国际化:能力应用绑定
|
||||
title: $t('payment.channel.wechatManage.cardCapabilityBinding'),
|
||||
icon: 'ant-design:api-outlined',
|
||||
description: $t('payment.channel.wechatManage.cardCapabilityBindingDesc'),
|
||||
|
||||
@@ -36,20 +36,17 @@
|
||||
/** 功能卡片配置 */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化:基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化:修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
@@ -57,27 +54,23 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.merchant.channelMerchant.groupApp'),
|
||||
color: 'green',
|
||||
cards: [
|
||||
{
|
||||
key: 'app',
|
||||
// 国际化:应用管理
|
||||
title: $t('payment.merchant.channelMerchant.cardApp'),
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardAppDesc'),
|
||||
},
|
||||
{
|
||||
key: 'capability',
|
||||
// 国际化:支付应用配置
|
||||
title: $t('payment.channel.wechatManage.cardCapabilityBinding'),
|
||||
icon: 'ant-design:api-outlined',
|
||||
description: $t('payment.channel.wechatManage.cardCapabilityBindingDesc'),
|
||||
},
|
||||
{
|
||||
key: 'authApp',
|
||||
// 国际化:认证应用配置
|
||||
title: $t('payment.channel.wechatManage.cardAuthApp'),
|
||||
icon: 'ant-design:safety-certificate-outlined',
|
||||
description: $t('payment.channel.wechatManage.cardAuthAppDesc'),
|
||||
|
||||
@@ -33,13 +33,11 @@
|
||||
/** 功能卡片配置(直连通道商户:基本信息 + 密钥配置 + 应用管理) */
|
||||
const functionCards = computed(() => [
|
||||
{
|
||||
// 国际化:基础管理
|
||||
group: $t('payment.merchant.channelMerchant.groupBasic'),
|
||||
color: 'blue',
|
||||
cards: [
|
||||
{
|
||||
key: 'basicInfo',
|
||||
// 国际化:基本信息
|
||||
title: $t('payment.merchant.channelMerchant.cardBasicInfo'),
|
||||
icon: 'ant-design:info-circle-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardBasicInfoDesc'),
|
||||
@@ -52,7 +50,6 @@
|
||||
},
|
||||
{
|
||||
key: 'editMerchantName',
|
||||
// 国际化:修改商户名称
|
||||
title: $t('payment.merchant.channelMerchant.cardEditMerchantName'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardEditMerchantNameDesc'),
|
||||
@@ -60,20 +57,17 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.merchant.channelMerchant.groupApp'),
|
||||
color: 'green',
|
||||
cards: [
|
||||
{
|
||||
key: 'appManage',
|
||||
// 国际化:通道商户应用
|
||||
title: $t('payment.merchant.channelMerchant.cardApp'),
|
||||
icon: 'ant-design:appstore-outlined',
|
||||
description: $t('payment.merchant.channelMerchant.cardAppDesc'),
|
||||
},
|
||||
{
|
||||
key: 'capabilityBinding',
|
||||
// 国际化:能力应用绑定
|
||||
title: $t('payment.channel.wechatManage.cardCapabilityBinding'),
|
||||
icon: 'ant-design:api-outlined',
|
||||
description: $t('payment.channel.wechatManage.cardCapabilityBindingDesc'),
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
: 'payment.constant.product.productConfig.switchToProdConfirm';
|
||||
|
||||
confirm({
|
||||
// 国际化:切换环境
|
||||
title: $t('payment.constant.product.productConfig.switchEnv'),
|
||||
content: $t(contentKey),
|
||||
onOk: () => {
|
||||
|
||||
@@ -146,7 +146,6 @@
|
||||
*/
|
||||
function handleDelete(row: PlatformWxDomainVerifyVo) {
|
||||
confirm({
|
||||
// 国际化:确认
|
||||
title: $t('common.confirm'),
|
||||
content: $t('payment.wxVerify.confirmDelete'),
|
||||
okText: $t('common.delete'),
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
* 抽屉标题
|
||||
*/
|
||||
const drawerTitle = computed(() => {
|
||||
// 国际化:通知配置
|
||||
const title = $t('payment.merchant.notifyConfig.notifyConfig.title');
|
||||
return props.appName ? `${title} (${props.appName})` : title;
|
||||
});
|
||||
|
||||
@@ -69,15 +69,12 @@
|
||||
const functionCards = computed((): WorkbenchGroup[] => {
|
||||
const groups: WorkbenchGroup[] = [];
|
||||
|
||||
// 国际化:支付配置
|
||||
const paymentCards: WorkbenchCard[] = [];
|
||||
if (hasPermission(PermCodes.Merchant.AppRoute.VIEW)) {
|
||||
paymentCards.push({
|
||||
key: 'payRoute',
|
||||
// 国际化:通道路由
|
||||
title: $t('payment.merchant.app.app.payRoute'),
|
||||
icon: 'ant-design:node-index-outlined',
|
||||
// 国际化:配置支付方式的通道匹配与路由策略
|
||||
description: $t('payment.merchant.app.app.payRouteDesc'),
|
||||
route: '/payment/merchant/route',
|
||||
});
|
||||
@@ -85,10 +82,8 @@
|
||||
if (hasPermission(PermCodes.Merchant.GatewayAggregate.VIEW)) {
|
||||
paymentCards.push({
|
||||
key: 'aggregateScan',
|
||||
// 国际化:码牌和聚合支付
|
||||
title: $t('payment.merchant.app.app.aggregateScan'),
|
||||
icon: 'ant-design:qrcode-outlined',
|
||||
// 国际化:配置聚合收款码与码牌支付规则,同时影响支付码牌相关配置
|
||||
description: $t('payment.merchant.app.app.aggregateScanDesc'),
|
||||
route: '/payment/merchant/aggregate',
|
||||
});
|
||||
@@ -96,10 +91,8 @@
|
||||
if (hasPermission(PermCodes.Merchant.GatewayCashier.VIEW)) {
|
||||
paymentCards.push({
|
||||
key: 'cashier',
|
||||
// 国际化:收银台配置
|
||||
title: $t('payment.merchant.app.app.cashierConfig'),
|
||||
icon: 'ant-design:desktop-outlined',
|
||||
// 国际化:配置收银台展示项与支付方式
|
||||
description: $t('payment.merchant.app.app.cashierConfigDesc'),
|
||||
route: '/payment/merchant/cashier',
|
||||
});
|
||||
@@ -107,69 +100,56 @@
|
||||
if (hasPermission(PermCodes.Merchant.NotifyConfig.VIEW)) {
|
||||
paymentCards.push({
|
||||
key: 'notify',
|
||||
// 国际化:通知配置
|
||||
title: $t('payment.merchant.app.app.notifyConfig'),
|
||||
icon: 'ant-design:notification-outlined',
|
||||
// 国际化:配置业务事件回调地址与订阅事件
|
||||
description: $t('payment.merchant.app.app.notifyConfigDesc'),
|
||||
action: 'notify',
|
||||
});
|
||||
}
|
||||
if (paymentCards.length > 0) {
|
||||
groups.push({
|
||||
// 国际化:支付配置
|
||||
group: $t('payment.merchant.app.app.groupConfig'),
|
||||
color: 'green',
|
||||
cards: paymentCards,
|
||||
});
|
||||
}
|
||||
|
||||
// 国际化:应用管理
|
||||
const manageCards: WorkbenchCard[] = [];
|
||||
if (hasPermission(PermCodes.Merchant.App.MANAGE)) {
|
||||
manageCards.push({
|
||||
key: 'edit',
|
||||
// 国际化:编辑
|
||||
title: $t('payment.merchant.app.app.edit'),
|
||||
icon: 'ant-design:edit-outlined',
|
||||
// 国际化:修改应用名称、启用状态等基本信息
|
||||
description: $t('payment.merchant.app.app.editDesc'),
|
||||
action: 'edit',
|
||||
});
|
||||
if (appInfo.value.defaultApp) {
|
||||
manageCards.push({
|
||||
key: 'cancelDefault',
|
||||
// 国际化:取消默认
|
||||
title: $t('payment.merchant.app.app.cancelDefault'),
|
||||
icon: 'ant-design:star-filled',
|
||||
// 国际化:取消后需重新指定默认应用
|
||||
description: $t('payment.merchant.app.app.cancelDefaultDesc'),
|
||||
action: 'cancelDefault',
|
||||
});
|
||||
} else {
|
||||
manageCards.push({
|
||||
key: 'setDefault',
|
||||
// 国际化:设为默认
|
||||
title: $t('payment.merchant.app.app.setDefault'),
|
||||
icon: 'ant-design:star-outlined',
|
||||
// 国际化:未指定应用时,交易默认落到该应用
|
||||
description: $t('payment.merchant.app.app.setDefaultDesc'),
|
||||
action: 'setDefault',
|
||||
});
|
||||
}
|
||||
manageCards.push({
|
||||
key: 'delete',
|
||||
// 国际化:删除
|
||||
title: $t('payment.merchant.app.app.delete'),
|
||||
icon: 'ant-design:delete-outlined',
|
||||
// 国际化:删除后不可恢复,请谨慎操作
|
||||
description: $t('payment.merchant.app.app.deleteDesc'),
|
||||
action: 'delete',
|
||||
});
|
||||
}
|
||||
if (manageCards.length > 0) {
|
||||
groups.push({
|
||||
// 国际化:应用管理
|
||||
group: $t('payment.merchant.app.app.groupManage'),
|
||||
color: 'blue',
|
||||
cards: manageCards,
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
if (!product) return '-';
|
||||
const i18nKey = productI18nMap[product];
|
||||
if (i18nKey) {
|
||||
// 国际化:根据动态key获取产品名称
|
||||
return $t(i18nKey);
|
||||
}
|
||||
return productNameMap[product] || product;
|
||||
@@ -166,7 +165,6 @@
|
||||
return;
|
||||
}
|
||||
mchNo.value = routeContext.query.value.mchNo;
|
||||
// 国际化:创建通道商户
|
||||
setTabTitle($t('payment.merchant.channelMerchant.createTitle'));
|
||||
loadMerchantInfo();
|
||||
loadProductList();
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
if (!product) return '-';
|
||||
const i18nKey = productI18nMap[product];
|
||||
if (i18nKey) {
|
||||
// 国际化:根据动态key获取支付产品名称
|
||||
return $t(i18nKey);
|
||||
}
|
||||
return productNameMap[product] || product;
|
||||
@@ -85,7 +84,6 @@
|
||||
*/
|
||||
function getSourceLabel(source: string) {
|
||||
if (source === 'manual') {
|
||||
// 国际化:手动创建
|
||||
return $t('payment.merchant.channelMerchant.sourceManual');
|
||||
}
|
||||
return source || '-';
|
||||
@@ -181,7 +179,6 @@
|
||||
function handleToggleEnable(record: ChannelMerchantResult, checked: boolean) {
|
||||
const isEnabling = checked;
|
||||
confirm({
|
||||
// 国际化:确认启用/禁用该通道商户?
|
||||
title: isEnabling
|
||||
? $t('payment.merchant.channelMerchant.confirmEnable')
|
||||
: $t('payment.merchant.channelMerchant.confirmDisable'),
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
formRef.value?.validate().then(() => {
|
||||
const id = props.channelMerchant.id;
|
||||
if (!id) {
|
||||
// 国际化: 缺少通道商户编号
|
||||
message.warning($t('payment.merchant.channelMerchant.missingId'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -101,9 +101,7 @@
|
||||
// 如果公钥已存在,需要二次确认
|
||||
if (formState.value.publicKey) {
|
||||
confirm({
|
||||
// 国际化:确认
|
||||
title: $t('common.confirm'),
|
||||
// 国际化:公钥已存在,重新生成将覆盖原有公钥,确定要重新生成吗?
|
||||
content: $t('payment.merchant.credential.credential.confirmGenPublicKey'),
|
||||
okText: $t('common.okText'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
@@ -137,9 +135,7 @@
|
||||
// 如果密钥已存在,需要二次确认
|
||||
if (formState.value.secretKey) {
|
||||
confirm({
|
||||
// 国际化:确认
|
||||
title: $t('common.confirm'),
|
||||
// 国际化:通信密钥已存在,重新生成将覆盖原有密钥,确定要重新生成吗?
|
||||
content: $t('payment.merchant.credential.credential.confirmGenSecretKey'),
|
||||
okText: $t('common.okText'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
@@ -167,7 +163,6 @@
|
||||
*/
|
||||
function handleCopy(text: string) {
|
||||
copy(text);
|
||||
// 国际化:复制成功
|
||||
message.success($t('payment.merchant.credential.credential.copySuccess'));
|
||||
}
|
||||
|
||||
@@ -177,7 +172,6 @@
|
||||
function handleSave() {
|
||||
confirm({
|
||||
title: $t('common.confirm'),
|
||||
// 国际化:确定要保存对接配置吗?
|
||||
content: $t('payment.merchant.credential.credential.confirmSave'),
|
||||
okText: $t('common.okText'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
@@ -191,7 +185,6 @@
|
||||
mchNo: mchNo.value,
|
||||
};
|
||||
await MerchantCredentialApi.update(submitData);
|
||||
// 国际化:保存成功
|
||||
message.success($t('payment.merchant.credential.credential.saveSuccess'));
|
||||
saving.value = false;
|
||||
isEditing.value = false;
|
||||
|
||||
@@ -46,19 +46,15 @@
|
||||
},
|
||||
{
|
||||
key: 'user',
|
||||
// 国际化:用户管理
|
||||
title: $t('payment.merchant.workbench.workbench.cardUser'),
|
||||
icon: 'ant-design:user-outlined',
|
||||
// 国际化:用户账号管理与权限分配
|
||||
description: $t('payment.merchant.workbench.workbench.cardUserDesc'),
|
||||
route: '/payment/merchant/user',
|
||||
},
|
||||
{
|
||||
key: 'store',
|
||||
// 国际化:门店管理
|
||||
title: $t('payment.merchant.workbench.workbench.cardStore'),
|
||||
icon: 'ant-design:environment-outlined',
|
||||
// 国际化:商户物理门店档案与位置信息管理
|
||||
description: $t('payment.merchant.workbench.workbench.cardStoreDesc'),
|
||||
route: '/payment/merchant/store',
|
||||
},
|
||||
@@ -103,10 +99,8 @@
|
||||
},
|
||||
{
|
||||
key: 'wxDomainVerify',
|
||||
// 国际化:微信域名验证(与菜单一致)
|
||||
title: $t('payment.merchant.workbench.workbench.cardWxDomainVerify'),
|
||||
icon: 'ant-design:safety-certificate-outlined',
|
||||
// 国际化:上传与管理微信公众号 / 小程序业务域名校验文件
|
||||
description: $t('payment.merchant.workbench.workbench.cardWxDomainVerifyDesc'),
|
||||
route: '/payment/merchant/manage/wx-verify',
|
||||
},
|
||||
|
||||
@@ -157,7 +157,6 @@
|
||||
*/
|
||||
function handleDelete(row: MchWxDomainVerifyVo) {
|
||||
confirm({
|
||||
// 国际化:确认
|
||||
title: $t('common.confirm'),
|
||||
content: $t('payment.wxVerify.confirmDelete'),
|
||||
okText: $t('common.delete'),
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
/** 取消编辑前二次确认 */
|
||||
function cancelBasicConfigEdit() {
|
||||
confirm({
|
||||
// 国际化:取消编辑二次确认
|
||||
content: $t('common.confirmCancelContent'),
|
||||
onOk() {
|
||||
return doCancelBasicConfigEdit();
|
||||
@@ -107,7 +106,6 @@
|
||||
return;
|
||||
}
|
||||
confirm({
|
||||
// 国际化:基础模式保存二次确认
|
||||
content: $t('payment.merchant.route.route.basicSaveConfirm'),
|
||||
onOk() {
|
||||
return doSaveBasicConfig();
|
||||
|
||||
@@ -246,7 +246,6 @@
|
||||
/** 取消编辑前二次确认 */
|
||||
function cancelSceneConfigEdit() {
|
||||
confirm({
|
||||
// 国际化:取消编辑二次确认
|
||||
content: $t('common.confirmCancelContent'),
|
||||
onOk() {
|
||||
return doCancelSceneConfigEdit();
|
||||
@@ -311,7 +310,6 @@
|
||||
return;
|
||||
}
|
||||
confirm({
|
||||
// 国际化:场景模式保存二次确认
|
||||
content: $t('payment.merchant.route.route.sceneSaveConfirm'),
|
||||
onOk() {
|
||||
return doSaveSceneConfig();
|
||||
|
||||
@@ -166,7 +166,6 @@
|
||||
return;
|
||||
}
|
||||
xTable.value?.connectToolbar(xToolbar.value as VxeToolbarInstance);
|
||||
// 国际化:加载行政区划映射用于地址反查
|
||||
loadRegionMap();
|
||||
// 加载商户信息用于标题展示
|
||||
loadMerchantInfo();
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
loading.value = true;
|
||||
|
||||
try {
|
||||
// 中文注释:对密码进行RSA加密
|
||||
// RSA 加密密码后再提交
|
||||
const encryptedPassword = await encryptPassword(formState.value.password!);
|
||||
await MerchantUserApi.add({
|
||||
mchNo: mchNo.value,
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
loading.value = true;
|
||||
|
||||
try {
|
||||
// 中文注释:对密码进行RSA加密
|
||||
// RSA 加密密码后再提交
|
||||
const encryptedPassword = await encryptPassword(formState.value.newPassword);
|
||||
await (userIds.value.length === 1
|
||||
? MerchantUserApi.restartPassword(userIds.value[0]!, encryptedPassword)
|
||||
|
||||
@@ -93,7 +93,6 @@
|
||||
formEditType.value,
|
||||
DictApi.existsByCode,
|
||||
DictApi.existsByCodeNotId,
|
||||
// 国际化:编码已存在
|
||||
$t('system.dict.codeExists'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
formEditType.value,
|
||||
() => DictItemApi.existsByCode(code!, currentDictId!),
|
||||
(value, excludeId) => DictItemApi.existsByCodeNotId(value, currentDictId!, excludeId!),
|
||||
// 国际化:编码已存在
|
||||
$t('system.dict.codeExists'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,14 +34,12 @@
|
||||
type: 'string',
|
||||
field: 'code',
|
||||
name: $t('system.dict.code'),
|
||||
// 国际化:请输入字典编码
|
||||
placeholder: $t('system.dict.inputCode'),
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
field: 'nameCn',
|
||||
name: $t('common.chineseName'),
|
||||
// 国际化:请输入中文名称
|
||||
placeholder: $t('system.dict.inputNameCn'),
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -67,9 +67,7 @@
|
||||
*/
|
||||
function handleCancel() {
|
||||
confirm({
|
||||
// 国际化:确认
|
||||
title: $t('common.confirm'),
|
||||
// 国际化:确定要取消编辑吗?
|
||||
content: $t('common.confirmCancelContent'),
|
||||
okText: $t('common.okText'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
@@ -88,7 +86,6 @@
|
||||
formRef.value?.validate().then(() => {
|
||||
confirm({
|
||||
cancelText: $t('common.cancelText'),
|
||||
// 国际化:确定要保存OSS配置吗?
|
||||
content: $t('system.platform.oss.confirmSaveContent'),
|
||||
okText: $t('common.okText'),
|
||||
onOk: async () => {
|
||||
|
||||
@@ -51,9 +51,7 @@
|
||||
*/
|
||||
function handleCancel() {
|
||||
confirm({
|
||||
// 国际化: 确认
|
||||
title: $t('common.confirm'),
|
||||
// 国际化: 确定要取消编辑吗?
|
||||
content: $t('common.confirmCancelContent'),
|
||||
okText: $t('common.okText'),
|
||||
cancelText: $t('common.cancelText'),
|
||||
@@ -74,7 +72,6 @@
|
||||
.then(() => {
|
||||
confirm({
|
||||
cancelText: $t('common.cancelText'),
|
||||
// 国际化: 确定要保存端点配置吗?
|
||||
content: $t('system.platform.url.confirmSaveContent'),
|
||||
okText: $t('common.okText'),
|
||||
onOk: async () => {
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
function validateCaptchaTrigger(): Promise<void> {
|
||||
const { captchaTriggerAttempts, maxFailedAttempts } = formState.value;
|
||||
if (captchaTriggerAttempts != null && maxFailedAttempts != null && captchaTriggerAttempts > maxFailedAttempts) {
|
||||
// 国际化:触发验证码的失败次数不能大于最大失败次数
|
||||
return Promise.reject(new Error($t('system.security.login-security.validation.captchaTriggerRange')));
|
||||
}
|
||||
return Promise.resolve();
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
function validateLengthRange(): Promise<void> {
|
||||
const { minLength, maxLength } = formState.value;
|
||||
if (minLength != null && maxLength != null && minLength > maxLength) {
|
||||
// 国际化:最小长度不能大于最大长度
|
||||
return Promise.reject(new Error($t('system.security.password-policy.validation.lengthRange')));
|
||||
}
|
||||
return Promise.resolve();
|
||||
|
||||
@@ -45,21 +45,17 @@
|
||||
type: 'string',
|
||||
field: 'filename',
|
||||
name: $t('system.file.platform.field.filename'),
|
||||
// 国际化:请输入文件名称
|
||||
placeholder: $t('system.file.platform.placeholder.filename'),
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
field: 'originalFilename',
|
||||
// 国际化:原始文件名
|
||||
name: $t('system.file.platform.field.originalFilename'),
|
||||
// 国际化:请输入原始文件名
|
||||
placeholder: $t('system.file.platform.placeholder.originalFilename'),
|
||||
},
|
||||
{
|
||||
type: 'list',
|
||||
field: 'accessType',
|
||||
// 国际化:访问类型
|
||||
name: $t('system.file.platform.field.accessType'),
|
||||
placeholder: $t('common.pleaseSelect'),
|
||||
selectList: accessTypeOptions.value,
|
||||
@@ -67,9 +63,7 @@
|
||||
{
|
||||
type: 'string',
|
||||
field: 'bizType',
|
||||
// 国际化:业务分类
|
||||
name: $t('system.file.platform.field.bizType'),
|
||||
// 国际化:请输入业务分类
|
||||
placeholder: $t('system.file.platform.placeholder.bizType'),
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user