From dd0c7259e6967772ddc73e6aa02f485a4a0e6741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 21 May 2021 17:33:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96app=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 4 ++-- plugins/APPUpdate/index.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index b6373fd..3ac8752 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "lili商城", "appid" : "__UNI__C100675", "description" : "", - "versionName" : "4.0.14", - "versionCode" : 4000014, + "versionName" : "4.0.16", + "versionCode" : 4000016, "transformPx" : false, "app-plus" : { "compatible" : { diff --git a/plugins/APPUpdate/index.js b/plugins/APPUpdate/index.js index dbc776e..9370af4 100644 --- a/plugins/APPUpdate/index.js +++ b/plugins/APPUpdate/index.js @@ -18,6 +18,7 @@ const $iconUrl = "https://lilishop-oss.oss-cn-beijing.aliyuncs.com/app/upgrade.p export const getCurrentNo = function (callback) { // 获取本地应用资源版本号 plus.runtime.getProperty(plus.runtime.appid, function (inf) { + callback && callback({ versionCode: inf.version.replace(/\./g, ""), version: inf.version @@ -802,6 +803,9 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) { export default function (isPrompt = false) { getCurrentNo(version => { getServerNo( res => { + + if( res.version.replace(/\./g, "") > version.versionCode){return false} + if (res.forceUpdate) { if (/\.wgt$/i.test(res.downloadUrl)) { getDownload(res);