保誠-保戶業務員媒合平台
Mila
2021-11-15 951c39dd069030a37b4d718b859dfb118269e433
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { service } from '~/assets/ts/api/share';
import { AxiosResponse } from 'axios';
 
// 顧客登入(TODO: OTP認證開發前 暫時使用)
export function login(user: any) {
    return service.post('/authenticate', user)
}
 
// 推薦保險顧問
export function recommend() {
    return service.get('/consultant/recommend')
}
 
// 我的顧問清單
export function getFavoriteConsultant() {
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return service.get('/consultant/favorite', {headers});
}
 
// 快速篩選
export function fastQuery(data: FastQueryParams) {
    return service.post('/consultant/fastQuery', data)
}
 
// 嚴選配對
export function strictQuery(data:StrictQueryParams):Promise<AxiosResponse<AgentOfStrictQuery>>{
    return service.post('/consultant/strictQuery', data)
}
 
// 加入顧問
export function addFavoriteConsultant(agentNoList: string[]) {
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return service.post('/consultant/favorite', {agentNoList}, {headers})
}
 
// 預約前詢問
export function appointmentDemand(data: AppointmentParams) {
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
<<<<<<< HEAD
    return service.post('/appointment/customer/create', data, {headers})
=======
    return service.post('/appointment/customer/create', data ,{headers})
>>>>>>> b7de9faedf2a3e21c77c4ab3fc645ef01ac549cf
}
 
//顧問詳細資訊
export function getConsultantDetail(agentNo:string){
    return service.get('/consultant/detail', {params:{agentNo:agentNo}})
}
 
export interface Consultants {
    agentNo: string,
    name: string,
    img: string,
    new: boolean,
    avgScore: number,
    expertise: string[],
    updateTime: Date,
    seniority: string,
    contactStatus?: string;
}
 
export interface FastQueryParams {
    gender: string,
    communicationStyles: string[],
    avgScore: number,
    status: string
}
 
export interface AppointmentParams {
    phone: string,
    email: string,
    contactType: string,
    gender: string,
    age: string,
    job: string,
    requirement: string,
    hopeContactTime: string,
    otherRequirement: string,
    agentNo: string
}
export interface StrictQueryParams{
    gender:           string;
    avgScore:         number;
    status:           string; //phase 1 disable
    area:             string;
    requirements:     string[];
    otherRequirement: string;
    seniority:        string;
    popularTags:      string[];
    otherPopularTags: string;
}
export interface AgentOfStrictQuery {
    agentNo:       string;
    name:          string;
    img:           string;
    expertise:     string[];
    avgScore:      number;
    contactStatus: null;
    updateTime:    null;
    seniority:     string;
    new:           boolean;
}