From 505f666d3ecf3688778c079a8bbfb366d695cf22 Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期五, 12 十一月 2021 17:32:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- PAMapp/store/index.ts | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts index 986f688..cc3a13b 100644 --- a/PAMapp/store/index.ts +++ b/PAMapp/store/index.ts @@ -1,6 +1,23 @@ -import { Module, VuexModule } from 'vuex-module-decorators' +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) + }) + } } \ No newline at end of file -- Gitblit v1.8.0