From 2ac30eb1f3f7583470320f4691972cde8db2b7f9 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Wed, 6 May 2026 08:23:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(push-config):=20=E5=B0=8F=E7=B1=B3?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E9=85=8D=E7=BD=AE=E6=96=B0=E5=A2=9E=20Androi?= =?UTF-8?q?d=20=E5=8C=85=E5=90=8D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit packageName 字段由租户在推送配置页维护,对应 Xiaomi MiPush restricted_package_name,服务端凭此正确路由推送。 Co-Authored-By: Claude Sonnet 4.6 --- tenant-platform/src/api/app.ts | 1 + tenant-platform/src/views/push/PushConfigView.vue | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tenant-platform/src/api/app.ts b/tenant-platform/src/api/app.ts index 9ed9b3e..6152c71 100644 --- a/tenant-platform/src/api/app.ts +++ b/tenant-platform/src/api/app.ts @@ -61,6 +61,7 @@ export interface PushVendorConfig { appId?: string appKey?: string appSecret?: string + packageName?: string masterSecret?: string clientId?: string clientSecret?: string diff --git a/tenant-platform/src/views/push/PushConfigView.vue b/tenant-platform/src/views/push/PushConfigView.vue index 5ca2626..abfe8c3 100644 --- a/tenant-platform/src/views/push/PushConfigView.vue +++ b/tenant-platform/src/views/push/PushConfigView.vue @@ -206,7 +206,7 @@ function updateViewport() { const pushConfig = reactive>({ huawei: { appId: '', appSecret: '' }, - xiaomi: { appId: '', appKey: '', appSecret: '' }, + xiaomi: { appId: '', appKey: '', appSecret: '', packageName: '' }, oppo: { appId: '', appKey: '', masterSecret: '' }, vivo: { appId: '', appKey: '', appSecret: '' }, honor: { appId: '', clientId: '', clientSecret: '' }, @@ -250,11 +250,12 @@ const vendorDefs: VendorDef[] = [ { key: 'xiaomi', label: '小米 MiPush', - hint: '填写 AppId / AppKey / AppSecret。', + hint: '填写 AppId / AppKey / AppSecret 及 Android 包名。', fields: [ { key: 'appId', label: 'AppId' }, { key: 'appKey', label: 'AppKey' }, { key: 'appSecret', label: 'AppSecret' }, + { key: 'packageName', label: 'Android 包名', placeholder: 'com.example.app' }, ], }, { @@ -354,7 +355,7 @@ function applyConfig(raw?: string | null) { function resetPushConfig() { pushConfig.huawei = { appId: '', appSecret: '' } - pushConfig.xiaomi = { appId: '', appKey: '', appSecret: '' } + pushConfig.xiaomi = { appId: '', appKey: '', appSecret: '', packageName: '' } pushConfig.oppo = { appId: '', appKey: '', masterSecret: '' } pushConfig.vivo = { appId: '', appKey: '', appSecret: '' } pushConfig.honor = { appId: '', clientId: '', clientSecret: '' }