From afe698bf46c6df1812e2100971a8838131892dd0 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Sat, 4 Jul 2026 01:51:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(update):=20=E7=89=88=E6=9C=AC=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96=20+=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=94=E7=94=A8=E4=B8=8B=E8=BD=BD=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 版本列表操作列新增"下载"按钮,直接下载 APK - 移除应用商店标签的悬浮提示,仅保留"查看详情"入口 - 新增 /download/:appKey 公开下载页:按设备 UA 识别 Android/iOS/HarmonyOS, 展示对应最新已发布版本;Android 按品牌匹配商店跳转按钮,未匹配时列出所有已配置商店链接; iOS/鸿蒙仅在已发布且配置商店链接时展示,否则提示无可用安装包 Co-Authored-By: Claude Sonnet 5 --- tenant-platform/src/api/update.ts | 23 ++ tenant-platform/src/router/index.ts | 4 + .../src/views/download/DownloadView.vue | 261 ++++++++++++++++++ .../views/update/VersionManagementView.vue | 18 +- 4 files changed, 293 insertions(+), 13 deletions(-) create mode 100644 tenant-platform/src/views/download/DownloadView.vue diff --git a/tenant-platform/src/api/update.ts b/tenant-platform/src/api/update.ts index 5ae9b48..9d7141c 100644 --- a/tenant-platform/src/api/update.ts +++ b/tenant-platform/src/api/update.ts @@ -42,6 +42,7 @@ updateClient.interceptors.request.use((config) => { const skipAuth = ( url.startsWith('/api/v1/updates/app/check') || url.startsWith('/api/v1/updates/app/inspect') || + url.startsWith('/api/v1/updates/public/') || url.startsWith('/api/v1/rn/update/check') || url.startsWith('/api/v1/rn/inspect') || url.startsWith('/api/v1/rn/files/') @@ -240,6 +241,28 @@ export interface UnifiedReleaseManifest { rnBundles: UnifiedRnUploadItem[] } +export interface DownloadPageAppInfo { + versionName: string + versionCode: number + downloadUrl?: string + changeLog?: string + storeUrl?: string + storeLinks?: Record + publishedAt: string +} + +export interface DownloadPageInfo { + android: DownloadPageAppInfo | null + ios: DownloadPageAppInfo | null + harmony: DownloadPageAppInfo | null +} + +export function fetchDownloadPageInfo(appKey: string) { + return updateClient.get<{ data: DownloadPageInfo }>('/api/v1/updates/public/download-info', { + params: { appKey }, + }) +} + export const updateAdminApi = { listAppVersions(appKey: string, platform: 'ANDROID' | 'IOS' | 'HARMONY') { return updateClient.get<{ data: AppVersion[] }>('/api/v1/updates/app/list', { diff --git a/tenant-platform/src/router/index.ts b/tenant-platform/src/router/index.ts index 4deada2..73db5e0 100644 --- a/tenant-platform/src/router/index.ts +++ b/tenant-platform/src/router/index.ts @@ -16,6 +16,10 @@ const router = createRouter({ path: '/forgot-password', component: () => import('@/views/auth/ForgotPasswordView.vue'), }, + { + path: '/download/:appKey', + component: () => import('@/views/download/DownloadView.vue'), + }, { path: '/', component: () => import('@/views/layout/MainLayout.vue'), diff --git a/tenant-platform/src/views/download/DownloadView.vue b/tenant-platform/src/views/download/DownloadView.vue new file mode 100644 index 0000000..55e40af --- /dev/null +++ b/tenant-platform/src/views/download/DownloadView.vue @@ -0,0 +1,261 @@ + + + + + diff --git a/tenant-platform/src/views/update/VersionManagementView.vue b/tenant-platform/src/views/update/VersionManagementView.vue index d384cff..2aa4312 100644 --- a/tenant-platform/src/views/update/VersionManagementView.vue +++ b/tenant-platform/src/views/update/VersionManagementView.vue @@ -77,19 +77,7 @@