| 
					
				 | 
			
			
				@@ -1,5 +1,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		request 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} from 'common/request/request' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	require("promise.prototype.finally").shim() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		mapState, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		mapMutations 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} from 'vuex' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -35,9 +39,38 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		onLaunch() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			this.$u.route({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				url: 'pages/login/upgrade' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			request({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					url: '/baseReq/apkUpgrade', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					method: 'get', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					params: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						osType: 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					console.log(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					console.log(res.data.forceVersion) //最低版本 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					console.log(res.data.msg) //更新文案 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					console.log(res.data.url) //下载最新版地址 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					console.log(res.data.version) //最新版本 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						console.log(wgtinfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						console.log(wgtinfo.version); //版本号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						if (wgtinfo.version != res.data.forceVersion || wgtinfo.version != res.data.version) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							console.log("需要更新") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						}else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							console.log("已是最新版本") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}).catch(err => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					console.log(err) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				.finally(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					// Loading.close() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// 1.1.0版本之前关于http拦截器代码,已平滑移动到/common/http.interceptor.js中 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// 注意,需要在/main.js中实例化Vue之后引入如下(详见文档说明): 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// import httpInterceptor from '@/common/http.interceptor.js' 
			 |