...
|
...
|
@@ -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});
|
...
|
...
|
|