保誠-保戶業務員媒合平台
HelenHuang
2021-11-12 4ffc0db28966ad106ded6ff0058c2dad7850bf78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)
        })
    }
 
}