|
|
import * as Types from './types';
|
|
|
import {get} from 'lodash';
|
|
|
|
|
|
export default {
|
|
|
async fetchOrderList({ commit }) {
|
|
|
const result = await this.$api.get('/api/ufo/invite/recordList');
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
commit(Types.FETCH_INVITE_ORDERLIST, { list: result.data.list });
|
|
|
commit(Types.FETCH_INVITE_ORDERLIST, { list: get(result, 'data.list', []) });
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -13,7 +14,9 @@ export default { |
|
|
const result = await this.$api.get('/api/ufo/invite/friendList');
|
|
|
|
|
|
if (result.code === 200) {
|
|
|
commit(Types.FETCH_INVITE_CODE, result.data);
|
|
|
commit(Types.FETCH_INVITE_CODE, Object.assign({
|
|
|
inviteRecordList: []
|
|
|
}, result.data));
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -32,8 +35,7 @@ export default { |
|
|
async fetchAll({ dispatch }) {
|
|
|
return Promise.all([
|
|
|
dispatch('fetchFriendList'),
|
|
|
dispatch('fetchOrderList'),
|
|
|
dispatch('mine/bankCard/fetchBankCard', null, { root: true })
|
|
|
dispatch('fetchOrderList')
|
|
|
]);
|
|
|
}
|
|
|
}; |
...
|
...
|
|