保誠-保戶業務員媒合平台
wayne
2022-02-17 4394e4248455637ab7836756058ac872fdf4af10
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
import { http } from "./httpClient";
 
import { Consultant } from "~/shared/models/consultant.model";
import { FastQueryParams } from "~/shared/models/quick-filter.model";
import { AgentOfStrictQuery, StrictQueryParams } from "~/shared/models/strict-query.model";
import { AppointmentParams } from "~/shared/models/appointment.model";
 
class QueryConsultantService {
 
  // 推薦保險顧問
  async getRecommendConsultantList(): Promise<Consultant[]> {
    return http.get<Consultant[]>('/consultant/recommend').then((res) => res.data);
  }
 
  // 快速篩選
  async fastQuery(data: FastQueryParams): Promise<Consultant[]> {
    return http.post<Consultant[]>('/consultant/fastQuery', data).then(res => res.data);
  }
 
  // 嚴選配對
  async strictQuery(data:StrictQueryParams): Promise<AgentOfStrictQuery[]>{
    return http.post('/consultant/strictQuery', data).then((res) => res.data);
  }
 
  // 加入顧問
  async addFavoriteConsultant(agentNoList: string[]) {
    return http.post('/consultant/favorite', { agentNoList });
  }
 
  // 預約前詢問
  async appointmentDemand(data: AppointmentParams) {
    return http.post('/appointment/customer/create', data).then((res) => res.data);
  }
 
}
 
export default new QueryConsultantService();