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