|
|
|
@ -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,
|
|
|
|
|