|
|
@@ -9,13 +9,10 @@ export default {
|
|
|
onLoad(){
|
|
|
// #ifdef APP-PLUS
|
|
|
plus.runtime.getProperty(plus.runtime.appid,(wgtinfo)=>{
|
|
|
- console.log(JSON.stringify(wgtinfo));
|
|
|
- console.log(wgtinfo.version);
|
|
|
this.version = wgtinfo.version
|
|
|
});
|
|
|
- uni.getSystemInfo({
|
|
|
- success:(res) => {
|
|
|
- console.log(res.platform);
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success:(res) => {
|
|
|
//检测当前平台,如果是安卓则启动安卓更新
|
|
|
if(res.platform=="android"){
|
|
|
this.androidCheckUpdate()
|
|
|
@@ -34,7 +31,6 @@ export default {
|
|
|
if(version <= this.version){
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
if(plus.networkinfo.getCurrentType()!=3){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'新版本更新',cancelText:'稍后',okText:'使用流量更新'},() => {
|
|
|
@@ -50,7 +46,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
install(version){
|
|
|
- console.log(APIHOST+'/apk/'+version+'.apk')
|
|
|
uni.showToast({ title: '后台下载中...', mask: false, duration: 1200,icon:"none"})
|
|
|
var dtask = plus.downloader.createDownload( APIHOST+'/apk/'+version+'.apk', {}, function ( d, status ) {
|
|
|
// 下载完成
|