zouling пре 1 година
родитељ
комит
3a8dcd8fd4
2 измењених фајлова са 13 додато и 4 уклоњено
  1. 2 2
      manifest.json
  2. 11 2
      pages/mine/index.vue

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "潜山市智慧政协平台",
     "appid" : "__UNI__FF95F38",
     "description" : "",
-    "versionName" : "1.1.7",
-    "versionCode" : 117,
+    "versionName" : "1.1.8",
+    "versionCode" : 118,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,

+ 11 - 2
pages/mine/index.vue

@@ -287,6 +287,13 @@
 			if (checkPermi(['system:notice:number'])) {
 				// this.getNoticenumber()
 			}
+			// #ifdef APP-PLUS
+			plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
+				that.$store.dispatch('SetwgtFn', widgetInfo.version).then(() => {
+					that.wgtcode=widgetInfo.version
+				})
+			});
+			// #endif
 		},
 		methods: {
 			checkPermi,
@@ -346,7 +353,9 @@
 			onlineWgt() {
 				let that = this;
 				plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
-					that.$store.dispatch('SetwgtFn', widgetInfo.version).then(() => {})
+					that.$store.dispatch('SetwgtFn', widgetInfo.version).then(() => {
+						that.wgtcode=widgetInfo.version
+					})
 					that.comparisonVersionNo(widgetInfo.versionCode);
 				});
 				// that.comparisonVersionNo()
@@ -363,7 +372,7 @@
 						console.log(versionNos, 'versionNos')
 						// console.log(res.data.path);
 						let filePath = res.data.path;
-						if (versionNos != versionCode) { //服务器返回1更新,0则不更新
+						if (Number(versionNos) > Number(versionCode)) { //服务器返回1更新,0则不更新
 							uni.showModal({
 								title: '提示',
 								content: '发现新版本,是否升级',