| | |
| | | //////////////////////////////////////////////////////////////////////////// |
| | | |
| | | async sentDemand() { |
| | | if (typeof this.isEditBtn !== 'undefined' && this.isEditBtn) { |
| | | await this.editAppointmentDemand(); |
| | | } else { |
| | | if (!this.isEditBtn) { |
| | | // 使用 async/await 來等待異步操作的回傳結果 |
| | | const addFavoriteAgentList = [{ agentNo: this.$route.params.agentNo, createdTime: new Date().toISOString() }]; |
| | | const response = await queryConsultantService.addFavoriteConsultant(addFavoriteAgentList); |
| | |
| | | throw new Error('this.editAppointmentDemand is not defined or not a function.'); |
| | | } |
| | | } |
| | | } else { |
| | | await this.editAppointmentDemand(); |
| | | } |
| | | |
| | | const editSettingInfo: UserSetting = { |