Browse Source

修改版本请求接口地址

master
邓宏 2 years ago
parent
commit
174b537f1d
  1. 7
      pages/home/login.vue

7
pages/home/login.vue

@ -146,7 +146,7 @@ export default {
if(res.statu){ if(res.statu){
if(res.data.appVersion!=this.appVersion){ if(res.data.appVersion!=this.appVersion){
this.isShowModal=true 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.modalTitle="开始下载"
this.modalOptions.isDownApp=true this.modalOptions.isDownApp=true
this.modalOptions.isShowCancel=false 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/", filename: "_downloads/",
timeout:30, timeout:30,
retry:1 retry:1
@ -177,7 +178,7 @@ export default {
this.modalOptions.modalContent="下载升级包失败!" this.modalOptions.modalContent="下载升级包失败!"
} }
}) })
console.log(dtask,'--dtask---') console.log(dtask,'--dtask----')
if(dtask){ if(dtask){
dtask.addEventListener("statechanged",e=>{ dtask.addEventListener("statechanged",e=>{
console.log("totalSize",e.totalSize) console.log("totalSize",e.totalSize)

Loading…
Cancel
Save