Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
141f2623
Commit
141f2623
authored
Aug 29, 2022
by
liujinsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
41111d4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
src/pages/stateAccountList/index.vue
+17
-9
No files found.
src/pages/stateAccountList/index.vue
View file @
141f2623
...
...
@@ -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
()
;
}
})
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment