From 61dd09763ada6554d5a7967e007fd58e88966a41 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Sat, 16 May 2026 15:34:42 +0800 Subject: [PATCH] feat: add app transfer, parallel upload toggle, webhook type config, fix Chinese encoding in JWT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ops-platform: add 一键转移 button and dialog to AppListView; add transferApp API call - tenant-platform/update: parallel upload toggle in 凭据配置 tab; REVIEW_WEBHOOK notifyType select (钉钉/企微/飞书/自定义); select field support in store config dialog with visibleWhen - tenant-platform/jwt: fix Chinese garble in right-corner nickname by decoding JWT payload as UTF-8 via TextDecoder instead of raw atob() Co-Authored-By: Claude Sonnet 4.6 --- ops-platform/src/api/ops.ts | 3 + ops-platform/src/views/apps/AppListView.vue | 95 ++++++++++++++++++- tenant-platform/src/utils/jwt.ts | 6 +- .../views/update/VersionManagementView.vue | 64 ++++++++++++- 4 files changed, 161 insertions(+), 7 deletions(-) diff --git a/ops-platform/src/api/ops.ts b/ops-platform/src/api/ops.ts index 08ec1c6..07c5366 100644 --- a/ops-platform/src/api/ops.ts +++ b/ops-platform/src/api/ops.ts @@ -251,6 +251,9 @@ export const opsApi = { listAppServices: (id: string) => client.get<{ data: FeatureServiceItem[] }>(`/ops/apps/${id}/services`), + transferApp: (appKey: string, targetTenantId: string) => + client.post(`/ops/apps/${appKey}/transfer`, { targetTenantId }), + listOperationLogs: (page = 0, size = 20) => client.get<{ data: OpsLogPage }>('/ops/operation-logs', { params: { page, size } }), diff --git a/ops-platform/src/views/apps/AppListView.vue b/ops-platform/src/views/apps/AppListView.vue index c9b14c3..55bb907 100644 --- a/ops-platform/src/views/apps/AppListView.vue +++ b/ops-platform/src/views/apps/AppListView.vue @@ -37,15 +37,53 @@ - + + + + + + {{ transferTarget?.name }} ({{ transferTarget?.appKey }}) + + + {{ transferTarget?.tenantName || transferTarget?.tenantId }} + + + + + + + + + + @@ -54,6 +92,7 @@ diff --git a/tenant-platform/src/utils/jwt.ts b/tenant-platform/src/utils/jwt.ts index e02c4b1..88e0e6f 100644 --- a/tenant-platform/src/utils/jwt.ts +++ b/tenant-platform/src/utils/jwt.ts @@ -4,7 +4,11 @@ export function decodeJwtPayload(token: string): Record | null if (!payload) return null const normalized = payload.replace(/-/g, '+').replace(/_/g, '/') const padded = normalized.padEnd(Math.ceil(normalized.length / 4) * 4, '=') - return JSON.parse(atob(padded)) as Record + const binary = atob(padded) + // Decode as UTF-8 to handle multi-byte characters (e.g. Chinese) + const bytes = Uint8Array.from(binary, c => c.charCodeAt(0)) + const json = new TextDecoder('utf-8').decode(bytes) + return JSON.parse(json) as Record } catch { return null } diff --git a/tenant-platform/src/views/update/VersionManagementView.vue b/tenant-platform/src/views/update/VersionManagementView.vue index 60a7458..2ff0271 100644 --- a/tenant-platform/src/views/update/VersionManagementView.vue +++ b/tenant-platform/src/views/update/VersionManagementView.vue @@ -205,6 +205,15 @@ /> +
+ 并行上传 + + 开启后同时向所有商店提交包,关闭后逐个排队上传 +