import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'; export default function (){ // 初始化appVersion initAppVersion(); // 检查更新 checkUpdate(); } /** * // 初始化appVersion */ function initAppVersion(){ // #ifdef APP-PLUS 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 } }); // #endif }