From 60dc6e178e4ab05ea8f62f7baa1dd72a5c20f93c Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期一, 13 十二月 2021 16:10:13 +0800 Subject: [PATCH] fixed#132096: 查看完聯絡清單(或登出後再登入),顧問清單的黃點並不會消失 --- PAMapp/assets/ts/api/appointment.ts | 53 +++++++++++++++++++++++++++++++---------------------- 1 files changed, 31 insertions(+), 22 deletions(-) diff --git a/PAMapp/assets/ts/api/appointment.ts b/PAMapp/assets/ts/api/appointment.ts index aa419c6..b324059 100644 --- a/PAMapp/assets/ts/api/appointment.ts +++ b/PAMapp/assets/ts/api/appointment.ts @@ -1,12 +1,13 @@ -import { service } from '~/assets/ts/api/share'; -import { AxiosResponse } from 'axios'; +import { http } from '~/assets/ts/services/httpClient'; + +import { AppointmentLog } from '../models/appointment.model'; // ��������� export function getMyAppointmentList():Promise<ClientInfo[]> { const headers = { Authorization: 'Bearer ' + localStorage.getItem('id_token') } - return service.get('/consultant/getMyAppointment', {headers}).then(res => res.data); + return http.get('/consultant/getMyAppointment', {headers}).then(res => res.data); } // 璅�撌脰蝯� @@ -15,16 +16,24 @@ Authorization: 'Bearer ' + localStorage.getItem('id_token') } // TODO: 頝�垢蝣箄���ㄐ��� API 銝�府���� void, ���府���敺���� - Ben 2021/11/16 - return service.post('/appointment/markAsContacted/'+appointmentId, undefined, {headers}) + return http.post('/appointment/markAsContacted/'+appointmentId, undefined, {headers}) .then(res => res.data) } + +export function getMyReviewLog(): Promise<AppointmentLog[]> { + const headers = { + Authorization: 'Bearer ' + localStorage.getItem('id_token') + } + return http.get('/satisfaction/getMySatisfaction', { headers }).then(res => res.data); +} + // 憿批��憿舐內����蝑敺孛� export function allAppointmentsView() { const headers = { Authorization: 'Bearer ' + localStorage.getItem('id_token') } - return service.post('/consultant/record/allAppointmentsView', undefined, {headers}) + return http.post('/consultant/record/allAppointmentsView', undefined, {headers}) } // 霈�������孛� @@ -32,28 +41,28 @@ const headers = { Authorization: 'Bearer ' + localStorage.getItem('id_token') } - return service.post('/appointment/recordRead/' + appointmentId, undefined, {headers}) + return http.post('/appointment/recordRead/' + appointmentId, undefined, {headers}) } export interface ClientInfo { - id: number, - phone: string, - email: string, - contactType: string, - gender: string, - age: string, - job: string, - requirement: string, + 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, + hopeContactTime : string, + otherRequirement : string, + appointmentDate : Date, + agentNo : string, + customerId : number, + name : string, consultantViewTime: Date, consultantReadTime: Date, - contactTime: Date, + contactTime : Date, satisfactionScore: number -} \ No newline at end of file +} -- Gitblit v1.8.0