From 3c98850a36937ffc01110efec5ed97a8151d7806 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Thu, 21 May 2026 15:25:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(app-detail):=20=E4=B8=8B=E8=BD=BD=20licens?= =?UTF-8?q?e=20=E6=96=87=E4=BB=B6=E7=A7=BB=E8=87=B3=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8D=A1=E7=89=87=EF=BC=8C=E9=99=84=20SDK=20?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E5=BC=95=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 授权管理页不再显示下载入口 - 应用信息卡片新增 "SDK 接入文件" 行(LICENSE 开通后可见), 包含下载按钮和 autoInitialize 使用说明 Co-Authored-By: Claude Sonnet 4.6 --- .../src/views/apps/AppDetailView.vue | 12 ++++++--- .../views/license/LicenseManagementView.vue | 25 ------------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/tenant-platform/src/views/apps/AppDetailView.vue b/tenant-platform/src/views/apps/AppDetailView.vue index 2dfab14..6068629 100644 --- a/tenant-platform/src/views/apps/AppDetailView.vue +++ b/tenant-platform/src/views/apps/AppDetailView.vue @@ -23,6 +23,15 @@ 重置 {{ app.description ?? '-' }} + +
+ + 将 license 文件放入应用的 assets/xuqm/ 目录, + 调用 XuqmSDK.autoInitialize(context) 即可完成初始化 + + 下载 license.xuqm +
+
@@ -154,9 +163,6 @@ 授权管理 → - - 下载 License 文件 - 申请开通 diff --git a/tenant-platform/src/views/license/LicenseManagementView.vue b/tenant-platform/src/views/license/LicenseManagementView.vue index 22616a0..90d3a84 100644 --- a/tenant-platform/src/views/license/LicenseManagementView.vue +++ b/tenant-platform/src/views/license/LicenseManagementView.vue @@ -70,7 +70,6 @@
- 下载 License 文件 刷新
@@ -230,30 +229,6 @@ async function reactivateDevice(row: LicenseDevice) { loadData() } -async function downloadLicenseFile() { - const key = appKey.value - if (!key) return - const res = await appApi.downloadLicenseFile(key) - const disposition = res.headers['content-disposition'] as string | undefined - const filename = parseFilename(disposition) ?? `${appName.value || key}.xuqmlicense` - const url = URL.createObjectURL(res.data) - const link = document.createElement('a') - link.href = url - link.download = filename - document.body.appendChild(link) - link.click() - link.remove() - URL.revokeObjectURL(url) -} - -function parseFilename(disposition?: string) { - if (!disposition) return null - const encoded = disposition.match(/filename\*=UTF-8''([^;]+)/i)?.[1] - if (encoded) return decodeURIComponent(encoded) - const plain = disposition.match(/filename="?([^";]+)"?/i)?.[1] - return plain ? decodeURIComponent(plain) : null -} - async function checkServiceEnabled(key: string) { checkingService.value = true serviceEnabled.value = null