From 4e7deffe644d4bb7b45e0e1b1e7b07812073d185 Mon Sep 17 00:00:00 2001 From: jevononlie <728254585@qq.com> Date: Wed, 29 May 2024 16:06:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=89=88=E6=9C=AC=E5=8F=B7fi?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mes-ui/uni-app/src/App.vue | 9 +++++---- mes-ui/uni-app/src/manifest.json | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mes-ui/uni-app/src/App.vue b/mes-ui/uni-app/src/App.vue index 25de7579..ca7e8eb5 100644 --- a/mes-ui/uni-app/src/App.vue +++ b/mes-ui/uni-app/src/App.vue @@ -16,11 +16,12 @@ onLaunch(async () => { appId: 'com.chanko.yunxi.mes.android' } const res = await appUpdateApi(params) - console.log('1-0', res,res.versionId) + console.log('1-0', res,res.versionId) plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) { - const version = wgtinfo.version || plus.runtime.version - console.log('1-1', res.versionId,version) - if (res.versionId != version) { + // 参考manifest.json; 1、应用版本名称字段是 version 2、应用版本号字段是versionCode + const versionCode = wgtinfo.versionCode || plus.runtime.versionCode + console.log('1-1', res.versionId,versionCode) + if (res.versionId != versionCode) { uni.showModal({ //提醒用户更新 title: '版本更新', showCancel: false, diff --git a/mes-ui/uni-app/src/manifest.json b/mes-ui/uni-app/src/manifest.json index 15cc35d7..a528cd6f 100644 --- a/mes-ui/uni-app/src/manifest.json +++ b/mes-ui/uni-app/src/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__1AFEDCC", "description" : "美乐嘉", "versionName" : "1", - "versionCode" : 1, + "versionCode" : 2, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { @@ -21,7 +21,9 @@ "delay" : 0 }, /* 模块配置 */ - "modules" : {}, + "modules" : { + "Camera" : {} + }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */