From 9ea09c95f2c4a4c5b8e13cb398a29dc7fec59655 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 19 Sep 2026 19:06:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B=E2=80=94=E2=80=94?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83=E5=90=8E=E6=97=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=86=B7=E5=90=AF=E5=8A=A8=E9=9D=99=E9=BB=98?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD+=E5=BC=B9=E7=AA=97=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E9=87=8D=E5=90=AF=EF=BC=9B=E7=89=88=E6=9C=ACv1.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/App.vue | 24 ++++++++++++++++++++++++ client/src/manifest.json | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/client/src/App.vue b/client/src/App.vue index f6d878b..64167fc 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -9,6 +9,30 @@ import { onLaunch, onShow, onHide } from '@dcloudio/uni-app' onLaunch(() => { initTheme() + // #ifdef MP-WEIXIN + // 版本更新检测:新版本发布后,旧版本用户冷启动时静默下载、弹窗引导重启 + const um = uni.getUpdateManager && uni.getUpdateManager() + if (um) { + um.onUpdateReady(() => { + uni.showModal({ + title: '更新提示', + content: '新版本已经准备好,是否重启应用?', + confirmText: '立即重启', + cancelText: '稍后', + success: (m) => { + if (m.confirm) um.applyUpdate() + }, + }) + }) + um.onUpdateFailed(() => { + uni.showModal({ + title: '更新提示', + content: '新版本下载失败,请删除当前小程序后重新搜索打开', + showCancel: false, + }) + }) + } + // #endif }) onShow(() => {}) diff --git a/client/src/manifest.json b/client/src/manifest.json index de26396..76d66e8 100644 --- a/client/src/manifest.json +++ b/client/src/manifest.json @@ -1,7 +1,7 @@ { "name": "宇之然AI维度", "appid": "wxdad62baf4ccd09e3", - "versionName": "1.4.2", + "versionName": "1.4.3", "versionCode": "100", "description": "AI 知识探索社区 — 从5个维度系统理解人工智能", "uni-app": {