xiaol 1 mesiac pred
rodič
commit
c960002363

+ 1 - 1
manifest.json

@@ -3,7 +3,7 @@
     "appid" : "__UNI__2978829",
     "description" : "一款电商App",
     "versionName" : "3.0.97",
-    "versionCode" : 317,
+    "versionCode" : 310,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 75 - 50
pages/index/index.vue

@@ -389,64 +389,89 @@
 				const appType = uni.getSystemInfoSync().platform;
 				if (plus != null) {
 					plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
+						let versionCode = wgtinfo.versionCode;
 						if (appType == "ios") {
+							const getIosUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=6474850968'
+							const iosAppStroeUrl ='https://apps.apple.com/cn/app/%E6%98%93%E8%B6%A3cbb/id6474850968';
 							uni.setStorageSync("showData", true)
-						} else {
-							uni.setStorageSync("showData", false)
-						}
-						let versionCode = wgtinfo.versionCode;
-						this
-							.request
-							.post("sysInit", {
-								code: versionCode
-							})
-							.then(res => {
-								console.log(res, 'res')
-								if (res.code == 200) {
-
-									this.setSys(res.data);
-
-									if (wgtinfo.versionCode < res.data.app_code) {
-										uni.setStorageSync("showData", true)
-										const upDater = uni.requireNativePlugin("CL-UpDater");
-										let options = {
-											title: "升级",
-											con: res.data.app_update,
-											downUrl: this.$device.platform == 'ios' ? encodeURI(res
-												.data.ios_url) : encodeURI(res.data.android_url), //必填
-											hidCancelbtn: true, //是否隐藏取消按钮;
-											btnBgColor: "#ff3300", //设置按钮背景色颜色
-											updateBtnText: "升级", //升级按钮文字,默认为立即升级
-											topImgBg: "", //非必填,用于自定义;自定义方法请参考demo,
-											hidBackBtn: true, //可选 默认为false(即会显示后台更新按钮), 设置android 整包更新弹框是否显示后台更新按钮,这个只有android整包更新才有这个参数,热更新是是无法设置的。
-											verCode: res.data
-												.app_version, //最新apk版本号 可选  用于Android整包升级,避免用户取消安装apk时,重复下载问题,如果不传的话,apk将会重新下载,
-											downMsgTip: "资源下载中,请稍后...", //可选(android)
-											goBackBtnText: "进入后台", //可选(android)
-										};
-										//必需提供下载地址;
-										upDater.startUpdate(options, () => {});
-									} else if (wgtinfo.versionCode > res.data.app_code) {
+					      uni.request({
+								url: getIosUpAppUrl,
+								method: 'POST',
+								data: {},
+								success: res => {
+									let version = res.data.results[0].version;
+									if (wgtinfo.versionCode < version) {
+										uni.showModal({
+											title: '提示',
+											content: '请更新应用',
+											showCancel: false,
+											success(e) {
+												plus.runtime.openURL(
+													iosAppStroeUrl
+												);
+											}
+										});
+									} else if (wgtinfo.versionCode > version) {
 										uni.setStorageSync("showData", false)
 									} else {
 										uni.setStorageSync("showData", true)
 									}
-
-									if (res.data.is_audit == 0) {
-										this.getGps({
-											page: this,
-											fn: (res) => {
-												console.log(res);
-												this.getData(true);
-											},
-											err: (err) => {
-												this.getData(true);
-											}
-										});
-									}
-
+								},
+								fail: res => {
+									// store.commit('changeState', true);
+									console.log(res, 'shib');
 								}
 							});
+						} else {
+							uni.setStorageSync("showData", false)
+							this.request.post("sysInit", {
+									code: versionCode
+								})
+								.then(res => {
+									console.log(res, 'res')
+									if (res.code == 200) {
+										this.setSys(res.data);
+										if (wgtinfo.versionCode < res.data.app_code) {
+											uni.setStorageSync("showData", true)
+											const upDater = uni.requireNativePlugin("CL-UpDater");
+											let options = {
+												title: "升级",
+												con: res.data.app_update,
+												downUrl: this.$device.platform == 'ios' ? encodeURI(res
+													.data.ios_url) : encodeURI(res.data.android_url), //必填
+												hidCancelbtn: true, //是否隐藏取消按钮;
+												btnBgColor: "#ff3300", //设置按钮背景色颜色
+												updateBtnText: "升级", //升级按钮文字,默认为立即升级
+												topImgBg: "", //非必填,用于自定义;自定义方法请参考demo,
+												hidBackBtn: true, //可选 默认为false(即会显示后台更新按钮), 设置android 整包更新弹框是否显示后台更新按钮,这个只有android整包更新才有这个参数,热更新是是无法设置的。
+												verCode: res.data
+													.app_version, //最新apk版本号 可选  用于Android整包升级,避免用户取消安装apk时,重复下载问题,如果不传的话,apk将会重新下载,
+												downMsgTip: "资源下载中,请稍后...", //可选(android)
+												goBackBtnText: "进入后台", //可选(android)
+											};
+											//必需提供下载地址;
+											upDater.startUpdate(options, () => {});
+										} else if (wgtinfo.versionCode > res.data.app_code) {
+											uni.setStorageSync("showData", false)
+										} else {
+											uni.setStorageSync("showData", true)
+										}
+										if (res.data.is_audit == 0) {
+											this.getGps({
+												page: this,
+												fn: (res) => {
+													console.log(res);
+													this.getData(true);
+												},
+												err: (err) => {
+													this.getData(true);
+												}
+											});
+										}
+									}
+								});
+						}
+						
 
 					});
 				}

+ 1 - 1
unpackage/dist/build/web/index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>CBB</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.2da1efab.css><script src=https://cn-shanghai-aliyun-cloudauth.oss-cn-shanghai.aliyuncs.com/web_sdk_js/jsvm_all.js></script><script src="https://cstaticdun.126.net/load.min.js?t=201903281201"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><script src="https://cstaticdun.126.net/load.min.js?t=201903281201"></script><div id=app></div><script src=/h5/static/js/chunk-vendors.f6948fc5.js></script><script src=/h5/static/js/index.2b3b0142.js></script></body></html><script>if(("standalone" in window.navigator) && window.navigator.standalone){
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.2da1efab.css><script src=https://cn-shanghai-aliyun-cloudauth.oss-cn-shanghai.aliyuncs.com/web_sdk_js/jsvm_all.js></script><script src="https://cstaticdun.126.net/load.min.js?t=201903281201"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><script src="https://cstaticdun.126.net/load.min.js?t=201903281201"></script><div id=app></div><script src=/h5/static/js/chunk-vendors.f6948fc5.js></script><script src=/h5/static/js/index.dd1870f6.js></script></body></html><script>if(("standalone" in window.navigator) && window.navigator.standalone){
 	var noddy, remotes = false;
 	document.addEventListener('click', function(event) {
 		noddy = event.target;

+ 0 - 0
unpackage/dist/dev/app-plus/static/img/91cdb0a89a13ce8475b7a8d8ea51abf.jpg → unpackage/dist/build/web/static/img/img03.jpg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/web/static/js/index.dd1870f6.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/web/static/js/pages-guild-index.0583317a.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/web/static/js/pages-guild-index.46346f16.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/web/static/js/pages-user-bank-save-alipay.0d81a292.js


BIN
unpackage/dist/build/web/web.zip


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


BIN
unpackage/dist/dev/app-plus/static/img/61843ef8701771857d60fe855aff8aa.png


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov