...
|
...
|
@@ -2,7 +2,7 @@ import { parseAssetList, formatNumber } from '../../utils/mine-handler'; |
|
|
import { get, set } from 'lodash';
|
|
|
import { getImgUrl } from '../../common/utils';
|
|
|
import moment from 'moment';
|
|
|
import { sellerOrderStatus, ownType } from '../../../constants/order-constants';
|
|
|
import { sellerOrderStatus, ownType } from 'constants/order-constants';
|
|
|
|
|
|
// const uid = '600046428';
|
|
|
// const uid = '500031424';
|
...
|
...
|
@@ -46,7 +46,7 @@ export default function() { |
|
|
endTime: 0,
|
|
|
},
|
|
|
userWalletInfo: {
|
|
|
totalAmount: 0.00,
|
|
|
totalAmount: 0.0,
|
|
|
withdrawLimit: 0,
|
|
|
withdrawAmount: 0,
|
|
|
shareSettlementAmount: 0,
|
...
|
...
|
@@ -128,22 +128,25 @@ export default function() { |
|
|
name: 'coupon',
|
|
|
title: '我的优惠券',
|
|
|
num: state.couponNum,
|
|
|
page: 'Coupon'
|
|
|
page: 'Coupon',
|
|
|
},
|
|
|
service: {
|
|
|
name: 'service',
|
|
|
title: '我的客服',
|
|
|
page: 'service'
|
|
|
page: 'service',
|
|
|
},
|
|
|
resource2: { name: 'resource2', data: state.resource2 },
|
|
|
|
|
|
};
|
|
|
|
|
|
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',
|
|
|
);
|
|
|
|
|
|
let a = moment(endTime.split('-'));
|
|
|
let b = moment(beginTime.split('-'));
|
...
|
...
|
@@ -225,7 +228,7 @@ export default function() { |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
addCouponSummary(state, {count}) {
|
|
|
addCouponSummary(state, { count }) {
|
|
|
state.couponNum = count;
|
|
|
},
|
|
|
addAssets(state, assetData) {
|
...
|
...
|
@@ -236,7 +239,9 @@ 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;
|
|
|
});
|
...
|
...
|
@@ -326,9 +331,7 @@ export default function() { |
|
|
}
|
|
|
},
|
|
|
async fetchSellerOrder({ commit }) {
|
|
|
const result = await this.$api.get(
|
|
|
'/api/ufo/mine/seller/orderSummary',
|
|
|
);
|
|
|
const result = await this.$api.get('/api/ufo/mine/seller/orderSummary');
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
commit('addSellerOrder', { orderSumList: result.data });
|
...
|
...
|
@@ -350,11 +353,11 @@ export default function() { |
|
|
commit('addOrderSummary', { data: result.data });
|
|
|
}
|
|
|
},
|
|
|
async fetchCoupon({commit}) {
|
|
|
async fetchCoupon({ commit }) {
|
|
|
const result = await this.$api.get('/api/ufo/mine/coupon');
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
commit('addCouponSummary', { count: result.data});
|
|
|
commit('addCouponSummary', { count: result.data });
|
|
|
}
|
|
|
},
|
|
|
async fetchAssets({ commit, state }, isRefresh) {
|
...
|
...
|
@@ -395,7 +398,9 @@ export default function() { |
|
|
{ isRefresh, tradeType = 0, startTime = 0, endTime = 0 },
|
|
|
) {
|
|
|
commit('changeWalletType', tradeType);
|
|
|
(startTime && endTime) && commit('changeWalletTime', { startTime, endTime });
|
|
|
startTime &&
|
|
|
endTime &&
|
|
|
commit('changeWalletTime', { startTime, endTime });
|
|
|
let {
|
|
|
isFetching,
|
|
|
endReached,
|
...
|
...
|
@@ -428,7 +433,8 @@ 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);
|
|
|
}
|
...
|
...
|
|