| | |
| | | |
| | | // 新增約訪記錄 |
| | | async createInterviewRecord(interviewRecordInfo: InterviewRecordInfo) { |
| | | return http.post('/interview_record/create', interviewRecordInfo).then(res => res.data); |
| | | try { |
| | | const response = await http.post('/interview_record/create', interviewRecordInfo); |
| | | if (response !== null) { |
| | | return response.data; |
| | | } else { |
| | | throw new Error('http.post returned null-like value.'); |
| | | } |
| | | } catch (error) { |
| | | console.error('An error occurred while creating interview record:', error); |
| | | // 可以在此處處理錯誤或回傳預設值 |
| | | throw error; |
| | | } |
| | | } |
| | | |
| | | // 修改約訪記錄 |