|
|
@ -146,7 +146,7 @@ export default { |
|
|
|
if(res.statu){ |
|
|
|
if(res.data.appVersion!=this.appVersion){ |
|
|
|
this.isShowModal=true |
|
|
|
this.appDownLoadUrl=res.data.appDownloadUrl |
|
|
|
this.appDownLoadUrl=host("version",res.data.appDownloadUrl) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -157,7 +157,8 @@ export default { |
|
|
|
this.modalOptions.modalTitle="开始下载" |
|
|
|
this.modalOptions.isDownApp=true |
|
|
|
this.modalOptions.isShowCancel=false |
|
|
|
var dtask=plus.downloader.createDownload(host()+'/'+this.appDownLoadUrl,{ |
|
|
|
console.log(this.appDownLoadUrl,'-----url----') |
|
|
|
var dtask=plus.downloader.createDownload(this.appDownLoadUrl,{ |
|
|
|
filename: "_downloads/", |
|
|
|
timeout:30, |
|
|
|
retry:1 |
|
|
@ -177,7 +178,7 @@ export default { |
|
|
|
this.modalOptions.modalContent="下载升级包失败!" |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(dtask,'--dtask---') |
|
|
|
console.log(dtask,'--dtask----') |
|
|
|
if(dtask){ |
|
|
|
dtask.addEventListener("statechanged",e=>{ |
|
|
|
console.log("totalSize",e.totalSize) |
|
|
|