Commit 141f2623 by liujinsa

提交

parent 41111d4f
......@@ -7,7 +7,7 @@
</div>
<div class="monthList flex flex-cen flex-btw van-hairline--bottom" v-for="(monthItem,index1) in item.month" :key="index1">
<div class="state">{{monthItem}}月账单</div>
<van-button :loading="isLoading" @click="downloadPdf(item.year + monthItem)">下载</van-button>
<van-button @click="downloadPdf(item.year + monthItem)">下载</van-button>
</div>
</div>
</div>
......@@ -32,7 +32,6 @@ export default {
},
onLoad(options){
console.log(options,'xiazai')
this.getList();
live.getUserInfo().then(res => {
if (res.data.code == 200) {
this.userId = res.data.data ? res.data.data.userId : ''
......@@ -40,7 +39,10 @@ export default {
})
},
onShow() {
// console.log(getTokenmu(),'userId')
},
onReady(){
this.list = []
this.getList();
},
methods: {
filterDateFun(arr){
......@@ -83,7 +85,10 @@ export default {
window.location.href = url
},
downloadPdf(id){
this.isLoading = true;
wx.showLoading({ // 显示加载中loading效果
title: "加载中",
mask: true //开启蒙版遮罩
});
let Temurl = this.baseUrl + '/customdev'+`/${hashids.encode(id)}` + `/${hashids.encode(this.userId)}` +`?mixid=${this.$store.state.mixid}`
console.log(Temurl,'mkurl')
let pdfurl = this.baseUrl+`/innerApi/utilsService/genPdf?url=${Temurl}`
......@@ -107,21 +112,24 @@ export default {
wx.showToast({
title: '打开文档成功',
})
_this.isLoading = false;
wx.hideLoading();
// _this.isLoading = false;
console.log('打开文档成功',res)
},
fail: (err) =>{
wx.showToast({
title: '打开文档失败',
})
console.log('打开文档失败',err)
_this.isLoading = false;
wx.hideLoading();
console.log('打开文档失败',err)
// _this.isLoading = false;
}
})
},
fail : (err) => {
console.log('下载失败',err)
_this.isLoading = false;
// _this.isLoading = false;
wx.hideLoading();
wx.showToast({
title: '打开文档失败',
})
......@@ -135,7 +143,7 @@ export default {
console.log(res,'res')
if(res.progress == 100){
console.log('下载成功')
this.isLoading = false;
wx.hideLoading();
}
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment