appInit.js 583 字节
Newer Older
芊里 已提交
1 2 3 4 5 6 7 8 9 10 11
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
export default function (){
	
	// 初始化appVersion
	initAppVersion();
	
	// 检查更新
	checkUpdate();
}

function initAppVersion(){
L
123  
linju 已提交
12
	// #ifdef APP-NVUE
芊里 已提交
13 14 15 16 17 18 19 20 21 22 23
	let appid = plus.runtime.appid;
	plus.runtime.getProperty(appid ,(wgtInfo) => {
		 wgtInfo.version 
		 let appVersion = plus.runtime;
		 getApp({allowDefault: true}).appVersion = {
			 appid,
			 version:appVersion,
			 wgtVersion:wgtInfo,
			 finall:appVersion.versionCode > wgtInfo.versionCode ? appVersion : wgtInfo
		 }
	});
L
123  
linju 已提交
24
	// #endif
芊里 已提交
25
}