Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shuaiguo
5 years ago
Commit
05c7d63c5e4b2fe904d7a6075432dfb58caf65dc
1 parent
21135b69
feat(我的收入): 数据获取
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
apps/store/home/mine.js
apps/store/home/mine.js
View file @
05c7d63
...
...
@@ -33,6 +33,7 @@ export default function() {
currentPage
:
1
,
pageSize
:
20
,
totalPage
:
0
,
isFetching
:
false
,
list
:
[]
},
incomeInfo
:
{
...
...
@@ -40,6 +41,7 @@ export default function() {
currentPage
:
1
,
pageSize
:
20
,
totalPage
:
0
,
isFetching
:
false
,
list
:
[]
}
},
...
...
@@ -425,7 +427,15 @@ export default function() {
},
async
fetchInComeAssets
({
commit
,
state
},
isRefresh
)
{
let
{
currentPage
,
list
,
pageSize
}
=
state
.
assetData
.
incomeInfo
;
const
{
incomeInfo
}
=
state
.
assetData
;
if
(
incomeInfo
.
isFetching
)
{
return
;
}
let
{
currentPage
,
list
,
pageSize
}
=
incomeInfo
;
commit
(
'setAssets'
,
{
incomeInfo
:
{...
incomeInfo
,
isFetching
:
true
}});
const
page
=
isRefresh
?
1
:
currentPage
+
1
;
...
...
@@ -443,6 +453,7 @@ export default function() {
let
assetData
=
parseAssetList
(
result
.
data
);
assetData
.
list
=
[...
list
,
...
assetData
.
list
];
assetData
.
isFetching
=
false
;
commit
(
'setAssetStatisticalInfo'
,
result
.
data
.
summary
);
commit
(
'setAssets'
,
{
incomeInfo
:
assetData
});
...
...
@@ -452,7 +463,15 @@ export default function() {
},
async
fetchWaitApplyAssets
({
commit
,
state
,
dispatch
},
isRefresh
)
{
let
{
currentPage
,
list
,
pageSize
}
=
state
.
assetData
.
waitApplyInfo
;
const
{
waitApplyInfo
}
=
state
.
assetData
;
if
(
waitApplyInfo
.
isFetching
)
{
return
;
}
let
{
currentPage
,
list
,
pageSize
}
=
waitApplyInfo
;
commit
(
'setAssets'
,
{
waitApplyInfo
:
{...
waitApplyInfo
,
isFetching
:
true
}});
const
page
=
isRefresh
?
1
:
currentPage
+
1
;
...
...
@@ -470,6 +489,7 @@ export default function() {
let
assetData
=
parseAssetList
(
result
.
data
);
assetData
.
list
=
[...
list
,
...
assetData
.
list
];
assetData
.
isFetching
=
false
;
commit
(
'setAssetStatisticalInfo'
,
result
.
data
.
summary
);
commit
(
'setAssets'
,
{
waitApplyInfo
:
assetData
});
...
...
Please
register
or
login
to post a comment