From 391d7db141245798c64aa8acb0f143ab4152aa79 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 10 十一月 2021 10:47:46 +0800
Subject: [PATCH] TODO#130015/130016 [推薦保險顧問/我的顧問清單] api 串接

---
 PAMapp/store/index.ts |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts
index 986f688..d175d60 100644
--- a/PAMapp/store/index.ts
+++ b/PAMapp/store/index.ts
@@ -1,6 +1,18 @@
-import { Module, VuexModule } from 'vuex-module-decorators'
-
+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)
+       })
+    }
 
 }
\ No newline at end of file

--
Gitblit v1.8.0