|
|
import { get } from 'lodash';
|
|
|
import { getImgUrl } from '../../common/utils';
|
|
|
export { default as buyerOderList } from './order-list';
|
|
|
|
|
|
export default function() {
|
|
|
return {
|
...
|
...
|
@@ -8,7 +9,7 @@ export default function() { |
|
|
list: [],
|
|
|
resource: '',
|
|
|
page: 1,
|
|
|
size: 10
|
|
|
size: 10,
|
|
|
},
|
|
|
mutations: {
|
|
|
addList(state, { list }) {
|
...
|
...
|
@@ -19,7 +20,7 @@ export default function() { |
|
|
},
|
|
|
changePage(state, { page }) {
|
|
|
state.page = page;
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
actions: {
|
|
|
async fetchList({ commit, state }) {
|
...
|
...
|
@@ -27,7 +28,7 @@ export default function() { |
|
|
|
|
|
const result = await this.$api.get('/api/union/inviteList', {
|
|
|
page: page,
|
|
|
size: state.size
|
|
|
size: state.size,
|
|
|
});
|
|
|
|
|
|
if (result.code === 200) {
|
...
|
...
|
@@ -38,16 +39,20 @@ export default function() { |
|
|
return result.data ? result.data.length : 0;
|
|
|
},
|
|
|
async fetchResource({ commit }) {
|
|
|
const result = await this.$api.get('/api/yoho/resource', { content_code: 'a51c8222d21b3d88faa4a49c01c9c93e' });
|
|
|
const result = await this.$api.get('/api/yoho/resource', {
|
|
|
content_code: 'a51c8222d21b3d88faa4a49c01c9c93e',
|
|
|
});
|
|
|
|
|
|
commit('addResource', { url: getImgUrl(get(result, 'data[0].data.src') || '', 1000, 1000) });
|
|
|
commit('addResource', {
|
|
|
url: getImgUrl(get(result, 'data[0].data.src') || '', 1000, 1000),
|
|
|
});
|
|
|
},
|
|
|
|
|
|
async fetchUnionStatus() {
|
|
|
const result = await this.$api.get('/api/union/queryUnion');
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
} |
...
|
...
|
|