import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'
|
import { Consultants } from '~/assets/ts/api/consultant';
|
import { recommend } from '~/assets/ts/api/consultant'
|
@Module
|
export default class Store extends VuexModule {
|
recommendList: Consultants[] | null = null;
|
|
@Mutation updateRecommend(data: Consultants[]) {
|
this.recommendList = data;
|
}
|
|
@Action storeRecommendList() {
|
recommend().then(res => {
|
this.context.commit('updateRecommend', res.data)
|
})
|
}
|
|
}
|