应用版本号fix

dev
jevononlie 5 months ago
parent 952e68a998
commit 4e7deffe64

@ -18,9 +18,10 @@ onLaunch(async () => {
const res = await appUpdateApi(params) 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) { plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
const version = wgtinfo.version || plus.runtime.version // manifest.json 1 version 2versionCode
console.log('1-1', res.versionId,version) const versionCode = wgtinfo.versionCode || plus.runtime.versionCode
if (res.versionId != version) { console.log('1-1', res.versionId,versionCode)
if (res.versionId != versionCode) {
uni.showModal({ // uni.showModal({ //
title: '版本更新', title: '版本更新',
showCancel: false, showCancel: false,

@ -3,7 +3,7 @@
"appid" : "__UNI__1AFEDCC", "appid" : "__UNI__1AFEDCC",
"description" : "美乐嘉", "description" : "美乐嘉",
"versionName" : "1", "versionName" : "1",
"versionCode" : 1, "versionCode" : 2,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -21,7 +21,9 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"Camera" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */

Loading…
Cancel
Save