Browse Source

修改版本请求地址

master
邓宏 2 years ago
parent
commit
64679f6377
  1. 8
      pages/home/login.vue

8
pages/home/login.vue

@ -80,7 +80,7 @@
</view>
</template>
<script>
import request from "@/common/request"
import request,{host} from "@/common/request"
export default {
data(){
return{
@ -157,11 +157,12 @@ export default {
this.modalOptions.modalTitle="开始下载"
this.modalOptions.isDownApp=true
this.modalOptions.isShowCancel=false
var dtask=plus.downloader.createDownload(this.appDownLoadUrl,{
var dtask=plus.downloader.createDownload(host()+'/'+this.appDownLoadUrl,{
filename: "_downloads/",
timeout:30,
retry:1
},(d,status)=>{
console.log(d,status,'----111----')
this.modalOptions.isDownApp=false
this.modalOptions.asyncClose=false
this.modalOptions.okText="确认"
@ -179,8 +180,9 @@ export default {
console.log(dtask,'--dtask---')
if(dtask){
dtask.addEventListener("statechanged",e=>{
console.log("totalSize",e.totalSize)
if(e&&e.totalSize>0){
// console.log("state",e.state,"::::","--------statechanged-----------",e.downloadedSize)
console.log("state",e.state,";","downloadedSize",e.downloadedSize)
this.modalOptions.process=Math.floor((e.downloadedSize/e.totalSize)*10000)/100
}
},false)

Loading…
Cancel
Save