|
|
@ -99,7 +99,7 @@ |
|
|
|
:content="modalOptions.modalContent" |
|
|
|
:show-confirm-button="true" |
|
|
|
:show-cancel-button="modalOptions.isShowCancel" |
|
|
|
@close="isShowModal=false" |
|
|
|
@close="!modalOptions.isDownApp && (isShowModal=false)" |
|
|
|
@cancel="isShowModal=false" |
|
|
|
@confirm="upgrade"> |
|
|
|
<template v-if="modalOptions.isDownApp"> |
|
|
@ -215,6 +215,8 @@ import request,{host} from '@/common/request' |
|
|
|
this.modalOptions.modalContent="下载升级包失败!" |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(dtask,'--dtask---') |
|
|
|
if(dtask){ |
|
|
|
dtask.addEventListener("statechanged",e=>{ |
|
|
|
if(e&&e.totalSize>0){ |
|
|
|
// console.log("state",e.state,"::::","--------statechanged-----------",e.downloadedSize) |
|
|
@ -222,6 +224,15 @@ import request,{host} from '@/common/request' |
|
|
|
} |
|
|
|
},false) |
|
|
|
dtask.start(); |
|
|
|
}else{ |
|
|
|
this.isShowModal=false |
|
|
|
this.modalOptions=this.$options.data().modalOptions |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:"下载最新版本失败!", |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
//#endif |
|
|
|
}, |
|
|
|