From 36ed1fe3d3d895202e46ecf4ee4caee5ce9e4168 Mon Sep 17 00:00:00 2001 From: DaxPay Dev Date: Thu, 9 Jul 2026 21:44:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(mobile):=20=E7=AE=A1=E7=90=86=E7=AB=AF?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=BA=94=E7=94=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=8C=96=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完善管理端移动应用详情: 微信/支付宝/抖音小程序按平台渲染结构化字段, 支持查看/编辑态与 diffForm 敏感字段保护; 管理端移除公众号, 安卓/iOS 暂灰显。 --- .../src/api/payment/config/mobile-app.api.ts | 8 +- .../langs/en-US/payment/config/mobileApp.json | 29 +- .../langs/zh-CN/payment/config/mobileApp.json | 29 +- .../mobileApp/detail/MobileAppDetail.vue | 538 +++++++++++++++--- 4 files changed, 505 insertions(+), 99 deletions(-) diff --git a/apps/daxpay-admin/src/api/payment/config/mobile-app.api.ts b/apps/daxpay-admin/src/api/payment/config/mobile-app.api.ts index 5017970e9..a15a153cb 100644 --- a/apps/daxpay-admin/src/api/payment/config/mobile-app.api.ts +++ b/apps/daxpay-admin/src/api/payment/config/mobile-app.api.ts @@ -26,7 +26,7 @@ export const MobileAppApi = { /** * 查询单条详情 */ - findById(id: number): Promise> { + findById(id: string): Promise> { return defHttp.get({ url: '/admin/mobile-app/get', params: { id } }); }, @@ -40,7 +40,7 @@ export const MobileAppApi = { /** * 更新启用状态 */ - updateEnabled(id: number, enable: boolean): Promise> { + updateEnabled(id: string, enable: boolean): Promise> { return defHttp.post({ url: '/admin/mobile-app/update-enabled', params: { id, enable }, @@ -56,7 +56,7 @@ export interface MobileAppResult extends BaseEntity { platform?: string; /** 应用名称 */ appName?: string; - /** 平台特有密钥配置(JSON文本) */ + /** 平台特有密钥配置(JSON文本, 敏感字段脱敏) */ appConfig?: string; /** 消息通知配置(JSON文本) */ notifyConfig?: string; @@ -71,7 +71,7 @@ export interface MobileAppResult extends BaseEntity { /** 移动端应用配置保存参数 */ export interface MobileAppParam { /** 主键(更新时传) */ - id?: number; + id?: string; /** 端类型 */ appType?: string; /** 移动平台 */ diff --git a/apps/daxpay-admin/src/locales/langs/en-US/payment/config/mobileApp.json b/apps/daxpay-admin/src/locales/langs/en-US/payment/config/mobileApp.json index 41335425d..b0f101d13 100644 --- a/apps/daxpay-admin/src/locales/langs/en-US/payment/config/mobileApp.json +++ b/apps/daxpay-admin/src/locales/langs/en-US/payment/config/mobileApp.json @@ -24,6 +24,32 @@ "android": "Android App", "ios": "iOS App" }, + "fields": { + "appId": "AppId", + "appIdPlaceholder": "Enter AppId", + "appIdRequired": "Please enter AppId", + "wxAppId": "Mini Program AppId", + "wxAppIdPlaceholder": "Enter WeChat Mini Program AppId", + "appSecret": "AppSecret", + "appSecretPlaceholder": "Enter AppSecret", + "appSecretRequired": "Please enter AppSecret", + "wxAppSecret": "Mini Program AppSecret", + "wxAppSecretPlaceholder": "Enter WeChat Mini Program AppSecret", + "originalId": "Original ID", + "originalIdPlaceholder": "Enter original ID (gh_..., optional)", + "alipayAppId": "Mini Program AppId", + "alipayAppIdPlaceholder": "Enter Alipay Mini Program AppId", + "privateKey": "App Private Key", + "privateKeyPlaceholder": "Enter app private key", + "privateKeyRequired": "Please enter app private key", + "alipayPublicKey": "Alipay Public Key", + "alipayPublicKeyPlaceholder": "Enter Alipay public key", + "alipayPublicKeyRequired": "Please enter Alipay public key", + "dyAppId": "Mini Program AppId", + "dyAppIdPlaceholder": "Enter Douyin Mini Program AppId", + "dyAppSecret": "Mini Program AppSecret", + "dyAppSecretPlaceholder": "Enter Douyin Mini Program AppSecret" + }, "detail": { "back": "Back", "appName": "App Name", @@ -39,6 +65,7 @@ "save": "Save", "saveSuccess": "Saved successfully", "notSupportedAppType": "Unsupported app type", - "emptyPlatformConfig": "No platform config yet, fill in and save to create" + "emptyPlatformConfig": "No platform config yet, fill in and save to create", + "platformComingSoon": "This platform is not available yet; will be handled when the APP is ready" } } diff --git a/apps/daxpay-admin/src/locales/langs/zh-CN/payment/config/mobileApp.json b/apps/daxpay-admin/src/locales/langs/zh-CN/payment/config/mobileApp.json index 4806f4750..688b0b688 100644 --- a/apps/daxpay-admin/src/locales/langs/zh-CN/payment/config/mobileApp.json +++ b/apps/daxpay-admin/src/locales/langs/zh-CN/payment/config/mobileApp.json @@ -24,6 +24,32 @@ "android": "安卓APP", "ios": "iOS APP" }, + "fields": { + "appId": "AppId", + "appIdPlaceholder": "请输入 AppId", + "appIdRequired": "请输入 AppId", + "wxAppId": "小程序 AppId", + "wxAppIdPlaceholder": "请输入微信小程序 AppId", + "appSecret": "AppSecret", + "appSecretPlaceholder": "请输入 AppSecret", + "appSecretRequired": "请输入 AppSecret", + "wxAppSecret": "小程序 AppSecret", + "wxAppSecretPlaceholder": "请输入微信小程序 AppSecret", + "originalId": "原始 ID", + "originalIdPlaceholder": "请输入小程序原始 ID(gh_ 开头, 可选)", + "alipayAppId": "小程序 AppId", + "alipayAppIdPlaceholder": "请输入支付宝小程序 AppId", + "privateKey": "应用私钥", + "privateKeyPlaceholder": "请输入应用私钥", + "privateKeyRequired": "请输入应用私钥", + "alipayPublicKey": "支付宝公钥", + "alipayPublicKeyPlaceholder": "请输入支付宝公钥", + "alipayPublicKeyRequired": "请输入支付宝公钥", + "dyAppId": "小程序 AppId", + "dyAppIdPlaceholder": "请输入抖音小程序 AppId", + "dyAppSecret": "小程序 AppSecret", + "dyAppSecretPlaceholder": "请输入抖音小程序 AppSecret" + }, "detail": { "back": "返回", "appName": "应用名称", @@ -39,6 +65,7 @@ "save": "保存", "saveSuccess": "保存成功", "notSupportedAppType": "不支持的端类型", - "emptyPlatformConfig": "暂无平台配置,填写后保存即可创建" + "emptyPlatformConfig": "暂无平台配置,填写后保存即可创建", + "platformComingSoon": "该平台配置暂未开放,后续 APP 完善时再处理" } } diff --git a/apps/daxpay-admin/src/views/payment/config/mobileApp/detail/MobileAppDetail.vue b/apps/daxpay-admin/src/views/payment/config/mobileApp/detail/MobileAppDetail.vue index 4f559f425..7f08b2845 100644 --- a/apps/daxpay-admin/src/views/payment/config/mobileApp/detail/MobileAppDetail.vue +++ b/apps/daxpay-admin/src/views/payment/config/mobileApp/detail/MobileAppDetail.vue @@ -1,5 +1,5 @@