...
|
...
|
@@ -141,15 +141,11 @@ export default function() { |
|
|
return tabList;
|
|
|
},
|
|
|
getYearMonth(state) {
|
|
|
let beginTime = moment(
|
|
|
new Date(state.filterData.beginTime * 1000),
|
|
|
).format('YYYY-MM');
|
|
|
let endTime = moment(new Date(state.filterData.endTime * 1000)).format(
|
|
|
'YYYY-MM',
|
|
|
);
|
|
|
let beginTime = moment(new Date(state.filterData.beginTime * 1000)).format('YYYY-MM');
|
|
|
let endTime = moment(new Date(state.filterData.endTime * 1000)).format('YYYY-MM');
|
|
|
|
|
|
var a = moment(endTime.split('-'));
|
|
|
var b = moment(beginTime.split('-'));
|
|
|
let a = moment(endTime.split('-'));
|
|
|
let b = moment(beginTime.split('-'));
|
|
|
let yearNum = a.diff(b, 'years');
|
|
|
let monthNum = a.diff(b, 'months');
|
|
|
let beginYear = beginTime.split('-')[0];
|
...
|
...
|
@@ -239,9 +235,7 @@ export default function() { |
|
|
},
|
|
|
addWallet(state, walletData) {
|
|
|
walletData.list.map(item => {
|
|
|
item.time = moment(new Date(item.createTime * 1000)).format(
|
|
|
'YYYY.MM.DD HH:mm',
|
|
|
);
|
|
|
item.time = moment(new Date(item.createTime * 1000)).format('YYYY.MM.DD HH:mm');
|
|
|
item.amount = Number(Math.abs(item.amount)).toFixed(2);
|
|
|
return item;
|
|
|
});
|
...
|
...
|
@@ -440,8 +434,7 @@ export default function() { |
|
|
let newList = [...oldList, ...data.list];
|
|
|
|
|
|
walletData.currentPage = data.page;
|
|
|
walletData.endReached =
|
|
|
data.list.length === 0 || data.page === data.totalPage;
|
|
|
walletData.endReached = data.list.length === 0 || data.page === data.totalPage;
|
|
|
walletData.list = newList;
|
|
|
commit('addWallet', walletData);
|
|
|
}
|
...
|
...
|
|