保誠-保戶業務員媒合平台
PAMapp/assets/ts/api/appointment.ts
@@ -1,5 +1,5 @@
import { service } from '~/assets/ts/api/share';
import { AxiosResponse } from 'axios';
import { http } from '~/assets/ts/services/httpClient';
import { AppointmentLog } from '../models/appointment.model';
// 取得所有預約清單
@@ -7,7 +7,7 @@
    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);
}
// 標記為已聯絡
@@ -16,7 +16,7 @@
        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)
}
@@ -24,7 +24,7 @@
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return service.get('/satisfaction/getMySatisfaction', { headers }).then(res => res.data);
    return http.get('/satisfaction/getMySatisfaction', { headers }).then(res => res.data);
}
@@ -33,7 +33,7 @@
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return service.post('/consultant/record/allAppointmentsView', undefined, {headers})
    return http.post('/consultant/record/allAppointmentsView', undefined, {headers})
}
// 讀取預約單時觸發
@@ -41,7 +41,7 @@
    const headers = {
        Authorization: 'Bearer ' + localStorage.getItem('id_token')
    }
    return service.post('/appointment/recordRead/' + appointmentId, undefined, {headers})
    return http.post('/appointment/recordRead/' + appointmentId, undefined, {headers})
}
@@ -65,4 +65,4 @@
    consultantReadTime: Date,
    contactTime      : Date,
    satisfactionScore: number
}
}