From df7e9c57ee754752e11ae0b4e2adb293d27e2f92 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期一, 25 十月 2021 18:12:16 +0800
Subject: [PATCH] TODO#128784 首頁-推薦保險顧問 畫面刻版+串假資料

---
 PAMapp/pages/index.vue |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue
index badeca7..75158e8 100644
--- a/PAMapp/pages/index.vue
+++ b/PAMapp/pages/index.vue
@@ -1,5 +1,5 @@
 <template>
-    <div>擐��
+    <div>
         <Ui-Carousel></Ui-Carousel>
         <h5>���“���</h5>
         <el-button @click="routerPush('/recommendConsultant')">������</el-button>
@@ -8,20 +8,36 @@
         <el-button @click="routerPush('/contactList/consultantList')">���憭�</el-button>
         <el-button @click="routerPush('/communication/consult')">隢株岷</el-button>
         <h5>��憿批��</h5>
-        <Ui-Swiper></Ui-Swiper>
+        <Ui-Swiper :agents="agents"></Ui-Swiper>
     </div>
 </template>
 
 <script lang="ts">
-import { Vue, Component } from 'vue-property-decorator'
+import { Vue, Component } from 'nuxt-property-decorator';
+import { Agents } from '~/plugins/api/home';
+import { Context } from '@nuxt/types/app';
 
 @Component({
     layout: 'home'
 })
 export default class MainComponent extends Vue {
+    agents: Agents[] = [];
+
+    async asyncData(context: Context) {
+        let agents: Agents[] = [];
+
+        await context.$service.home.recommendConsultantList().then((result: Agents[]) => {
+            agents = result;
+        })
+
+        return {
+            agents
+        }
+    }
+
     routerPush(path: string) {
         this.$router.push(path);
     }
 }
 
-</script>
+</script>
\ No newline at end of file

--
Gitblit v1.8.0