保誠-保戶業務員媒合平台
Mila
2021-10-25 df7e9c57ee754752e11ae0b4e2adb293d27e2f92
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<template>
    <div>
        <Ui-Carousel></Ui-Carousel>
        <h5>預約顧問</h5>
        <el-button @click="routerPush('/recommendConsultant')">嚴選配對</el-button>
        <el-button @click="routerPush('/quickFilter')">快速篩選</el-button>
        <h5>我的聯絡清單</h5>
        <el-button @click="routerPush('/contactList/consultantList')">查看更多</el-button>
        <el-button @click="routerPush('/communication/consult')">諮詢</el-button>
        <h5>推薦顧問</h5>
        <Ui-Swiper :agents="agents"></Ui-Swiper>
    </div>
</template>
 
<script lang="ts">
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>