<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>
|