...
|
...
|
@@ -23,6 +23,7 @@ export default function() { |
|
|
favoriteNum: 0,
|
|
|
buyNum: 0,
|
|
|
askBuyNum: 0,
|
|
|
couponNum: 0,
|
|
|
assetData: {
|
|
|
isFetching: false,
|
|
|
list: [],
|
...
|
...
|
@@ -79,7 +80,7 @@ export default function() { |
|
|
buyOrder: {title: '我的订单', num: state.buyNum, page: ''},
|
|
|
buy: {name: 'buy', title: '我的求购', num: state.askBuyNum, page: ''},
|
|
|
collect: {name: 'collect', title: '我的收藏', num: state.favoriteNum, page: 'favorite'},
|
|
|
coupon: {name: 'coupon', title: '我的优惠券', num: state.favoriteNum, page: ''},
|
|
|
coupon: {name: 'coupon', title: '我的优惠券', num: state.couponNum, page: ''},
|
|
|
service: {name: 'service', title: '我的客服', page: 'service'},
|
|
|
resource2: {name: 'resource2', data: state.resource2}
|
|
|
};
|
...
|
...
|
@@ -171,6 +172,9 @@ export default function() { |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
addCouponSummary(state, {count}) {
|
|
|
state.couponNum = count;
|
|
|
},
|
|
|
addAssets(state, assetData) {
|
|
|
assetData.totalIncome = formatNumber(assetData.totalIncome);
|
|
|
assetData.compensateIncome = formatNumber(assetData.compensateIncome);
|
...
|
...
|
@@ -281,7 +285,13 @@ export default function() { |
|
|
commit('addOrderSummary', { data: result.data});
|
|
|
}
|
|
|
},
|
|
|
async fetchCoupon({commit}) {
|
|
|
const result = await this.$api.get('/api/ufo/mine/coupon', {uid});
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
commit('addCouponSummary', { count: result.data});
|
|
|
}
|
|
|
},
|
|
|
async fetchAssets({ commit, state }, isRefresh) {
|
|
|
let {isFetching, endReached, currentPage, list, pageSize} = state.assetData;
|
|
|
|
...
|
...
|
|