| | |
| | | import { service } from '~/assets/ts/api/share'; |
| | | import { AxiosResponse } from 'axios'; |
| | | import { AppointmentDetail } from '../models/AppointmentDetail'; |
| | | |
| | | // 顧客登入(TODO: OTP認證開發前 暫時使用) |
| | | export function login(user: any) { |
| | |
| | | |
| | | // 推薦保險顧問 |
| | | export function recommend() { |
| | | return service.get('/consultant/recommend') |
| | | return service.get<Consultants[]>('/consultant/recommend') |
| | | .then(res => res.data); |
| | | } |
| | | |
| | | // 我的顧問清單 |
| | | export function getFavoriteConsultant():Promise<AxiosResponse<Consultants[]>> { |
| | | export function getFavoriteConsultant() { |
| | | const headers = { |
| | | Authorization: 'Bearer ' + localStorage.getItem('id_token') |
| | | } |
| | | return service.get('/consultant/favorite', {headers}); |
| | | return service.get<Consultants[]>('/consultant/favorite', {headers}) |
| | | .then(res => res.data); |
| | | } |
| | | |
| | | // 快速篩選 |
| | |
| | | new: boolean; |
| | | } |
| | | |
| | | export interface AppointmentDetail { |
| | | id: number, |
| | | phone: string, |
| | | email: string, |
| | | contactType: string, |
| | | gender: string, |
| | | age: string, |
| | | job: string, |
| | | requirement: string, |
| | | communicateStatus: string, |
| | | hopeContactTime: string, |
| | | otherRequirement: string, |
| | | appointmentDate: Date, |
| | | agentNo: string, |
| | | customerId: number, |
| | | name: string |
| | | } |