|
@@ -23,6 +23,7 @@ export default function() { |
|
@@ -23,6 +23,7 @@ export default function() { |
23
|
favoriteNum: 0,
|
23
|
favoriteNum: 0,
|
24
|
buyNum: 0,
|
24
|
buyNum: 0,
|
25
|
askBuyNum: 0,
|
25
|
askBuyNum: 0,
|
|
|
26
|
+ couponNum: 0,
|
26
|
assetData: {
|
27
|
assetData: {
|
27
|
isFetching: false,
|
28
|
isFetching: false,
|
28
|
list: [],
|
29
|
list: [],
|
|
@@ -79,7 +80,7 @@ export default function() { |
|
@@ -79,7 +80,7 @@ export default function() { |
79
|
buyOrder: {title: '我的订单', num: state.buyNum, page: ''},
|
80
|
buyOrder: {title: '我的订单', num: state.buyNum, page: ''},
|
80
|
buy: {name: 'buy', title: '我的求购', num: state.askBuyNum, page: ''},
|
81
|
buy: {name: 'buy', title: '我的求购', num: state.askBuyNum, page: ''},
|
81
|
collect: {name: 'collect', title: '我的收藏', num: state.favoriteNum, page: 'favorite'},
|
82
|
collect: {name: 'collect', title: '我的收藏', num: state.favoriteNum, page: 'favorite'},
|
82
|
- coupon: {name: 'coupon', title: '我的优惠券', num: state.favoriteNum, page: ''},
|
83
|
+ coupon: {name: 'coupon', title: '我的优惠券', num: state.couponNum, page: ''},
|
83
|
service: {name: 'service', title: '我的客服', page: 'service'},
|
84
|
service: {name: 'service', title: '我的客服', page: 'service'},
|
84
|
resource2: {name: 'resource2', data: state.resource2}
|
85
|
resource2: {name: 'resource2', data: state.resource2}
|
85
|
};
|
86
|
};
|
|
@@ -171,6 +172,9 @@ export default function() { |
|
@@ -171,6 +172,9 @@ export default function() { |
171
|
}
|
172
|
}
|
172
|
});
|
173
|
});
|
173
|
},
|
174
|
},
|
|
|
175
|
+ addCouponSummary(state, {count}) {
|
|
|
176
|
+ state.couponNum = count;
|
|
|
177
|
+ },
|
174
|
addAssets(state, assetData) {
|
178
|
addAssets(state, assetData) {
|
175
|
assetData.totalIncome = formatNumber(assetData.totalIncome);
|
179
|
assetData.totalIncome = formatNumber(assetData.totalIncome);
|
176
|
assetData.compensateIncome = formatNumber(assetData.compensateIncome);
|
180
|
assetData.compensateIncome = formatNumber(assetData.compensateIncome);
|
|
@@ -281,7 +285,13 @@ export default function() { |
|
@@ -281,7 +285,13 @@ export default function() { |
281
|
commit('addOrderSummary', { data: result.data});
|
285
|
commit('addOrderSummary', { data: result.data});
|
282
|
}
|
286
|
}
|
283
|
},
|
287
|
},
|
|
|
288
|
+ async fetchCoupon({commit}) {
|
|
|
289
|
+ const result = await this.$api.get('/api/ufo/mine/coupon', {uid});
|
284
|
|
290
|
|
|
|
291
|
+ if (result.code === 200) {
|
|
|
292
|
+ commit('addCouponSummary', { count: result.data});
|
|
|
293
|
+ }
|
|
|
294
|
+ },
|
285
|
async fetchAssets({ commit, state }, isRefresh) {
|
295
|
async fetchAssets({ commit, state }, isRefresh) {
|
286
|
let {isFetching, endReached, currentPage, list, pageSize} = state.assetData;
|
296
|
let {isFetching, endReached, currentPage, list, pageSize} = state.assetData;
|
287
|
|
297
|
|