lemon橪 5 лет назад
Родитель
Сommit
dd0c7259e6
2 измененных файлов с 6 добавлено и 2 удалено
  1. 2 2
      manifest.json
  2. 4 0
      plugins/APPUpdate/index.js

+ 2 - 2
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" : {

+ 4 - 0
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);