From 2cf2ddcb19cc628f258cb9e87bcc5baac5140aa7 Mon Sep 17 00:00:00 2001 From: History <2596007731@qq.com> Date: Mon, 14 Jul 2025 10:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Manager/NetworkingManager/YXNetAPI.h | 104 --- .../Manager/NetworkingManager/YXNetAPI.m | 333 -------- .../Manager/UserManager/YXKeychainTool.h | 36 - .../Manager/UserManager/YXKeychainTool.m | 56 -- .../Manager/UserManager/YXUserInfo.h | 38 - .../Manager/UserManager/YXUserInfo.m | 73 -- .../Project/HQPopView/HQShowPromptPopView.h | 16 - .../Project/HQPopView/HQShowPromptPopView.m | 134 --- .../YXDownToolsManager.h | 20 - .../YXDownToolsManager.m | 103 --- .../YXHealthPhyReportModel.h | 99 --- .../YXHealthPhyReportModel.m | 80 -- .../YXLookReportImageViewController.h | 22 - .../YXLookReportImageViewController.m | 173 ---- .../YXQuestionDetailViewController.h | 18 - .../YXQuestionDetailViewController.m | 744 ----------------- .../YXSickNameSubTableViewCell.m | 221 ----- .../YXSickNameTopTableViewCell.h | 23 - .../YXSickNameTopTableViewCell.m | 134 --- .../YXimageReportTableViewCell.h | 22 - .../YXimageReportTableViewCell.m | 235 ------ .../YXAudioVideoRecordViewController.h | 19 - .../YXAudioVideoRecordViewController.m | 286 ------- .../YXPictureRecordViewController.h | 19 - .../YXPictureRecordViewController.m | 588 ------------- .../YXQustionRecordViewController.h | 20 - .../YXQustionRecordViewController.m | 255 ------ .../YXQuestionStatisticsViewController.h | 16 - .../YXQuestionStatisticsViewController.m | 514 ------------ .../YXStopAnnouncementViewController.h | 15 - .../YXStopAnnouncementViewController.m | 387 --------- .../YXStopQuestionCauseViewController.h | 16 - .../YXStopQuestionCauseViewController.m | 40 - .../YXStopQuestionSettingVC.h | 16 - .../YXStopQuestionSettingVC.m | 185 ----- .../YXBasicHealthInfoViewController.h | 16 - .../YXBasicHealthInfoViewController.m | 48 -- .../controller/YXHomePageViewController.h | 18 - .../controller/YXHomePageViewController.m | 774 ------------------ .../YXworkSetingViewController.h | 16 - .../YXworkSetingViewController.m | 490 ----------- .../Project/HomePage/model/DoctorInfoModel.h | 74 -- .../HomePage/model/QuestionStaticsModel.h | 22 - .../HomePage/model/YXCancelReasonModel.h | 21 - .../HomePage/model/YXDoctorInfoModel.m | 42 - .../Project/HomePage/model/YXHomePageModel.h | 49 -- .../Project/HomePage/model/YXHomePageModel.m | 32 - .../Project/HomePage/model/YXHospitalModel.h | 25 - .../Project/HomePage/model/YXHospitalModel.m | 18 - .../HomePage/model/YXProjectListModel.h | 33 - .../HomePage/model/YXProjectListModel.m | 27 - .../model/YXQuestionBodyReportModel.h | 21 - .../HomePage/model/YXQuestionRecordModel.h | 42 - .../HomePage/model/YXQuestionRecordModel.m | 19 - .../HomePage/model/YXRecordIMListDateModel.h | 50 -- .../HomePage/model/YXRecordIMListDateModel.m | 19 - .../HomePage/model/YXRecoredListDetailModel.h | 142 ---- .../HomePage/model/YXRecoredListDetailModel.m | 86 -- .../HomePage/model/YXStopReasonModel.h | 25 - .../HomePage/model/YXStopServiceModel.h | 53 -- .../HomePage/model/YXStopServiceModel.m | 33 - .../Project/HomePage/model/YXToolsModel.h | 21 - .../Project/HomePage/model/YXToolsModel.m | 13 - .../HomePage/model/YXWorkSettingModel.h | 50 -- .../HomePage/model/YXWorkSettingModel.m | 35 - .../HomePage/model/YXwithDrawDetailModel.h | 47 -- .../HomePage/model/YXwithDrawDetailModel.m | 19 - .../BasicHealthInfoView.h | 20 - .../BasicHealthInfoView.m | 135 --- .../BillDetailTableViewCell.h | 21 - .../BillDetailTableViewCell.m | 90 -- .../BillDetailView(账单详情)/BillDtailTable.h | 21 - .../BillDetailView(账单详情)/BillDtailTable.m | 126 --- .../BillDetailView(账单详情)/BillListTable.h | 22 - .../BillDetailView(账单详情)/BillListTable.m | 125 --- .../BillListTableViewCell.h | 18 - .../BillListTableViewCell.m | 115 --- .../DetailTitleView.m | 66 -- .../DetailUserInfoView.m | 114 --- .../QuestionAppointmentTimeView.h | 33 - .../QuestionAppointmentTimeView.m | 401 --------- .../QuestionFileDataView.h | 25 - .../QuestionFileDataView.m | 103 --- .../QuestionHealthInfoView.h | 19 - .../QuestionHealthInfoView.m | 140 ---- .../QuestionReportView.h | 22 - .../QuestionReportView.m | 91 -- .../FileDataDeatilCenterView.h | 21 - .../FileDataDeatilCenterView.m | 318 ------- .../HQSearchView.h | 24 - .../HQSearchView.m | 97 --- .../HistoryRecordTable.h | 18 - .../HistoryRecordTable.m | 118 --- .../HistoryRecordTableViewCell.h | 16 - .../HistoryRecordTableViewCell.m | 153 ---- .../HospitalSelectedTableViewCell.m | 97 --- .../HospitalSelected/HospitalSelectedView.h | 23 - .../HospitalSelected/HospitalSelectedView.m | 206 ----- .../MoveAddDelete/SYLIfeManagerFooterView.h | 13 - .../MoveAddDelete/SYLIfeManagerFooterView.m | 22 - .../MoveAddDelete/SYLifeManagerHeaderView.h | 15 - .../MoveAddDelete/SYLifeManagerHeaderView.m | 32 - .../view/MoveAddDelete/SYLifeManagerLayout.h | 30 - .../view/MoveAddDelete/SYLifeManagerLayout.m | 156 ---- .../QuestionRecordTableViewCell.m | 171 ---- .../QuestionRecordView/QuestionRecoredTable.h | 25 - .../QuestionRecordView/QuestionRecoredTable.m | 141 ---- .../StopQuestionPopView.h | 22 - .../StopQuestionPopView.m | 148 ---- .../StopQuestionTableView.h | 21 - .../StopQuestionTableView.m | 135 --- .../StopQuestionTableViewCell.h | 23 - .../StopQuestionTableViewCell.m | 205 ----- .../Project/HomePage/view/YXDTTestView.h | 13 - .../Project/HomePage/view/YXDTTestView.m | 329 -------- .../RefuseQuestionPopView.h | 26 - .../RefuseQuestionPopView.m | 271 ------ .../Project/Login_Register/IMUserInfoModel.h | 29 - .../Project/Login_Register/IMUserInfoModel.m | 43 - .../YXLoginFoundPasswordViewController.h | 17 - .../YXLoginFoundPasswordViewController.m | 209 ----- .../Login/YXLoginProtocolWebViewController.h | 16 - .../Login/YXLoginProtocolWebViewController.m | 32 - .../Login/YXLoginSetPasswordViewController.h | 18 - .../Login/YXLoginSetPasswordViewController.m | 178 ---- .../Login/YXRegisterViewController.h | 16 - .../Login/YXRegisterViewController.m | 262 ------ .../register/HQLoginViewController.h | 16 - .../register/YXLoginViewController.m | 498 ----------- .../Mine/controller/YXAboutUsViewController.h | 16 - .../Mine/controller/YXAboutUsViewController.m | 236 ------ .../controller/YXGoodAtSicksViewController.h | 24 - .../controller/YXGoodAtSicksViewController.m | 251 ------ .../Mine/controller/YXMineViewController.h | 16 - .../Mine/controller/YXMineViewController.m | 411 ---------- .../YXUserCenterInfoViewController.h | 16 - .../YXUserCenterInfoViewController.m | 631 -------------- .../YXModifyPasswordViewController.h | 18 - .../YXModifyPasswordViewController.m | 214 ----- .../YXCustomSchedulingViewController.h | 16 - .../YXCustomSchedulingViewController.m | 73 -- .../YXSchedulingSettingViewController.h | 16 - .../YXSchedulingSettingViewController.m | 133 --- .../Project/Mine/model/YXBillListModel.h | 40 - .../Project/Mine/model/YXBillListModel.m | 32 - .../Mine/model/YXSchedulingSettingModel.h | 20 - .../AddSchedulingTimeTableViewCell.h | 24 - .../WeakTitleTableViewCell.h | 16 - .../YXCustomSchedulingTable.h | 28 - .../YXCustomSchedulingTable.m | 305 ------- .../YXWeakTitleTableViewCell.m | 65 -- .../JumpHolidayTableViewCell.h | 16 - .../YXAddSchedulingTimeTableViewCell.m | 64 -- .../YXJumpHolidayTableViewCell.m | 82 -- .../YXSchedulingDateTableViewCell.h | 17 - .../YXSchedulingDateTableViewCell.m | 150 ---- .../YXSchedulingSetingTable.h | 27 - .../YXSchedulingSetingTable.m | 308 ------- .../YXSectionOneTableViewCell.h | 20 - .../YXSectionOneTableViewCell.m | 93 --- .../YXTimeDisanceTableViewCell.m | 100 --- .../YXVideoAudioTableViewCell.h | 18 - .../YXVideoAudioTableViewCell.m | 110 --- .../Project/Mine/view/YXcustomDelectedView.h | 24 - .../Project/Mine/view/YXcustomDelectedView.m | 79 -- .../Project/Mine/view/YXuserAddGoodPopView.h | 20 - .../Project/Mine/view/YXuserAddGoodPopView.m | 108 --- .../TUIChat/ChatList/ChatListViewController.h | 16 - .../TUIChat/ChatList/ChatListViewController.m | 65 -- .../Controller/ChatMapViewController.h | 20 - .../Controller/ChatMapViewController.m | 157 ---- .../CurrentLocationViewController.h | 21 - .../CurrentLocationViewController.m | 138 ---- .../DoctorXinjiang/Supporting Files/HQConst.h | 18 - .../DoctorXinjiang/Supporting Files/HQConst.m | 17 - .../DoctorXinjiang/Utils/HQCommonUtils.h | 95 --- .../DoctorXinjiang/Utils/HQCommonUtils.m | 435 ---------- .../DoctorXinjiang/Utils/LineTextField.h | 19 - .../DoctorXinjiang/Utils/LineTextField.m | 26 - 179 files changed, 18234 deletions(-) delete mode 100755 DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.h delete mode 100755 DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.m delete mode 100755 DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.h delete mode 100755 DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.m delete mode 100755 DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.h delete mode 100755 DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameSubTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/DoctorInfoModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/QuestionStaticsModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXCancelReasonModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXDoctorInfoModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionBodyReportModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopReasonModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailTitleView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailUserInfoView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecordTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/HQLoginViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/YXLoginViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXSchedulingSettingModel.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/AddSchedulingTimeTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/WeakTitleTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXWeakTitleTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/JumpHolidayTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXAddSchedulingTimeTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXJumpHolidayTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXTimeDisanceTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.m delete mode 100644 DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.h delete mode 100644 DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.m diff --git a/DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.h b/DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.h deleted file mode 100755 index 32ba328..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.h +++ /dev/null @@ -1,104 +0,0 @@ -// -// API.h -// XZYNetworking -// -// Created by 仁康信息 on 2022/9/9. -// Copyright © 2022年 仁康信息. All rights reserved. -// - -#import -#import "YXNetworkingWithCache.h" - -@interface YXNetAPI : NSObject - -@property (nonatomic,strong) YXNetworkingWithCache * httpRequest; - -#pragma mark - init方法 -//无需token -- (instancetype)init:(id)delegate tag:(NSString *)tag; -//携带token -- (instancetype)init:(id)delegate tag:(NSString *)tag NeedToken:(NSString *)NeedToken; - -#pragma mark - 首页模块 - -- (void)getHomeData:(NSMutableDictionary *)parmaDic; -- (void)getHomeSmallData:(NSMutableDictionary *)parmaDic; -- (void)getHomeFoundSmallHelpData:(NSMutableDictionary *)parmaDic; - -//接受咨询 -- (void)getAcceptQuestion:(NSMutableDictionary *)parmaDic; - -#pragma mark: -医生排班 - -- (void)PostDoctorWorkTime:(NSMutableDictionary *)parmDic; -- (void)GetDoctorWorkSetting:(NSMutableDictionary *)pamraDic; - -#pragma mark:咨询统计 - -- (void)GetQuestionStatistics:(NSMutableDictionary *)pamraDic; -- (void)GetStatisticsEarnings:(NSMutableDictionary *)pamraDic; -- (void)GetQuestionRecoredList:(NSMutableDictionary *)parmDic; -- (void)GetRecoredQuestionDetail:(NSMutableDictionary *)pamraDic; -- (void)getBodyReportDeatil:(NSMutableDictionary *)parmDic; -- (void)GetCancelReasourData:(NSMutableDictionary *)pamraDic; -- (void)submitCancelreasourData:(NSMutableDictionary *)pamraDic; -- (void)fileDetatilData:(NSMutableDictionary *)pamraDic; -#pragma mark:暂停公告 - -- (void)GetPublishServerMessage:(NSMutableDictionary *)pamraDic; -- (void)GetSPublishServerRecored:(NSMutableDictionary *)pamraDic; -- (void)GetChangePublishServer:(NSMutableDictionary *)pamraDic; -- (void)GetPhyscialSearchAnomalyData:(NSMutableDictionary *)parmDic; - -#pragma mark:发布公告 - -- (void)PostStopPublishServer:(NSMutableDictionary *)pamraDic; - -//查询停诊原因 -- (void)GetPublishServerReason:(NSMutableDictionary *)pamraDic; -//查询当前咨询数量 -- (void)GetCurrentServerNumber:(NSMutableDictionary *)pamraDic; -#pragma mark: im - -- (void)PostEndSoSIMQuestion:(NSMutableDictionary *)pamraDic; -- (void)GetEndPictureEndIMQuestion:(NSMutableDictionary *)pamraDic; -- (void)PostGroupIDArray:(NSMutableDictionary *)parmDic; - -#pragma mark - 我的模块 - -- (void)GetInquireDoctorInfo:(NSMutableDictionary *)pamraDic; - -//查询科室 -- (void)GetInquireDoctorRoomInfo:(NSMutableDictionary *)pamraDic; -//个人简介 -- (void)postUpdateDoctorInfo:(NSMutableDictionary *)pamraDic; -//收益明细 -- (void)GetBillListData:(NSMutableDictionary *)pamraDic; -//提现详情 -- (void)withDrawDetailsData:(NSMutableDictionary *)pamraDic; - -#pragma mark - 登录注册 - -- (void)PostLogin:(NSMutableDictionary *)parmDic; -- (void)GetIMLoginAccount:(NSMutableDictionary *)pamraDic; -- (void)postSetUserPassword:(NSMutableDictionary *)parmDic; -- (void)postImageArrayUpload:(NSArray *)imageArray; -- (void)postResetUserNewPassword:(NSMutableDictionary *)parmDic; -//更新头像 -- (void)updateUserAvatar:(NSMutableDictionary *)parmDic; -//更新密码 -- (void)updateDoctorLoginPassword:(NSMutableDictionary *)pamraDic; -- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic; -- (void)getVesionHideRegis:(NSMutableDictionary *)parmDic; -#pragma mark - IM模块 - -- (void)getAgainSessionReservationDate:(NSMutableDictionary *)parmDic; -- (void)getendVideoReportById:(NSMutableDictionary *)parmDic; -//获取体检语音 -- (void)docotorReportListAudioResource:(NSMutableDictionary *)parmDic; -- (void)docotorReportListHistoryDoctorAudioResource:(NSMutableDictionary *)parmDic; -- (void)GetDoctorPhyscialIDCardSearch:(NSMutableDictionary *)parmDic; -- (void)getHistoryReportById:(NSMutableDictionary *)parmDic; -- (void)getSendVideoStart:(NSMutableDictionary *)pamraDic; - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.m b/DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.m deleted file mode 100755 index 0fb5c27..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Manager/NetworkingManager/YXNetAPI.m +++ /dev/null @@ -1,333 +0,0 @@ -// -// API.m -// XZYNetworking -// -// Created by 仁康信息 on 2022/9/9. -// Copyright © 2022年 仁康信息. All rights reserved. -// - -#import "YXNetAPI.h" -#define needToken httpRequest.needToken -#define isLoginFlag httpRequest.isLoginFlag - -@implementation YXNetAPI - -#pragma mark - init方法 -@synthesize httpRequest; - -//无需token -- (instancetype)init:(id)delegate tag:(NSString *)tag -{ - YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; - return [self init:delegate tag:tag NeedToken:user.token]; -} - -//携带token -- (instancetype)init:(id)delegate tag:(NSString *)tag NeedToken:(NSString *)NeedToken -{ - if (self=[super init]) { - if (![tag isEqualToString:@"LOGINGAPI"] || ![tag isEqualToString:@"CHANGEAPI"] ) { - - YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; - - httpRequest = [[YXNetworkingWithCache alloc] initWithDelegate:delegate bindTag:tag NeedToken:user.token]; - }else{ - httpRequest = [[YXNetworkingWithCache alloc] initWithDelegate:delegate bindTag:tag NeedToken:@""]; - - } - } - return self; -} -#pragma mark - 首页模块 -- (void)getHomeData:(NSMutableDictionary *)parmaDic { - - //GET https://starry.test.icdat.cn/health-consultation/api/consult/conSession/selectSessionProfessorIng HTTP/1.1 - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionProfessorIngNew",Http] params:parmaDic]; - - -} - -- (void)getHomeSmallData:(NSMutableDictionary *)parmaDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/insertProfessorAndHelperSessionShow",Http] params:parmaDic]; - -} - -- (void)getHomeFoundSmallHelpData:(NSMutableDictionary *)parmaDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/insertProfessorAndHelperSession",Http] params:parmaDic]; - -} -- (void)getAcceptQuestion:(NSMutableDictionary *)parmaDic { - -// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conSession/sessionConfirm?id=1744619023486275586&startTime=1705287600000&endTime=1705294800000 HTTP/1.1 - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/sessionConfirm",Http] params:parmaDic]; -} -//结束图文咨询 -- (void)GetEndPictureEndIMQuestion:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/finishSession",Http] params:pamraDic]; -// /health-consultation/api/consult/conSession/finishSession -} - -- (void)PostEndSoSIMQuestion:(NSMutableDictionary *)pamraDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/orderOver",Http] params:pamraDic]; - -} - -- (void)GetInquireDoctorInfo:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/queryDoctor",Http] params:pamraDic]; - -} - -#pragma mark: -医生排班 - -- (void)PostDoctorWorkTime:(NSMutableDictionary *)parmDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctorScheduling/insertDoctorScheduling",Http] params:parmDic]; - -} - -#pragma mark: -查询医生排班 -- (void)GetDoctorWorkSetting:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctorScheduling/selectDoctorScheduling",Http] params:pamraDic]; - -} - -- (void)postUpdateDoctorInfo:(NSMutableDictionary *)pamraDic { - -// POST https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/update HTTP/1.1 - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/update",Http] params:pamraDic]; - - -} -#pragma mark:咨询统计 - -- (void)GetQuestionStatistics:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/groupByTypehList",Http] params:pamraDic]; - -} - -- (void)GetStatisticsEarnings:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/getStatistics",Http] params:pamraDic]; - -} - -- (void)GetQuestionRecoredList:(NSMutableDictionary *)parmDic { - - //selectSessionListByDoctorId - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionListByDoctorIdNew",Http] params:parmDic]; -} - -#pragma mark:咨询详情 -- (void)GetRecoredQuestionDetail:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/sessionDetailDoctorAll",Http] params:pamraDic]; - -} -- (void)getBodyReportDeatil:(NSMutableDictionary *)parmDic { - -// [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@cqyt/middleController/getCheckItemBySfzhNewNew",Http] params:parmDic]; - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/selectNewHealthReport",Http] params:parmDic]; - -} -//拒绝理由 -- (void)GetCancelReasourData:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectRejectReason",Http] params:pamraDic]; - -} -//开始视频 - -- (void)getSendVideoStart:(NSMutableDictionary *)pamraDic { - -// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conSessionVideoInfo/startVideoSession?sessionId=1778696654498156546 HTTP/1.1 - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSessionVideoInfo/startVideoSession",Http] params:pamraDic]; - -} -//确认拒绝 -- (void)submitCancelreasourData:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/sessionReject",Http] params:pamraDic]; - -} -- (void)fileDetatilData:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/medicalRecords/selectConMedicalRecordsByIdDoctor",Http] params:pamraDic]; -} - -//提现详情 -- (void)withDrawDetailsData:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/queryById",Http] params:pamraDic]; -} - -- (void)getAgainSessionReservationDate:(NSMutableDictionary *)parmDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/sessionReservationDate/sessionReservationDate",Http] params:parmDic]; - -} - - -//查询体检信息(整合,带正常异常数量) - -- (void)GetPhyscialSearchAnomalyData:(NSMutableDictionary *)parmDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/cqyt/middleController/getCheckItemBySfzhTotal/",Http] params:parmDic]; - -} - -#pragma mark:暂停公告 - -//暂停公告发布 -- (void)GetPublishServerMessage:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/conDoctor/getServiceByDoctorId",Http] params:pamraDic]; - -} -//暂停公告列表 -- (void)GetSPublishServerRecored:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conService/list",Http] params:pamraDic]; - -} -//编辑公告状态 -- (void)GetChangePublishServer:(NSMutableDictionary *)pamraDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conService/edit",Http] params:pamraDic]; - -} - -//发布公告状态 -- (void)PostStopPublishServer:(NSMutableDictionary *)pamraDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conService/add",Http] params:pamraDic]; - -} -//查询停诊原因 -- (void)GetPublishServerReason:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList",Http] params:pamraDic]; - -} -//查询当前咨询数量 -- (void)GetCurrentServerNumber:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionVideoExistDoctor",Http] params:pamraDic]; - -} - -//上传图片 -- (void)postImageArrayUpload:(NSArray *)imageArray { - - [httpRequest upLoadDataWithUrlStr:[NSString stringWithFormat:@"%@/sys/upload/uploadFileMany",Http] params:nil withDataArray:imageArray]; -} -//更新头像 -- (void)updateUserAvatar:(NSMutableDictionary *)parmDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/sys/user/updateUserAvatar",Http] params:parmDic]; -} -#pragma mark - 登录注册 -- (void)PostLogin:(NSMutableDictionary *)parmDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/conDoctor/loginDoctor",Http] params:parmDic]; - -} -- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic { - - //GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url HTTP/1.1 - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url",Http] params:parmDic]; - - -} -/* - IM登录 - */ -- (void)GetIMLoginAccount:(NSMutableDictionary *)pamraDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-im/wnapp/userSigAndroid",Http] params:pamraDic]; -} - -- (void)PostGroupIDArray:(NSMutableDictionary *)parmDic { - -// POST https://starry.test.icdat.cn/health-consultation/api/consult/conSession/selectSessionByImIdNew HTTP/1.1 - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionByImIdNewNew",Http] params:parmDic]; -} - -#pragma mark:我的 -- (void)GetInquireDoctorRoomInfo:(NSMutableDictionary *)pamraDic { - -// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conSicks/selectSickListByDepartmentIdDoctorSearch?departmentId=1677938163633926145 HTTP/1.1 - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSicks/selectSickListByDepartmentIdDoctorSearch",Http] params:pamraDic]; - -} - -- (void)GetBillListData:(NSMutableDictionary *)pamraDic { - // - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/findlistpage",Http] params:pamraDic]; -} - -//修改密码 -- (void)updateDoctorLoginPassword:(NSMutableDictionary *)pamraDic { - //T https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/updatePassword - [httpRequest httpPUTCacheRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/updatePassword",Http] params:pamraDic]; -} - -- (void)postResetUserNewPassword:(NSMutableDictionary *)parmDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/api/anon/sys/resetUserPwd",Http] params:parmDic]; - -} - -- (void)postSetUserPassword:(NSMutableDictionary *)parmDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/api/anon/sys/checkUser",Http] params:parmDic]; - -} -- (void)getVesionHideRegis:(NSMutableDictionary *)parmDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/sys/api/notice/selectIosUpdate",Http] params:parmDic]; -} - -//获取体检语音 -- (void)docotorReportListAudioResource:(NSMutableDictionary *)parmDic{ - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/getVoiceUrl",Http] params:parmDic]; - -} -- (void)docotorReportListHistoryDoctorAudioResource:(NSMutableDictionary *)parmDic{ - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/convertVoice2",Http] params:parmDic]; - -} -- (void)GetDoctorPhyscialIDCardSearch:(NSMutableDictionary *)parmDic { - - [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/getHistoryReportByPage",Http] params:parmDic]; - -} -- (void)getHistoryReportById:(NSMutableDictionary *)parmDic { - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/getHistoryReportById",Http] params:parmDic]; - -} - -- (void)getendVideoReportById:(NSMutableDictionary *)parmDic { - -// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/sessionReservationDate/endPhone?id=1780071436959469569 HTTP/1.1 - - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/sessionReservationDate/endPhone",Http] params:parmDic]; - -} - -//结束咨询 -- (void)getABMUpdate:(NSMutableDictionary *)parmDic { - - [httpRequest httpGetRequest:@"https://base.icdat.cn/latest" params:parmDic]; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.h b/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.h deleted file mode 100755 index 75f93c5..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.h +++ /dev/null @@ -1,36 +0,0 @@ - -// YXKeychainTool.h -// idleBuy -// -// Created by ios on 2018/5/28. -// Copyright © 2018年 ios. All rights reserved. -#import -#import - -@interface YXKeychainTool : NSObject -/** - * 储存字符串到🔑钥匙串 - * - * @param sValue 对应的Value - * @param sKey 对应的Key - */ -+ (void)saveKeychainValue:(NSString *)sValue key:(NSString *)sKey; - - -/** - * 从🔑钥匙串获取字符串 - * - * @param sKey 对应的Key - * - * @return 返回储存的Value - */ -+ (NSString *)readKeychainValue:(NSString *)sKey; - - -/** - * 从🔑钥匙串删除字符串 - * - * @param sKey 对应的Key - */ -+ (void)deleteKeychainValue:(NSString *)sKey; -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.m b/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.m deleted file mode 100755 index 07701e3..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXKeychainTool.m +++ /dev/null @@ -1,56 +0,0 @@ - -// NewLottery -// -// Created by 孙号斌 on 2017/2/14. -// Copyright © 2017年 孙号斌. All rights reserved. -// - -#import "YXKeychainTool.h" - -@implementation YXKeychainTool -+ (NSMutableDictionary *)getKeychainQuery:(NSString *)service{ - return [NSMutableDictionary dictionaryWithObjectsAndKeys: - (__bridge_transfer id)kSecClassGenericPassword, - (__bridge_transfer id)kSecClass,service, - (__bridge_transfer id)kSecAttrService,service, - (__bridge_transfer id)kSecAttrAccount, - (__bridge_transfer id)kSecAttrAccessibleAfterFirstUnlock, - (__bridge_transfer id)kSecAttrAccessible, - nil]; -} - -+ (void)saveKeychainValue:(NSString *)sValue key:(NSString *)sKey{ - NSMutableDictionary * keychainQuery = [self getKeychainQuery:sKey]; - SecItemDelete((__bridge_retained CFDictionaryRef)keychainQuery); - - [keychainQuery setObject:[NSKeyedArchiver archivedDataWithRootObject:sValue] forKey:(__bridge_transfer id)kSecValueData]; - - SecItemAdd((__bridge_retained CFDictionaryRef)keychainQuery, NULL); - -} - -+ (NSString *)readKeychainValue:(NSString *)sKey -{ - NSString *ret = nil; - NSMutableDictionary *keychainQuery = [self getKeychainQuery:sKey]; - [keychainQuery setObject:(id)kCFBooleanTrue forKey:(__bridge_transfer id)kSecReturnData]; - [keychainQuery setObject:(__bridge_transfer id)kSecMatchLimitOne forKey:(__bridge_transfer id)kSecMatchLimit]; - CFDataRef keyData = NULL; - if (SecItemCopyMatching((__bridge CFDictionaryRef)keychainQuery, (CFTypeRef *)&keyData) == noErr) { - @try { - ret = (NSString *)[NSKeyedUnarchiver unarchiveObjectWithData:(__bridge NSData *)keyData]; - } @catch (NSException *e) { - NSLog(@"Unarchive of %@ failed: %@", sKey, e); - } @finally { - } - } - if (keyData) - CFRelease(keyData); - return ret; -} -+ (void)deleteKeychainValue:(NSString *)sKey { - NSMutableDictionary *keychainQuery = [self getKeychainQuery:sKey]; - SecItemDelete((__bridge CFDictionaryRef)keychainQuery); -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.h b/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.h deleted file mode 100755 index f39086a..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// YXUserInfo.h -// idleBuy -// -// Created by ios on 2018/5/30. -// Copyright © 2018年 ios. All rights reserved. -// - -#import - -@interface YXUserInfo : NSObject - -@property (nonatomic, strong) NSDictionary *userInfo; - -@property (nonatomic, copy) NSString * user_id; -@property (nonatomic, copy) NSString * username; -@property (nonatomic, copy) NSString * realname; -@property (nonatomic, copy) NSString * avatar; -@property (nonatomic, copy) NSString * phone; -@property (nonatomic, copy) NSString * orgCode; -@property (nonatomic, copy) NSString * sex; -@property (nonatomic, copy) NSString * loginTenantId; -@property (nonatomic, copy) NSString * status_dictText; -@property (nonatomic, copy) NSString * delFlag; -@property (nonatomic, copy) NSString * workNo; -@property (nonatomic, copy) NSString * idCard; -@property (nonatomic, copy) NSString * sex_dictText; -@property (nonatomic, copy) NSString * email; - -@property (nonatomic, copy) NSString * status; -@property (nonatomic, copy) NSString * depart; -@property (nonatomic, copy) NSString * personType_dictText; -@property (nonatomic, copy) NSString * createTime; - -@property (nonatomic, copy) NSString * token; - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.m b/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.m deleted file mode 100755 index 8ed7a2f..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Manager/UserManager/YXUserInfo.m +++ /dev/null @@ -1,73 +0,0 @@ -// -// YXUserInfo.m -// idleBuy -// -// Created by ios on 2018/5/30. -// Copyright © 2018年 ios. All rights reserved. -// - -#import "YXUserInfo.h" - -@implementation YXUserInfo -- (void)encodeWithCoder:(NSCoder *)aCoder -{ - [aCoder encodeObject:self.userInfo forKey:@"userInfo"]; - [aCoder encodeObject:self.user_id forKey:@"user_id"]; - [aCoder encodeObject:self.avatar forKey:@"avatar"]; - [aCoder encodeObject:self.username forKey:@"username"]; - [aCoder encodeObject:self.realname forKey:@"realname"]; - [aCoder encodeObject:self.phone forKey:@"phone"]; - [aCoder encodeObject:self.idCard forKey:@"idCard"]; - [aCoder encodeObject:self.status forKey:@"status"]; - [aCoder encodeObject:self.workNo forKey:@"workNo"]; - [aCoder encodeObject:self.token forKey:@"token"]; - [aCoder encodeObject:self.sex_dictText forKey:@"sex_dictText"]; - - - -} -- (id)initWithCoder:(NSCoder *)aDecoder -{ - self = [super init]; - if (self) - { - self.userInfo = [aDecoder decodeObjectForKey:@"userInfo"]; - self.user_id = [aDecoder decodeObjectForKey:@"user_id"]; - self.avatar = [aDecoder decodeObjectForKey:@"avatar"]; - self.username = [aDecoder decodeObjectForKey:@"username"]; - self.realname = [aDecoder decodeObjectForKey:@"realname"]; - self.phone = [aDecoder decodeObjectForKey:@"phone"]; - self.idCard = [aDecoder decodeObjectForKey:@"idCard"]; - self.token = [aDecoder decodeObjectForKey:@"token"]; - self.status = [aDecoder decodeObjectForKey:@"status"]; - self.workNo = [aDecoder decodeObjectForKey:@"workNo"]; - self.sex_dictText = [aDecoder decodeObjectForKey:@"sex_dictText"]; - - } - return self; -} - - -- (void)setUserInfo:(NSDictionary *)userInfo { - - _userInfo = userInfo; - self.user_id = [_userInfo objectForKey:@"id"]; - self.avatar = [NSString stringWithFormat:@"%@%@",ResourceAddress,[_userInfo objectForKey:@"avatar"]]; - self.phone = [_userInfo objectForKey:@"phone"]; - self.realname = [_userInfo objectForKey:@"realname"]; - self.username = [_userInfo objectForKey:@"username"]; - self.sex = [_userInfo objectForKey:@"sex"]; - self.status = [_userInfo objectForKey:@"status"]; - self.email = [_userInfo objectForKey:@"email"]; - self.idCard = [_userInfo objectForKey:@"idCard"]; - self.workNo = [_userInfo objectForKey:@"workNo"]; - self.sex_dictText = [_userInfo objectForKey:@"sex_dictText"]; -} - - --(void)setToken:(NSString *)token { - _token = token; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.h b/DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.h deleted file mode 100644 index 232641e..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// HQShowPromptPopView.h -// healthQuestion -// -// Created by 仁康信息 on 2022/9/28. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface HQShowPromptPopView : UIView - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.m b/DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.m deleted file mode 100644 index 5ceae8b..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HQPopView/HQShowPromptPopView.m +++ /dev/null @@ -1,134 +0,0 @@ -// -// HQShowPromptPopView.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/28. -// - -#import "HQShowPromptPopView.h" - -@implementation HQShowPromptPopView - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - - return self; - -} - -- (void)createUI { - - UIView * backView = [[UIView alloc] initWithFrame:self.frame]; - backView.backgroundColor = UIColorBackground; - [self addSubview:backView]; - - UIImageView * popImageView = [[UIImageView alloc] initWithImage:IMAGE_NAMED(@"popCenterImg")]; - popImageView.userInteractionEnabled = true; - [backView addSubview:popImageView]; - - [popImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(kRealValue(260)); - make.width.mas_equalTo(kScreenWidth - 47); - make.centerX.mas_equalTo(self); - }]; - - UILabel * titLabel = [[UILabel alloc] init]; - titLabel.text = @"提示"; - titLabel.textColor = CFontColor1; - titLabel.font = BOLDSYSTEMFONT(16); - titLabel.textAlignment = NSTextAlignmentCenter; - [popImageView addSubview:titLabel]; - - [titLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(kRealValue(107)); - make.width.mas_equalTo(popImageView); - make.centerX.mas_equalTo(self); - }]; - - UILabel * detailLabel = [[UILabel alloc] init]; - detailLabel.text = @"本人郑重承诺,认真履行自主防疫责任,填报相关内容全部属实"; - detailLabel.textColor = CFontColor1; - detailLabel.font = BOLDSYSTEMFONT(16); - detailLabel.numberOfLines = 2; - detailLabel.textAlignment = NSTextAlignmentCenter; - [popImageView addSubview:detailLabel]; - - [detailLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(titLabel.mas_bottom).offset(20); - make.height.mas_equalTo(40); - make.left.mas_equalTo(popImageView.mas_left).offset(50.5); - make.right.mas_equalTo(popImageView.mas_right).offset(-40.5); - }]; - - UIButton * cancalBtn = [[UIButton alloc] init]; - [cancalBtn setTitle:@"取消" forState:UIControlStateNormal]; - [cancalBtn setTitleColor:UIColorHex(#394356) forState:UIControlStateNormal]; - [cancalBtn addTarget:self action:@selector(cancelClick) forControlEvents: UIControlEventTouchUpInside]; - [popImageView addSubview:cancalBtn]; - - [cancalBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.bottom.mas_equalTo(@0); - make.left.mas_equalTo(popImageView.mas_left).offset(35); - make.height.mas_equalTo(50); - make.width.mas_equalTo((popImageView.width-20)/2); - }]; - - - UIButton * sureBtn = [[UIButton alloc] init]; - [sureBtn setTitleColor:UIColorHex(#77849E) forState:UIControlStateNormal]; - sureBtn.titleLabel.font = SYSTEMFONT(17); - [popImageView addSubview:sureBtn]; - - [sureBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.bottom.mas_equalTo(@0); - make.left.mas_equalTo(cancalBtn.mas_right); - make.height.mas_equalTo(50); - make.width.mas_equalTo(cancalBtn); - }]; - - - - - __block int timeout=3; //倒计时时间 - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); - dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 - dispatch_source_set_event_handler(_timer, ^{ - if(timeout<=0){ //倒计时结束,关闭 - dispatch_source_cancel(_timer); - dispatch_async(dispatch_get_main_queue(), ^{ - //设置界面的按钮显示 根据自己需求设置 - [sureBtn setTitleColor:UIColorMain forState:UIControlStateNormal]; - [sureBtn setTitle:@"确定" forState:UIControlStateNormal]; - [sureBtn addTarget:self action:@selector(cancelClick) forControlEvents:UIControlEventTouchUpInside]; - sureBtn.userInteractionEnabled = YES; - }); - }else{ - int seconds = timeout; - NSString *strTime = [NSString stringWithFormat:@"%.2d", seconds]; - dispatch_async(dispatch_get_main_queue(), ^{ - //让按钮变为不可点击的灰色 - sureBtn.userInteractionEnabled = NO; - //设置界面的按钮显示 根据自己需求设置 - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:1]; - [sureBtn setTitle:[NSString stringWithFormat:@"%@秒后点击确认",strTime] forState:UIControlStateNormal]; - [UIView commitAnimations]; - }); - timeout--; - } - }); - dispatch_resume(_timer); -} - -- (void)cancelClick { - - [self removeFromSuperview]; -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.h deleted file mode 100644 index f88db70..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// YXDownToolsManager.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/12/1. -// - -#import -#import "ReaderViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXDownToolsManager : NSObject - -+ (void)downLoadReportWithURL:(NSString *)PDFURL withFileName:(NSString *)fileName; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.m deleted file mode 100644 index 29e1b92..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXDownToolsManager.m +++ /dev/null @@ -1,103 +0,0 @@ -// -// YXDownToolsManager.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/12/1. -// - -#import "YXDownToolsManager.h" -@implementation YXDownToolsManager - -+ (void)downLoadReportWithURL:(NSString *)PDFURL withFileName:(NSString *)fileName -{ - - [self downLoadPdfFileByUrl:PDFURL fileName:[NSString stringWithFormat:@"%@.pdf",fileName]]; - -} - -+(__kindof NSURLSessionTask *)downloadWithURL:(NSString *)URL - fileDir:(NSString *)fileDir - progress:(void(^)(NSProgress *progress))progress - success:(void(^)(NSString *filePath))success - failure:(void(^)(NSError *error))failure{ - - AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; - NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:URL]]; - NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) { - //下载进度 - progress ? progress(downloadProgress) : nil; - NSLog(@"下载进度:%.2f%%",100.0*downloadProgress.completedUnitCount/downloadProgress.totalUnitCount); - } destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) { - - //拼接缓存目录 - NSString *downloadStr = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] ; - - //拼接文件路径 - NSString *filePath = [downloadStr stringByAppendingPathComponent:fileDir]; - - NSLog(@"downloadStr = %@",downloadStr); - return [NSURL fileURLWithPath:filePath]; - - } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) { - NSLog(@"%@---%@", filePath, filePath.absoluteString); - success ? success(filePath.absoluteString /** NSURL->NSString*/) : nil; - failure && error ? failure(error) : nil; - }]; - //开始下载 - [downloadTask resume]; - return downloadTask; - -} - -//下载pdf文件 -+(void)downLoadPdfFileByUrl:(NSString *)url fileName:(NSString *)fileName -{ - //如果存在直接打开 - if ([self isFileExist:fileName]) { - //获取路径 - NSString *documentsPath = [ReaderDocument documentsPath]; - //可根据路径command + shift + G查看该路径下的所有的pdf文件 - NSLog(@"%@", documentsPath); - NSString *filePath = [documentsPath stringByAppendingPathComponent:fileName]; - ReaderDocument *document = [ReaderDocument withDocumentFilePath:filePath password:nil]; - if (document != nil) - { - ReaderViewController *readerViewController = [[ReaderViewController alloc] initWithReaderDocument:document]; - - readerViewController.delegate = self; - [[HQCommonUtils getCurrentVC] presentViewController:readerViewController animated:YES completion:nil]; - } - }else{ - - [self downloadWithURL:url fileDir:fileName progress:^(NSProgress *progress) { - - } success:^(NSString *filePath) { - NSLog(@"%@", filePath); - //下载完成直接打开 - [self downLoadPdfFileByUrl:url fileName:fileName]; - } failure:^(NSError *error) { - }]; - } - -} -#pragma mark ReaderViewControllerDelegate因为PDF阅读器可能是push出来的,也可能是present出来的,为了更好的效果,这个代理方法可以实现很好的退出 -+ (void)dismissReaderViewController:(ReaderViewController *)viewController{ - [[HQCommonUtils getCurrentVC] dismissViewControllerAnimated:YES completion:nil]; -} - -#pragma 判断文件是否存在 -+(BOOL)isFileExist:(NSString *)fileName -{ - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *path = [paths objectAtIndex:0]; - NSString *filePath = [path stringByAppendingPathComponent:fileName]; - NSFileManager *fileManager = [NSFileManager defaultManager]; - BOOL result = [fileManager fileExistsAtPath:filePath]; - NSLog(@"这个文件已经存在:%@",result?@"是的":@"不存在"); - return result; - -} - - -@end - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.h deleted file mode 100644 index f8f6ef9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.h +++ /dev/null @@ -1,99 +0,0 @@ -// -// YXHealthPhyReportModel.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/8/28. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -//新增影像报告 - - -@interface YXThirdResultResModel : NSObject - -@property (nonatomic, copy) NSString * third_tId; -@property (nonatomic, copy) NSString * type; - -@property (nonatomic, copy) NSString * userResultId; -@property (nonatomic, copy) NSString * peItemName; -@property (nonatomic, copy) NSString * uniItemId; -@property (nonatomic, copy) NSString * printContext; -@property (nonatomic, copy) NSString * peResult; -@property (nonatomic, copy) NSString * unit; -@property (nonatomic, copy) NSString * colour; -@property (nonatomic, copy) NSString * textFlag; - -@end - - -@interface YXImageItemListModel : NSObject - -@property (nonatomic, copy) NSString * imageCheckName; -@property (nonatomic, copy) NSString * imageShowUrl; -@property (nonatomic, copy) NSString * imageClass; -@property (nonatomic, copy) NSString * studyInsId; -@property (nonatomic, copy) NSString * reportContent; -@property (nonatomic, copy) NSString * reportUrl; -@property (nonatomic, copy) NSString * reportDate; -@property (nonatomic, copy) NSString * imageClassName; -@property (nonatomic, assign) CGFloat textHeight; -@property (nonatomic, assign) CGFloat cellHeight; - -@end - -@interface YXSenResultResModel : NSObject -@property (nonatomic, copy) NSString * uniItemClassId; -@property (nonatomic, copy) NSString * uniItemClassName; -@property (nonatomic, strong) NSArray * thirdResultRes; - -@end - -@interface YXResultItemResListModel : NSObject - -@property (nonatomic, copy) NSString * analysisId; -@property (nonatomic, copy) NSString * analysisName; -@property (nonatomic, copy) NSString * empBirthday; -@property (nonatomic, copy) NSString * medicalYear; -@property (nonatomic, assign) NSInteger rowNumber; -@property (nonatomic, strong) NSArray * senResultRes; -@property (nonatomic, strong) NSArray * allResultArray; - - -@end - -@interface YXHealthPhyReportModel : NSObject - -@property (nonatomic, copy) NSString * report_id; -@property (nonatomic, copy) NSString * userId; -@property (nonatomic, copy) NSString * userName; -@property (nonatomic, copy) NSString * sex; -@property (nonatomic, copy) NSString * sex_dictText; -@property (nonatomic, copy) NSString * age; -@property (nonatomic, copy) NSString * card; -@property (nonatomic, copy) NSString * mobilePhone; -@property (nonatomic, copy) NSString * peQueueDate; -@property (nonatomic, copy) NSString * empBirthday; -@property (nonatomic, copy) NSString * medicalYear; -@property (nonatomic, copy) NSString * suggest; -@property (nonatomic, copy) NSString * conclusion; -@property (nonatomic, copy) NSString * email; -@property (nonatomic, copy) NSString * empNativeplace; -@property (nonatomic, copy) NSString * hospitalName; - - -@property (nonatomic, assign) BOOL zhangkaiSug; -@property (nonatomic, assign) BOOL zhangkaiCon; - - - -@property (nonatomic, strong) NSArray * resultItemResList; - -@property (nonatomic, strong) NSArray * imageItemList; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.m deleted file mode 100644 index 7c6c78c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXHealthPhyReportModel.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// YXHealthPhyReportModel.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/8/28. -// - -#import "YXHealthPhyReportModel.h" - -@implementation YXThirdResultResModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"third_tId" :@"id"}; - return dic; -} - - -@end - -@implementation YXImageItemListModel - - - -@end - -@implementation YXSenResultResModel - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - return @{ - - @"thirdResultRes":[YXThirdResultResModel class] - }; -} - - - -@end - - -@implementation YXResultItemResListModel - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - return @{ - @"senResultRes":[YXSenResultResModel class], - @"allResultArray":[YXThirdResultResModel class] - }; - -} - - - -@end - -@implementation YXHealthPhyReportModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"report_id" :@"id"}; - return dic; -} - - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - return @{ - @"resultItemResList":[YXResultItemResListModel class], - @"imageItemList":[YXImageItemListModel class] - }; -} - - - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.h deleted file mode 100644 index e3b9262..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// YXLookReportImageViewController.h -// DoctorXinjiang -// -// Created by Apple on 2024/2/26. -// - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXLookReportImageViewController : YXBaseViewController - -@property (nonatomic, strong) NSString * webTitle; - -@property (nonatomic, strong) NSString * webUrl; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.m deleted file mode 100644 index 09c03e4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXLookReportImageViewController.m +++ /dev/null @@ -1,173 +0,0 @@ -// -// YXLookReportImageViewController.m -// DoctorXinjiang -// -// Created by Apple on 2024/2/26. -// - -#import "YXLookReportImageViewController.h" - -@interface YXLookReportImageViewController () - -@property (nonatomic, strong)NSURL *originalUrl; -@property (nonatomic, copy)NSString *videoUrl; -@property (nonatomic, copy)NSString *messageType; -@property (nonatomic, strong) WKWebView * wkWebView; - -@end - -@implementation YXLookReportImageViewController - - -#pragma mark - LifeCycle -- (void)viewDidLoad { - [super viewDidLoad]; - self.view.backgroundColor = [UIColor whiteColor]; - self.isHidenNaviBar = false; - [self addNavigationItemWithImageNames:@[@"whiteBack_icon"] isLeft:YES target:self action:@selector(backVC) tags:@[@""]]; - - if (self.webTitle) { - self.navigationItem.title = self.webTitle; - } - [self.view addSubview:self.wkWebView]; - [self webViewRequest]; -} - -- (void)backVC { - - [self.navigationController popViewControllerAnimated:YES]; -} - - - -- (void)viewWillDisappear:(BOOL)animated{ - [super viewWillDisappear:animated]; - _wkWebView.navigationDelegate = nil; - _wkWebView.UIDelegate = nil; - //清除cookies - NSHTTPCookie *cookie; - NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; - for (cookie in [storage cookies]) { - [storage deleteCookie:cookie]; - } - [[NSURLCache sharedURLCache] removeAllCachedResponses]; - [self clearWebViewCache]; -} - - -#pragma mark 懒加载 --(WKWebView *)wkWebView{ - if (!_wkWebView) { - - NSString *jScript = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width,initial-scale=1,minimum-scale=0.25,maximum-scale=2,user-scalable=yes'); document.getElementsByTagName('head')[0].appendChild(meta); var imgs = document.getElementsByTagName('img');for (var i in imgs){imgs[i].style.maxWidth='100%';imgs[i].style.height='auto';}"; - - - WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:jScript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES]; - WKUserContentController *wkUController = [[WKUserContentController alloc] init]; - [wkUController addUserScript:wkUScript]; - WKWebViewConfiguration *wkWebConfig = [[WKWebViewConfiguration alloc] init]; - wkWebConfig.userContentController = wkUController; - - _wkWebView = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) configuration:wkWebConfig]; - _wkWebView.allowsBackForwardNavigationGestures = true; - } - return _wkWebView; -} - - -- (void)webViewRequest{ - NSString *urlString = self.webUrl; - [self hiddenAllMBProgressHUD]; - if (urlString.length > 0) { - [self showMBProgressHUDOnlyWithString:@"加载中"]; - NSURL *url = [NSURL URLWithString:urlString]; - NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; - if (self.wkWebView) { - [self.wkWebView loadRequest:urlRequest]; - } - } -} - - - - -#pragma mark - WKNavigationDelegate -- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{ - -} - -#pragma mark - WKScriptMessageHandler -- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures { - [self hiddenAllMBProgressHUD]; - if (!navigationAction.targetFrame.isMainFrame) { - [webView loadRequest:navigationAction.request]; - } - return nil; -} - -- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{ - if (!self.webTitle) { - self.title = @"加载中..."; - } - -} - -- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{ - [self hiddenAllMBProgressHUD]; - - if (!self.webTitle) { - self.title = webView.title; - } - -} - -- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{ - [self hiddenAllMBProgressHUD]; -} - - -#pragma mark - 自定义 -- (void)onBackClicked{ - if ( self.wkWebView.canGoBack){ - [self.wkWebView goBack]; - } else { - [self clearWebViewCache]; - } -} - -- (void)clearWebViewCache{ - if (iOS9Later) { - NSSet *websiteDataTypes = [WKWebsiteDataStore allWebsiteDataTypes]; - NSDate *dateFrom = [NSDate dateWithTimeIntervalSince1970:0]; - [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:websiteDataTypes modifiedSince:dateFrom completionHandler:^{ - NSLog(@"-----clear webView cache success------"); - }]; - } else { - NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; - NSString *cookiesFolderPath = [libraryPath stringByAppendingString:@"/Cookies"]; - NSError *errors; - [[NSFileManager defaultManager] removeItemAtPath:cookiesFolderPath error:&errors]; - if (!errors) { - NSLog(@"-----clear wkWebView cache success------"); - } - } -} -- (NSString *)URLEncodedString:(NSString *)urlString{ - NSString *encodePath ; - if (!IOS7) { - encodePath = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - }else{ - encodePath = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; - }return encodePath; -} - - -#pragma mark - SETTER - -- (void)setWebUrl:(NSString *)webUrl{ - _webUrl = webUrl; - [self webViewRequest]; -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.h deleted file mode 100644 index a6117cf..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// YXQuestionDetailViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/27. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXQuestionDetailViewController : YXBaseViewController - -@property (nonatomic, copy) NSString * question_id; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.m deleted file mode 100644 index 96c5e53..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXQuestionDetailViewController.m +++ /dev/null @@ -1,744 +0,0 @@ -// -// YXQuestionDetailViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/27. -// - -#import "YXQuestionDetailViewController.h" -#import "DetailUserInfoView.h" -#import "DetailTitleView.h" -#import "QuestionAppointmentTimeView.h" -#import "QuestionFileDataView.h" -#import "QuestionHealthInfoView.h" -#import "QuestionReportView.h" -#import "YXRecoredListDetailModel.h" -#import "YXQuestionBodyReportModel.h" -#import "RefuseQuestionPopView.h" -#import "YXCancelReasonModel.h" -#import "XJDFileDataDetailViewController.h" -#import "YXDTTestView.h" -#import "TUIConversationListBaseDataProvider.h" - -#import -#import -#import -#import -#import "TUIConversationCellData.h" -@interface YXQuestionDetailViewController () - -@property (nonatomic, strong) UIScrollView * mainScrollView; - -@property (nonatomic, strong) DetailTitleView * titleview; - -@property (nonatomic, strong) DetailUserInfoView * infoView; - -@property (nonatomic, strong) QuestionAppointmentTimeView * timeView; - -@property (nonatomic, strong) QuestionFileDataView * fileView; - -@property (nonatomic, strong) QuestionReportView * reportView; - -@property (nonatomic, strong) QuestionHealthInfoView * healthView; - -@property (nonatomic, strong) UIView * questionStartView; - -@property (nonatomic, strong) UIButton * cancelBtn; - -@property (nonatomic, strong) UIButton * acceptBtn; - -@property (nonatomic, strong) UIButton * sendVideBtn; - -@property (nonatomic, strong) RefuseQuestionPopView * popView; - -@property (nonatomic, copy) NSString * conSession_id; - -@property (nonatomic, copy) NSString * record_id; - -@property (nonatomic, copy) NSString * idNo; - -@property (nonatomic, copy) NSString * starTimeString; - -@property (nonatomic, copy) NSString * endTimeString; - -@property (nonatomic, strong) UILabel * questionStartLabel; - -@property (nonatomic, copy) NSString * imId; - - -@property (nonatomic, copy) NSString * endPhoneID; - -@property (nonatomic, strong) YXRecoredDetailConsessionModel * timeModel; - -@end - -@implementation YXQuestionDetailViewController - -- (RefuseQuestionPopView *)popView { - - if (!_popView) { - MJWeakSelf - _popView = [[RefuseQuestionPopView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - _popView.upBlock = ^{ - - }; - - _popView.popBlock = ^(NSString * _Nonnull beizhuString, NSString * _Nonnull reasourString) { - //拒绝提交 - [weakSelf cancelReasourSubmit:beizhuString withReasonType:reasourString]; - - }; - _popView.alpha = 0; - - } - return _popView; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.navigationItem.title = @"视频咨询"; - self.view.backgroundColor = UIColorHex(#E0E0E0); - // Do any additional setup after loading the view. - [self createUI]; - [self createData]; - [self getCancelReasourData]; -} - -- (void)createUI { - - UIImageView * topImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 200)]; - topImage.image = [UIImage imageNamed:@"questionDetailBack"]; - [self.view addSubview:topImage]; - - - - self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kScreenHeight - kTopHeight - SafetyAreaHeight)]; - self.mainScrollView.showsVerticalScrollIndicator = false; - self.mainScrollView.showsHorizontalScrollIndicator = false; - self.mainScrollView.layer.cornerRadius = 8.0; - self.mainScrollView.layer.masksToBounds = true; - self.mainScrollView.backgroundColor = KClearColor; - [self.view addSubview:self.mainScrollView]; - - DetailTitleView * titleview = [[DetailTitleView alloc] initWithFrame:CGRectMake(0, 0, self.mainScrollView.width, 33)]; - self.titleview = titleview; - [self.mainScrollView addSubview:titleview]; - - //个人信息 - DetailUserInfoView * infoView = [[DetailUserInfoView alloc] initWithFrame:CGRectMake(0, titleview.bottom, kScreenWidth - kRealValue(30), kRealValue(103))]; - infoView.backgroundColor = KWhiteColor; - self.infoView = infoView; - [self.mainScrollView addSubview:infoView]; - - //预约时间 - QuestionAppointmentTimeView * timeView = [[QuestionAppointmentTimeView alloc] initWithFrame:CGRectMake(0, infoView.bottom + 1, kScreenWidth - kRealValue(30), kRealValue(64))]; - timeView.backgroundColor = KWhiteColor; - self.timeView = timeView; - [self.mainScrollView addSubview:timeView]; - //档案 - QuestionFileDataView * fileView = [[QuestionFileDataView alloc] initWithFrame:CGRectMake(0, timeView.bottom, kScreenWidth - kRealValue(30), kRealValue(64))]; - fileView.backgroundColor = KWhiteColor; - fileView.height = fileView.fileHeight; - self.fileView = fileView; - fileView.fileBlock = ^{ - [self lookFileDetail]; - }; - [self.mainScrollView addSubview:fileView]; - //基本健康信息 - QuestionHealthInfoView * healthView = [[QuestionHealthInfoView alloc] initWithFrame:CGRectMake(0, fileView.bottom +1, kScreenWidth - kRealValue(30), kRealValue(1))]; - healthView.backgroundColor = KWhiteColor; - self.healthView = healthView; - self.questionStartView.layer.cornerRadius = 10.0; - [self.mainScrollView addSubview:healthView]; - //体检报告 - QuestionReportView * reportView = [[QuestionReportView alloc] initWithFrame:CGRectMake(0, healthView.bottom +1, kScreenWidth - kRealValue(30), kRealValue(100))]; - reportView.backgroundColor = KWhiteColor; - self.reportView = reportView; - self.reportView.layer.cornerRadius = 10.0; - self.reportView.layer.masksToBounds = true; -// reportView.baogaoBlock = ^(YXPhyscialReportListModel * _Nonnull reportModel) { -// -// YXPhyReportDetailViewController * yearVC = [[YXPhyReportDetailViewController alloc] init]; -// yearVC.navTitle = reportModel.medicalYear; -// yearVC.yearString = reportModel.report_id; -// [self.navigationController pushViewController:yearVC animated:YES]; -// -// }; - [self.mainScrollView addSubview:reportView]; - - //咨询开始时间 - self.questionStartView = [[UIView alloc] initWithFrame:CGRectMake(0, reportView.bottom, kScreenWidth - kRealValue(30), 1)]; - self.questionStartView.backgroundColor = KWhiteColor; - self.questionStartView.layer.cornerRadius = 10.0; - self.questionStartView.layer.masksToBounds = true; - self.questionStartView.hidden = true; - [self.mainScrollView addSubview:self.questionStartView]; -// - UILabel * startLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(22), 100, 14)]; - startLabel.text = @"咨询开始时间"; - startLabel.font = BOLDSYSTEMFONT(13); - startLabel.textAlignment = NSTextAlignmentLeft; - [self.questionStartView addSubview:startLabel]; - - self.questionStartLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), startLabel.bottom + kRealValue(17), self.questionStartView.width - kRealValue(36), 13)]; - self.questionStartLabel.text = @""; - self.questionStartLabel.font = BOLDSYSTEMFONT(13); - self.questionStartLabel.textAlignment = NSTextAlignmentLeft; - [self.questionStartView addSubview:self.questionStartLabel]; - - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), reportView.bottom + kTopHeight); - - UIButton * cancelBtn = [[UIButton alloc] initWithFrame:CGRectMake( self.mainScrollView.width/2 - kRealValue(155) , kScreenHeight - kTopHeight - 60 - SafetyAreaHeight , kRealValue(150), 40)]; - [cancelBtn setTitle:@"拒绝" forState:UIControlStateNormal]; - [cancelBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - cancelBtn.titleLabel.font = SYSTEMFONT(18); - cancelBtn.backgroundColor = KWhiteColor; - cancelBtn.layer.cornerRadius = 18; - cancelBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - [cancelBtn addTarget:self action:@selector(cancelQuestionAction) forControlEvents:UIControlEventTouchUpInside]; - cancelBtn.layer.masksToBounds = true; - self.cancelBtn = cancelBtn; - self.cancelBtn.hidden = YES; - [self.mainScrollView addSubview:cancelBtn]; - - UIButton * acceptBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.mainScrollView.width/2 + kRealValue(5), cancelBtn.top , kRealValue(150), 40)]; - [acceptBtn setTitle:@"接受" forState:UIControlStateNormal]; - [acceptBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - [acceptBtn addTarget:self action:@selector(waitAcceptAction) forControlEvents:UIControlEventTouchUpInside]; - acceptBtn.titleLabel.font = SYSTEMFONT(18); - acceptBtn.backgroundColor = UIColorHex(#21BEBD); - acceptBtn.layer.cornerRadius = 18; - acceptBtn.layer.masksToBounds = true; - self.acceptBtn = acceptBtn; - self.acceptBtn.hidden = YES; - [self.mainScrollView addSubview:acceptBtn]; - - // - UIButton * videoBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(5), kScreenHeight - kTopHeight - 40 - SafetyAreaHeight , kRealValue(150), 40)]; - [videoBtn setTitle:@"视频通话" forState:UIControlStateNormal]; - [videoBtn setImage:[UIImage imageNamed:@"sendVideo_icon"] forState:UIControlStateNormal]; - [videoBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - videoBtn.titleLabel.font = SYSTEMFONT(18); - videoBtn.backgroundColor = KWhiteColor; - videoBtn.layer.cornerRadius = 18; - videoBtn.layer.masksToBounds = true; - videoBtn.centerX = self.mainScrollView.centerX; - self.sendVideBtn = videoBtn; - [self.sendVideBtn addTarget:self action:@selector(sendVideoAction) forControlEvents:UIControlEventTouchUpInside]; - self.sendVideBtn.hidden = YES; - [self.mainScrollView addSubview:videoBtn]; - - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), reportView.bottom + 35); -} - -- (void) createData { - - [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:self.question_id forKey:@"id"]; - - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"DeatilAPI" NeedToken:@""]; - - [detailApi GetRecoredQuestionDetail:parmDic]; -} - -- (void)getCancelReasourData { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"REASOURAPI" NeedToken:@""]; - - [detailApi GetCancelReasourData:parmDic]; - - -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - - if ([tag isEqualToString:@"DeatilAPI"]) { - - [self hiddenAllMBProgressHUD]; - NSDictionary * dic = response; - - YXRecoredListDetailModel * model = [YXRecoredListDetailModel modelWithDictionary:dic]; - - YXReocrdconFamilyMembersDO * infoModel = [YXReocrdconFamilyMembersDO modelWithDictionary:model.conFamilyMembersDO]; - - YXRecoredDetailConsessionModel * timeModel = [YXRecoredDetailConsessionModel modelWithDictionary:model.conSession]; - self.timeModel = timeModel; - YXRecoredconMedicalRecordsListDO * medicalModel = [YXRecoredconMedicalRecordsListDO modelWithDictionary:model.conMedicalRecordsListDO]; - //总的ID - self.conSession_id = timeModel.consession_id; - self.record_id = medicalModel.dangan_id; - self.imId = infoModel.groupId; - //个人信息 - self.infoView.userInfo = infoModel; - //顶部时间 - self.titleview.createTime = timeModel.createTime; - //预约时间 - self.timeView.model = model; - //顶部时间高度 - self.timeView.height = self.timeView.doctorinfoHeight; - //档案 - self.fileView.model = medicalModel; - self.fileView.top = self.timeView.bottom; - - //健康信息 - if (model.answer.count <= 0) { - - self.healthView.hidden = YES; - self.healthView.height = 1; - - UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.fileView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)]; - - CAShapeLayer * maskLayer = [[CAShapeLayer alloc]init]; - - maskLayer.frame = self.fileView.bounds; - - maskLayer.path = maskPath.CGPath; - - self.fileView.layer.mask = maskLayer; - - - }else - { - self.healthView.hidden = false; - self.healthView.questionArray = model.answer; - self.healthView.height = self.healthView.healthHeight; - - UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.healthView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)]; - - CAShapeLayer * maskLayer = [[CAShapeLayer alloc]init]; - - maskLayer.frame = self.healthView.bounds; - - maskLayer.path = maskPath.CGPath; - - self.healthView.layer.mask = maskLayer; - - } - - // self.endTimeString = info - self.idNo = model.idNo; - - //是否体检报告 - if ([medicalModel.tfPermission integerValue] == 1) { //有体检报告 -// self.reportView.hidden = false; - [self getBodyInfoReport:timeModel.fromAccount]; -// self.reportView.height = self.reportView.reportHeight; -// self.reportView.top = self.healthView.bottom - 10; - - }else - { - self.reportView.hidden = YES; - self.reportView.height = 1; - [self updateUI]; - - } -// [self updateUI]; - - - } - if ([tag isEqualToString:@"BodyApi"]) { - - // NSArray * dataArray = response; - // - // self.reportView.dataArray = dataArray; - // self.reportView.top= self.healthView.bottom; - // self.reportView.height = self.reportView.reportHeight; - // self.mainScrollView.height = self.reportView.bottom + 35; - // self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.reportView.bottom + 35); - [self hiddenAllMBProgressHUD]; - NSDictionary * dic = response; - - if (ValidDict(dic)) { - -// YXPhyscialReportListModel * model = [YXPhyscialReportListModel modelWithDictionary:dic]; -// self.reportView.bodyModel =model; - self.reportView.height = self.reportView.reportHeight; - self.questionStartView.top = self.reportView.bottom + kRealValue(15); -// [self updateFocusIfNeeded]; -// if (self.cancelBtn.hidden == false) { -// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.cancelBtn.bottom + 35); -// } -// if (self.sendVideBtn.hidden == false) { -// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.sendVideBtn.bottom + 35); -// } -// if (self.questionStartView.hidden == false) { -// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.questionStartView.bottom + 35); -// } - [self updateUI]; - }else - { - self.reportView.height = 1; - self.reportView.hidden = true; - [self updateUI]; - } - - - } - if ([tag isEqualToString:@"REASOURAPI"]) { - [self hiddenAllMBProgressHUD]; - NSArray * array = response; - - NSMutableArray * dataArray = [[NSMutableArray alloc] init]; - - for (NSDictionary * reasourDic in array) { - - YXCancelReasonModel * model = [YXCancelReasonModel modelWithDictionary:reasourDic]; - - [dataArray addObject:model]; - - } - self.popView.dataArray = dataArray; - - } - if ([tag isEqualToString:@"SUBMITREASOUR"]) { - - [self.popView removeFromSuperview]; - [self hiddenAllMBProgressHUD]; - [self createData]; - } - if([tag isEqualToString:@"ACCEPTQUESTION"]) { - [self hiddenAllMBProgressHUD]; - [self createData]; - - } - if ([tag isEqualToString:@"ENDPICTUREAPI"]) { - - [self createData]; - } - if ([tag isEqualToString:@"AgainQuestion"]) { - - [self createData]; - [self hiddenAllMBProgressHUD]; - } - if ([tag isEqualToString:@"IMAPI"]) { - - NSDictionary * pamrDic = response; - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; - - IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; - iminfoModel.IMInfo = pamrDic; - [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; - - // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 - // 2. 初始化 config 对象 - V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init]; - // 3. 指定 log 输出级别。 - config.logLevel = V2TIM_LOG_INFO; - // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 - // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 - [[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config]; - [ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig]; - [[TUICallEngine createInstance] init:[model.sdkAppId intValue] userId:model.userId userSig:model.userSig succ:^{ - - } fail:^(int code, NSString * _Nullable errMsg) { - - }]; - - } - if ([tag isEqualToString:@"STARSENDVIDE"]) { - - [self hiddenAllMBProgressHUD]; - NSDictionary * dic = response; - - NSString * groupId ; - - if ([dic.allKeys containsObject:@"groupId"]) { - - NSArray * memberArray = [dic objectForKey:@"member"]; - - [[TUICallEngine createInstance] addObserver:self]; - - [[TUICallKit createInstance] groupCall:[dic objectForKey:@"groupId"] userIdList:memberArray callMediaType:TUICallMediaTypeVideo]; - - [self hiddenAllMBProgressHUD]; - } - - if ([ESCTUIManager TUIUserStatus] == false) { - - - [self loginImAccount]; - return; - }else - { - - } - } - - if ([tag isEqualToString:@"ENDVideo"]) { - [self createData]; - - } - - if ([tag isEqualToString:@"beginVideo"]) { - - self.endPhoneID = [NSString stringWithFormat:@"%@",response]; - [self createData]; - } -} - -- (void)updateUI { - - //健康信息布局 - self.healthView.top = self.fileView.bottom; - // 体检信息布局 - self.reportView.top = self.healthView.bottom - 10; - //开始视图布局 - self.questionStartView.top = self.healthView.bottom + kRealValue(15); - //底部按钮布局 - self.cancelBtn.top = self.reportView.bottom + kRealValue(30); - self.acceptBtn.top = self.reportView.bottom + kRealValue(30); - self.sendVideBtn.top = self.reportView.bottom + kRealValue(30); - - // 预约状态 1待确认 2待开始 3已开始 4待评价 5已完成 - // 6 拒绝 7取消 8 超时 - - - if ([self.timeModel.contentStatus intValue] == 1) { - self.acceptBtn.hidden = false; - self.cancelBtn.hidden = false; - self.sendVideBtn.hidden = YES; - self.questionStartView.hidden = true; //视图开始时间隐藏 - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.cancelBtn.bottom + 60); - - } - if ([self.timeModel.contentStatus intValue] == 2 || [self.timeModel.contentStatus intValue] == 3) { - self.acceptBtn.hidden = YES; - self.cancelBtn.hidden = YES; - self.sendVideBtn.hidden = false; - self.questionStartView.hidden = false; - NSTimeInterval starTimeInterval = [self.timeModel.doctorStartTimeLong longLongValue]; - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:@"yyyy年MM月dd HH:mm"]; - NSDate *date = [NSDate dateWithTimeIntervalSince1970:starTimeInterval/1000]; - NSString *timeString = [formatter stringFromDate:date]; - - NSTimeInterval endTimeInterval = [self.timeModel.doctorEndTimeLong longLongValue]; - NSDateFormatter * endformatter = [[NSDateFormatter alloc] init]; - [endformatter setDateFormat:@"HH:mm"]; - NSDate * enddate = [NSDate dateWithTimeIntervalSince1970:endTimeInterval/1000]; - NSString * endTimeString = [endformatter stringFromDate:enddate]; - self.questionStartView.height = kRealValue(100); - self.questionStartLabel.text = [NSString stringWithFormat:@"%@~%@",timeString,endTimeString]; - self.questionStartView.top = self.reportView.bottom + kRealValue(15); - self.sendVideBtn.top = self.questionStartView.bottom + kRealValue(30); - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.sendVideBtn.bottom + 35); - - - } - if ([self.timeModel.contentStatus intValue] >= 4 ) { //待评价 已完成 - self.acceptBtn.hidden = true; - self.cancelBtn.hidden = true; - self.sendVideBtn.hidden = true; - NSTimeInterval starTimeInterval = [self.timeModel.doctorStartTimeLong longLongValue]; - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:@"yyyy年MM月dd HH:mm"]; - NSDate *date = [NSDate dateWithTimeIntervalSince1970:starTimeInterval/1000]; - NSString *timeString = [formatter stringFromDate:date]; - - NSTimeInterval endTimeInterval = [self.timeModel.doctorEndTimeLong longLongValue]; - NSDateFormatter * endformatter = [[NSDateFormatter alloc] init]; - [endformatter setDateFormat:@"HH:mm"]; - NSDate * enddate = [NSDate dateWithTimeIntervalSince1970:endTimeInterval/1000]; - NSString * endTimeString = [endformatter stringFromDate:enddate]; - - self.questionStartLabel.text = [NSString stringWithFormat:@"%@~%@",timeString,endTimeString]; - self.questionStartView.top = self.reportView.bottom + kRealValue(15); - self.questionStartView.height = CGFLOAT_MIN; - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.questionStartView.bottom + 60); - - } - -} -- (void)loginImAccount { - - - YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; - [proctocolApi GetIMLoginAccount:nil]; - - - -} - -//请求体检信息 -- (void)getBodyInfoReport:(NSString *)byID { - - -// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; -// -// [parmDic setObject:byID forKey:@"sfzh"]; -// - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - [parmDic setObject:byID forKey:@"userId"]; - - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"BodyApi" NeedToken:@""]; - - [detailApi getBodyReportDeatil:parmDic]; - - -} - -//拒绝 -- (void)cancelQuestionAction { - - - [kApplication.keyWindow addSubview:self.popView]; - - [UIView animateWithDuration:0.5 - animations:^{ - self.popView.alpha = 1; - }]; -} -//发起视频通话 -- (void)sendVideoAction { - - [self showMBProgressHUDWithString:@"视频通话请求中..." autoHidden:NO]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:self.question_id forKey:@"sessionId"]; - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"STARSENDVIDE" NeedToken:@""]; - [detailApi getSendVideoStart:parmDic]; -} - - -//提交拒绝原因 -- (void)cancelReasourSubmit:(NSString *)rejectReason withReasonType:(NSString *)reasonType { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject: self.conSession_id forKey:@"id"]; - [parmDic setObject:rejectReason forKey:@"rejectReason"]; - [parmDic setObject:reasonType forKey:@"reasonType"]; - - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"SUBMITREASOUR" NeedToken:@""]; - - [detailApi submitCancelreasourData:parmDic]; - -} - -//接受请求 -- (void)waitAcceptAction { - YXDTTestView *vi = [[YXDTTestView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - [kAppWindow addSubview:vi]; - vi.returnBlock = ^(NSString *startTime, NSString *endTime) { - NSLog(@"开始时间 = %@", startTime); - NSLog(@"结束时间 = %@", endTime); - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject: self.conSession_id forKey:@"id"]; - [parmDic setObject:startTime forKey:@"startTime"]; - [parmDic setObject:endTime forKey:@"endTime"]; - - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"ACCEPTQUESTION" NeedToken:@""]; - - [detailApi getAcceptQuestion:parmDic]; - - }; -} - -//点否 下次预约 --(void)againSendVideoTime { - - YXDTTestView *vi = [[YXDTTestView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - [kAppWindow addSubview:vi]; - vi.returnBlock = ^(NSString *startTime, NSString *endTime) { - NSLog(@"开始时间 = %@", startTime); - NSLog(@"结束时间 = %@", endTime); - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject: self.conSession_id forKey:@"id"]; - [parmDic setObject:startTime forKey:@"startTime"]; - [parmDic setObject:endTime forKey:@"endTime"]; - [parmDic setObject:@(1) forKey:@"type"]; - [self showMBProgressHUDWithString:@"重新预约中" autoHidden:false]; - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"AgainQuestion" NeedToken:@""]; - [detailApi getAgainSessionReservationDate:parmDic]; - - }; - -} - -//查看详情 -- (void)lookFileDetail { - - XJDFileDataDetailViewController * detalVC = [[XJDFileDataDetailViewController alloc] init]; - detalVC.record_id = self.record_id; - [self.navigationController pushViewController:detalVC animated:YES]; - -} - -//开始通话 -- (void)onCallBegin:(TUIRoomId *)roomId callMediaType:(TUICallMediaType)callMediaType callRole:(TUICallRole)callRole { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject: self.conSession_id forKey:@"id"]; - [parmDic setObject:@"" forKey:@"startTime"]; - [parmDic setObject:@"" forKey:@"endTime"]; - [parmDic setObject:@(2) forKey:@"type"]; - YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"beginVideo" NeedToken:@""]; - [detailApi getAgainSessionReservationDate:parmDic]; - -} - -//结束通话 -- (void)onCallEnd:(TUIRoomId *)roomId callMediaType:(TUICallMediaType)callMediaType callRole:(TUICallRole)callRole totalTime:(float)totalTime { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:self.endPhoneID forKey:@"id"]; - YXNetAPI * endApi = [[YXNetAPI alloc] init:self tag:@"ENDVideo" NeedToken:@""]; - [endApi getendVideoReportById:parmDic]; - - - - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"本次咨询是否已完成?" preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"否" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - [self againSendVideoTime]; - - }]; - UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"完成" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - - [self endQuestionSelected]; - - }]; - [alertController addAction:cancelAction]; - [alertController addAction:sureAction]; - // 确保在主线程上显示 UIAlertController - dispatch_async(dispatch_get_main_queue(), ^{ - [self presentViewController:alertController animated:YES completion:nil]; - }); - -} - -//结束本次咨询 -- (void)endQuestionSelected { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:self.question_id forKey:@"id"]; - YXNetAPI * endApi = [[YXNetAPI alloc] init:self tag:@"ENDPICTUREAPI" NeedToken:@""]; - [endApi GetEndPictureEndIMQuestion:parmDic]; - -} - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameSubTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameSubTableViewCell.m deleted file mode 100644 index 460c111..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameSubTableViewCell.m +++ /dev/null @@ -1,221 +0,0 @@ -// -// YXSickNameSubTableViewCell.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/8/29. -// - -#import "YXSickNameSubTableViewCell.h" - - -@interface YXSickNameSubTableViewCell () - -@property (nonatomic, strong) UILabel * nameLabel; -@property (nonatomic, strong) UILabel * resultLabel; -@property (nonatomic, strong) UILabel * danweiLabel; -@property (nonatomic, strong) UILabel * caokaoLabel; -@property (nonatomic, strong) UIButton * detailBtn; -@property (nonatomic, strong) UIView * popbackView; -@end - -@implementation YXSickNameSubTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - - - UIView * headView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kRealValue(40))]; - headView.backgroundColor =KWhiteColor; - [self.contentView addSubview:headView]; - - - - UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kRealValue(127), kRealValue(40))]; - nameLabel.text = @""; - nameLabel.textAlignment = NSTextAlignmentCenter; - nameLabel.font = SYSTEMFONT(13); - nameLabel.numberOfLines = 2; - self.nameLabel = nameLabel; - [headView addSubview:nameLabel]; - - CGFloat tabWidth = (kScreenWidth - kRealValue(30) - kRealValue(127) - 4)/3; - - UIView * lin_left = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, nameLabel.height)]; - lin_left.backgroundColor = CLineColor; - [headView addSubview:lin_left]; - - UIView * linName = [[UIView alloc] initWithFrame:CGRectMake(nameLabel.right, 0, 1, nameLabel.height)]; - linName.backgroundColor = CLineColor; - [headView addSubview:linName]; - - UILabel * reslutLabel = [[UILabel alloc] initWithFrame:CGRectMake(linName.right , 0, tabWidth, kRealValue(40))]; - reslutLabel.text = @""; - reslutLabel.textAlignment = NSTextAlignmentCenter; - reslutLabel.font = SYSTEMFONT(13); - reslutLabel.textColor = UIColorHex(#333333); - self.resultLabel = reslutLabel; - reslutLabel.userInteractionEnabled = true; - [headView addSubview:reslutLabel]; - - self.detailBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, tabWidth - 20, 20)]; - [self.detailBtn setTitle:@"详情" forState:UIControlStateNormal]; - [self.detailBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - self.detailBtn.titleLabel.font = MEDIUMFONT(13); - self.detailBtn.layer.cornerRadius = 5; - self.detailBtn.backgroundColor = RGBA(33, 190, 189, 0.5); - [self.detailBtn addTarget:self action:@selector(showResultDetail) forControlEvents:UIControlEventTouchUpInside]; - [reslutLabel addSubview:self.detailBtn]; - - UIView * resName = [[UIView alloc] initWithFrame:CGRectMake(reslutLabel.right, 0, 1, nameLabel.height)]; - resName.backgroundColor = CLineColor; - [headView addSubview:resName]; - - UILabel * danweiLabel = [[UILabel alloc] initWithFrame:CGRectMake(resName.right, 0, tabWidth, kRealValue(40))]; - danweiLabel.text = @""; - danweiLabel.textAlignment = NSTextAlignmentCenter; - danweiLabel.font = SYSTEMFONT(13); - danweiLabel.textColor = UIColorHex(#333333); - self.danweiLabel = danweiLabel; - [headView addSubview:danweiLabel]; - - UIView * danweiLine = [[UIView alloc] initWithFrame:CGRectMake(danweiLabel.right, 0, 1, nameLabel.height)]; - danweiLine.backgroundColor = CLineColor; - [headView addSubview:danweiLine]; - - UILabel * zhiLabel = [[UILabel alloc] initWithFrame:CGRectMake(danweiLine.right, 0, tabWidth, kRealValue(40))]; - zhiLabel.text = @""; - zhiLabel.textAlignment = NSTextAlignmentCenter; - zhiLabel.textColor = UIColorHex(#333333); - zhiLabel.font = SYSTEMFONT(13); - self.caokaoLabel = zhiLabel; - [headView addSubview:zhiLabel]; - - UIView * lin_right = [[UIView alloc] initWithFrame:CGRectMake(zhiLabel.right, 0, 1, nameLabel.height)]; - lin_right.backgroundColor = CLineColor; - [headView addSubview:lin_right]; - - UIView * lin_bottom = [[UIView alloc] initWithFrame:CGRectMake(0, zhiLabel.bottom - 1, kScreenWidth - kRealValue(30), 1)]; - lin_bottom.backgroundColor = CLineColor; - [headView addSubview:lin_bottom]; -} - -- (void)setModel:(YXThirdResultResModel *)model { - - _model = model; - - if (ValidStr(_model.peResult)) { - _model.peResult = @"/"; - } - if (ValidStr(_model.unit)) { - _model.unit = @"/"; - } - if (ValidStr(_model.printContext)) { - _model.printContext = @"/"; - } - if (ValidStr(_model.peItemName)) { - _model.peItemName = @"/"; - } - self.nameLabel.text = _model.peItemName; - - - if (_model.peResult.length >= 5) { - - self.resultLabel.text =@""; - self.detailBtn.hidden = false; - }else - { - self.resultLabel.text = _model.peResult; - self.detailBtn.hidden = true; - } - self.danweiLabel.text = _model.unit; - self.caokaoLabel.text = _model.printContext; - - - if ([_model.colour integerValue] == 1) { - - self.nameLabel.textColor = UIColorHex(#DA180F); - self.resultLabel.textColor = UIColorHex(#DA180F); - self.danweiLabel.textColor = UIColorHex(#DA180F); - self.caokaoLabel.textColor = UIColorHex(#DA180F); - }else - { - self.nameLabel.textColor = UIColorHex(#333333); - self.resultLabel.textColor = UIColorHex(#333333); - self.danweiLabel.textColor = UIColorHex(#333333); - self.caokaoLabel.textColor = UIColorHex(#333333); - } - -} - -- (void)showResultDetail { - - - UIView * popbackView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - self.popbackView = popbackView; - popbackView.backgroundColor = RGBA(0, 0, 0, 0.5); - - - - UIScrollView * centerView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(154), kScreenWidth - kRealValue(30), 200)]; - centerView.backgroundColor = KWhiteColor; - centerView.layer.cornerRadius = 10.0; - [popbackView addSubview:centerView]; - - UILabel * connteLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 20, centerView.width - 20, 50)]; - connteLabel.text = [NSString stringWithFormat:@"%@",self.model.peResult] ; - connteLabel.numberOfLines = 0; - connteLabel.font = SYSTEMFONT(14); - connteLabel.textAlignment = NSTextAlignmentLeft; - connteLabel.textColor = CFontColor1; - [centerView addSubview:connteLabel]; - - CGFloat h = [HQCommonUtils getSpaceLabelHeight:connteLabel AndLeftisTrue:true withStr:connteLabel.text withFont:[UIFont systemFontOfSize:14] withWidth:connteLabel.width withLineSpacing:5]; - - connteLabel.height = h; - - centerView.height = h + 69; - - if (h > kScreenHeight - kRealValue(180)) { - - centerView.height = kRealValue(450); - centerView.contentSize = CGSizeMake(centerView.width, h); - } - - UIButton * sureBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15), centerView.bottom- 15, kScreenWidth - kRealValue(30), 49)]; - [sureBtn setTitle:@"确定" forState:UIControlStateNormal]; - sureBtn.titleLabel.font = SYSTEMFONT(13); - sureBtn.backgroundColor = KWhiteColor; - sureBtn.layer.cornerRadius = 10; - [sureBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [sureBtn addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside]; - [popbackView addSubview:sureBtn]; - - - [kAppWindow addSubview:popbackView]; -} - -- (void)sureAction { - - [self.popbackView removeFromSuperview]; -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.h deleted file mode 100644 index 82ed28b..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// YXSickNameTopTableViewCell.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/8/29. -// - -#import -#import "YXHealthPhyReportModel.h" -NS_ASSUME_NONNULL_BEGIN - -typedef void(^onekeyQuestionBlock)(NSString * itemID); - -@interface YXSickNameTopTableViewCell : UITableViewCell - -@property (nonatomic, strong) YXThirdResultResModel * model; -@property (nonatomic, copy) onekeyQuestionBlock itemBlock; -@property (nonatomic, copy) NSString * uniItemClassId; -@property (nonatomic, assign) NSInteger questionType; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.m deleted file mode 100644 index 695b0f4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXSickNameTopTableViewCell.m +++ /dev/null @@ -1,134 +0,0 @@ -// -// SickNameTopTableViewCell.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/8/29. -// - -#import "YXSickNameTopTableViewCell.h" - -@interface YXSickNameTopTableViewCell () - -@property (nonatomic, strong ) UILabel * sickNameLabel; -@property (nonatomic, strong ) YYLabel * oneKeyLabel; - -@end - -@implementation YXSickNameTopTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - UIView * linV = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(15), 2, kRealValue(13))]; - linV.backgroundColor = UIColorHex(#21BEBD); - [self.contentView addSubview:linV]; - - self.sickNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(linV.right + kRealValue(10), kRealValue(15), 100, 16)]; - self.sickNameLabel.textAlignment = NSTextAlignmentLeft; - self.sickNameLabel.font = BOLDSYSTEMFONT(15); - self.sickNameLabel.textColor = CFontColor1; - [self.contentView addSubview:self.sickNameLabel]; - - self.oneKeyLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 130 , kRealValue(15), 130, 16)]; - self.oneKeyLabel.textAlignment = NSTextAlignmentRight; - self.oneKeyLabel.font = BOLDSYSTEMFONT(13); - self.oneKeyLabel.textColor = KRedColor; - self.oneKeyLabel.text = @"专家库一键咨询 >"; - self.oneKeyLabel.hidden = true; - [self.oneKeyLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - [self doctorQuestion]; - }]; - [self.contentView addSubview:self.oneKeyLabel]; - - UIView * headView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.sickNameLabel.bottom + kRealValue(12), kScreenWidth - kRealValue(30), kRealValue(40))]; - headView.backgroundColor = RGBA(33, 190, 189, 0.5); - [self.contentView addSubview:headView]; - - UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kRealValue(127), kRealValue(40))]; - nameLabel.text = @"名称"; - nameLabel.textAlignment = NSTextAlignmentCenter; - nameLabel.font = SYSTEMFONT(13); - [headView addSubview:nameLabel]; - - CGFloat tabWidth = (kScreenWidth - kRealValue(30) - kRealValue(127) - 4)/3; - - UIView * linName = [[UIView alloc] initWithFrame:CGRectMake(nameLabel.right, 0, 1, nameLabel.height)]; - linName.backgroundColor = CLineColor; - [headView addSubview:linName]; - - UILabel * reslutLabel = [[UILabel alloc] initWithFrame:CGRectMake(linName.right , 0, tabWidth, kRealValue(40))]; - reslutLabel.text = @"结果"; - reslutLabel.textAlignment = NSTextAlignmentCenter; - reslutLabel.font = SYSTEMFONT(13); - [headView addSubview:reslutLabel]; - - UIView * resName = [[UIView alloc] initWithFrame:CGRectMake(reslutLabel.right, 0, 1, nameLabel.height)]; - resName.backgroundColor = CLineColor; - [headView addSubview:resName]; - - UILabel * danweiLabel = [[UILabel alloc] initWithFrame:CGRectMake(resName.right, 0, tabWidth, kRealValue(40))]; - danweiLabel.text = @"单位"; - danweiLabel.textAlignment = NSTextAlignmentCenter; - danweiLabel.font = SYSTEMFONT(13); - [headView addSubview:danweiLabel]; - - UIView * danweiLine = [[UIView alloc] initWithFrame:CGRectMake(danweiLabel.right, 0, 1, nameLabel.height)]; - danweiLine.backgroundColor = CLineColor; - [headView addSubview:danweiLine]; - - UILabel * zhiLabel = [[UILabel alloc] initWithFrame:CGRectMake(danweiLine.right, 0, tabWidth, kRealValue(40))]; - zhiLabel.text = @"参考值"; - zhiLabel.textAlignment = NSTextAlignmentCenter; - zhiLabel.font = SYSTEMFONT(13); - [headView addSubview:zhiLabel]; -} - -- (void)setModel:(YXThirdResultResModel *)model { - - _model = model; - - self.sickNameLabel.text = _model.peItemName; - -} - - -- (void)doctorQuestion { - - if (self.itemBlock) { - - self.itemBlock(self.model.third_tId); - } -} - -- (void)setQuestionType:(NSInteger)questionType { - - _questionType = questionType; - - if (_questionType == 2) { - self.oneKeyLabel.hidden = false; - }else - { - self.oneKeyLabel.hidden = true; - } - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.h deleted file mode 100644 index 6f2e5a6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// YXimageReportTableViewCell.h -// DoctorXinjiang -// -// Created by Apple on 2024/2/23. -// - -#import -#import "YXHealthPhyReportModel.h" -NS_ASSUME_NONNULL_BEGIN - -typedef void(^lookUserReport)(NSString * lookUrl); - -@interface YXimageReportTableViewCell : UITableViewCell - -@property (nonatomic, strong) YXImageItemListModel * model; - -@property (nonatomic, copy) lookUserReport lookBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.m deleted file mode 100644 index 6ad8b34..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionDetail(咨询详情)/YXimageReportTableViewCell.m +++ /dev/null @@ -1,235 +0,0 @@ -// -// imageReportTableViewCell.m -// DoctorXinjiang -// -// Created by Apple on 2024/2/23. -// - -#import "YXimageReportTableViewCell.h" - -@interface YXimageReportTableViewCell () - -@property (nonatomic, strong) UILabel * reportLabel; - -@property (nonatomic, strong) UIView * reportConetView; - -@property (nonatomic, strong) UILabel * resultLabel; - -@property (nonatomic, strong) UIView * conteLineView; - -@property (nonatomic, strong) NSMutableArray * buttonArray; -@property (nonatomic, strong) NSMutableArray * reportArray; -@property (nonatomic, strong) NSMutableArray * imageArray; - - -@end - -@implementation YXimageReportTableViewCell - -- (NSMutableArray *)buttonArray { - - if (!_buttonArray) { - - _buttonArray = [[NSMutableArray alloc] init]; - } - return _buttonArray; -} - -- (NSMutableArray *)reportArray { - - if (!_reportArray) { - - _reportArray = [[NSMutableArray alloc] init]; - } - return _reportArray; -} - -- (NSMutableArray *)imnageArray { - - if (!_imageArray) { - - _imageArray = [[NSMutableArray alloc] init]; - } - return _imageArray; -} -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - - -- (void)createUI { - - UIView * linV = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(15), 2, kRealValue(13))]; - linV.backgroundColor = UIColorHex(#21BEBD); - [self.contentView addSubview:linV]; - - self.reportLabel = [[UILabel alloc] initWithFrame:CGRectMake(linV.right + kRealValue(10), kRealValue(15), kScreenWidth - kRealValue(20), 16)]; - self.reportLabel.textAlignment = NSTextAlignmentLeft; - self.reportLabel.font = BOLDSYSTEMFONT(15); - self.reportLabel.textColor = CFontColor1; - self.reportLabel.text = @"--"; - [self.contentView addSubview:self.reportLabel]; - - self.reportConetView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15),self.reportLabel.bottom + kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(13))]; - self.reportConetView.backgroundColor = RGBA(245, 247, 251, 1); - [self.contentView addSubview:self.reportConetView]; - - self.resultLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(15), self.reportConetView.width - kRealValue(32), 13)]; - self.resultLabel.textAlignment = NSTextAlignmentLeft; - self.resultLabel.font = MEDIUMFONT(13); - self.resultLabel.textColor = CFontColor1; - self.resultLabel.numberOfLines = 0; - self.resultLabel.text = @"--"; - [self.reportConetView addSubview:self.resultLabel]; - - self.conteLineView = [[UIView alloc] initWithFrame:CGRectMake(0,self.resultLabel.bottom + kRealValue(38), self.reportConetView.width, kRealValue(1))]; - self.conteLineView.backgroundColor = UIColorHex(#E7EAF2); - [self.reportConetView addSubview:self.conteLineView]; - -} - -- (void)setModel:(YXImageItemListModel *)model { - - _model = model; - - self.reportLabel.text = _model.imageCheckName; - - self.resultLabel.text = _model.reportContent; - - self.resultLabel.height = _model.textHeight; - - if (_model.textHeight < 13) { - - self.conteLineView.top = self.resultLabel.bottom + kRealValue(38); - self.reportConetView.height = kRealValue(15) + 13 + kRealValue(38) + kRealValue(44); - } - else - { - self.conteLineView.top = self.resultLabel.bottom + kRealValue(18); - self.reportConetView.height = kRealValue(15) + _model.textHeight + kRealValue(18) + kRealValue(44); - - } - - - - - - - - for (UIButton * toolsBtn in self.buttonArray) { - [toolsBtn removeFromSuperview]; - } - [self.buttonArray removeAllObjects]; - [self.imnageArray removeAllObjects]; - [self.reportArray removeAllObjects]; - - //原始报告 - CGFloat buttonW = (self.reportConetView.width - kRealValue(75) )/ 4; //1行最多4个 - - NSArray * yuanshiArray = [_model.reportUrl componentsSeparatedByString:@","]; - [self.reportArray addObjectsFromArray:yuanshiArray]; - CGFloat lastX = 0; - for (int i = 0 ; i < yuanshiArray.count; i ++) { - - UIButton * lookYuanshi = [[UIButton alloc] initWithFrame:CGRectMake(self.reportConetView.width - kRealValue(15) - (buttonW + kRealValue(15)) * i, self.conteLineView.bottom + kRealValue(6), kRealValue(80), kRealValue(30))]; - [lookYuanshi setTitle:@"原始报告" forState:UIControlStateNormal]; - lookYuanshi.titleLabel.font = SYSTEMFONT(13); - lookYuanshi.layer.cornerRadius = 15.0; - lookYuanshi.layer.borderWidth = 1.0; - [lookYuanshi setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - lookYuanshi.layer.borderColor = UIColorHex(#21BEBD).CGColor; - lookYuanshi.layer.masksToBounds = true; - lookYuanshi.tag = 2000+ i; - [self.buttonArray addObject:lookYuanshi]; - - } - //影像原片 - NSArray * yingxiangArray = [_model.imageShowUrl componentsSeparatedByString:@","]; - [self.imageArray addObjectsFromArray:yingxiangArray]; - for (int i = 0 ; i < yingxiangArray.count; i ++) { - - UIButton * lookyingxiang = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) - (buttonW + kRealValue(15)) * i, self.conteLineView.bottom + kRealValue(6), kRealValue(80), kRealValue(30))]; - [lookyingxiang setTitle:@"影像原片" forState:UIControlStateNormal]; - lookyingxiang.titleLabel.font = SYSTEMFONT(13); - lookyingxiang.layer.cornerRadius = 15.0; - lookyingxiang.layer.borderWidth = 1.0; - lookyingxiang.layer.borderColor = UIColorHex(#21BEBD).CGColor; - lookyingxiang.layer.masksToBounds = true; - [lookyingxiang setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - - lookyingxiang.tag = 1000+ i; - [self.buttonArray addObject:lookyingxiang]; - } - - - - //布局多组按钮 - //一行的列数 - NSInteger cols = 4; - //label大小 - CGFloat labW = buttonW ; - CGFloat labH = kRealValue(30); - CGFloat pading = kRealValue(15); - //每一行的间距 - CGFloat rowMargin = kRealValue(15); - for (int index = 0; index < self.buttonArray.count ; index ++) { - //所在列 - NSInteger col = index % cols; - //所在行 - NSInteger row = index / cols; - - CGFloat shopX = col * (labW + rowMargin); - CGFloat shopY = row * (labH + rowMargin); - UIButton * toolsBtn = self.buttonArray[index]; - toolsBtn.frame = CGRectMake(self.reportConetView.width - shopX - pading - buttonW , self.conteLineView.bottom + kRealValue(6) + shopY, labW, labH); - if (index == self.buttonArray.count - 1) { - lastX = toolsBtn.bottom + kRealValue(7); - } - [toolsBtn addTarget:self action:@selector(lookImageReport:) forControlEvents:UIControlEventTouchUpInside]; - [self.reportConetView addSubview:toolsBtn]; - - } - self.reportConetView.height = lastX; - -} - -- (void)lookImageReport:(UIButton *)lookBtn { - - NSLog(@"%d",lookBtn.tag); - //影片原像 - if (lookBtn.tag < 2000) { - - if (self.lookBlock) { - self.lookBlock(self.imageArray[lookBtn.tag - 1000]); - } - - }else //原始报告 - { - if (self.lookBlock) { - self.lookBlock(self.reportArray[lookBtn.tag - 2000]); - } - } - - - - -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.h deleted file mode 100644 index 864b59b..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// YXAudioVideoRecordViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXAudioVideoRecordViewController : YXBaseViewController - -@property (nonatomic, assign) NSInteger questionType; -@property (nonatomic, assign) NSInteger questionStatus; //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型) - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.m deleted file mode 100644 index 73cdc21..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXAudioVideoRecordViewController.m +++ /dev/null @@ -1,286 +0,0 @@ -// -// YXAudioVideoRecordViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "YXAudioVideoRecordViewController.h" -#import "QuestionRecoredTable.h" -#import "YXQuestionDetailViewController.h" -#import "LYEmptyView.h" -#import "LYEmptyViewHeader.h" -@interface YXAudioVideoRecordViewController () - -@property (nonatomic, strong) QuestionRecoredTable * homeTable; - -@property (nonatomic, strong) NSMutableArray * buttonArray; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@property (nonatomic, assign) NSInteger pageNo; - -@property (nonatomic, copy) NSString * status; - -@end - -@implementation YXAudioVideoRecordViewController - -- (NSMutableArray *)dataArray { - - if (!_dataArray) { - - _dataArray = [[NSMutableArray alloc] init]; - - } - return _dataArray; - -} - - -- (NSMutableArray *)buttonArray { - - if (!_buttonArray) { - - _buttonArray = [[NSMutableArray alloc] init]; - - } - return _buttonArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"视频咨询"; - [self createUI]; - [self createData]; -} - -- (void)createData { - - [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO]; - YXNetAPI * listApi = [[YXNetAPI alloc] init:self tag:@"LIST" NeedToken:@""]; - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; - [parmDic setObject:@(10) forKey:@"pageSize"]; - [parmDic setObject:@"2" forKey:@"type"]; - [parmDic setObject:self.status forKey:@"status"]; - [listApi GetQuestionRecoredList:parmDic]; - -} - -- (void)viewWillAppear:(BOOL)animated { - - [super viewWillAppear:animated]; - [self.homeTable.mj_header beginRefreshing]; - - -} -- (void)createUI { - - NSArray * array = @[@"待确认",@"进行中",@"已完成"]; - [self.buttonArray removeAllObjects]; - CGFloat w = kRealValue(66); - for (int index = 0; index < array.count; index ++) { - - UIButton * listBtn = [[UIButton alloc] init]; - - listBtn.frame = CGRectMake(kRealValue(15) + (w + kRealValue(13)) * index , kRealValue(15), w, 27); - [listBtn setTitle:array[index] forState:UIControlStateNormal]; - [listBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; - [listBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - [listBtn addTarget:self action:@selector(statusChange:) forControlEvents:UIControlEventTouchUpInside]; - listBtn.titleLabel.font = SYSTEMFONT(13); - listBtn.layer.cornerRadius = 14.0; - listBtn.layer.masksToBounds = true; - [self.view addSubview:listBtn]; - listBtn.tag = 100 + index; - [self.buttonArray addObject:listBtn]; - - } - - - - self.homeTable = [[QuestionRecoredTable alloc] initWithFrame:CGRectMake(0, 50, kScreenWidth, kScreenHeight - kTopHeight - kRealValue(15) + 27 - SafetyAreaHeight - kRealValue(48)) style:UITableViewStyleGrouped]; - MJWeakSelf - self.homeTable.videoBlock = ^(YXRecordIMListDateModel * _Nonnull model) { - - YXQuestionDetailViewController * detailVC = [[YXQuestionDetailViewController alloc] init]; - detailVC.question_id = model.Record_id; - [weakSelf.navigationController pushViewController:detailVC animated:YES]; - - }; - [self.view addSubview:self.homeTable]; - - - self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ - weakSelf.pageNo = 1; - [self createData]; - - }]; - self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ - weakSelf.pageNo ++; - [self createData]; - - }]; - - //初始化一个emptyView - - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"nodataPicture"] titleStr:@"暂无数据" detailStr:@""]; - -// LYEmptyView *emptyView = [LYEmptyView emptyActionViewWithImageStr:@"nodataPicture" -// titleStr:@"无数据" -// detailStr:@"请稍后再试!" -// btnTitleStr:@"重新加载" -// btnClickBlock:^{ -// [self createData]; -// }]; - //元素竖直方向的间距 - emptyView.subViewMargin = 20.f; - //标题颜色 - emptyView.titleLabTextColor = UIColorHex(#666666); - //描述字体 - emptyView.detailLabFont = [UIFont systemFontOfSize:16]; - //按钮背景色 - emptyView.imageSize = CGSizeMake(kRealValue(210), kRealValue(183)); - emptyView.contentViewY = kRealValue(160); - //设置空内容占位图 - self.homeTable.ly_emptyView = emptyView; -} - --(void)setQuestionStatus:(NSInteger)questionStatus { - - _questionStatus = questionStatus; - - - - switch (_questionStatus) { - case 10: - for (UIButton * seleBtn in self.buttonArray) { - if (seleBtn.tag == 100) { - seleBtn.selected = YES; - seleBtn.backgroundColor = UIColorHex(#21BEBD); - }else - { - seleBtn.backgroundColor = UIColorHex(#DDDDDD); - } - } - self.status = @"1"; - [self createData]; - break; - case 20: - for (UIButton * seleBtn in self.buttonArray) { - if (seleBtn.tag == 101) { - seleBtn.selected = YES; - seleBtn.backgroundColor = UIColorHex(#21BEBD); - }else - { - seleBtn.backgroundColor = UIColorHex(#DDDDDD); - } - - } - self.status = @"2"; - [self createData]; - break; - case 30: - for (UIButton * seleBtn in self.buttonArray) { - if (seleBtn.tag == 102) { - seleBtn.selected = YES; - seleBtn.backgroundColor = UIColorHex(#21BEBD); - }else - { - seleBtn.backgroundColor = UIColorHex(#DDDDDD); - } - } - self.status = @"3"; - [self createData]; - break; - - default: - break; - } -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - - [self.homeTable.mj_footer endRefreshing]; - [self.homeTable.mj_header endRefreshing]; - - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self.homeTable.mj_footer endRefreshing]; - [self.homeTable.mj_header endRefreshing]; - - if ([tag isEqualToString:@"LIST"]) { - [self hiddenAllMBProgressHUD]; - if (self.pageNo == 1) { - [self.dataArray removeAllObjects]; - } - NSArray * array = response ; - - for (NSDictionary * dic in array) { - - YXRecordIMListDateModel * model = [YXRecordIMListDateModel modelWithDictionary:dic]; - - [self.dataArray addObject:model]; - } - self.homeTable.dataArray = self.dataArray; - - } - -} - - -- (void)statusChange:(UIButton *)statusBtn { - [self.dataArray removeAllObjects]; - if (statusBtn.tag == 100) { - self.status = @"1"; - } - if (statusBtn.tag == 101) { - self.status = @"2"; - - } - if (statusBtn.tag == 102) { - self.status = @"3"; - - } - [self createData]; - for (UIButton * titBtn in self.buttonArray) { - - if (titBtn == statusBtn) { - - titBtn.selected = YES; - titBtn.backgroundColor = UIColorHex(#21BEBD); - - }else - { - titBtn.selected = NO; - titBtn.backgroundColor = UIColorHex(#DDDDDD); - } - - } -} - - - - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.h deleted file mode 100644 index 04b6125..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// YXPictureRecordViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXPictureRecordViewController : YXBaseViewController - -@property (nonatomic, assign) NSInteger questionType; -@property (nonatomic, assign) NSInteger questionStatus; //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型) - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.m deleted file mode 100644 index af6ab53..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXPictureRecordViewController.m +++ /dev/null @@ -1,588 +0,0 @@ -// -// YXPictureRecordViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "YXPictureRecordViewController.h" -#import "QuestionRecoredTable.h" -#import "YXQuestionRecordModel.h" -#import "YXRecordIMListDateModel.h" -#import "ChatViewController.h" - -#import "TUIConversationListBaseDataProvider.h" - -#import -#import -#import -#import -#import "TUIConversationCellData.h" -#import "LYEmptyView.h" -#import "LYEmptyViewHeader.h" -@interface YXPictureRecordViewController () - -@property (nonatomic, strong) QuestionRecoredTable * homeTable; - -@property (nonatomic, strong) NSMutableArray * buttonArray; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@property (nonatomic, strong) NSMutableArray * IMDataArray; - - -@property (nonatomic, strong) NSMutableArray * groupIDArray; - -@property (nonatomic, strong) NSMutableArray * jingxingArray; - -@property (nonatomic, assign) NSInteger pageNo; - -@property (nonatomic, copy) NSString * status; - -@property (nonatomic, assign) NSInteger tfReply; - - -@end - -@implementation YXPictureRecordViewController - -- (NSMutableArray *)buttonArray { - - if (!_buttonArray) { - - _buttonArray = [[NSMutableArray alloc] init]; - - } - return _buttonArray; -} - -- (NSMutableArray *)groupIDArray { - - if (!_groupIDArray) { - - _groupIDArray = [[NSMutableArray alloc] init]; - - } - return _groupIDArray; - -} - -- (NSMutableArray *)jingxingArray { - - if (!_jingxingArray) { - - _jingxingArray = [[NSMutableArray alloc] init]; - - } - return _jingxingArray; - -} - - - -- (NSMutableArray *)dataArray { - - if (!_dataArray) { - - _dataArray = [[NSMutableArray alloc] init]; - - } - return _dataArray; - -} - -- (NSMutableArray *)IMDataArray { - - if (!_IMDataArray) { - _IMDataArray = [[NSMutableArray alloc] init]; - } - return _IMDataArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"图文咨询"; - self.pageNo = 1; - [self loginImAccount]; - [self createUI]; - // self 为 id 类型 - [[V2TIMManager sharedInstance] addConversationListener:self]; -} - -- (void)createUI { - - NSArray * array = @[@"待回复",@"进行中",@"已完成"]; - [self.buttonArray removeAllObjects]; - CGFloat w = kRealValue(66); - for (int index = 0; index < array.count; index ++) { - - UIButton * listBtn = [[UIButton alloc] init]; - - listBtn.frame = CGRectMake(kRealValue(15) + (w + kRealValue(13)) * index , kRealValue(15), w, 27); - [listBtn setTitle:array[index] forState:UIControlStateNormal]; - [listBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; - [listBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - [listBtn addTarget:self action:@selector(statusChange:) forControlEvents:UIControlEventTouchUpInside]; - listBtn.titleLabel.font = SYSTEMFONT(13); - listBtn.layer.cornerRadius = 14.0; - listBtn.layer.masksToBounds = true; - listBtn.tag = 100 + index; - [self.view addSubview:listBtn]; - [self.buttonArray addObject:listBtn]; - - } - - - - self.homeTable = [[QuestionRecoredTable alloc] initWithFrame:CGRectMake(0, 50, kScreenWidth, kScreenHeight - kTopHeight - kRealValue(15) + 27 - SafetyAreaHeight - kRealValue(48)) style:UITableViewStyleGrouped]; - self.homeTable.recordBlock = ^(YXRecordIMListDateModel * _Nonnull model) { - - if ([ESCTUIManager TUIUserStatus] == false) { - - - [self loginImAccount]; - return; - } - - ChatViewController * chatVC = [[ChatViewController alloc] init]; - chatVC.isGroupID = YES; - chatVC.chatID = model.imId; - chatVC.isVideo = false; - chatVC.eableSendReport = YES; - chatVC.eableMapTools = false; - chatVC.eableMapTools = false; - chatVC.navTitle = model.memberName; - chatVC.eablehaveHelathData = YES; - chatVC.pictureEnd_id = model.Record_id; - chatVC.questionType = 2; - chatVC.memberSex = model.memberSex; - if ([model.contentStatus intValue] >= 4) - { - chatVC.isHideKeyBord = true; - } - [self.navigationController pushViewController:chatVC animated:YES]; - - - - }; - [self.view addSubview:self.homeTable]; - - - - __weak __typeof(self) weakSelf = self; - self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ - weakSelf.pageNo = 1; - if ([self.status intValue] == 0) { - [self waitReplayTUIList]; - } - if ([self.status intValue] == 1) { - [self getChatList]; - } - if ([self.status intValue] == 2) { - [self createData]; - } - - - - }]; - self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ - weakSelf.pageNo ++; - if ([self.status intValue] == 0) { - [self waitReplayTUIList]; - } - if ([self.status intValue] == 1) { - [self getChatList]; - } - if ([self.status intValue] == 2) { - [self createData]; - } - - }]; - - //初始化一个emptyView - - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"nodataPicture"] titleStr:@"暂无数据" detailStr:@""]; - -// LYEmptyView *emptyView = [LYEmptyView emptyActionViewWithImageStr:@"nodataPicture" -// titleStr:@"无数据" -// detailStr:@"请稍后再试!" -// btnTitleStr:@"重新加载" -// btnClickBlock:^{ -// [self createData]; -// }]; - //元素竖直方向的间距 - emptyView.subViewMargin = 20.f; - //标题颜色 - emptyView.titleLabTextColor = UIColorHex(#666666); - //描述字体 - emptyView.detailLabFont = [UIFont systemFontOfSize:16]; - //按钮背景色 - emptyView.imageSize = CGSizeMake(kRealValue(210), kRealValue(183)); - emptyView.contentViewY = kRealValue(160); - //设置空内容占位图 - self.homeTable.ly_emptyView = emptyView; -} - -- (void)viewWillAppear:(BOOL)animated { - - [super viewWillAppear:animated]; - - [self.homeTable.mj_header beginRefreshing]; - - -} - -- (void)createData { - - [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false]; - YXNetAPI * listApi = [[YXNetAPI alloc] init:self tag:@"LIST" NeedToken:@""]; - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; - [parmDic setObject:@(10) forKey:@"pageSize"]; - [parmDic setObject:@"1" forKey:@"type"]; - [parmDic setObject:self.status forKey:@"status"]; - [listApi GetQuestionRecoredList:parmDic]; - -} - -//待回复 -- (void)waitReplayTUIList { - - V2TIMConversationListFilter *filter = [[V2TIMConversationListFilter alloc] init]; - filter.hasUnreadCount = NO; - [[V2TIMManager sharedInstance] getConversationListByFilter:filter nextSeq:self.pageNo - 1 count:100 succ:^(NSArray *list, uint64_t nextSeq, BOOL isFinished) { - // 获取会话列表成功,list 为会话列表 - [self.groupIDArray removeAllObjects]; - [self.IMDataArray removeAllObjects]; - for (V2TIMConversation * v2Model in list) { - if ( !ValidStr(v2Model.groupID)) { - [self.groupIDArray addObject: v2Model.groupID]; - } - [self.IMDataArray addObject:v2Model]; - - } - [self postGroupArray:self.groupIDArray]; - } fail:^(int code, NSString *desc) { - // 获取会话列表失败 - [self loginImAccount]; - }]; - -} - -//获取腾讯im会话列表 -- (void)getChatList { - - - V2TIMConversationListFilter *filter = [[V2TIMConversationListFilter alloc] init]; -// filter.type = V2TIM_C2C; //拉取单聊会话 - filter.type = V2TIM_GROUP; //拉取群聊会话 - [[V2TIMManager sharedInstance] getConversationListByFilter:filter nextSeq:self.pageNo - 1 count:50 succ:^(NSArray *list, uint64_t nextSeq, BOOL isFinished) { - // 获取会话列表成功,list 为会话列表 - [self.groupIDArray removeAllObjects]; - [self.IMDataArray removeAllObjects]; - DLog(@"%@",list); - for (V2TIMConversation * v2Model in list) { - [self.groupIDArray addObject: [NSString stringWithFormat:@"%@",v2Model.groupID] ]; - [self.IMDataArray addObject:v2Model]; - } - [self postIngGroupArray:self.groupIDArray]; - } fail:^(int code, NSString *desc) { - // 获取会话列表失败 - [self loginImAccount]; - }]; - - -} - -#pragma mark:上传id数组 -- (void)postGroupArray:(NSArray *)array { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - //tfReply : 待回复0 进行中1 - [parmDic setObject:array forKey:@"imIds"]; - [parmDic setObject:@"0" forKey:@"tfReply"]; - - [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false]; - YXNetAPI * recordApi = [[YXNetAPI alloc] init:self tag:@"GROUPID" NeedToken:@""]; - [recordApi PostGroupIDArray:parmDic]; -} - - -- (void)postIngGroupArray:(NSArray *)array { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - //tfReply : 待回复0 进行中1 - [parmDic setObject:array forKey:@"imIds"]; - [parmDic setObject:@"1" forKey:@"tfReply"]; - - [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false]; - YXNetAPI * recordApi = [[YXNetAPI alloc] init:self tag:@"GROUPIDING" NeedToken:@""]; - [recordApi PostGroupIDArray:parmDic]; -} - - --(void)setQuestionStatus:(NSInteger)questionStatus { - - _questionStatus = questionStatus; - - - - switch (_questionStatus) { - case 10: - for (UIButton * seleBtn in self.buttonArray) { - if (seleBtn.tag == 100) { - seleBtn.selected = YES; - seleBtn.backgroundColor = UIColorHex(#21BEBD); - }else - { - seleBtn.backgroundColor = UIColorHex(#DDDDDD); - } - } - self.status = @"0"; - [self waitReplayTUIList]; - break; - case 20: - for (UIButton * seleBtn in self.buttonArray) { - if (seleBtn.tag == 101) { - seleBtn.selected = YES; - seleBtn.backgroundColor = UIColorHex(#21BEBD); - }else - { - seleBtn.backgroundColor = UIColorHex(#DDDDDD); - } - - } - self.status = @"1"; - [self getChatList]; - break; - case 30: - for (UIButton * seleBtn in self.buttonArray) { - if (seleBtn.tag == 102) { - seleBtn.selected = YES; - seleBtn.backgroundColor = UIColorHex(#21BEBD); - }else - { - seleBtn.backgroundColor = UIColorHex(#DDDDDD); - } - } - self.status = @"2"; - [self createData]; - break; - - default: - break; - } -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - - [self.homeTable.mj_footer endRefreshing]; - [self.homeTable.mj_header endRefreshing]; - - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self.homeTable.mj_footer endRefreshing]; - [self.homeTable.mj_header endRefreshing]; - - if ([tag isEqualToString:@"LIST"]) { - [self hiddenAllMBProgressHUD]; - if (self.pageNo == 1) { - [self.dataArray removeAllObjects]; - } - NSArray * array = response ; - - for (NSDictionary * dic in array) { - - YXRecordIMListDateModel * model = [YXRecordIMListDateModel modelWithDictionary:dic]; - - [self.dataArray addObject:model]; - } - self.homeTable.dataArray = self.dataArray; - - } - - if ([tag isEqualToString:@"IMAPI"]) { - [self hiddenAllMBProgressHUD]; - NSDictionary * pamrDic = response; - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; - - IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; - iminfoModel.IMInfo = pamrDic; - [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; - - // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 - // 2. 初始化 config 对象 - V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init]; - // 3. 指定 log 输出级别。 - config.logLevel = V2TIM_LOG_INFO; - // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 - // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 - [[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config]; - [ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig]; - if ([self.status intValue] == 0) { - [self waitReplayTUIList]; - } - if ([self.status intValue] == 1) { - [self getChatList]; - } - - - - } - if ([tag isEqualToString:@"GROUPID"]) { - [self hiddenAllMBProgressHUD]; - - NSArray * array = response; - [self.jingxingArray removeAllObjects]; -// for ( V2TIMConversation * v2Model in self.IMDataArray) { - - for (NSDictionary * parmDic in array) { - - YXRecordIMListDateModel * model = [ YXRecordIMListDateModel modelWithDictionary:parmDic]; - for ( V2TIMConversation * v2Model in self.IMDataArray) { - if ([model.imId isEqualToString:v2Model.groupID]) { - DLog(@"------------%d",v2Model.unreadCount); - model.unRedMessage = [NSString stringWithFormat:@"%d",v2Model.unreadCount]; - } - } - [self.jingxingArray addObject:model]; - } -// } - - self.homeTable.dataArray = self.jingxingArray; - } - if ([tag isEqualToString:@"GROUPIDING"]) { - [self hiddenAllMBProgressHUD]; - - NSArray * array = response; - [self.jingxingArray removeAllObjects]; -// for ( V2TIMConversation * v2Model in self.IMDataArray) { - - for (NSDictionary * parmDic in array) { - - YXRecordIMListDateModel * model = [ YXRecordIMListDateModel modelWithDictionary:parmDic]; - for ( V2TIMConversation * v2Model in self.IMDataArray) { - if ([model.imId isEqualToString:v2Model.groupID]) { - DLog(@"------------%d",v2Model.unreadCount); - model.unRedMessage = [NSString stringWithFormat:@"%d",v2Model.unreadCount]; - } - } - [self.jingxingArray addObject:model]; - } -// } - - self.homeTable.dataArray = self.jingxingArray; - } - -} - - -- (void)statusChange:(UIButton *)statusBtn { - - if (statusBtn.tag == 100) { - self.status = @"0"; - self.tfReply = 0; - [self waitReplayTUIList]; - } - if (statusBtn.tag == 101) { - self.status = @"1"; - self.tfReply = 1; - [self getChatList]; - - } - if (statusBtn.tag == 102) { - self.status = @"2"; - [self createData]; - } - - for (UIButton * titBtn in self.buttonArray) { - - if (titBtn == statusBtn) { - - titBtn.selected = YES; - titBtn.backgroundColor = UIColorHex(#21BEBD); - - }else - { - titBtn.selected = NO; - titBtn.backgroundColor = UIColorHex(#DDDDDD); - } - - } -} - -- (void)loginImAccount { - - - YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; - [proctocolApi GetIMLoginAccount:nil]; - - - -} - -- (void)onNewConversation:(NSArray *)conversationList { - // 收到会话新增通知,conversationList 为新增的会话 - [self updateConversation:conversationList]; -} - - -- (void)onConversationChanged:(NSArray *)conversationList { - // 收到会话变更通知,conversationList 中为变更后的会话对象 - [self updateConversation:conversationList]; -} - - - - -- (void)onConversationDeleted:(NSArray *)conversationIDList { - // 会话被删除 -} - - -- (void)onTotalUnreadMessageCountChanged:(UInt64) totalUnreadCount { - // 会话未读总数变化 -} - - - - -- (void)onUnreadMessageCountChangedByFilter:(V2TIMConversationListFilter *)filter totalUnreadCount:(UInt64)totalUnreadCount { - // 过滤条件下的会话未读总数变化 -} - - -- (void)updateConversation:(NSArray *)convList { - // 更新 UI 会话列表,如果 UI 会话列表已经存在该新增/变更的会话,就替换之;如果没有,就新增一个会话对象 - [self.homeTable.mj_header beginRefreshing]; -} - - - -//- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView -//{ -// return -self.homeTable.frame.size.height; -//} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.h deleted file mode 100644 index 48e989d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// YXQustionRecordViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - - -@interface YXQustionRecordViewController : YXBaseViewController - -@property (nonatomic, assign) NSInteger questionType; -@property (nonatomic, assign) NSInteger questionStatus; //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型) - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.m deleted file mode 100644 index 875ee43..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionRecord(咨询记录)/YXQustionRecordViewController.m +++ /dev/null @@ -1,255 +0,0 @@ -// -// QustionRecordViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "YXQustionRecordViewController.h" -#import "YXAudioVideoRecordViewController.h" -#import "YXPictureRecordViewController.h" - -@interface YXQustionRecordViewController () - -/** 顶部控件*/ -@property (nonatomic, weak) UIScrollView *topView; -/** 下划线 */ -@property (nonatomic, weak) UIView *lineView; -/** 滚动视图 */ -@property (nonatomic, weak) UICollectionView *collectionView; -/** 当前选中的按钮 */ -@property (nonatomic, weak) UIButton *selectButton; -/** 按钮数组 */ -@property (nonatomic, strong) NSMutableArray *titleButtons; - -@end - -@implementation YXQustionRecordViewController - -#pragma mark - 懒加载 -- (NSMutableArray *)titleButtons { - if (_titleButtons==nil) { - _titleButtons = [NSMutableArray array]; - } - return _titleButtons; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = NO; - self.title = @"咨询记录"; - self.view.backgroundColor = UIColorBackground; - [self createUI]; - -} - -#pragma mark:返回 -- (void)popVc -{ - [self.navigationController popViewControllerAnimated:YES]; -} - -- (void)createUI -{ - [self setupNavgationBar]; - - // 添加底部内容view - [self setupBottomContentView]; - - // 添加所有子控制器 - [self setupAllChildViewController]; - - [self setupAllTitle]; - - // 不添加额外滚动区域 - self.automaticallyAdjustsScrollViewInsets = NO; -} - -#pragma mark - 添加所有的子控制器 -- (void)setupAllChildViewController { - //questionStatus //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型) - YXPictureRecordViewController * pictureVc = [[YXPictureRecordViewController alloc] init]; - pictureVc.view.backgroundColor = UIColorBackground; - pictureVc.navigationItem.title = @"图文咨询"; - pictureVc.questionStatus = self.questionStatus; - [self addChildViewController:pictureVc]; - - // - YXAudioVideoRecordViewController * videoVc = [[YXAudioVideoRecordViewController alloc] init]; - videoVc.view.backgroundColor = UIColorBackground; - videoVc.navigationItem.title = @"视频咨询"; - videoVc.questionStatus = self.questionStatus; - [self addChildViewController:videoVc]; -} - -#pragma mark - 设置导航条内容 -- (void)setupNavgationBar { - UIScrollView *topView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 1, kScreenHeight, kRealValue(48))]; - topView.backgroundColor = [UIColor whiteColor]; - _topView = topView; - [self.view addSubview:topView]; -} - -#pragma mark - 按钮被点击 -- (void)titleClick:(UIButton *)titleButton{ - - NSInteger i = titleButton.tag; - // 重复点击标题按钮的时候,刷新当前界面 - if (titleButton == _selectButton) { - } - - [self selButton:titleButton]; - - //滚动collectionView 修改偏移量 - CGFloat offsetX = i * kScreenWidth; - _collectionView.contentOffset = CGPointMake(offsetX, 0); -} - -#pragma mark - 选中标题按钮 -- (void)selButton:(UIButton *)titleButton{ - - _selectButton.selected = NO; - titleButton.selected = YES; - _selectButton = titleButton; - - // 移动下划线的位置 - [UIView animateWithDuration:0.25 animations:^{ - _lineView.centerX = titleButton.centerX; - }]; -} - -#pragma mark - 添加标题 -- (void)setupAllTitle{ - - NSUInteger count = self.childViewControllers.count; - CGFloat btnX = 0; - CGFloat btnW = kScreenWidth/count; - CGFloat btnH = _topView.height; - for (int i = 0; i < count; i++) { - UIButton *titleButton = [UIButton buttonWithType:UIButtonTypeCustom]; - titleButton.tag = i; - - UIViewController *vc = self.childViewControllers[i]; - [titleButton setTitle:vc.navigationItem.title forState:UIControlStateNormal]; - // 设置标题颜色 - [titleButton setTitleColor:RGBA(34, 34, 34, 1) forState:UIControlStateSelected]; - [titleButton setTitleColor:RGBA(102, 102, 102, 1) forState:UIControlStateNormal]; - - // 设置标题字体 - titleButton.titleLabel.font = [UIFont systemFontOfSize:15]; - - btnX = i * btnW; - - titleButton.frame = CGRectMake(btnX, 0, btnW, btnH); - - // 监听按钮点击 - [titleButton addTarget:self action:@selector(titleClick:) forControlEvents:UIControlEventTouchUpInside]; - - [_topView addSubview:titleButton]; - if (i == self.questionType - 1) { - // 添加下划线 - // 下划线宽度 = 按钮文字宽度 - // 下划线中心点x = 按钮中心点x - CGFloat h = 3; - CGFloat y = kRealValue(46) ; - UIView *lineView =[[UIView alloc] init]; - // 位置和尺寸 - lineView.height = h; - // 先计算文字尺寸,在给label去赋值 - [titleButton.titleLabel sizeToFit]; - lineView.width = kScreenWidth/2 - 30; - lineView.centerX = titleButton.centerX; - lineView.mj_y = y; - lineView.backgroundColor = UIColorHex(#21BEBD); - _lineView = lineView; - [_topView addSubview:lineView]; - - [self titleClick:titleButton]; - } - - [self.titleButtons addObject:titleButton]; - } -} - -#pragma mark - 添加底部内容view -- (void)setupBottomContentView -{ - // 创建一个流水布局 - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - layout.itemSize = CGSizeMake(kScreenWidth, kScreenHeight-44); - - // 设置水平滚动方向 - layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; - layout.minimumInteritemSpacing = 0; - layout.minimumLineSpacing = 0; - - // 创建UICollectionView - UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0,kRealValue(48), kScreenWidth, kScreenHeight - kRealValue(48) ) collectionViewLayout:layout]; - collectionView.backgroundColor = [UIColor whiteColor]; - [self.view addSubview:collectionView]; - _collectionView = collectionView; - collectionView.scrollsToTop = NO; - collectionView.scrollEnabled = YES; - // 开启分页 - collectionView.pagingEnabled = YES; - collectionView.showsHorizontalScrollIndicator = NO; - collectionView.bounces = YES; - - // 展示cell - collectionView.dataSource = self; - collectionView.delegate = self; - - // 注册cell - [collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"COUPCELLID"]; -} - -#pragma mark - UICollectionViewDelegate -// 滚动完成的时候就会调用 -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{ - // 获取角标 - NSInteger i = scrollView.contentOffset.x / kScreenWidth; - - // 获取选中标题 - UIButton *selButton = self.titleButtons[i]; - - // 选中标题 - [self selButton:selButton]; -} - -#pragma mark - UICollectionViewDataSource -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ - - return self.childViewControllers.count; -} - -// 只要有新的cell出现的时候才会调用 -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ - - UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"COUPCELLID" forIndexPath:indexPath]; - - // 移除之前子控制器view - [cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; - - // 取出对应的子控制器添加到对应cell上 - UIViewController *vc = self.childViewControllers[indexPath.row]; - - [cell.contentView addSubview:vc.view]; - - return cell; -} - - - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.h deleted file mode 100644 index b295510..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXQuestionStatisticsViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/26. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXQuestionStatisticsViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.m deleted file mode 100644 index 966db9e..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/QuestionStatistics(咨询统计)/YXQuestionStatisticsViewController.m +++ /dev/null @@ -1,514 +0,0 @@ -// -// YXQuestionStatisticsViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/26. -// - -#import "YXQuestionStatisticsViewController.h" -#import "AAOptions.h" -#import "AAChartView.h" -#import "NSDate+Calendar.h" -#import "BRDatePickerView.h" -#import "YXQuestionStaticsModel.h" -#import "XJDBillViewController.h" -@interface YXQuestionStatisticsViewController () - -@property (nonatomic, strong) AAChartView * aaChartView; - -@property (nonatomic, strong) UILabel * moneyLabel; - -@property (nonatomic, strong) UILabel * leftMoneyLabel; - -@property (nonatomic, strong) UILabel * rightMoneyLabel; - -@property (nonatomic, strong) YYLabel * monthLabel; - -@property (nonatomic, copy) NSString * quesDate; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@end - -@implementation YXQuestionStatisticsViewController - -- (NSMutableArray *)dataArray { - if(!_dataArray) { - - _dataArray = [[NSMutableArray alloc] init]; - } - return _dataArray; - -} - -//- (AAChartModel *)configurePieChart { -// return AAChartModel.new -// .chartTypeSet(AAChartTypePie) -// .marginSet(@[@0,@0,@0,@60]) -// .colorsThemeSet(@[@"#407FFF",@"#A682E6"]) -// .dataLabelsEnabledSet(true)//是否直接显示扇形图数据 -// .seriesSet(@[ -// AASeriesElement.new -// .innerSizeSet(@"60%")//内部圆环半径大小占比 -// .sizeSet(@150)//尺寸大小 -// .nameSet(@"人数") -// .borderWidthSet(@0)//描边的宽度 -// .allowPointSelectSet(true)//是否允许在点击数据点标记(扇形图点击选中的块发生位移) -// .statesSet(AAStates.new -// .hoverSet(AAHover.new -// .enabledSet(false)//禁用点击区块之后出现的半透明遮罩层 -// ) -// -// -// ) -// .dataSet(@[ -// @[@"图文咨询", @50], -// @{@"sliced": @true, -// @"selected": @true, -// @"name": @"音视频咨询", -// @"y": @50, }, -// -//// @[@"Safari", @88.5], -//// @[@"Opera", @46.0], -//// @[@"Others", @223.0], -// ])]); -//} -- (AAOptions *)adjustPieChartTitleAndDataLabelFontStyle { - AAOptions *aaOptions = AAOptions.new - .chartSet(AAChart.new.typeSet(AAChartTypePie)) - .titleSet(AATitle.new - .useHTMLSet(true) - .textSet(@" 170
\ - 咨询方式 ")//标题文本内容 - .alignSet(AAChartAlignTypeCenter)//标题水平居中 - .verticalAlignSet(AAChartVerticalAlignTypeMiddle)//标题垂直居中 - .ySet(@0)//标题相对于垂直对齐的偏移量,取值范围:图表的上边距(chart.spacingTop )到图表的下边距(chart.spacingBottom),可以是负值,单位是px。默认值和字体大小有关。 - ) - .colorsSet(@[@"#407FFF",@"#A682E6"])//设置颜色主题 - .seriesSet(@[ - AASeriesElement.new - .nameSet(@"人数") - .sizeSet(@150)//环形图的半径大小 - .innerSizeSet(@"60%")//内部圆环半径大小占比 - .allowPointSelectSet(false)//是否允许在点击数据点标记(扇形图点击选中的块发生位移) - .dataLabelsSet(AADataLabels.new - .enabledSet(true) - .useHTMLSet(true) - .distanceSet(@20)//扇形图百分比线的长度 - .formatSet(@"{point.name} {point.y}") - ) - - .dataSet(@[ - @[@"图文咨询", @110], - @[@"视频咨询", @10], - ]), - ]); - return aaOptions; -} - - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"咨询统计"; - self.view.backgroundColor = UIColorHex(#EFEFEF); - [self createUI]; - [self createData]; - [self createEarmingsData]; - -} - - -- (void)createUI { - - UIScrollView * mainScrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - mainScrollview.backgroundColor = UIColorHex(#EEEEEE); - [self.view addSubview:mainScrollview]; - //顶部背景收益 - UIImageView * moneyImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(10), kScreenWidth - kRealValue(30), kRealValue(150))]; - moneyImg.userInteractionEnabled = YES; - UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)]; - [moneyImg addGestureRecognizer:tap]; - moneyImg.image = [UIImage imageNamed:@"statusticBackImg"]; - [mainScrollview addSubview:moneyImg]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(12), 300, 12)]; - titleLabel.text = @"未结算收益"; - titleLabel.textColor = KWhiteColor; - titleLabel.textAlignment = NSTextAlignmentLeft; - titleLabel.font = MEDIUMFONT(12); - [moneyImg addSubview:titleLabel]; - - self.moneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,titleLabel.bottom + kRealValue(23), moneyImg.width, 18)]; - self.moneyLabel.text = @"¥7900"; - self.moneyLabel.textColor = KWhiteColor; - self.moneyLabel.textAlignment = NSTextAlignmentCenter; - self.moneyLabel.font = MEDIUMFONT(23); - [moneyImg addSubview:self.moneyLabel]; - - UIView * linView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(22),self.moneyLabel.bottom + kRealValue(24), moneyImg.width - kRealValue(44), 1)]; - linView.backgroundColor = KWhiteColor; - [moneyImg addSubview:linView]; - - UILabel * leijiLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(22),linView.bottom + kRealValue(10), moneyImg.width/2, 11)]; - leijiLabel.text = @"累计总收益(税前)"; - leijiLabel.textColor = KWhiteColor; - leijiLabel.textAlignment = NSTextAlignmentLeft; - leijiLabel.font = MEDIUMFONT(11); - [moneyImg addSubview:leijiLabel]; - - self.leftMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(22),leijiLabel.bottom + kRealValue(10), moneyImg.width/2, 11)]; - self.leftMoneyLabel.text = @"¥--"; - self.leftMoneyLabel.textColor = KWhiteColor; - self.leftMoneyLabel.textAlignment = NSTextAlignmentLeft; - self.leftMoneyLabel.font = BOLDSYSTEMFONT(16); - [moneyImg addSubview:self.leftMoneyLabel]; - - - UILabel * leijiRightLabel = [[UILabel alloc] initWithFrame:CGRectMake(moneyImg.width/2 ,linView.bottom + kRealValue(10), moneyImg.width/2 - kRealValue(40) , 11)]; - leijiRightLabel.text = @"已结算(税前)"; - leijiRightLabel.textColor = KWhiteColor; - leijiRightLabel.textAlignment = NSTextAlignmentRight; - leijiRightLabel.font = MEDIUMFONT(11); - [moneyImg addSubview:leijiRightLabel]; - - self.rightMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(moneyImg.width/2,leijiLabel.bottom + kRealValue(10), moneyImg.width/2 - kRealValue(40), 16)]; - self.rightMoneyLabel.text = @"¥--0"; - self.rightMoneyLabel.textColor = KWhiteColor; - self.rightMoneyLabel.textAlignment = NSTextAlignmentRight; - self.rightMoneyLabel.font = BOLDSYSTEMFONT(16); - [moneyImg addSubview:self.rightMoneyLabel]; - - //月份选择 - UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), moneyImg.bottom + kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(44))]; - topView.backgroundColor = KWhiteColor; - topView.layer.cornerRadius = 10.0f; - topView.layer.masksToBounds = true; - [mainScrollview addSubview:topView]; - - UIImageView * sattisImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(17), kRealValue(15), kRealValue(14), kRealValue(14))]; - sattisImg.image = IMAGE_NAMED(@"smallStatis_icon"); - [topView addSubview:sattisImg]; - - UILabel * monthsLabel = [[UILabel alloc] initWithFrame:CGRectMake(sattisImg.right + kRealValue(9),0, moneyImg.width/2, kRealValue(44))]; - monthsLabel.text = @"月度统计"; - monthsLabel.textColor = CFontColor1; - monthsLabel.textAlignment = NSTextAlignmentLeft; - monthsLabel.font = BOLDSYSTEMFONT(15); - [topView addSubview:monthsLabel]; - - NSDate * currentDate = [NSDate date]; - YYLabel * monthLabel = [[YYLabel alloc]initWithFrame:CGRectMake(topView.width - 190, 0, 160, kRealValue(44))]; - self.quesDate = [NSString stringWithFormat:@"%ld-%02ld",currentDate.year,currentDate.month]; - monthLabel.text = [NSString stringWithFormat:@"%ld年%ld月 ",currentDate.year,currentDate.month]; - monthLabel.textColor = UIColorHex(#999999); - self.monthLabel = monthLabel; - [topView addSubview:monthLabel]; - - UIImage * image = [UIImage imageNamed:@"garyDown"]; - - NSMutableAttributedString * roomAttri = [[NSMutableAttributedString alloc] initWithString:monthLabel.text]; - - NSMutableAttributedString * roomAttachText = [NSMutableAttributedString attachmentStringWithContent:image contentMode:UIViewContentModeCenter attachmentSize:CGSizeMake(10, 10) alignToFont:[UIFont boldSystemFontOfSize:13] alignment:YYTextVerticalAlignmentCenter]; //content:内容  size:图片尺寸 alignToFont:字符串内字体的格式 - [roomAttri appendAttributedString:roomAttachText]; - - monthLabel.attributedText = roomAttri; - - monthLabel.textAlignment = NSTextAlignmentRight; - - [monthLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - - [self selectedMonth]; - }]; - - //统计图 - UIView * chatView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), topView.bottom + kRealValue(8), kScreenWidth - kRealValue(30), kRealValue(300))]; - chatView.backgroundColor = KWhiteColor; - chatView.layer.cornerRadius = 10; - chatView.layer.masksToBounds = true; - [mainScrollview addSubview:chatView]; - - UILabel * chatTopLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),kRealValue(16), 200, kRealValue(15))]; - chatTopLabel.text = @"分类统计"; - chatTopLabel.textColor = CFontColor1; - chatTopLabel.textAlignment = NSTextAlignmentLeft; - chatTopLabel.font = BOLDSYSTEMFONT(15); - [chatView addSubview:chatTopLabel]; - - self.aaChartView = [[AAChartView alloc]init]; - self.aaChartView.delegate = self; - self.aaChartView.frame = CGRectMake(0, chatTopLabel.bottom, chatView.width, chatView.height - kRealValue(30)); - ////禁用 AAChartView 滚动效果(默认不禁用) - self.aaChartView.scrollEnabled = NO; - [chatView addSubview:self.aaChartView]; -// [_aaChartView aa_drawChartWithOptions:self.adjustPieChartTitleAndDataLabelFontStyle]; - //列表统计 - //统计图 - UIView * bottomView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), chatView.bottom + kRealValue(8), kScreenWidth - kRealValue(30), kRealValue(175))]; - bottomView.backgroundColor = KWhiteColor; - bottomView.layer.cornerRadius = 10; - bottomView.layer.masksToBounds = true; - [mainScrollview addSubview:bottomView]; - - UILabel * bottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),0, moneyImg.width/2, kRealValue(44))]; - bottomLabel.text = @"分类统计"; - bottomLabel.textColor = CFontColor1; - bottomLabel.textAlignment = NSTextAlignmentLeft; - bottomLabel.font = BOLDSYSTEMFONT(15); - [bottomView addSubview:bottomLabel]; - -// YYLabel * lookLabel = [[YYLabel alloc]initWithFrame:CGRectMake(topView.width - 170, 0, 160, kRealValue(44))]; -// lookLabel.text = @"查看明细 >"; -// lookLabel.textColor = UIColorHex(#3390FF); -// lookLabel.font = MEDIUMFONT(11); -// lookLabel.textAlignment = NSTextAlignmentRight; -// [bottomView addSubview:lookLabel]; -// -// [lookLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { -// -// [self selectedMonth]; -// }]; - UIView * conView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(17), bottomLabel.bottom + kRealValue(15), bottomView.width - kRealValue(34), 90)]; - conView.layer.borderWidth = 1.0; - conView.layer.borderColor = UIColorHex(#E0E0E0).CGColor; - [bottomView addSubview:conView]; - - UIView * tabTitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, bottomView.width - kRealValue(34), 30)]; - tabTitleView.backgroundColor = UIColorHex(#EFEFEF); - [conView addSubview:tabTitleView]; - - NSArray * array = @[@"类别",@"进行中",@"已完成",@"合计"]; - for (int i = 0; i < 4; i ++) { - - UILabel * conteLabel = [[UILabel alloc] init]; - conteLabel.frame = CGRectMake( tabTitleView.width/4 * i, 0 , tabTitleView.width/4,tabTitleView.height); - conteLabel.text = array[i]; - conteLabel.textColor = CFontColor1; - conteLabel.textAlignment = NSTextAlignmentCenter; - conteLabel.font = SYSTEMFONT(10); - [tabTitleView addSubview:conteLabel]; - } - - UIView * tabLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 60, conView.width, 1)]; - tabLineView.backgroundColor = UIColorHex(#E0E0E0); - [conView addSubview:tabLineView]; - - NSArray * dataArray =@[@[@"图文咨询",@"2",@"8",@"10"],@[@"视频咨询",@"2",@"5",@"7"]]; - - for (int i = 0; i < dataArray.count; i ++) { - - UIView * tab = [self createTabconteWithFrame:CGRectMake(0, tabTitleView.bottom + i * 30, tabTitleView.width, 30) withArray:dataArray[i] withTag:100 + i * 10]; - [conView addSubview:tab]; - - } - mainScrollview.contentSize = CGSizeMake(kScreenWidth , bottomView.bottom + 100); -} - - -- (void)selectedMonth { - - BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init]; - // 2.设置属性 - datePickerView.pickerMode = BRDatePickerModeYM; - datePickerView.title = @"选择月份"; - // datePickerView.selectValue = @"2019-10-30"; - datePickerView.minDate = [NSDate br_setYear:1949 month:3 day:12]; - datePickerView.maxDate = [NSDate date]; - datePickerView.isAutoSelect = YES; - datePickerView.showUnitType = BRShowUnitTypeOnlyCenter; - datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) { - NSLog(@"选择的值:%@", selectValue); - self.quesDate = [NSString stringWithFormat:@"%ld-%02ld",selectDate.year,selectDate.month]; - self.monthLabel.text = [NSString stringWithFormat:@"%@ ",selectValue]; - UIImage * image = [UIImage imageNamed:@"garyDown"]; - NSMutableAttributedString * roomAttri = [[NSMutableAttributedString alloc] initWithString:self.monthLabel.text]; - - NSMutableAttributedString * roomAttachText = [NSMutableAttributedString attachmentStringWithContent:image contentMode:UIViewContentModeCenter attachmentSize:CGSizeMake(10, 10) alignToFont:[UIFont boldSystemFontOfSize:13] alignment:YYTextVerticalAlignmentCenter]; //content:内容  size:图片尺寸 alignToFont:字符串内字体的格式 - [roomAttri appendAttributedString:roomAttachText]; - - self.monthLabel.attributedText = roomAttri; - - self.monthLabel.textAlignment = NSTextAlignmentRight; - [self createData]; - }; - - datePickerView.pickerStyle = [BRPickerStyle pickerStyleWithThemeColor:UIColorHex(#21BEBD)]; - // 3.显示 - [datePickerView show]; - - -} - -- (UIView *)createTabconteWithFrame:(CGRect)frame - withArray:(NSArray *)conteArray - withTag:(NSInteger)labTag -{ - - UIView * connteView = [[UIView alloc] initWithFrame:frame]; - - for (int i = 0 ; i < conteArray.count; i ++) { - //100 110 - UILabel * conteLabel = [[UILabel alloc] init]; - conteLabel.frame = CGRectMake(connteView.width/4 * i, 0,connteView.width/4 , connteView.height); - conteLabel.text = conteArray[i]; - conteLabel.textColor = CFontColor1; - conteLabel.font = SYSTEMFONT(12); - conteLabel.textAlignment = NSTextAlignmentCenter; - conteLabel.tag = labTag + 10 + i ; - DLog(@"------------%@----------%ld",conteLabel.text, conteLabel.tag); - [connteView addSubview:conteLabel]; - - } - - - - - return connteView; - -} - -- (void)aaChartView:(AAChartView *)aaChartView moveOverEventWithMessage:(AAMoveOverEventMessageModel *)message { - - NSDictionary *messageDic = @{ - @"category":message.category, - @"index":@(message.index), - @"name":message.name, - @"offset":message.offset, - @"x":message.x, - @"y":message.y - }; - - NSNumber *plotX = message.offset[@"plotX"]; - -// self.tipLab.hidden = NO; -// self.tipLab.text = [NSString stringWithFormat:@"%f",[message.y floatValue]]; -// self.tipLab.centerX = [plotX floatValue]+6+50; -// - NSLog(@"mes:%@", messageDic); - } - - -- (void)createData { - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"QUSTIONAPI" NeedToken:@""]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject: self.quesDate forKey:@"date"]; - [workApi GetQuestionStatistics:parmDic]; - -} - -- (void)createEarmingsData { - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"EARNINGAPI" NeedToken:@""]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [workApi GetStatisticsEarnings:parmDic]; - -} - - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - if ([tag isEqualToString:@"QUSTIONAPI"]) { - - NSArray * array = response; - [self.dataArray removeAllObjects]; - for (NSDictionary * dic in array) { - - YXQuestionStaticsModel * model = [YXQuestionStaticsModel modelWithDictionary:dic]; - [self.dataArray addObject:model]; - } - NSInteger pictureNum; - NSInteger videoNum; - NSInteger allNumber; - YXQuestionStaticsModel * picmodel; - YXQuestionStaticsModel * videomodel; - if (self.dataArray.count>=2) { - picmodel = self.dataArray[0]; - pictureNum = [picmodel.total integerValue]; - videomodel = self.dataArray[1]; - videoNum = [videomodel.total integerValue]; - } - - NSString *str2 = @" 咨询方式 "; - AAOptions *aaOptions = AAOptions.new - .chartSet(AAChart.new.typeSet(AAChartTypePie)) - .titleSet(AATitle.new - .useHTMLSet(true) - .textSet(str2)//标题文本内容 - .alignSet(AAChartAlignTypeCenter)//标题水平居中 - .verticalAlignSet(AAChartVerticalAlignTypeMiddle)//标题垂直居中 - .ySet(@0)//标题相对于垂直对齐的偏移量,取值范围:图表的上边距(chart.spacingTop )到图表的下边距(chart.spacingBottom),可以是负值,单位是px。默认值和字体大小有关。 - ) - .colorsSet(@[@"#407FFF",@"#A682E6"])//设置颜色主题 - .seriesSet(@[ - AASeriesElement.new - .nameSet(@"人数") - .sizeSet(@150)//环形图的半径大小 - .innerSizeSet(@"60%")//内部圆环半径大小占比 - .allowPointSelectSet(false)//是否允许在点击数据点标记(扇形图点击选中的块发生位移) - .dataLabelsSet(AADataLabels.new - .enabledSet(true) - .useHTMLSet(true) - .distanceSet(@20)//扇形图百分比线的长度 - .formatSet(@"{point.name} {point.y}") - ) - - .dataSet(@[ - @[@"图文咨询", @(pictureNum)], - @[@"视频咨询", @(videoNum)], - ]), - ]); - [self.aaChartView aa_drawChartWithOptions:aaOptions]; -// / 110 111 112 113 114 - -// 120 121 122 123 124 - UILabel * videoLabel = [self.view viewWithTag:111]; - videoLabel.text = [NSString stringWithFormat:@"%@",picmodel.inProgress]; - UILabel * videoReplyLabel = [self.view viewWithTag:112]; - videoReplyLabel.text = [NSString stringWithFormat:@"%@",picmodel.completed]; - UILabel * videoComplLabel = [self.view viewWithTag:113]; - videoComplLabel.text = [NSString stringWithFormat:@"%@",picmodel.total]; - - UILabel * picLabel = [self.view viewWithTag:121]; - picLabel.text = [NSString stringWithFormat:@"%@",videomodel.inProgress]; - UILabel * picReplyLabel = [self.view viewWithTag:122]; - picReplyLabel.text = [NSString stringWithFormat:@"%@",videomodel.completed]; - UILabel * pciCompLabel = [self.view viewWithTag:123]; - pciCompLabel.text = [NSString stringWithFormat:@"%@",videomodel.total]; - } - if ([tag isEqualToString:@"EARNINGAPI"]) { - NSDictionary * responDic = response; - - self.moneyLabel.text = [NSString stringWithFormat:@"¥%.2f",[[responDic objectForKey:@"unsettled"] floatValue]]; - self.leftMoneyLabel.text = [NSString stringWithFormat:@"¥%.2f",[[responDic objectForKey:@"sumIncome"] floatValue]]; - self.rightMoneyLabel.text = [NSString stringWithFormat:@"¥%.2f",[[responDic objectForKey:@"sumPaymentMoney"] floatValue]]; - - } -} -//咨询收益 -- (void)handleTapGesture:(id)sender { - - XJDBillViewController * billVC = [[XJDBillViewController alloc] init]; - - [self.navigationController pushViewController:billVC animated:YES]; - - -} -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.h deleted file mode 100644 index facb2f8..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// YXStopAnnouncementViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - - -NS_ASSUME_NONNULL_BEGIN - -@interface YXStopAnnouncementViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.m deleted file mode 100644 index 15ac734..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopAnnouncementViewController.m +++ /dev/null @@ -1,387 +0,0 @@ -// -// YXStopAnnouncementViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import "YXStopAnnouncementViewController.h" -#import "ZHTagListView.h" -#import "BRDatePickerView.h" -#import "NSDate+Calendar.h" -#import "UIPlaceHolderTextView.h" -#import "YXStopReasonModel.h" -#import "StopQuestionPopView.h" - -@interface YXStopAnnouncementViewController () - -@property (nonatomic, strong) UIView * announceView; - -@property (nonatomic, strong) YYLabel * starLabel; - -@property (nonatomic, strong) YYLabel * endLabel; - -@property (nonatomic, strong) UIPlaceHolderTextView * textView; - -@property (nonatomic, strong) ZHTagListView *tagList; - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UILabel * centerLabel; - -@property (nonatomic, strong) UILabel * gonggaoLabel; - -@property (nonatomic, copy) NSString * reasonString; - -@property (nonatomic, strong) NSDate * starDate; -@property (nonatomic, strong) NSDate * endDate; - -@property (nonatomic, strong) NSMutableArray * reasonArray; - -@end - -@implementation YXStopAnnouncementViewController - -- (NSMutableArray *)reasonArray { - - if (!_reasonArray) { - _reasonArray = [[NSMutableArray alloc] init]; - } - return _reasonArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.view.backgroundColor = UIColorHex(#EEEEEE); - self.isHidenNaviBar = false; - self.navigationItem.title = @"暂停服务公告"; - [self createUI]; - [self getReasonData]; -} - -- (void)createUI { - - UIView * announceView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(10), kScreenWidth - kRealValue(30), kRealValue(388))]; - announceView.layer.cornerRadius = 10; - announceView.backgroundColor = KWhiteColor; - announceView.layer.masksToBounds = true; - self.announceView = announceView; - [self.view addSubview:announceView]; - - UILabel * resouLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(20), 60, 13)]; - resouLabel.textColor = CFontColor1; - resouLabel.font = MEDIUMFONT(14); - resouLabel.text = @"暂停原因"; - [announceView addSubview:resouLabel]; - - - NSMutableArray *_dataSource = @[@" ",@" ",@" ",@" "].mutableCopy; - - ZHTagListConfiguration *config = [ZHTagListConfiguration defaultConfiguration]; - config.tagTextColor = CFontColor1; - config.tagTextMargin = 11; - config.tagHeight = 27; - config.tagTextFont = SYSTEMFONT(13); - config.tagListViewInset = UIEdgeInsetsMake(15, 15, 15, 10); - - ZHTagListView *tagList = [[ZHTagListView alloc] initWithFrame:CGRectMake(resouLabel.right, 0, announceView.width - resouLabel.right - kRealValue(10), 0) configuration:config tagTexts:_dataSource]; - tagList.backgroundColor = KWhiteColor; - [announceView addSubview:tagList]; - self.tagList = tagList; - [tagList.tagButtonList enumerateObjectsUsingBlock:^(UIButton * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { -// [obj setBackgroundColor:KRedColor]; - - }]; - [tagList setTagClickHandler:^(ZHTagListView *tagListView, NSString *tagText, NSUInteger index) { - UIButton * btn = tagListView.tagButtonList[index]; - self.reasonString = tagText; - for (UIButton * selectBtn in tagListView.tagButtonList) { - if (selectBtn == btn ) { - selectBtn.backgroundColor = UIColorHex(#21BEBD); - [selectBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - }else - { - selectBtn.backgroundColor = KClearColor; - [selectBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - } - } - }]; - - UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),tagList.bottom + kRealValue(15), 60, 13)]; - timeLabel.textColor = CFontColor1; - timeLabel.font = MEDIUMFONT(14); - timeLabel.text = @"暂停时间"; - self.timeLabel = timeLabel; - [announceView addSubview:timeLabel]; - - NSDateFormatter *formater = [[ NSDateFormatter alloc] init]; - [formater setDateFormat:@"yyyy-MM-dd"];// 时间格式 - NSDate *currentDate = [NSDate date];//获取当前日期 - NSString *currentDateStr = [formater stringFromDate:currentDate]; - self.starDate = currentDate; - self.endDate = currentDate; - self.starLabel = [[YYLabel alloc] initWithFrame:CGRectMake(timeLabel.right + kRealValue(15),tagList.bottom + kRealValue(12), 102, 30)]; - self.starLabel.textColor = CFontColor1; - self.starLabel.font = MEDIUMFONT(14); - self.starLabel.text = currentDateStr; - self.starLabel.layer.cornerRadius = 5; - self.starLabel.layer.borderWidth = 1.0f; - self.starLabel.layer.borderColor = UIColorHex(#CCCCCC).CGColor; - self.starLabel.textAlignment = NSTextAlignmentCenter; - MJWeakSelf - [self.starLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - [weakSelf selectStarOnclick]; - }]; - [announceView addSubview:self.starLabel]; - - UILabel * centerLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.starLabel.right ,tagList.bottom + kRealValue(12), 44, 30)]; - centerLabel.textColor = CFontColor1; - centerLabel.font = MEDIUMFONT(14); - centerLabel.text = @"至"; - self.centerLabel = centerLabel; - centerLabel.textAlignment = NSTextAlignmentCenter; - [announceView addSubview:centerLabel]; - - self.endLabel = [[YYLabel alloc] initWithFrame:CGRectMake(centerLabel.right,tagList.bottom + kRealValue(12), self.starLabel.width, self.starLabel.height)]; - self.endLabel.textColor = CFontColor1; - self.endLabel.font = MEDIUMFONT(14); - self.endLabel.text = currentDateStr; - self.endLabel.layer.cornerRadius = 5; - self.endLabel.layer.borderWidth = 1.0f; - self.endLabel.layer.borderColor = UIColorHex(#CCCCCC).CGColor; - self.endLabel.textAlignment = NSTextAlignmentCenter; - - [self.endLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - [weakSelf selectEndOnclick]; - }]; - [announceView addSubview:self.endLabel]; - - UILabel * gonggaoLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),self.endLabel.bottom + kRealValue(23), 60, 13)]; - gonggaoLabel.textColor = CFontColor1; - gonggaoLabel.font = MEDIUMFONT(14); - gonggaoLabel.text = @"暂停公告"; - self.gonggaoLabel = gonggaoLabel; - [announceView addSubview:gonggaoLabel]; - - self.textView = [[UIPlaceHolderTextView alloc] initWithFrame:CGRectMake(kRealValue(15), gonggaoLabel.bottom + kRealValue(15), announceView.width - kRealValue(30), kRealValue(179))]; - self.textView.placeholder = @"请输入暂停公告"; - self.textView.font = SYSTEMFONT(14); - self.textView.layer.cornerRadius = 5; - self.textView.layer.masksToBounds = true; - self.textView.backgroundColor = UIColorHex(#EFEFEF); - [announceView addSubview:self.textView]; - - UIButton * publishBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(111), kScreenHeight - kTopHeight - SafetyAreaHeight - kRealValue(56), kScreenWidth - kRealValue(222), kRealValue(35))]; - [publishBtn setTitle:@"发布" forState:UIControlStateNormal]; - [publishBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - publishBtn.titleLabel.font = SYSTEMFONT(14); - publishBtn.layer.cornerRadius = 18; - publishBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - publishBtn.layer.borderWidth = 1.0; - publishBtn.layer.masksToBounds = true; - publishBtn.backgroundColor = KWhiteColor; - [publishBtn addTarget:self action:@selector(publishAction) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:publishBtn]; -} - -- (void)getReasonData { - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"ReasonAPI" NeedToken:@""]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:@"doctor_stop_reason_type" forKey:@"dictKey"]; - [workApi GetPublishServerReason:parmDic]; - -} - -- (void)selectStarOnclick { - self.starLabel.layer.borderColor = UIColorHex(#21BEBD).CGColor; - // 1.创建日期选择器 - BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init]; - // 2.设置属性 - datePickerView.pickerMode = BRDatePickerModeYMD; - datePickerView.title = @"选择暂停日期"; - // datePickerView.selectValue = @"2019-10-30"; - datePickerView.minDate = [NSDate br_setYear:2003 month:3 day:12]; - datePickerView.maxDate = [NSDate br_setYear:2050 month:3 day:12]; - datePickerView.isAutoSelect = YES; - datePickerView.showUnitType = BRShowUnitTypeOnlyCenter; - datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) { - NSLog(@"选择的值:%@", selectValue); - self.starDate = selectDate; - self.starLabel.text = selectValue; - }; - - datePickerView.pickerStyle = [BRPickerStyle pickerStyleWithThemeColor:UIColorHex(#21BEBD)]; - // 3.显示 - [datePickerView show]; -} - -- (void)selectEndOnclick { - self.endLabel.layer.borderColor = UIColorHex(#21BEBD).CGColor; - - // 1.创建日期选择器 - BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init]; - // 2.设置属性 - datePickerView.pickerMode = BRDatePickerModeYMD; - datePickerView.title = @"选择暂停日期"; - // datePickerView.selectValue = @"2019-10-30"; - datePickerView.minDate = [NSDate br_setYear:2003 month:3 day:12]; - datePickerView.maxDate = [NSDate br_setYear:2050 month:3 day:12]; - datePickerView.isAutoSelect = YES; - datePickerView.showUnitType = BRShowUnitTypeOnlyCenter; - datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) { - NSLog(@"选择的值:%@", selectValue); - self.endDate = selectDate; - self.endLabel.text = selectValue; - }; - - datePickerView.pickerStyle = [BRPickerStyle pickerStyleWithThemeColor:UIColorHex(#21BEBD)]; - // 3.显示 - [datePickerView show]; -} - -#pragma mark:发布 - -- (void)publishAction { - if (ValidStr(self.reasonString)) { - - [MBProgressHUD showErrorMessage:@"请选择暂停原因"]; - return; - } - if (ValidStr(self.textView.text)) { - - [MBProgressHUD showErrorMessage:@"请输入公告"]; - return; - } - - //查询当前咨询 - [self showMBProgressHUDWithString:@"发布中,请稍候..." autoHidden:false]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - NSTimeInterval starLong =[self.starDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒 - NSString * starString = [NSString stringWithFormat:@"%.0f", starLong]; //转为字符型 - - NSTimeInterval endLong =[self.endDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒 - NSString * endString = [NSString stringWithFormat:@"%.0f", endLong]; //转为字符型 - - [parmDic setObject:starString forKey:@"startTime"]; - [parmDic setObject:endString forKey:@"endTime"]; - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"CURRENTAPI" NeedToken:@""]; - [workApi GetCurrentServerNumber:parmDic]; -// - - -} - -- (void)addPublishDate { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - NSTimeInterval starLong =[self.starDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒 - NSString * startDayLong = [NSString stringWithFormat:@"%.0f", starLong]; //转为字符型 - - NSTimeInterval endLong =[self.endDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒 - NSString * endDayLong = [NSString stringWithFormat:@"%.0f", endLong]; //转为字符型 - - NSDateFormatter *formater = [[ NSDateFormatter alloc] init]; - [formater setDateFormat:@"yyyy-MM-dd"];// 时间格式 - - if (endLong < starLong) { - - [EasyTextView showErrorText:@"结束时间小于开始时间,请重新选择"]; - return; - } - - NSString *starDateStr = [formater stringFromDate:self.starDate]; - NSString *endDateStr = [formater stringFromDate:self.endDate]; - - [parmDic setObject:self.reasonString forKey:@"stopReason"]; - [parmDic setObject:startDayLong forKey:@"startDayLong"]; - [parmDic setObject:endDayLong forKey:@"endDayLong"]; - [parmDic setObject:self.textView.text forKey:@"notice"]; - [parmDic setObject:@"" forKey:@"doctorId"]; - [parmDic setObject:endDateStr forKey:@"endDay"]; - [parmDic setObject:starDateStr forKey:@"startDay"]; - - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"ADDAPI" NeedToken:@""]; - [workApi PostStopPublishServer:parmDic]; - - - -} -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [EasyTextView showErrorText:message]; - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - - if ([tag isEqualToString:@"ReasonAPI"]) { - NSArray * resArray = response; - NSMutableArray * textArray = [[NSMutableArray alloc] init]; - for (NSDictionary * resDic in resArray) { - - YXStopReasonModel * model = [YXStopReasonModel modelWithDictionary:resDic]; - [textArray addObject:model.text]; - [self.reasonArray addObject:model]; - } - self.tagList.tags = textArray; - //布局 - self.starLabel.top = self.tagList.bottom + kRealValue(12); - self.centerLabel.top = self.starLabel.top; - self.endLabel.top = self.starLabel.top; - self.gonggaoLabel.top = self.endLabel.bottom + kRealValue(23); - self.textView.top = self.gonggaoLabel.bottom + kRealValue(15); - self.announceView.bottom = self.textView.bottom + kRealValue(20); - self.announceView.top = kRealValue(15); - self.timeLabel.top = self.tagList.bottom + kRealValue(15); - - } - if ([tag isEqualToString:@"CURRENTAPI"]) { - [self addPublishDate]; - //转换为时间戳 -// NSString * resString = response; -// -// if ([resString integerValue] == 0 ) { -// [self addPublishDate]; -// -// }else -// { -// -// StopQuestionPopView * popview = [[StopQuestionPopView alloc] initWithFrame:[UIScreen mainScreen].bounds]; -// popview.questionNumber = resString; -// popview.publisBlock = ^{ -// [self addPublishDate]; -// }; -// [[UIApplication sharedApplication].keyWindow addSubview:popview]; -// popview.alpha = 0; -// [UIView animateWithDuration:0.5 animations:^{ -// popview.alpha = 1; -// } completion:^(BOOL finished) { -// }]; -// } - } - if ([tag isEqualToString:@"ADDAPI"]) { - [self hiddenAllMBProgressHUD]; - [self.navigationController popViewControllerAnimated:YES]; - } - -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.h deleted file mode 100644 index ca2afd0..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXStopQuestionCauseViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/30. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXStopQuestionCauseViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.m deleted file mode 100644 index 91eb401..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionCauseViewController.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// YXStopQuestionCauseViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/30. -// - -#import "YXStopQuestionCauseViewController.h" - -@interface YXStopQuestionCauseViewController () - -@end - -@implementation YXStopQuestionCauseViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"暂停服务"; - [self createUI]; - -} - -- (void)createUI { - - - -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.h deleted file mode 100644 index 171aaac..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXStopQuestionSettingVC.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/29. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXStopQuestionSettingVC : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.m deleted file mode 100644 index 6457bce..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/StopQuestionSetting(停诊设置)/YXStopQuestionSettingVC.m +++ /dev/null @@ -1,185 +0,0 @@ -// -// YXStopQuestionSettingVC.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/29. -// - -#import "YXStopQuestionSettingVC.h" -#import "StopQuestionTableView.h" -#import "StopQuestionPopView.h" -#import "YXStopServiceModel.h" -#import "YXStopAnnouncementViewController.h" -@interface YXStopQuestionSettingVC () - -@property (nonatomic, strong) StopQuestionTableView * homeTable; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@property (nonatomic, assign) NSInteger pageNo; - -@property (nonatomic, assign) NSInteger pageSize; - -@end - -@implementation YXStopQuestionSettingVC - - -- (NSMutableArray *)dataArray { - - if (!_dataArray) { - _dataArray = [[NSMutableArray alloc] init]; - } - return _dataArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.view.backgroundColor = UIColorHex(#EFEFEF); - self.navigationItem.title = @"暂停服务"; - self.pageNo = 0; - self.pageSize = 10; - [self createUI]; - [self createData]; -} - -- (void)viewWillAppear:(BOOL)animated { - - [super viewWillAppear:animated] ; - - [self.homeTable.mj_header beginRefreshing]; - -} -- (void)createUI { - - - UIButton * stopPublish = [[UIButton alloc] init]; - [stopPublish setTitle:@"发布暂停公告" forState:UIControlStateNormal]; - [stopPublish setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [stopPublish addTarget:self action:@selector(publishAction) forControlEvents:UIControlEventTouchUpInside]; - stopPublish.layer.borderColor = UIColorHex(#21BEBD).CGColor; - stopPublish.layer.borderWidth = 1.0; - stopPublish.layer.cornerRadius = 17; - [self.view addSubview:stopPublish]; - - [stopPublish mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_offset(150); - make.bottom.mas_offset(-30); - make.height.mas_offset(36); - make.centerX.mas_equalTo(self.view); - }]; - - self.homeTable = [[StopQuestionTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; - self.homeTable.changeBlock = ^(NSString * _Nullable record_id) { - DLog(@"%@",record_id); - [self chageServiceStatus:record_id]; - }; - [self.view addSubview:self.homeTable]; - - [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.left.right.mas_offset(0); - make.bottom.mas_equalTo(stopPublish.mas_top).offset(-10); - }]; - - __weak __typeof(self) weakSelf = self; - self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ - weakSelf.pageNo = 1; - - [weakSelf createData]; - - - }]; - self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ - weakSelf.pageNo ++; - - [weakSelf createData]; - }]; - - - - -} - -- (void)publishAction { - - - - YXStopAnnouncementViewController * publishVC = [[YXStopAnnouncementViewController alloc] init]; - - [self.navigationController pushViewController:publishVC animated:YES]; -} - -- (void)createData { - - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; - [parmDic setObject:@(self.pageSize) forKey:@"pageSize"]; - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"RECORDAPI" NeedToken:@""]; - - [workApi GetSPublishServerRecored:parmDic]; - -} - - -- (void)chageServiceStatus:(NSString *)recordID { - [self showMBProgressHUDWithString:@"恢复中,请稍候" autoHidden:false]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:recordID forKey:@"id"]; - [parmDic setObject:@"1" forKey:@"serviceStatus"]; - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"CHAGEAPI" NeedToken:@""]; - [workApi GetChangePublishServer:parmDic]; - -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - - [self.homeTable.mj_header endRefreshing]; - [self.homeTable.mj_footer endRefreshing]; - [self hiddenAllMBProgressHUD]; -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - - [self.homeTable.mj_header endRefreshing]; - [self.homeTable.mj_footer endRefreshing]; - if ([tag isEqualToString:@"RECORDAPI"]) { - NSDictionary * resDic = response; - if (self.pageNo == 1) { - - [self.dataArray removeAllObjects]; - } - YXStopServiceModel * model = [YXStopServiceModel modelWithDictionary:resDic]; - - for (YXStopServiceListModel * listModel in model.records ) { - - [self.dataArray addObject:listModel]; - } - self.homeTable.dataArray = self.dataArray; - } - if ([tag isEqualToString:@"CHAGEAPI"]) { - [self hiddenAllMBProgressHUD]; - [self.homeTable.mj_header beginRefreshing]; - } - -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.h deleted file mode 100644 index 6a27952..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// BasicHealthInfoViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXBasicHealthInfoViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.m deleted file mode 100644 index 58b861a..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXBasicHealthInfoViewController.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// BasicHealthInfoViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "YXBasicHealthInfoViewController.h" -#import "BasicHealthInfoView.h" - - -@interface YXBasicHealthInfoViewController () - - - -@end - -@implementation YXBasicHealthInfoViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.title = @"基本健康信息"; - self.view.backgroundColor = UIColorHex(#EEEEEE); - [self createUI]; - // Do any additional setup after loading the view. -} - -- (void)createUI { - - BasicHealthInfoView * infoView = [[BasicHealthInfoView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(286))]; - infoView.backgroundColor = [UIColor whiteColor]; - infoView.layer.cornerRadius = 10.0; - infoView.layer.masksToBounds = true; - [self.view addSubview:infoView]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.h deleted file mode 100644 index 07ed7e0..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// YXHomePageViewController.h -// healthQuestion -// -// Created by xulei on 2022/8/17. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXHomePageViewController : YXBaseViewController - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.m deleted file mode 100644 index 5a7e992..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/YXHomePageViewController.m +++ /dev/null @@ -1,774 +0,0 @@ -// -// YXHomePageViewController.m -// healthQuestion -// -// Created by xulei on 2022/8/17. -// - -#import "YXHomePageViewController.h" -#import "YXQuestionDetailViewController.h" -#import "YXHomePageModel.h" -#import "ChatViewController.h" -#import "MJRefresh.h" -#import "HQShowPromptPopView.h" -#import "YXQuestionStatisticsViewController.h" -#import "YXQustionRecordViewController.h" -#import "YXStopQuestionSettingVC.h" -#import "YXBasicHealthInfoViewController.h" -#import "RefuseQuestionPopView.h" -#import "XJDHistoricalRecordViewController.h" -#import "XJDFileDataDetailViewController.h" -#import "YXStopAnnouncementViewController.h" -#import "XJDBillDetailViewController.h" -#import "TUIC2CChatViewController.h" -#import "YXDoctorInfoModel.h" -#import "PSAppInfo.h" -#import "PSCheckVersion.h" -@interface YXHomePageViewController () - -@property (nonatomic, strong) UIScrollView * mainScrollView; - -@property (nonatomic, strong) UILabel * nameLabel; - -@property (nonatomic, strong) UILabel * workLabel; - -@property (nonatomic, strong) UILabel * hospatilLabel; - -@property (nonatomic, strong) UIImageView * heardImage; - -@property (nonatomic, strong) UILabel * messageLabel; -@property (nonatomic, copy) NSString * smallGroup; - -@end - -@implementation YXHomePageViewController - -- (void)viewDidLoad { - - [super viewDidLoad]; - [self createUI]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(updateHomeDate) - name:KNotificAgreeMapDelegate - object:nil]; - - //前缀请求 - [self chageUrlService]; - [[V2TIMManager sharedInstance] addSimpleMsgListener:self]; - [[TUICallEngine createInstance] addObserver:self]; - - self.isHidenNaviBar = false; - self.StatusBarStyle = UIStatusBarStyleDefault; - self.view.backgroundColor = CViewBgColor; - self.navigationItem.title = @"健康专家库"; - - [self docotrUserInfo]; - [self creatSmallHelpNumber]; - [PSCheckVersion checkVersionCompulsoryUpdate]; - -} - -- (void)updateHomeDate { - - [self docotrUserInfo]; - [self creatSmallHelpNumber]; - -} - -#pragma mark:请求前缀 -- (void)chageUrlService { - - AFHTTPSessionManager *session=[AFHTTPSessionManager manager]; - // AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; - - session.responseSerializer.acceptableContentTypes=[NSSet setWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html",@"text/plain", nil]; - //超时时间 - - session.requestSerializer.timeoutInterval= 30.f; - session.responseSerializer = [AFHTTPResponseSerializer serializer]; - - session.requestSerializer = [AFJSONRequestSerializer serializer]; - - session.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - // 获取应用的版本号 - NSString * version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - // 将版本号按照点(.)分割成数组 - NSArray * components = [version componentsSeparatedByString:@"."]; - - // 获取数组中的最后一个元素 - NSString * lastComponent = [components lastObject]; - // 如果需要将其转换为整数 - NSInteger lastNumber = [lastComponent integerValue]; - - [parmDic setObject:@(lastNumber) forKey:@"version"]; - [parmDic setObject:@"health.Employees.tools" forKey:@"pkg"]; - - - [session GET:@"https://base.icdat.cn/v2/url" parameters:parmDic headers:nil progress:^(NSProgress * _Nonnull downloadProgress) { - - } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { - - NSString * dataString = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding]; - DLog(@"response\n%@\n",dataString); - NSData *requestData = [dataString dataUsingEncoding:NSUTF8StringEncoding]; - - id myResult = [NSJSONSerialization JSONObjectWithData:requestData options:NSJSONReadingMutableContainers error:nil]; - //判断是否为字典 - if ([myResult isKindOfClass:[NSDictionary class]]) { - - NSDictionary *response = (NSDictionary *)myResult; - if ([response.allKeys containsObject:@"result"]) { - NSDictionary * resultDic = [response objectForKey:@"result"]; - - if ([resultDic.allKeys containsObject:@"api"]) { - [[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"api"] forKey:@"HTTPS"]; - [[NSUserDefaults standardUserDefaults] synchronize]; - } - if ([resultDic.allKeys containsObject:@"h5"]) { - [[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"h5"] forKey:@"IntervenH5"]; - [[NSUserDefaults standardUserDefaults] synchronize]; - } - if ([resultDic.allKeys containsObject:@"h5Host"]) { - [[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"h5Host"] forKey:@"H5DevHost"]; - [[NSUserDefaults standardUserDefaults] synchronize]; - } - if ([resultDic.allKeys containsObject:@"health"]) { - [[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"health"] forKey:@"BASEURL"]; - [[NSUserDefaults standardUserDefaults] synchronize]; - } - } - } - - } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { - NSString * statusCode = [error.userInfo objectForKey:@"NSLocalizedDescription"]; - - }]; -} - - -- (void)viewWillAppear:(BOOL)animated { - - [super viewWillAppear:animated]; - [self.mainScrollView.mj_header beginRefreshing]; - -} -- (void)createUI { - - self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight)]; - [self.view addSubview:self.mainScrollView]; - - UIView * linV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 0.5)]; - [self.mainScrollView addSubview:linV]; - - YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; - - UIView * topBack = [[UIView alloc] initWithFrame:CGRectMake(0, linV.bottom, kScreenWidth, kRealValue(130))]; - topBack.backgroundColor = UIColorHex(#21BEBD); - [self.mainScrollView addSubview:topBack]; - - self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(19), 100, 20)]; - self.nameLabel.textColor = KWhiteColor; - self.nameLabel.font = SYSTEMFONT(21); - self.nameLabel.text = user.realname; - CGFloat w = [HQCommonUtils getLengthFromText:self.nameLabel.text andFontSize:21]; - self.nameLabel.width = w; - self.nameLabel.textAlignment = NSTextAlignmentLeft; - [topBack addSubview:self.nameLabel]; - - self.workLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLabel.right + kRealValue(12), kRealValue(25), 100, 13)]; - self.workLabel.textColor = KWhiteColor; - self.workLabel.font = SYSTEMFONT(13); - self.workLabel.textAlignment = NSTextAlignmentLeft; - [topBack addSubview:self.workLabel]; - - self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), self.nameLabel.bottom + kRealValue(17), kScreenWidth - kRealValue(65), 20)]; - self.hospatilLabel.textColor = KWhiteColor; - self.hospatilLabel.font = SYSTEMFONT(13); -// self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",user.phone,user.sex_dictText]; - self.hospatilLabel.textAlignment = NSTextAlignmentLeft; - [topBack addSubview:self.hospatilLabel]; - - self.heardImage = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(24) - 60, kRealValue(10), 60, 60)]; - self.heardImage.backgroundColor = KWhiteColor; - self.heardImage.layer.cornerRadius = 30.0; - self.heardImage.layer.masksToBounds = true; - [topBack addSubview:self.heardImage]; - - - -// UIView * questionView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.heardImage.bottom + kRealValue(23), kScreenWidth - kRealValue(30), kRealValue(132) * 2 + kRealValue(10))]; -// questionView.backgroundColor = KRedColor; -// questionView.layer.cornerRadius = 10.0; -//// [HQCommonUtils addShadowToView:questionView]; -// [self.view addSubview:questionView]; - - NSArray * array = @[@[@"图文咨询",@"通过图片、文字的形式进行咨询"],@[@"视频咨询",@"通过语音视频电话的形式进行咨询"]]; - NSArray * timearray = @[@[@"0",@"0"],@[@"0",@"0"]]; - NSArray * TagArray = @[@"100",@"200"]; - UIView * lastView; - for (int i = 0; i < 2 ; i ++) { - - UIView * listView = [self createQuestionFrame:CGRectMake(kRealValue(15) , self.heardImage.bottom + kRealValue(23) + 10 * i + kRealValue(132) * i, kScreenWidth - kRealValue(30), kRealValue(132)) Image:@"" withTitle:array[i][0] withDesTitle:array[i][1] withTime:timearray[i][0] numberCount:timearray[i][1] withTag:[TagArray[i] intValue]]; - listView.backgroundColor = KWhiteColor; - if (i == 1) { - lastView = listView; - } - - UIButton * topBackbtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, listView.width, listView.height - 46)]; - topBackbtn.tag = 1000 + i; - [topBackbtn addTarget:self action:@selector(topAction:) forControlEvents:UIControlEventTouchUpInside]; - [listView addSubview:topBackbtn]; - [self.mainScrollView addSubview:listView]; - } - - UIView * smallView= [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), lastView.bottom + kRealValue(10), kScreenWidth - kRealValue(30), kRealValue(80))]; - smallView.backgroundColor = KWhiteColor; - smallView.layer.cornerRadius = 10.0; - smallView.layer.masksToBounds = YES; - UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)]; - [smallView addGestureRecognizer:tap]; - [self.mainScrollView addSubview:smallView]; - - UIImageView * leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(24, 24, 40, 40)]; - leftImg.layer.cornerRadius = 20.0f; - leftImg.layer.masksToBounds = true; - leftImg.image = [UIImage imageNamed:@"home_small"] ; - [smallView addSubview:leftImg]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), kRealValue(28), kScreenWidth - kRealValue(65), 14)]; - titleLabel.textColor = UIColorHex(#333333); - titleLabel.font = BOLDSYSTEMFONT(14); - titleLabel.text = @"小助手"; - titleLabel.textAlignment = NSTextAlignmentLeft; - [smallView addSubview:titleLabel]; - - UILabel * desLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), titleLabel.bottom + kRealValue(10), kScreenWidth - kRealValue(65), 11)]; - desLabel.textColor = UIColorHex(#666666); - desLabel.font = SYSTEMFONT(11); - desLabel.text = @"联系小助手获取相关帮助和支持"; - desLabel.textAlignment = NSTextAlignmentLeft; - [smallView addSubview:desLabel]; - - UILabel * dayLabel = [[UILabel alloc] initWithFrame:CGRectMake(smallView.width - kRealValue(11) - 100, kRealValue(23), 100, 11)]; - dayLabel.textColor = UIColorHex(#999999); - dayLabel.font = SYSTEMFONT(11); - dayLabel.text = @""; - dayLabel.textAlignment = NSTextAlignmentRight; - self.messageLabel = dayLabel; - [smallView addSubview:dayLabel]; - -// UILabel * messageLabel = [[UILabel alloc] initWithFrame:CGRectMake(smallView.width - kRealValue(20) - 12 ,dayLabel.bottom + kRealValue(12) ,14, 14)]; -// messageLabel.textColor = KWhiteColor; -// messageLabel.font = SYSTEMFONT(10); -// messageLabel.text = @"-"; -// messageLabel.textAlignment = NSTextAlignmentCenter; -// messageLabel.layer.cornerRadius = 7; -// messageLabel.layer.masksToBounds = true; -// messageLabel.backgroundColor = UIColorHex(#21BEBD); - -// [smallView addSubview:messageLabel]; - MJWeakSelf - self.mainScrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ - // 进入刷新状态后会自动调用这个block - [weakSelf createMessageNumber]; - [weakSelf creatSmallHelpNumber]; - - }]; - - // 马上进入刷新状态 - // 拉取群聊历史消息 - // 首次拉取,lastMsg 设置为 null - // 再次拉取时,lastMsg 可以使用返回的消息列表中的最后一条消息 - - -} - -- (void)createMessageNumber { - - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"HOMEAPI" NeedToken:@""]; - - [homeApi getHomeData:nil]; - -} - -- (void)docotrUserInfo { - - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"DoctorINFO" NeedToken:@""]; - - [homeApi GetInquireDoctorInfo:nil]; - -} - -- (void)handleTapGesture:(id)sender { - - if ([ESCTUIManager TUIUserStatus] == false) { - - - [self loginImAccount]; - } - [self showMBProgressHUDWithString:@"加载中..." autoHidden:false]; - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"FOUNDSMALLAPI" NeedToken:@""]; - - [homeApi getHomeFoundSmallHelpData:nil]; - -} - -- (void)creatSmallHelpNumber { - - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"SMALLAPI" NeedToken:@""]; - - [homeApi getHomeSmallData:nil]; - -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - [self.mainScrollView.mj_header endRefreshing]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - - - if ([tag isEqualToString:@"HOMEAPI"]) { - [self.mainScrollView.mj_header endRefreshing]; - NSDictionary * dic = response ; - -// 图文咨询:pictureUnReply 待回复 pictureIng进行中 pictureFinish已完成 视频咨询: videoUnReply待确认 videoIng进行中 videoFinish已完成 - - UILabel * pictur_wait = [self.view viewWithTag:100]; - if ([dic.allKeys containsObject:@"pictureUnReply"]) { - if ([[dic objectForKey:@"pictureUnReply"] intValue] == 0) { - pictur_wait.hidden = YES; - }else - { - pictur_wait.hidden = false; - pictur_wait.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"pictureUnReply"]]; - } - - } - - UILabel * pictur_ing = [self.view viewWithTag:110]; - - if ([dic.allKeys containsObject:@"pictureIng"]) { - if ([[dic objectForKey:@"pictureIng"] intValue] == 0) { - pictur_ing.hidden = YES; - }else - { - pictur_ing.hidden = false; - pictur_ing.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"pictureIng"]]; - } - - } - - UILabel * pictur_end = [self.view viewWithTag:120]; - - if ([dic.allKeys containsObject:@"pictureFinish"]) { - if ([[dic objectForKey:@"pictureFinish"] intValue] == 0) { - pictur_end.hidden = YES; - }else - { - pictur_end.hidden = false; - pictur_end.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"pictureFinish"]]; - } - - } - - UILabel * video_wait = [self.view viewWithTag:200]; - if ([dic.allKeys containsObject:@"videoUnReply"]) { - if ([[dic objectForKey:@"videoUnReply"] intValue] == 0) { - video_wait.hidden = YES; - }else - { - video_wait.hidden = false; - video_wait.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"videoUnReply"]]; - } - - } - - UILabel * video_ing = [self.view viewWithTag:210]; - - if ([dic.allKeys containsObject:@"videoIng"]) { - if ([[dic objectForKey:@"videoIng"] intValue] == 0) { - video_ing.hidden = YES; - }else - { - video_ing.hidden = false; - video_ing.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"videoIng"]]; - } - - } - - UILabel * video_end = [self.view viewWithTag:220]; - - if ([dic.allKeys containsObject:@"videoFinish"]) { - if ([[dic objectForKey:@"videoFinish"] intValue] == 0) { - video_end.hidden = YES; - }else - { - video_end.hidden = false; - video_end.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"videoFinish"]]; - } - - } - - } - if ([tag isEqualToString:@"SMALLAPI"]) { - [self.mainScrollView.mj_header endRefreshing]; - NSString * result = response; - if (!ValidStr(result)) { - self.smallGroup = result; - [self loginImAccount]; - - } - - } - if ([tag isEqualToString:@"FOUNDSMALLAPI"]) { - - NSDictionary * responDic = response; - - YXZJSmallHelpModel * helpModel = [YXZJSmallHelpModel modelWithDictionary:responDic]; - - if ([ESCTUIManager TUIUserStatus] == false) { - - - [self loginImAccount]; - return; - } - - ChatViewController * chatVC = [[ChatViewController alloc] init]; - chatVC.isGroupID = false; - chatVC.chatID = helpModel.groupId; - chatVC.smallHelp_id = helpModel.help_Id; - chatVC.member = helpModel.member; - chatVC.isVideo = false; - chatVC.eableSendReport = YES; - chatVC.eableMapTools = false; - chatVC.navTitle = @"小助手"; - chatVC.eablehaveHelathData = YES; - chatVC.questionType = 1; - chatVC.memberSex = @"2"; - [self hiddenAllMBProgressHUD]; - [self.navigationController pushViewController:chatVC animated:YES]; - - - } - if ([tag isEqualToString:@"loginIMAPI"]) { - - NSDictionary * pamrDic = response; - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; - - IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; - iminfoModel.IMInfo = pamrDic; - [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; - - // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 - // 2. 初始化 config 对象 - V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init]; - // 3. 指定 log 输出级别。 - config.logLevel = V2TIM_LOG_INFO; - // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 - [[V2TIMManager sharedInstance] addIMSDKListener:self]; - // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 - [[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config]; - - [ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig]; - - [V2TIMManager.sharedInstance getGroupHistoryMessageList:[NSString stringWithFormat:@"%@",self.smallGroup] count:20 lastMsg:nil succ:^(NSArray *msgs) { - // 记录下次拉取的 lastMsg,用于下次拉取 - V2TIMMessage *lastMsg = msgs.lastObject; - NSLog(@"success, %@", msgs); - - NSDateFormatter *date = [[NSDateFormatter alloc]init]; - [date setDateFormat:@"HH:mm:ss"]; - NSString *dateString = [date stringFromDate:lastMsg.timestamp]; - - if (!ValidStr(dateString)) { - dispatch_async(dispatch_get_main_queue(), ^{ - self.messageLabel.text = [NSString stringWithFormat:@"%@",dateString]; - }); - }else - { - dispatch_async(dispatch_get_main_queue(), ^{ - self.messageLabel.text = @""; - }); - - } - - } fail:^(int code, NSString *desc) { - NSLog(@"fail, %d, %@", code, desc); - }]; - } - - if ([tag isEqualToString:@"DoctorINFO"]) { - - NSDictionary * parDic = response; - - YXDoctorInfoModel * model = [YXDoctorInfoModel modelWithDictionary:parDic]; - self.nameLabel.text = model.doctorName; - self.workLabel.text = [NSString stringWithFormat:@"%@",model.doctorTitle] ; - CGFloat workW = [HQCommonUtils getLengthFromText:self.workLabel.text andFontSize:13]; - self.workLabel.width = workW; - self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",model.resourceName,model.departmentName]; - - NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photo]; - - NSString * str1 = @"\\"; - - photo = [photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; - - NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); - - [self.heardImage sd_setImageWithURL:[NSURL URLWithString:encodedString3] placeholderImage:[UIImage imageNamed:@"doctorNoImage"]]; - } - - -} - -- (void)topAction:(UIButton *)btn { - - - YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init]; - //图文待回复 - if (btn.tag == 1000) { - - recoredVC.questionType = 1; - - } - //视频待确认 - if (btn.tag == 1001) { - - recoredVC.questionType = 2; - - } - recoredVC.questionStatus = 10; - [self.navigationController pushViewController:recoredVC animated:YES]; -} -- (void)loginImAccount { - - YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"loginIMAPI" NeedToken:nil]; - [proctocolApi GetIMLoginAccount:nil]; - -} - - -- (UIView *)createQuestionFrame:(CGRect)frame - Image:(NSString *)imageName - withTitle:(NSString *)title - withDesTitle:(NSString *)desTitle - withTime:(NSString *)time - numberCount:(NSString *)number - withTag:(NSInteger)NumberTag{ - - UIView * view = [[UIView alloc] initWithFrame:frame]; - view.layer.cornerRadius = 10.0; - view.backgroundColor = KWhiteColor; - view.layer.masksToBounds = YES; - - UIImageView * leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(24, 24, 40, 40)]; - leftImg.layer.cornerRadius = 20.0f; - leftImg.layer.masksToBounds = true; - if ([title isEqualToString:@"图文咨询"]) { - leftImg.image = [UIImage imageNamed:@"home_PictureQustion"]; - } - if ([title isEqualToString:@"视频咨询"]) { - leftImg.image = [UIImage imageNamed:@"home_VideoQustion"]; - } - if ([title isEqualToString:@"小助手"]) { - leftImg.image = [UIImage imageNamed:@"home_small"]; - } - leftImg.backgroundColor = [UIColor greenColor]; - [view addSubview:leftImg]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), kRealValue(28), kScreenWidth - kRealValue(65), 14)]; - titleLabel.textColor = UIColorHex(#333333); - titleLabel.font = BOLDSYSTEMFONT(14); - titleLabel.text = title; - titleLabel.textAlignment = NSTextAlignmentLeft; - [view addSubview:titleLabel]; - - UILabel * desLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), titleLabel.bottom + kRealValue(10), kScreenWidth - kRealValue(65), 11)]; - desLabel.textColor = UIColorHex(#666666); - desLabel.font = SYSTEMFONT(11); - desLabel.text = desTitle; - desLabel.textAlignment = NSTextAlignmentLeft; - [view addSubview:desLabel]; - - UIView * linView = [[UIView alloc] initWithFrame:CGRectMake(0, desLabel.bottom + kRealValue(26), view.width, 1)]; - linView.backgroundColor = UIColorHex(#E0E0E0); - [view addSubview:linView]; - - UIView * cowView = [[UIView alloc] initWithFrame:CGRectMake(view.width/3, linView.bottom + kRealValue(8), 1, 28)]; - cowView.backgroundColor = UIColorHex(#E0E0E0); - [view addSubview:cowView]; - - UIView * cowTwoView = [[UIView alloc] initWithFrame:CGRectMake(view.width/3 * 2, linView.bottom + kRealValue(8), 1, 28)]; - cowTwoView.backgroundColor = UIColorHex(#E0E0E0); - [view addSubview:cowTwoView]; - - //待回复 - UIButton * replayBtn = [[UIButton alloc] initWithFrame:CGRectMake(0 , linView.bottom ,view.width/3 , 45)]; - - if ([title isEqualToString:@"图文咨询"]) { - [replayBtn setTitle:@"待回复" forState:UIControlStateNormal]; - - } - if ([title isEqualToString:@"视频咨询"]) { - [replayBtn setTitle:@"待确认" forState:UIControlStateNormal]; - - } - [replayBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - replayBtn.titleLabel.font = SYSTEMFONT(13); - replayBtn.tag = NumberTag + 1000; - [replayBtn addTarget:self action:@selector(daihuifuAction:) forControlEvents:UIControlEventTouchUpInside]; - [view addSubview:replayBtn]; - - - - UILabel * numLabel = [[UILabel alloc] initWithFrame:CGRectMake(replayBtn.width - kRealValue(22) - 12 ,kRealValue(15) ,12, 12)]; - numLabel.textColor = KWhiteColor; - numLabel.font = SYSTEMFONT(10); - numLabel.text = number; - numLabel.textAlignment = NSTextAlignmentCenter; - numLabel.layer.cornerRadius = 6; - numLabel.layer.masksToBounds = true; - numLabel.backgroundColor = UIColorHex(#21BEBD); - numLabel.tag = NumberTag; - [replayBtn addSubview:numLabel]; - //进行中 - UIButton * qustionBtn = [[UIButton alloc] initWithFrame:CGRectMake(view.width/3 , linView.bottom ,view.width/3 , 45)]; - [qustionBtn setTitle:@"进行中" forState:UIControlStateNormal]; - [qustionBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - qustionBtn.titleLabel.font = SYSTEMFONT(13); - qustionBtn.tag = NumberTag + 1001; - [qustionBtn addTarget:self action:@selector(jingxingAction:) forControlEvents:UIControlEventTouchUpInside]; - - [view addSubview:qustionBtn]; - - UILabel * jingxingLabel = [[UILabel alloc] initWithFrame:CGRectMake(qustionBtn.width - kRealValue(22) - 12 ,kRealValue(15) ,12, 12)]; - jingxingLabel.textColor = KWhiteColor; - jingxingLabel.font = SYSTEMFONT(10); - jingxingLabel.text = number; - jingxingLabel.textAlignment = NSTextAlignmentCenter; - jingxingLabel.layer.cornerRadius = 6; - jingxingLabel.layer.masksToBounds = true; - jingxingLabel.backgroundColor = UIColorHex(#21BEBD); - jingxingLabel.tag = NumberTag + 10; - [qustionBtn addSubview:jingxingLabel]; - - //完成 - UIButton * wanchengBtn = [[UIButton alloc] initWithFrame:CGRectMake(view.width/3 * 2 , linView.bottom ,view.width/3 , 45)]; - [wanchengBtn setTitle:@"已完成" forState:UIControlStateNormal]; - [wanchengBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - wanchengBtn.titleLabel.font = SYSTEMFONT(13); - wanchengBtn.tag = NumberTag + 1002; - [wanchengBtn addTarget:self action:@selector(wanchengAction:) forControlEvents:UIControlEventTouchUpInside]; - [view addSubview:wanchengBtn]; - - UILabel * wanchengLabel = [[UILabel alloc] initWithFrame:CGRectMake(qustionBtn.width - kRealValue(22) - 12 ,kRealValue(15) ,14, 14)]; - wanchengLabel.textColor = KWhiteColor; - wanchengLabel.font = SYSTEMFONT(10); - wanchengLabel.text = number; - wanchengLabel.textAlignment = NSTextAlignmentCenter; - wanchengLabel.layer.cornerRadius = 7; - wanchengLabel.layer.masksToBounds = true; - wanchengLabel.backgroundColor = UIColorHex(#21BEBD); - wanchengLabel.tag = NumberTag + 20; - [wanchengBtn addSubview:wanchengLabel]; - - return view; -} - -#pragma mark:待回复 -- (void)daihuifuAction:(UIButton *)daihuifuBtn { - YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init]; - //图文待回复 - if (daihuifuBtn.tag == 1100) { - - recoredVC.questionType = 1; - - } - //音视频待回复 - if (daihuifuBtn.tag == 1200) { - - recoredVC.questionType = 2; - } - recoredVC.questionStatus = 10; - [self.navigationController pushViewController:recoredVC animated:YES]; -} -#pragma mark:进行中 -- (void)jingxingAction:(UIButton *)jingxingBtn { - YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init]; - //图文待回复 - if (jingxingBtn.tag == 1101) { - - recoredVC.questionType = 1; - - } - //视频待确认 - if (jingxingBtn.tag == 1201) { - - recoredVC.questionType = 2; - - } - recoredVC.questionStatus = 20; - [self.navigationController pushViewController:recoredVC animated:YES]; -} -#pragma mark:已完成 -- (void)wanchengAction:(UIButton *)wancgengBtn { - - YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init]; - //图文待回复 - if (wancgengBtn.tag == 1102) { - - recoredVC.questionType = 1; - - } - //音视频待回复 - if (wancgengBtn.tag == 1202) { - - recoredVC.questionType = 2; - } - recoredVC.questionStatus = 30; - [self.navigationController pushViewController:recoredVC animated:YES]; -} - -- (void)pictureQuestionAction { - - YXStopQuestionSettingVC * detailVC = [[YXStopQuestionSettingVC alloc] init]; - - [self.navigationController pushViewController:detailVC animated:YES]; -} - - -//在线时票据过期:此时您需要生成新的 userSig,并再次重新调用初始化。 -- (void)onKickedOffline { - - [HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo]; - [ESCTUIManager outLoginTUISDK]; - KPostNotification(KNotificationLoginStateChange, @NO); - -} - - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.h deleted file mode 100644 index 10a328c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXworkSetingViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/6. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXworkSetingViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.m deleted file mode 100644 index 91d06d5..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/controller/workSetting(排班设置)/YXworkSetingViewController.m +++ /dev/null @@ -1,490 +0,0 @@ -// -// YXworkSetingViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/6. -// - -#import "YXworkSetingViewController.h" -#import "YXWorkSettingModel.h" -#import "YXCustomSchedulingViewController.h" - - -@interface YXworkSetingViewController () - -@property (nonatomic, strong) UIScrollView * mainScrollview; - -@property (nonatomic, strong) UISwitch * rightSlider; - -@property (nonatomic, strong) UIView * workView; - -@property (nonatomic, strong) UIView * jumpView; - -@property (nonatomic, strong) UISwitch * jumpSwithch; - -@property (nonatomic, strong) UIButton * submitBtn; - -@property (nonatomic, strong) UIButton * customBtn; - - -@property (nonatomic, assign) BOOL isVideo; - -@property (nonatomic, assign) BOOL isJump; - -//7个id -@property (nonatomic, copy) NSString * oneID; -@property (nonatomic, copy) NSString * twoID; -@property (nonatomic, copy) NSString * threeID; -@property (nonatomic, copy) NSString * fourID; -@property (nonatomic, copy) NSString * fiveID; -@property (nonatomic, copy) NSString * sixID; -@property (nonatomic, copy) NSString * sevenID; -@property (nonatomic, copy) NSArray * peopleArray; - - -@end - -@implementation YXworkSetingViewController - -#pragma mark:懒加载 - - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"视频排班"; - [self createUI]; - [self createData]; -} - -- (void)createUI { - - self.mainScrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - self.mainScrollview.backgroundColor = CViewBgColor; - [self.view addSubview:self.mainScrollview]; - - UIView * workView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(12), kScreenWidth - kRealValue(30), kRealValue(382))]; - workView.layer.cornerRadius = 10; - workView.layer.masksToBounds = YES; - self.workView = workView; - workView.backgroundColor = KWhiteColor; - [self.mainScrollview addSubview:workView]; - - - NSArray * array = @[@"周一",@"周二",@"周三",@"周四",@"周五",@"周六",@"周天"]; - - CGFloat viewW = self.workView.width - kRealValue(30); - - for (int i = 0; i < array.count; i++) { - - UIView * weekView = [self createWorkView:CGRectMake(kRealValue(15), kRealValue(40) + 15 + kRealValue(45) * i, viewW, kRealValue(35)) withWeek:array[i] withAmTag:100 +i withPmTag:200 + i]; - [self.workView addSubview:weekView]; - - } - - UILabel * questionTitle = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(18),200, 15)]; - questionTitle.textAlignment = NSTextAlignmentLeft; - questionTitle.textColor = UIColorHex(#333333); - questionTitle.font = BOLDSYSTEMFONT(15); - questionTitle.text = @"视频咨询"; - [workView addSubview:questionTitle]; - - - self.rightSlider = [[UISwitch alloc] initWithFrame:CGRectMake(workView.width - kRealValue(52), kRealValue(11), kRealValue(40), 30)]; - [self.rightSlider setOn:NO animated:YES]; - [self.rightSlider setOnTintColor: UIColorHex(#59D5D4)]; - self.rightSlider.transform = CGAffineTransformMakeScale(0.6, 0.6); - self.isVideo = false; - [self.rightSlider addTarget:self action:@selector(switchChange:) forControlEvents:UIControlEventValueChanged]; - [workView addSubview:self.rightSlider]; - - - - - UIView * jumpView = [[UIView alloc] initWithFrame:CGRectMake(workView.left, workView.bottom + kRealValue(10), workView.width, kRealValue(44))]; - jumpView.layer.cornerRadius = 10.0; - jumpView.layer.masksToBounds = YES; - jumpView.backgroundColor = KWhiteColor; - self.jumpView = jumpView; - [self.mainScrollview addSubview:jumpView]; - - - UILabel * jumpLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), 0, 200, kRealValue(44))]; - jumpLabel.textColor = CFontColor1; - jumpLabel.text = @"自动跳过法定节假日?"; - jumpLabel.font = MEDIUMFONT(14); - jumpLabel.textAlignment = NSTextAlignmentLeft; - [jumpView addSubview:jumpLabel]; - - - - self.jumpSwithch = [[UISwitch alloc] initWithFrame:CGRectMake(jumpView.width - kRealValue(52), kRealValue(9), kRealValue(40), 30)]; - [self.jumpSwithch setOn:NO animated:YES]; - [self.jumpSwithch setOnTintColor: UIColorHex(#59D5D4)]; - self.jumpSwithch.transform = CGAffineTransformMakeScale(0.6, 0.6); - self.isJump = false; - [self.jumpSwithch addTarget:self action:@selector(jumpChange:) forControlEvents:UIControlEventValueChanged]; - [jumpView addSubview:self.jumpSwithch]; - - UIButton * submitBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, jumpView.bottom + kRealValue(98), 160, 35)]; - submitBtn.backgroundColor = KWhiteColor; - submitBtn.layer.cornerRadius = 20; - submitBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - submitBtn.layer.borderWidth = 1.0f; - [submitBtn setTitle:@"生成排班" forState:UIControlStateNormal]; - [submitBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - submitBtn.centerX = self.view.centerX; - [submitBtn addTarget:self action:@selector(submitTimeAction) forControlEvents:UIControlEventTouchUpInside]; - submitBtn.titleLabel.font = SYSTEMFONT(14); - self.submitBtn = submitBtn; - [self.mainScrollview addSubview:submitBtn]; - -// UIButton * customBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, submitBtn.bottom + kRealValue(10), 160, 35)]; -// customBtn.centerX = self.view.centerX; -// customBtn.titleLabel.font = SYSTEMFONT(14); -// customBtn.backgroundColor = KClearColor; -// [customBtn setTitle:@"自定义排班" forState:UIControlStateNormal]; -// [customBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; -// [customBtn addTarget:self action:@selector(customAction) forControlEvents:UIControlEventTouchUpInside]; -// [self.view addSubview:customBtn]; -// self.customBtn = customBtn; -// [self.mainScrollview addSubview:submitBtn]; - - self.mainScrollview.contentSize = CGSizeMake(kScreenWidth, submitBtn.bottom + kRealValue(22)); -} - - -- (void)createData { - - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"WEEKAPI" NeedToken:@""]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [workApi GetDoctorWorkSetting:parmDic]; - - -} - -- (UIView *)createWorkView:(CGRect)frame withWeek:(NSString *)week withAmTag:(NSInteger)amTag withPmTag:(NSInteger)pmTag { - - UIView * view = [[UIView alloc] initWithFrame:frame]; - view.layer.cornerRadius = 18; - view.backgroundColor = UIColorHex(#E0E0E0); - view.layer.masksToBounds = YES; - - UILabel * weekLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(26), 0, kRealValue(63), view.height)]; - weekLabel.textAlignment = NSTextAlignmentLeft; - weekLabel.textColor = UIColorHex(#333333); - weekLabel.font = SYSTEMFONT(13); - weekLabel.text = week; - [view addSubview:weekLabel]; - CGFloat amWidth = [HQCommonUtils getLengthFromText:@"上午" andFontSize:13]; - UILabel * amLabel = [[UILabel alloc] initWithFrame:CGRectMake(weekLabel.right, 0, amWidth, view.height)]; - amLabel.text = @"上午"; - amLabel.textAlignment = NSTextAlignmentLeft; - amLabel.textColor = UIColorHex(#333333); - amLabel.font = SYSTEMFONT(13); - [view addSubview:amLabel]; - - UITextField * pepleField = [[UITextField alloc] initWithFrame:CGRectMake(amLabel.right +5 , 5, 38, view.height - 10)]; - pepleField.backgroundColor = KWhiteColor; - pepleField.layer.cornerRadius = 5.0; - pepleField.layer.masksToBounds = YES; - pepleField.textAlignment = NSTextAlignmentCenter; - pepleField.font = SYSTEMFONT(13); - pepleField.keyboardType = UIKeyboardTypeNumberPad; - pepleField.tag = amTag; - [view addSubview:pepleField]; - - CGFloat peoWidth = [HQCommonUtils getLengthFromText:@"人" andFontSize:13]; - UILabel * peoLabel = [[UILabel alloc] initWithFrame:CGRectMake(pepleField.right + 5, 0, peoWidth, view.height)]; - peoLabel.text = @"人"; - peoLabel.textAlignment = NSTextAlignmentLeft; - peoLabel.textColor = UIColorHex(#333333); - peoLabel.font = SYSTEMFONT(13); - [view addSubview:peoLabel]; - - UILabel * rightPeoLabel = [[UILabel alloc] initWithFrame:CGRectMake(view.width - kRealValue(23) - peoWidth, 0, peoWidth, view.height)]; - rightPeoLabel.text = @"人"; - rightPeoLabel.textAlignment = NSTextAlignmentLeft; - rightPeoLabel.textColor = UIColorHex(#333333); - rightPeoLabel.font = SYSTEMFONT(13); - - [view addSubview:rightPeoLabel]; - - UITextField * pmField = [[UITextField alloc] initWithFrame:CGRectMake(rightPeoLabel.left - 5 - 38 , 5, 38, view.height - 10)]; - pmField.backgroundColor = KWhiteColor; - pmField.layer.cornerRadius = 5.0; - pmField.textAlignment = NSTextAlignmentCenter; - pmField.font = SYSTEMFONT(13); - pmField.layer.masksToBounds = YES; - pmField.tag = pmTag; - pmField.keyboardType = UIKeyboardTypeNumberPad; - [view addSubview:pmField]; - - UILabel * pmLabel = [[UILabel alloc] initWithFrame:CGRectMake(pmField.left - amWidth - 5, 0, amWidth, view.height)]; - pmLabel.text = @"下午"; - pmLabel.textAlignment = NSTextAlignmentLeft; - pmLabel.textColor = UIColorHex(#333333); - pmLabel.font = SYSTEMFONT(13); - [view addSubview:pmLabel]; - - return view; -} - -- (void) switchChange:(UISwitch*)sw { - - self.isVideo = sw.on; - - -} - -- (void)jumpChange:(UISwitch*)sw { - - self.isJump = sw.on; -} - - -- (void)submitTimeAction { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - NSMutableArray * dataArray = [[NSMutableArray alloc] init]; - - if (self.isVideo == true) { - //有时间用模型吧 - - //周一 - UITextField * oneAmField = [self.view viewWithTag:100]; - UITextField * onePmField = [self.view viewWithTag:200]; - if ([oneAmField.text integerValue] > 0 ||[onePmField.text integerValue] > 0 ) { - NSString * oneDic = [self createSubmitData:oneAmField.text PMtext:onePmField.text Withweek:@"1" withWeekID:self.oneID]; - [dataArray addObject:oneDic]; - } - //周二 - UITextField * twoAmField = [self.view viewWithTag:101]; - UITextField * twoPmField = [self.view viewWithTag:201]; - if ([twoAmField.text integerValue] > 0 ||[twoPmField.text integerValue] > 0 ) { - NSString * twoDic = [self createSubmitData:twoAmField.text PMtext:twoPmField.text Withweek:@"2" withWeekID:self.twoID]; - [dataArray addObject:twoDic]; - } - //周三 - UITextField * threeAmField = [self.view viewWithTag:102]; - UITextField * threePmField = [self.view viewWithTag:202]; - if ([threeAmField.text integerValue] > 0 ||[threePmField.text integerValue] > 0 ) { - NSString * threeDic = [self createSubmitData:threeAmField.text PMtext:threePmField.text Withweek:@"3" withWeekID:self.threeID]; - [dataArray addObject:threeDic]; - } - //周四 - UITextField * fourAmField = [self.view viewWithTag:103]; - UITextField * fourPmField = [self.view viewWithTag:203]; - if ([fourAmField.text integerValue] > 0 ||[fourPmField.text integerValue] > 0 ) { - NSString * fourDic = [self createSubmitData:fourAmField.text PMtext:fourPmField.text Withweek:@"4" withWeekID:self.fourID]; - [dataArray addObject:fourDic]; - } - //周五 - UITextField * fiveAmField = [self.view viewWithTag:104]; - UITextField * fivePmField = [self.view viewWithTag:204]; - if ([fiveAmField.text integerValue] > 0 ||[fivePmField.text integerValue] > 0 ) { - NSString * fiveDic = [self createSubmitData:fiveAmField.text PMtext:fivePmField.text Withweek:@"5" withWeekID:self.fiveID]; - [dataArray addObject:fiveDic]; - } - //周六 - UITextField * sixAmField = [self.view viewWithTag:105]; - UITextField * sixPmField = [self.view viewWithTag:205]; - if ([sixAmField.text integerValue] > 0 ||[sixPmField.text integerValue] > 0 ) { - NSString * sixDic = [self createSubmitData:sixAmField.text PMtext:sixPmField.text Withweek:@"6" withWeekID:self.sixID]; - [dataArray addObject:sixDic]; - } - //周天 - UITextField * sevenAmField = [self.view viewWithTag:106]; - UITextField * sevenPmField = [self.view viewWithTag:206]; - if ([sevenAmField.text integerValue] > 0 ||[sevenPmField.text integerValue] > 0 ) { - NSString * sevenDic = [self createSubmitData:sevenAmField.text PMtext:sevenPmField.text Withweek:@"7" withWeekID:self.sevenID]; - [dataArray addObject:sevenDic]; - } - - if (dataArray.count == 0) { - [EasyTextView showErrorText:@"请输入就诊人数"]; - return; - } - // 创建一个包含对象的数组 - [parmDic setObject:dataArray forKey:@"list"]; - - } - else - { - NSArray * array = [NSArray modelArrayWithClass:[YXWorkTimeModel class] json:self.peopleArray]; - - for (YXWorkTimeModel * model in self.peopleArray) { - NSString * jsonString = [model modelToJSONObject]; - [dataArray addObject:jsonString]; - } - [parmDic setObject:dataArray forKey:@"list"]; - } -// //是否开启音视频 -// self.isVideo; -// //是否自动跳过节假日 -// self.isJump; -// tfDefault 自排班已去掉 - [parmDic setObject:@(1) forKey:@"audioStatus"]; - - if (self.isVideo == true) { - [parmDic setObject:@(1) forKey:@"audioStatus"]; - - }else if (self.isVideo == false) { - [parmDic setObject:@(0) forKey:@"audioStatus"]; - } - - - if (self.isJump == true) { - [parmDic setObject:@(1) forKey:@"tfJumpHoliday"]; - - }else if (self.isJump == false) { - [parmDic setObject:@(0) forKey:@"tfJumpHoliday"]; - } - - [parmDic setObject:@(0) forKey:@"tfDefault"]; - - [self showMBProgressHUDWithString:@"正在设置" autoHidden:false]; - YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"WorkAPI" NeedToken:@""]; - - - - [workApi PostDoctorWorkTime:parmDic]; - - -} - -- (NSString *)createSubmitData:(NSString *)amText - PMtext:(NSString *)pmText - Withweek:(NSString *)week - withWeekID:(NSString *)weekID{ - - NSMutableDictionary * dic = [[NSMutableDictionary alloc] init]; - NSInteger type = 0; - if ([amText integerValue] > 0 || [pmText intValue] > 0) { - - if ([amText integerValue] > 0) { - [dic setObject:[NSString stringWithFormat:@"%@",amText] forKey:@"amNum"]; - type = 0; - } - if ([pmText integerValue] > 0) { - [dic setObject:[NSString stringWithFormat:@"%@",pmText] forKey:@"pmNum"]; - type = 1; - } - if ([amText integerValue] > 0 && [pmText intValue] > 0) { - type = 2; - } - [dic setObject:[NSString stringWithFormat:@"%@",weekID] forKey:@"id"]; - [dic setObject:@(type) forKey:@"type"]; - [dic setObject:week forKey:@"week"]; - [dic setObject:@(self.isJump) forKey:@"tfJumpHoliday"]; - [dic setObject:@(self.isVideo) forKey:@"audioStatus"]; - - } - YXWorkTimeModel * model = [YXWorkTimeModel modelWithDictionary:dic]; - NSString * jsonString = [model modelToJSONObject]; - return jsonString; -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - if ([tag isEqualToString:@"WorkAPI"]) { - [self hiddenAllMBProgressHUD]; - [self showMBProgressHUDOnlyWithString:response]; - } - if ([tag isEqualToString:@"WEEKAPI"]) { - - NSDictionary * resDic = response; - - YXWorkSettingModel * model = [YXWorkSettingModel modelWithDictionary:resDic]; - - [self.jumpSwithch setOn:[model.tfJumpHoliday boolValue] animated:YES]; - [self.rightSlider setOn:[model.audioStatus boolValue] animated:YES]; - - [self switchChange:self.rightSlider]; - self.peopleArray = model.list; - for (YXWorkTimeModel * timeModel in model.list) { - - //周一 - [self haveDoctorWorkTime:timeModel]; - - } - } - - -} - -- (void)haveDoctorWorkTime:(YXWorkTimeModel *)timeModel { - - if ([timeModel.week intValue] == 1) { - self.oneID = timeModel.work_id; - UITextField * oneAmField = [self.view viewWithTag:100]; - UITextField * onePmField = [self.view viewWithTag:200]; - oneAmField.text = timeModel.amNum; - onePmField.text = timeModel.pmNum; - } - if ([timeModel.week intValue] == 2) { - self.twoID = timeModel.work_id; - UITextField * twoAmField = [self.view viewWithTag:101]; - UITextField * twoPmField = [self.view viewWithTag:201]; - twoAmField.text = timeModel.amNum; - twoPmField.text = timeModel.pmNum; - } - if ([timeModel.week intValue] == 3) { - self.threeID = timeModel.work_id; - UITextField * threeAmField = [self.view viewWithTag:102]; - UITextField * threePmField = [self.view viewWithTag:202]; - threeAmField.text = timeModel.amNum; - threePmField.text = timeModel.pmNum; - } - if ([timeModel.week intValue] == 4) { - self.fourID = timeModel.work_id; - UITextField * fourAmField = [self.view viewWithTag:103]; - UITextField * fourPmField = [self.view viewWithTag:203]; - fourAmField.text = timeModel.amNum; - fourPmField.text = timeModel.pmNum; - } - if ([timeModel.week intValue] == 5) { - self.fiveID = timeModel.work_id; - UITextField * fiveAmField = [self.view viewWithTag:104]; - UITextField * fivePmField = [self.view viewWithTag:204]; - fiveAmField.text = timeModel.amNum; - fivePmField.text = timeModel.pmNum; - } - if ([timeModel.week intValue] == 6) { - self.sixID = timeModel.work_id; - UITextField * sixAmField = [self.view viewWithTag:105]; - UITextField * sixPmField = [self.view viewWithTag:205]; - sixAmField.text = timeModel.amNum; - sixPmField.text = timeModel.pmNum; - } - if ([timeModel.week intValue] == 7) { - self.sevenID = timeModel.work_id; - UITextField * sevenAmField = [self.view viewWithTag:106]; - UITextField * sevenPmField = [self.view viewWithTag:206]; - sevenAmField.text = timeModel.amNum; - sevenPmField.text = timeModel.pmNum; - } - - -} - -- (void)customAction { - - YXCustomSchedulingViewController * customvc = [[YXCustomSchedulingViewController alloc] init]; - - [self.navigationController pushViewController:customvc animated:YES]; - -} - - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/DoctorInfoModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/DoctorInfoModel.h deleted file mode 100644 index c858182..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/DoctorInfoModel.h +++ /dev/null @@ -1,74 +0,0 @@ -// -// YXDoctorInfoModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/4. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - - - -@interface YXDoctorGoodSicknessModel : NSObject - -@property (nonatomic, copy) NSString * sicks_id; - -@property (nonatomic, copy) NSString * sicksName; - -@end - - -@interface YXDoctorInfoModel : NSObject - -@property (nonatomic, copy) NSString * doctor_Id; - -@property (nonatomic, copy) NSString * sex; - -@property (nonatomic, strong) NSArray * goodAtSicknessName; - -@property (nonatomic, copy) NSString * doctorJob_dictText; - -@property (nonatomic, copy) NSString * doctorName; - -@property (nonatomic, copy) NSString * photo; - -@property (nonatomic, copy) NSString * doctorTitle; - -@property (nonatomic, copy) NSString * doctorStatus_dictText; - -@property (nonatomic, copy) NSString * resourceName; - -@property (nonatomic, copy) NSString * goodAtSymptom; - -@property (nonatomic, copy) NSString * departmentName; - -@property (nonatomic, copy) NSString * introduction; - -@property (nonatomic, copy) NSString * goodAt; - -@property (nonatomic, copy) NSString * userScore; - -@property (nonatomic, copy) NSString * replyNum; - -@property (nonatomic, copy) NSString * tfShowFire; - -@property (nonatomic, copy) NSString * audioVideo; - -@property (nonatomic, copy) NSString * audioStatus; - -@property (nonatomic, copy) NSString * status; - -@property (nonatomic, copy) NSString * resourceId; - -@property (nonatomic, copy) NSString * experience; - -@property (nonatomic, copy) NSString * doctorStatus; - -@property (nonatomic, copy) NSString * departmentId; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/QuestionStaticsModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/QuestionStaticsModel.h deleted file mode 100644 index c827962..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/QuestionStaticsModel.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// YXQuestionStaticsModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXQuestionStaticsModel : NSObject - - -@property (nonatomic, copy) NSString * total; -@property (nonatomic, copy) NSString * content_type; -@property (nonatomic, copy) NSString * inProgress; -@property (nonatomic, copy) NSString * completed; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXCancelReasonModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXCancelReasonModel.h deleted file mode 100644 index ae04411..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXCancelReasonModel.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// YXCancelReasonModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/17. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXCancelReasonModel : NSObject - -@property (nonatomic, strong) NSString * value; -@property (nonatomic, strong) NSString * text; -@property (nonatomic, strong) NSString * label; -@property (nonatomic, strong) NSString * title; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXDoctorInfoModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXDoctorInfoModel.m deleted file mode 100644 index 7200dce..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXDoctorInfoModel.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// YXDoctorInfoModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/4. -// - -#import "YXDoctorInfoModel.h" - - -@implementation YXDoctorGoodSicknessModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"sicks_id" :@"id"}; - return dic; -} - - -@end - -@implementation YXDoctorInfoModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"doctor_Id" :@"id"}; - return dic; -} - - - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - - return @{@"goodAtSicknessName":[YXDoctorGoodSicknessModel class], - }; - -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.h deleted file mode 100644 index 63ccae6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// YXHomePageModel.h -// healthQuestion -// -// Created by 仁康信息 on 2022/9/9. -// - -#import -NS_ASSUME_NONNULL_BEGIN - -@interface YXHomePageModel : NSObject - -@property (nonatomic, copy) NSString * imageName; - -@property (nonatomic, copy) NSString * projectName; - -@end - - -@interface YXProjectModel : NSObject - -@property (nonatomic, copy) NSString * imageName; - -@property (nonatomic, copy) NSString * projectName; - -@property (nonatomic, copy) NSString * price; - -@property (nonatomic, assign) BOOL isSelected; - -@end - - -@interface YXZJSmallHelpModel : NSObject - -@property (nonatomic, copy) NSString * groupId; - -@property (nonatomic, strong) NSArray * member; - -@property (nonatomic, copy) NSString * userId; - -@property (nonatomic, copy) NSString * tfNew; - -@property (nonatomic, copy) NSString * help_Id; - -@end - - - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.m deleted file mode 100644 index d52734d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHomePageModel.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// YXHomePageModel.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/9. -// - -#import "YXHomePageModel.h" - -@implementation YXHomePageModel - -@end - - - -@implementation YXProjectModel - -@end - - -@implementation YXZJSmallHelpModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"help_Id" :@"id"}; - return dic; -} - -@end - - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.h deleted file mode 100644 index 5fde1d7..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// YXHospitalModel.h -// healthQuestion -// -// Created by 仁康信息 on 2022/9/19. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXHospitalModel : NSObject - -@property (nonatomic, copy) NSString * hospitalName; - -@property (nonatomic, copy) NSString * hospitalImage; - -@property (nonatomic, copy) NSString * hospitalId; - -@property (nonatomic, assign) BOOL isChoose; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.m deleted file mode 100644 index f7c8207..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXHospitalModel.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// YXHospitalModel.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/19. -// - -#import "YXHospitalModel.h" - -@implementation YXHospitalModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"hospitalId" :@"id"}; - return dic; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.h deleted file mode 100644 index 2053776..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// YXProjectListModel.h -// healthQuestion -// -// Created by 仁康信息 on 2022/10/12. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXSubProjectListModel : NSObject - -@property (nonatomic, copy) NSString * imageName; - -@property (nonatomic, copy) NSString * projectName; - -@end - -@interface YXProjectListModel : NSObject - -@property (nonatomic, assign) BOOL isShow; - -@property (nonatomic, assign) BOOL isSelected; - -@property (nonatomic, copy) NSString * projectName; - -@property (nonatomic, strong) NSArray* subData; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.m deleted file mode 100644 index a5f17ec..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXProjectListModel.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// YXProjectListModel.m -// healthQuestion -// -// Created by 仁康信息 on 2022/10/12. -// - -#import "YXProjectListModel.h" - -@implementation YXSubProjectListModel - -@end - - - -@implementation YXProjectListModel - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - - return @{@"subData":[YXSubProjectListModel class], - }; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionBodyReportModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionBodyReportModel.h deleted file mode 100644 index 1261807..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionBodyReportModel.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// YXQuestionBodyReportModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/16. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXQuestionBodyReportModel : NSObject - -@property (nonatomic, strong) NSString * insertdate; -@property (nonatomic, strong) NSString * tjrq; -@property (nonatomic, strong) NSString * name; -@property (nonatomic, strong) NSString * yymc; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.h deleted file mode 100644 index 34d7327..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// YXQuestionRecordModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/15. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXQuestionRecordModel : NSObject - -@property (nonatomic, copy) NSString * record_id; -@property (nonatomic, copy) NSString * memberId; -@property (nonatomic, copy) NSString * toAccount; -@property (nonatomic, copy) NSString * memberName; -@property (nonatomic, copy) NSString * memberSex; -@property (nonatomic, copy) NSString * memberAge; -@property (nonatomic, copy) NSString * imId; -@property (nonatomic, copy) NSString * image; -@property (nonatomic, copy) NSString * rejectReason; -@property (nonatomic, copy) NSString * doctorStartTime; -@property (nonatomic, copy) NSString * doctorEndTime; -@property (nonatomic, copy) NSString * contentStatus; -@property (nonatomic, copy) NSString * contentType; -@property (nonatomic, copy) NSString * medicalRecordsId; -@property (nonatomic, copy) NSString * schedulingDateId; -@property (nonatomic, copy) NSString * createTime; -@property (nonatomic, copy) NSString * sessionDate; -@property (nonatomic, copy) NSString * week; -@property (nonatomic, copy) NSString * amPm; -@property (nonatomic, copy) NSString * reasonType; -@property (nonatomic, copy) NSString * toAccountHead; -@property (nonatomic, copy) NSString * toAccountTitle; -@property (nonatomic, copy) NSString * departmentName; -@property (nonatomic, copy) NSString * hospitalLevel; -@property (nonatomic, copy) NSString * toAccountName; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.m deleted file mode 100644 index 8fcc0b6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXQuestionRecordModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// YXQuestionRecordModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/15. -// - -#import "YXQuestionRecordModel.h" - -@implementation YXQuestionRecordModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"record_id" :@"id"}; - return dic; -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.h deleted file mode 100644 index 53ed1d1..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// RecordIMListDateModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/15. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXRecordIMListDateModel : NSObject -@property (nonatomic, strong) NSString * Record_id; -@property (nonatomic, strong) NSString * rejectReason; -@property (nonatomic, strong) NSString * fromAccount; -@property (nonatomic, strong) NSString * memberName; -@property (nonatomic, strong) NSString * hospitalLevel; -@property (nonatomic, strong) NSString * contentStatus; -@property (nonatomic, strong) NSString * schedulingDateId; -@property (nonatomic, strong) NSString * amPm; -@property (nonatomic, strong) NSString * toAccountName; -@property (nonatomic, strong) NSString * memberSex; -@property (nonatomic, strong) NSString * contentType; -@property (nonatomic, strong) NSString * reasonType; - -@property (nonatomic, strong) NSString * week; -@property (nonatomic, strong) NSString * toAccount; -@property (nonatomic, strong) NSString * sessionType; -@property (nonatomic, strong) NSString * medicalRecordsId; -@property (nonatomic, strong) NSString * toAccountHead; -@property (nonatomic, strong) NSString * toAccountTitle; -@property (nonatomic, strong) NSString * createTimeLong; -@property (nonatomic, strong) NSString * tfOwn; -@property (nonatomic, strong) NSString * memberId; - -@property (nonatomic, strong) NSString * doctorStartTime; -@property (nonatomic, strong) NSString * departmentName; -@property (nonatomic, strong) NSString * tfReply; -@property (nonatomic, strong) NSString * doctorEndTimeLong; -@property (nonatomic, strong) NSString * sessionDate; -@property (nonatomic, strong) NSString * imId; -@property (nonatomic, strong) NSString * createTime; -@property (nonatomic, strong) NSString * memberAge; -@property (nonatomic, strong) NSString * resourceName; - -@property (nonatomic, strong) NSString * unRedMessage; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.m deleted file mode 100644 index a4a1677..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecordIMListDateModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// YXRecordIMListDateModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/15. -// - -#import "YXRecordIMListDateModel.h" - -@implementation YXRecordIMListDateModel - - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"Record_id" :@"id"}; - return dic; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.h deleted file mode 100644 index e62e7ab..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.h +++ /dev/null @@ -1,142 +0,0 @@ -// -// YXRecoredListDetailModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/16. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXRecoredDetailConsessionModel : NSObject - -@property (nonatomic, copy) NSString * consession_id; - -@property (nonatomic, copy) NSString * memberId; - -@property (nonatomic, copy) NSString * toAccount; - -@property (nonatomic, copy) NSString * fromAccount; - -@property (nonatomic, copy) NSString * memberName; - -@property (nonatomic, copy) NSString * memberSex; - -@property (nonatomic, copy) NSString * memberAge; - -@property (nonatomic, copy) NSString * createTime; - -@property (nonatomic, copy) NSString * sessionDate; - -@property (nonatomic, copy) NSString * week; - -@property (nonatomic, copy) NSString * amPm; - -@property (nonatomic, copy) NSString * sessionType; - -@property (nonatomic, copy) NSString * weight; - -@property (nonatomic, copy) NSString * contentStatus; - -@property (nonatomic, copy) NSString * reasonType; - -@property (nonatomic, copy) NSString * rejectReason; - -@property (nonatomic, copy) NSString * imId; - -@property (nonatomic, copy) NSString * doctorStartTimeLong; - -@property (nonatomic, copy) NSString * doctorEndTimeLong; -@property (nonatomic, copy) NSString * sessionDateLong; -@property (nonatomic, copy) NSString * contentType; -@property (nonatomic, copy) NSString * doctorStartTime; - -@end - - -@interface YXRecoredconMedicalRecordsListDO : NSObject - -@property (nonatomic, copy) NSString * dangan_id; -@property (nonatomic, copy) NSString * recordsName; -@property (nonatomic, copy) NSString * medicalDescribe; -@property (nonatomic, copy) NSString * tfPermission; -@property (nonatomic, copy) NSString * image; -@property (nonatomic, copy) NSString * createTime; -@property (nonatomic, copy) NSString * haveTimeValue; -@property (nonatomic, copy) NSString * tfLookValue; -@property (nonatomic, copy) NSString * tfLook; -@property (nonatomic, copy) NSString * desire; -@property (nonatomic, copy) NSString * lookOffice; -@property (nonatomic, copy) NSString * lookMedicalName; - -@end - -@interface YXRecoredDetailHealthModel : NSObject - -@property (nonatomic, strong) NSString * answerValue; -@property (nonatomic, strong) NSString * answerKey; - -@end - - -@interface YXRecoredDetailIMListModel : NSObject - - -@property (nonatomic, copy) NSString * endTime; - -@property (nonatomic, copy) NSString * startTime; - -@property (nonatomic, copy) NSString * endTimeLong; - -@property (nonatomic, copy) NSString * startTimLong; - -@property (nonatomic, copy) NSString * type; // 1约定时间 2通话时长 - - -@end - -@interface YXRecoredListDetailModel : NSObject - -@property (nonatomic, strong) NSArray * imList; - -@property (nonatomic, strong) NSArray * answer; - -@property (nonatomic, strong) NSDictionary * conSession; - -@property (nonatomic, strong) NSDictionary * conFamilyMembersDO; - -@property (nonatomic, strong) NSDictionary * conMedicalRecordsListDO; - -@property (nonatomic, strong) NSDictionary * conMedicalRecordsDO; - -@property (nonatomic, copy) NSString * idNo; - -@property (nonatomic, copy) NSString * conEvaluateDO; - -@property (nonatomic, copy) NSString * createTime; - -@end - - -@interface YXReocrdconFamilyMembersDO : NSObject - -@property (nonatomic, copy) NSString * name; - -@property (nonatomic, copy) NSString * gender; - -@property (nonatomic, copy) NSString * height; - -@property (nonatomic, copy) NSString * weight; - -@property (nonatomic, copy) NSString * familyRelation; - -@property (nonatomic, copy) NSString * groupId; - -@property (nonatomic, copy) NSString * age; - -@property (nonatomic, copy) NSString * family_id; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.m deleted file mode 100644 index 09a6c48..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXRecoredListDetailModel.m +++ /dev/null @@ -1,86 +0,0 @@ -// -// YXRecoredListDetailModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/16. -// - -#import "YXRecoredListDetailModel.h" - -@implementation YXRecoredDetailConsessionModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"consession_id" :@"id"}; - return dic; -} - -@end -// -@implementation YXRecoredconMedicalRecordsListDO - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"dangan_id" :@"id"}; - return dic; -} - - -@end - - -@implementation YXRecoredDetailHealthModel - -//+ (NSDictionary *)modelContainerPropertyGenericClass -//{ -// -// return @{ -// @"childList":[QuestionOptionChildListModel class], -// -// }; -//} -// -//+ (NSDictionary *)modelCustomPropertyMapper -//{ -// NSDictionary * dic =@{@"option_id" :@"id"}; -// return dic; -//} - -@end - - -@implementation YXRecoredDetailIMListModel - - - -@end - - -@implementation YXRecoredListDetailModel - - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - - return @{@"imList":[YXRecoredDetailIMListModel class], - @"answer":[YXRecoredDetailHealthModel class], - }; - -} -@end - -@implementation YXReocrdconFamilyMembersDO - - - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"family_id" :@"id"}; - return dic; -} - - -@end - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopReasonModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopReasonModel.h deleted file mode 100644 index eb1f092..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopReasonModel.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// YXStopReasonModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/9. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXStopReasonModel : NSObject - -@property (nonatomic, copy) NSString * value; - -@property (nonatomic, copy) NSString * label; - -@property (nonatomic, copy) NSString * title; - -@property (nonatomic, copy) NSString * text; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.h deleted file mode 100644 index 6247a36..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// YXStopServiceModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/9. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXStopServiceListModel : NSObject - -@property (nonatomic, copy) NSString * record_id; - -@property (nonatomic, copy) NSString * notice; - -@property (nonatomic, assign) NSInteger delFlag; - - -@property (nonatomic, copy) NSString * createBy; - -@property (nonatomic, copy) NSString * startDay; - -@property (nonatomic, copy) NSString * endDay; - -@property (nonatomic, copy) NSString * stopReason; - -@property (nonatomic, copy) NSString * doctorId; - -@property (nonatomic, copy) NSString * createTime; - -@property (nonatomic, assign) NSInteger serviceStatus; - -@property (nonatomic, assign) NSInteger status; - -@end - -@interface YXStopServiceModel : NSObject - -@property (nonatomic, strong) NSArray * orders; - -@property (nonatomic, assign) NSInteger pages; - -@property (nonatomic, assign) NSInteger current; - -@property (nonatomic, assign) NSInteger total; - -@property (nonatomic, strong) NSArray * records; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.m deleted file mode 100644 index 887daba..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXStopServiceModel.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// YXStopServiceModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/9. -// - -#import "YXStopServiceModel.h" - -@implementation YXStopServiceListModel - - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"record_id" :@"id"}; - return dic; -} - - -@end - -@implementation YXStopServiceModel - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - - return @{@"records":[YXStopServiceListModel class], - }; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.h deleted file mode 100644 index 0ae7652..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// YXToolsModel.h -// healthQuestion -// -// Created by 仁康信息 on 2022/9/28. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXToolsModel : NSObject - -/** - * 标题 - */ -@property (nonatomic, copy) NSString *title; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.m deleted file mode 100644 index 3ad9500..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXToolsModel.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// YXToolsModel.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/28. -// - -#import "YXToolsModel.h" - -@implementation YXToolsModel - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.h deleted file mode 100644 index 5ca3635..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// YXWorkSettingModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/7. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXWorkTimeModel : NSObject - -@property (nonatomic, copy) NSString * amNum; - -@property (nonatomic, copy) NSString * pmNum; - -@property (nonatomic, copy) NSString * week; - -@property (nonatomic, copy) NSString * checked; - -@property (nonatomic, copy) NSString * consultSwitchOn; - -@property (nonatomic, copy) NSString * itemType; - -@property (nonatomic, copy) NSString * tfDefault; - -@property (nonatomic, copy) NSString * tfJumpHoliday; - -@property (nonatomic, copy) NSString * type; - -@property (nonatomic, copy) NSString * timePeriod; - -@property (nonatomic, copy) NSString * work_id; - -@end - -@interface YXWorkSettingModel : NSObject - -@property (nonatomic, copy) NSString * tfDefault; - -@property (nonatomic, copy) NSString * audioStatus; - -@property (nonatomic, copy) NSString * tfJumpHoliday; - -@property (nonatomic, strong) NSArray * list; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.m deleted file mode 100644 index d8df593..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXWorkSettingModel.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// YXWorkSettingModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/7. -// - -#import "YXWorkSettingModel.h" - - -@implementation YXWorkTimeModel - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"work_id" :@"id"}; - return dic; -} - - -@end - -@implementation YXWorkSettingModel - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - - return @{@"list":[YXWorkTimeModel class], - }; - -} - - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.h deleted file mode 100644 index 7652421..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// withDrawDetailModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/18. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXwithDrawDetailModel : NSObject - -@property (nonatomic, copy) NSString * wraw_Id; -@property (nonatomic, copy) NSString * sessionId; -@property (nonatomic, copy) NSString * userId; -@property (nonatomic, copy) NSString * userName; -@property (nonatomic, copy) NSString * operateType;//操作类型1图文咨询2视频咨询3电话咨询4通讯费5提现 操作类型0收益1图文咨询2视频咨询3电话咨询4通讯费5提现 -@property (nonatomic, copy) NSString * operateId; -@property (nonatomic, copy) NSString * operateName; -@property (nonatomic, copy) NSString * incomeTime; -@property (nonatomic, copy) NSString * withdrawalName; -@property (nonatomic, copy) NSString * remarks; -@property (nonatomic, copy) NSString * withdraw; -@property (nonatomic, copy) NSString * paymentAccount; -@property (nonatomic, copy) NSString * paymentName; -@property (nonatomic, copy) NSString * paymentMoney; -@property (nonatomic, copy) NSString * realityMoney; -@property (nonatomic, copy) NSString * accountMoney; -@property (nonatomic, copy) NSString * paymentTime; -@property (nonatomic, copy) NSString * charDate; -@property (nonatomic, assign) NSInteger status;//状态(1-正常,2-冻结) -@property (nonatomic, assign) NSInteger delFlag; -@property (nonatomic, copy) NSString * createBy; - -@property (nonatomic, copy) NSString * createTime; -@property (nonatomic, copy) NSString * updateBy; -@property (nonatomic, copy) NSString * updateTime; -@property (nonatomic, copy) NSString * memo; -@property (nonatomic, copy) NSString * income;//操作类型1图文咨询2视频咨询3电话咨询4通讯费5提现 操作类型0收益1图文咨询2视频咨询3电话咨询4通讯费5提现 -@property (nonatomic, copy) NSString * sumIncome; -@property (nonatomic, copy) NSString * sumPaymentMoney; -@property (nonatomic, copy) NSString * waterType; -@property (nonatomic, copy) NSString * operateTypeName; -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.m deleted file mode 100644 index 2bd1dad..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/model/YXwithDrawDetailModel.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// withDrawDetailModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/18. -// - -#import "YXwithDrawDetailModel.h" - -@implementation YXwithDrawDetailModel - - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"wraw_Id" :@"id"}; - return dic; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.h deleted file mode 100644 index f6ffb4e..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// BasicHealthInfoView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BasicHealthInfoView : UIView - -@property (nonatomic, strong) NSArray * dataArray; - -@property (nonatomic, assign) CGFloat healthHeight; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.m deleted file mode 100644 index c29bde9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BasicHealthInfo(基本健康信息)/BasicHealthInfoView.m +++ /dev/null @@ -1,135 +0,0 @@ -// -// BasicHealthInfoView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "BasicHealthInfoView.h" -#import "YXRecoredListDetailModel.h" - -@interface BasicHealthInfoView () - -@property (nonatomic, strong) NSMutableArray * leftArray; - -@property (nonatomic, strong) NSMutableArray * rightArray; - -@property (nonatomic, strong) UILabel * lastLabel; - -@end - -@implementation BasicHealthInfoView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -- (NSMutableArray *)leftArray { - - if (!_leftArray) { - _leftArray = [[NSMutableArray alloc] init]; - } - return _leftArray; -} - -- (NSMutableArray *)rightArray { - - if (!_rightArray) { - - _rightArray = [[NSMutableArray alloc] init]; - } - return _rightArray; -} - - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - self.backgroundColor = KWhiteColor; - [self createUI]; - - } - - return self; -} - - -- (void)createUI { - - - NSArray * leftArray = @[@"饮食习惯:",@"烟酒习惯:",@"既往史:",@"家族史:",@"过敏史:",@"用药史:"]; - NSArray * rightArray = @[@"",@"",@"",@"",@"",@""]; - - for (int i = 0; i < leftArray.count; i ++) { - - - UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(20) + 47 * i, 100, 13)]; - leftLabel.text =leftArray[i]; - leftLabel.font = MEDIUMFONT(13); - leftLabel.textAlignment = NSTextAlignmentLeft; - leftLabel.textColor = UIColorHex(#666666); - CGFloat w = [HQCommonUtils getLengthFromText:leftLabel.text andFontSize:13]; - leftLabel.width = w; - [self addSubview:leftLabel]; - [self.leftArray addObject:leftLabel]; - - UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right, leftLabel.top, self.width - leftLabel.right, 13)]; - rightLabel.text =rightArray[i]; - rightLabel.font = MEDIUMFONT(13); - rightLabel.textAlignment = NSTextAlignmentLeft; - rightLabel.textColor = UIColorHex(#333333); - [self addSubview:rightLabel]; - - [self.rightArray addObject:rightLabel]; - - } - - -} - -- (void)setDataArray:(NSArray *)dataArray { - - _dataArray = dataArray; - for (UILabel * leftLabel in self.leftArray) { - [leftLabel removeFromSuperview]; - } - for (UILabel * rightLabel in self.rightArray) { - [rightLabel removeFromSuperview]; - } - [self.leftArray removeAllObjects]; - [self.rightArray removeAllObjects]; - - for (int i = 0; i < _dataArray.count; i ++) { - - YXRecoredDetailHealthModel * model = _dataArray[i]; - - UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(20) + 14 + 30 * i, 100, 13)]; - leftLabel.text = model.answerKey; - leftLabel.font = MEDIUMFONT(13); - leftLabel.textAlignment = NSTextAlignmentLeft; - leftLabel.textColor = UIColorHex(#666666); - [self addSubview:leftLabel]; - - - UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right, leftLabel.top, self.width - leftLabel.right, 13)]; - rightLabel.text = model.answerValue; - rightLabel.font = MEDIUMFONT(13); - rightLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:rightLabel]; - [self.leftArray addObject:leftLabel]; - [self.rightArray addObject:rightLabel]; - - if (i == _dataArray.count - 1) { - self.lastLabel = rightLabel; - } - } - self.healthHeight = self.lastLabel.bottom + kRealValue(20); - -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.h deleted file mode 100644 index 8b1b26f..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// BillDetailTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface BillDetailTableViewCell : UITableViewCell - -@property (nonatomic, copy) NSString * leftString; - -@property (nonatomic, copy) NSString * rightString; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.m deleted file mode 100644 index 12ec7a6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDetailTableViewCell.m +++ /dev/null @@ -1,90 +0,0 @@ -// -// BillDetailTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import "BillDetailTableViewCell.h" - -@interface BillDetailTableViewCell () - -@property (nonatomic, strong) UILabel * leftLabel; - -@property (nonatomic, strong) UILabel * rightLabel; - -@end - -@implementation BillDetailTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - [self createUI]; - - } - return self; -} - -- (void)createUI { - - self.leftLabel = [[UILabel alloc] init]; - self.leftLabel.textColor = UIColorHex(#666666); - self.leftLabel.font = BOLDSYSTEMFONT(14); - self.leftLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.leftLabel]; - - [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.top.mas_offset(kRealValue(30)); - make.height.mas_offset(13); - }]; - [self.leftLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.rightLabel = [[UILabel alloc] init]; - self.rightLabel.textColor = UIColorHex(#333333); - self.rightLabel.font = BOLDSYSTEMFONT(13); - self.rightLabel.numberOfLines = 0; - self.rightLabel.textAlignment = NSTextAlignmentRight; - [self.contentView addSubview:self.rightLabel]; - - [self layoutIfNeeded]; - [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_offset(-18); - make.left.mas_equalTo(self.leftLabel.mas_right).offset(8); - make.top.mas_equalTo(self.leftLabel); - make.bottom.mas_offset(-5); - }]; - [self.rightLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - -} - -- (void)setLeftString:(NSString *)leftString { - _leftString = leftString; - - self.leftLabel.text = _leftString; - -} - -- (void)setRightString:(NSString *)rightString { - - _rightString = rightString; - - self.rightLabel.text = rightString; - -} - -@end - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.h deleted file mode 100644 index f93a57a..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// BillDtailTable.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import -#import "YXwithDrawDetailModel.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface BillDtailTable : UITableView - -@property (nonatomic, strong) NSDictionary * dic; - -@property (nonatomic, strong) YXwithDrawDetailModel * model; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.m deleted file mode 100644 index e390412..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillDtailTable.m +++ /dev/null @@ -1,126 +0,0 @@ -// -// BillDtailTable.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import "BillDtailTable.h" -#import "BillDetailTableViewCell.h" - -@interface BillDtailTable () - -@end - -@implementation BillDtailTable - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.whiteColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone; - self.estimatedRowHeight = 60; - self.rowHeight = UITableViewAutomaticDimension; - - - -} - -- (void)setModel:(YXwithDrawDetailModel *)model { - - _model = model; - [self reloadData]; - -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 9; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - NSArray * array; - - - BillDetailTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"BILLCELL"]; - - if (!cell) { - - cell = [[BillDetailTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BILLCELL"]; - } - if (self.model) { - array = @[@[@"流水号:",[NSString stringWithFormat:@"%@",self.model.wraw_Id] ],@[@"提现方:",self.model.withdrawalName],@[@"提现方式:",self.model.withdraw],@[@"收款账号:",self.model.paymentAccount],@[@"提现金额:",[NSString stringWithFormat:@"%@",self.model.paymentMoney]],@[@"实际到账金额:",[NSString stringWithFormat:@"%@",self.model.realityMoney]],@[@"提现说明:",self.model.remarks],@[@"账户金额:",[NSString stringWithFormat:@"%@",self.model.accountMoney]],@[@"提现时间",[NSString stringWithFormat:@"%@",self.model.paymentTime]]]; - cell.leftString= array[indexPath.row][0]; - cell.rightString= array[indexPath.row][1]; - } - - cell.backgroundColor = KWhiteColor; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - - UIView * videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(10))]; - - return videoView; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - - -} - - -@end - - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.h deleted file mode 100644 index 5b200f9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// BillListTable.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^lookBillDetail)(NSString * billString); - -@interface BillListTable : UITableView - -@property (nonatomic, strong) NSArray * dataArray; - -@property (nonatomic, copy) lookBillDetail detailBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.m deleted file mode 100644 index 36e6aa7..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTable.m +++ /dev/null @@ -1,125 +0,0 @@ -// -// BillListTable.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import "BillListTable.h" -#import "BillListTableViewCell.h" - - -@interface BillListTable () - -@end - -@implementation BillListTable - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.clearColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone; - self.estimatedRowHeight = 60; - self.rowHeight = UITableViewAutomaticDimension; - - - -} - -- (void)setDataArray:(NSArray *)dataArray { - - _dataArray = dataArray; - - [self reloadData]; -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return self.dataArray.count; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 1; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - BillListTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"BILLCELL"]; - - if (!cell) { - - cell = [[BillListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BILLCELL"]; - } - cell.backgroundColor = KWhiteColor; - cell.layer.cornerRadius = 10.0; - cell.layer.masksToBounds = true; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - cell.model = self.dataArray[indexPath.section]; - return cell; - -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return kRealValue(10); -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - - UIView * videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(10))]; - - return videoView; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - YXBillListDetailModel * model = self.dataArray[indexPath.section]; - - if (self.detailBlock) { - - self.detailBlock(model.bill_id); - } - -} - - -@end - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.h deleted file mode 100644 index 88a0dae..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// BillListTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import -#import "YXBillListModel.h" -NS_ASSUME_NONNULL_BEGIN - -@interface BillListTableViewCell : UITableViewCell - -@property (nonatomic, strong) YXBillListDetailModel * model; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.m deleted file mode 100644 index ab3b6b9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/BillDetailView(账单详情)/BillListTableViewCell.m +++ /dev/null @@ -1,115 +0,0 @@ -// -// BillListTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/5. -// - -#import "BillListTableViewCell.h" - -@interface BillListTableViewCell () - -@property (nonatomic, strong) UILabel * typeLabel; - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UILabel * moneyLabel; - -@property (nonatomic, strong) UILabel * billLabel; - -@end - -@implementation BillListTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - - self.typeLabel = [[UILabel alloc] init]; - self.typeLabel.text = @""; - self.typeLabel.textColor = CFontColor1; - self.typeLabel.font = BOLDSYSTEMFONT(14); - self.typeLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.typeLabel]; - - [self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(18); - make.top.mas_offset(15); - make.height.mas_offset(14); - make.width.mas_offset(90); - }]; - - self.moneyLabel = [[UILabel alloc] init]; - self.moneyLabel.text = @""; - self.moneyLabel.textColor = UIColorHex(#21BEBD); - self.moneyLabel.font = BOLDSYSTEMFONT(16); - self.moneyLabel.textAlignment = NSTextAlignmentRight; - [self.contentView addSubview:self.moneyLabel]; - - [self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_offset(-18); - make.top.mas_offset(19); - make.height.mas_offset(13); - make.width.mas_offset(200); - }]; - - self.timeLabel = [[UILabel alloc] init]; - - self.timeLabel.textColor = UIColorHex(#999999); - self.timeLabel.font = BOLDSYSTEMFONT(12); - self.timeLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.timeLabel]; - - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(18); - make.top.mas_equalTo(self.typeLabel.mas_bottom).offset(10); - make.height.mas_offset(13); - make.bottom.mas_offset(-16); - }]; - [self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.billLabel = [[UILabel alloc] init]; - - self.billLabel.textColor = UIColorHex(#333333); - self.billLabel.font = MEDIUMFONT(12); - self.billLabel.textAlignment = NSTextAlignmentRight; - [self.contentView addSubview:self.billLabel]; - - [self.billLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_offset(-18); - make.top.mas_equalTo(self.typeLabel.mas_bottom).offset(10); - make.height.mas_offset(13); - make.bottom.mas_offset(-16); - }]; - [self.billLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; -} - -- (void)setModel:(YXBillListDetailModel *)model { - - _model = model; - self.typeLabel.text = _model.operateType_dictText; - self.moneyLabel.text = [NSString stringWithFormat:@"%.2f",[_model.income floatValue]]; - self.timeLabel.text = _model.createTime; - self.billLabel.text = [NSString stringWithFormat:@"余额:%.2f",[_model.accountMoney floatValue]]; -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailTitleView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailTitleView.m deleted file mode 100644 index 1541542..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailTitleView.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// DetailTitleView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/27. -// - -#import "DetailTitleView.h" - -@interface DetailTitleView () - -@property (nonatomic, strong) UILabel * timeLabel; - -@end - -@implementation DetailTitleView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - - UIImageView * headImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, 33)]; - headImg.image = IMAGE_NAMED(@"userinfoTitleImg"); - [self addSubview:headImg]; - - UIImageView * leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(16), 10, 15, 15)]; - leftImg.image = IMAGE_NAMED(@"questionLeft_icon"); - [headImg addSubview:leftImg]; - - UILabel * titleLabel = [[UILabel alloc] init]; - titleLabel.frame = CGRectMake(leftImg.right + kRealValue(7),10 , 80, 14); - titleLabel.textAlignment = NSTextAlignmentLeft; - titleLabel.text = @"咨询人信息"; - titleLabel.font = BOLDSYSTEMFONT(14); - [self addSubview:titleLabel]; - - self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake( headImg.width/2 - kRealValue(10) , 8 , headImg.width/2 -kRealValue(10) , 15)]; - self.timeLabel.text = @"--"; - self.timeLabel.font = SYSTEMFONT(10); - self.timeLabel.textAlignment = NSTextAlignmentRight; - self.timeLabel.textColor = KWhiteColor; - [headImg addSubview:self.timeLabel]; - -} - -- (void)setCreateTime:(NSString *)createTime { - _createTime = createTime; - self.timeLabel.text = [NSString stringWithFormat:@"生成时间:%@",_createTime]; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailUserInfoView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailUserInfoView.m deleted file mode 100644 index 973ac5a..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/DetailUserInfoView.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// DetailUserInfoView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/27. -// - -#import "DetailUserInfoView.h" - -@interface DetailUserInfoView () - - -@end - -@implementation DetailUserInfoView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - - } - - return self; - -} - -- (void)createUI { - - - //一行的列数 - NSInteger cols = 3; - //label大小 - CGFloat labW = (self.width - kRealValue(46) ) / 3 ; - CGFloat labH = 13; - CGFloat pading = 0; - //每一行的间距 - CGFloat rowMargin = kRealValue(20); - for (int i = 0; i < 5; i ++) { - //所在列 - NSInteger col = i % cols; - //所在行 - NSInteger row = i / cols; - - CGFloat shopX = col * (labW ); - CGFloat shopY = row * (labH + rowMargin); - UILabel * nameLabel = [[UILabel alloc] init]; - nameLabel.frame = CGRectMake( kRealValue(18) + shopX,kRealValue(23) + shopY, labW, labH); - nameLabel.textAlignment = NSTextAlignmentLeft; - nameLabel.text = @""; - nameLabel.font = SYSTEMFONT(13); - nameLabel.tag = 100 + i; - [self addSubview:nameLabel]; - - } - UIView * lineV = [[UIView alloc] initWithFrame:CGRectMake(0, self.height, self.width, 1)]; - lineV.backgroundColor = UIColorHex(#E0E0E0); - [self addSubview:lineV]; -} - -- (void)setUserInfo:(YXReocrdconFamilyMembersDO *)userInfo { - - _userInfo = userInfo; - - UILabel * nameLabel = [self viewWithTag:100]; - - nameLabel.text = [NSString stringWithFormat:@"姓名:%@",_userInfo.name]; - - NSString * sexString = [_userInfo.gender integerValue] == 1 ? @"女":@"男"; - - UILabel * sexLabel = [self viewWithTag:101]; - - sexLabel.text = [NSString stringWithFormat:@"性别:%@",sexString]; - - UILabel * ageLabel = [self viewWithTag:102]; - - ageLabel.text = [NSString stringWithFormat:@"年龄:%@",_userInfo.age]; - - - UILabel * shengaoLabel = [self viewWithTag:103]; - - NSString * heightString ; - if (ValidStr(_userInfo.height)) { - heightString = @"--"; - } - else - { - heightString = _userInfo.height; - } - shengaoLabel.text = [NSString stringWithFormat:@"身高:%@cm",heightString]; - - NSString * weightString ; - if (ValidStr(_userInfo.height)) { - weightString = @"--"; - } - else - { - weightString = _userInfo.weight; - } - UILabel * weightLabel = [self viewWithTag:104]; - - weightLabel.text = [NSString stringWithFormat:@"体重:%@kg",weightString]; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.h deleted file mode 100644 index 2f135db..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// QuestionAppointmentTimeView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/27. -// - -#import -#import "YXRecoredListDetailModel.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface QuestionAppointmentTimeView : UIView - -//@property (nonatomic, assign) BOOL ishide; -// -//@property (nonatomic, strong) YXRecoredListDetailModel * model; -// -//@property (nonatomic, strong) NSArray * imList; -// -//@property (nonatomic, assign) CGFloat timeHeight; -//@property (nonatomic, strong) DoctorReportDoctorInfoModel * doctorModel; -//@property (nonatomic, strong) DoctorReportConSessionModel * sessionModel; -@property (nonatomic, strong) YXRecoredListDetailModel * model; - -@property (nonatomic, assign) CGFloat doctorinfoHeight; - -@property (nonatomic, assign) bool isJujue; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.m deleted file mode 100644 index c30adc5..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionAppointmentTimeView.m +++ /dev/null @@ -1,401 +0,0 @@ -// -// QuestionAppointmentTimeView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/27. -// - -#import "QuestionAppointmentTimeView.h" -#import "NSDate+BRPickerView.h" -@interface QuestionAppointmentTimeView () - -@property (nonatomic, strong) NSMutableArray * labsArray; - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UILabel * questionTypeLabel; - -@property (nonatomic, strong) UILabel * starTimeLabel; - -@property (nonatomic, strong) UIButton * collectBtn; - -@property (nonatomic, strong) UIView * starTimeView ; //开始时间视图 -@property (nonatomic, strong) UIView * jujueView ; //拒绝视图 -@property (nonatomic, strong) UIView * cancelQuestionView ; //取消视图 -@property (nonatomic, strong) UIView * questionRecordView ; //咨询记录 - - -@property (nonatomic, strong) UILabel * jujueyuanyinLab ; //拒绝原因 -@property (nonatomic, strong) UILabel * jujueBeizhuLab ; //拒绝备注 -@property (nonatomic, strong) UILabel * beizhuLabel ; //拒绝备注 -@property (nonatomic, strong) UILabel * cancelTimeLabel ; //取消时间 -@property (nonatomic, strong) UILabel * recordStarLabel ; //取消时间 - -@end - -@implementation QuestionAppointmentTimeView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -#pragma mark:懒加载 -- (NSMutableArray *)labsArray { - - if (!_labsArray) { - - _labsArray = [[NSMutableArray alloc] init]; - } - return _labsArray; -} - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - - } - - return self; -} - -- (void)createUI { - - - UIView * lineV = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, self.width - kRealValue(30), 0.1)]; - lineV.backgroundColor = UIColorHex(#E0E0E0); - [self addSubview:lineV]; - - UILabel * leftTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),lineV.bottom + kRealValue(20), 100, 14)]; - leftTimeLabel.text = @"预约时间"; - leftTimeLabel.font = MEDIUMFONT(14); - leftTimeLabel.textColor = CFontColor1; - leftTimeLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:leftTimeLabel]; - - self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width - 300 - 19,lineV.bottom + kRealValue(20), 300, 14)]; - self.timeLabel.text = @""; - self.timeLabel.font = [UIFont systemFontOfSize:13]; - self.timeLabel.textColor = CFontColor1; - self.timeLabel.textAlignment = NSTextAlignmentRight; - [self addSubview:self.timeLabel]; - - - //从这里开始不一样 - - UIView * starTimeView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.timeLabel.bottom + kRealValue(20), self.width- kRealValue(30) , 30)]; - self.starTimeView = starTimeView; - starTimeView.hidden = YES; - [self addSubview:starTimeView]; - - UILabel * starLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(14), 100, 14)]; - starLabel.text = @"开始时间"; - starLabel.font = MEDIUMFONT(14); - starLabel.textColor = CFontColor1; - starLabel.textAlignment = NSTextAlignmentLeft; - [starTimeView addSubview:starLabel]; - - self.starTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(starTimeView.width - 300 , kRealValue(14), 300, 14)]; - self.starTimeLabel.text = @""; - self.starTimeLabel.font = [UIFont systemFontOfSize:13];; - self.starTimeLabel.textColor = CFontColor1; - self.starTimeLabel.textAlignment = NSTextAlignmentRight; - [starTimeView addSubview:self.starTimeLabel]; - starTimeView.height = starLabel.bottom + kRealValue(10); - self.starTimeView.hidden = YES; - // 1 拒绝 - - UIView * jujueView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.timeLabel.bottom + kRealValue(20), self.width - kRealValue(30), 30)]; - self.jujueView = jujueView; - jujueView.hidden = true; - [self addSubview:jujueView]; - - UILabel * jujueLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0, 100, 14)]; - jujueLabel.text = @"拒绝原因"; - jujueLabel.font = MEDIUMFONT(14); - jujueLabel.textColor = CFontColor1; - jujueLabel.textAlignment = NSTextAlignmentLeft; - [jujueView addSubview:jujueLabel]; - - UILabel * jujueyuanyinLab = [[UILabel alloc] initWithFrame:CGRectMake(jujueLabel.right + 10, 0, jujueView.width - 100 -15 , 15)]; - jujueyuanyinLab.text = @""; - jujueyuanyinLab.font = [UIFont systemFontOfSize:13]; - self.jujueyuanyinLab = jujueyuanyinLab; - self.jujueyuanyinLab.numberOfLines = 0; - jujueyuanyinLab.textColor = CFontColor1; - jujueyuanyinLab.textAlignment = NSTextAlignmentRight; - [jujueView addSubview:jujueyuanyinLab]; - - - UILabel * beizhuLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,jujueLabel.bottom + kRealValue(20), 100, 14)]; - beizhuLabel.text = @"拒绝备注"; - beizhuLabel.font = MEDIUMFONT(14); - beizhuLabel.textColor = CFontColor1; - beizhuLabel.textAlignment = NSTextAlignmentLeft; - self.beizhuLabel = beizhuLabel; - [jujueView addSubview:beizhuLabel]; - - self.jujueBeizhuLab = [[UILabel alloc] initWithFrame:CGRectMake(beizhuLabel.right + 10, jujueLabel.bottom + kRealValue(20), jujueView.width - 15 - jujueLabel.width, 22)]; - self.jujueBeizhuLab.text = @""; - self.jujueBeizhuLab.font = [UIFont systemFontOfSize:13]; - self.jujueBeizhuLab.numberOfLines = 0; - self.jujueBeizhuLab.textColor = CFontColor1; - self.jujueBeizhuLab.textAlignment = NSTextAlignmentRight; - [jujueView addSubview:self.jujueBeizhuLab]; -// - - // 取消 - self.cancelQuestionView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.timeLabel.bottom + kRealValue(16), self.width - kRealValue(30), 30)]; - [self addSubview:self.cancelQuestionView]; - -// UIView * cancellineType = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, self.width - kRealValue(30), 1)]; -// cancellineType.backgroundColor = UIColorHex(#E0E0E0); -// [self.cancelQuestionView addSubview:cancellineType]; - - UILabel * cancelStarLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,kRealValue(14), 100, 14)]; - cancelStarLabel.text = @"预计开始时间"; - cancelStarLabel.font = MEDIUMFONT(14); - cancelStarLabel.textColor = CFontColor1; - cancelStarLabel.textAlignment = NSTextAlignmentLeft; - [self.cancelQuestionView addSubview:cancelStarLabel]; - - UILabel * openLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,cancelStarLabel.bottom + kRealValue(13), 150, 12)]; - openLabel.text = @"请打开APP并保证网络流畅"; - openLabel.font = MEDIUMFONT(11); - openLabel.textColor = UIColorHex(#999999); - openLabel.textAlignment = NSTextAlignmentLeft; - [self.cancelQuestionView addSubview:openLabel]; - - self.cancelTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width - 300 - 19, kRealValue(14), 300, 22)]; - self.cancelTimeLabel.text = @""; - self.cancelTimeLabel.font = BOLDSYSTEMFONT(13); - self.cancelTimeLabel.textColor = UIColorHex(#999999); - self.cancelTimeLabel.textAlignment = NSTextAlignmentRight; - [self.cancelQuestionView addSubview:self.cancelTimeLabel]; - //中划线 - NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]}; - NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString: self.cancelTimeLabel.text attributes:attribtDic]; - // 赋值 - self.cancelTimeLabel.attributedText = attribtStr; - - self.cancelQuestionView.height = openLabel.bottom + kRealValue(10); - - //咨询记录 - - self.questionRecordView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.starTimeView.bottom + kRealValue(10), self.width - kRealValue(30), 30)]; - self.questionRecordView.backgroundColor = KWhiteColor; - [self addSubview:self.questionRecordView]; - - - UILabel * recordStarLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(14), 100, 14)]; - recordStarLabel.text = @"咨询记录"; - recordStarLabel.font = MEDIUMFONT(14); - recordStarLabel.textColor = CFontColor1; - recordStarLabel.textAlignment = NSTextAlignmentLeft; - self.recordStarLabel = recordStarLabel; - [self.questionRecordView addSubview:recordStarLabel]; - - // 赋值 - self.questionRecordView.height = recordStarLabel.bottom + kRealValue(10); - - - - self.doctorinfoHeight = self.cancelQuestionView.bottom + kRealValue(15); -} - - -- (void)setModel:(YXRecoredListDetailModel *)model { - _model = model; - - - YXRecoredDetailConsessionModel * sessionModel = [YXRecoredDetailConsessionModel modelWithDictionary:_model.conSession]; - - - //状态数据 - NSString * timeString = [HQCommonUtils getTimeFromTimestamp:[sessionModel.sessionDateLong integerValue] andDateFormat:@"YYYY年MM月dd日"]; - NSString * weekString; - NSArray * weekArray = @[@"周一",@"周二",@"周三",@"周四",@"周五",@"周六",@"周天"]; - NSString * amString = [sessionModel.amPm integerValue] == 1 ? @"下午":@"上午"; - if ( [sessionModel.week integerValue] >= 1) { - weekString = weekArray[[sessionModel.week integerValue] - 1]; - } - self.timeLabel.text = [NSString stringWithFormat:@"%@ %@ %@",timeString,weekString,amString]; - - - - //预约状态 1待确认 2待开始 3已开始 4待评价 5已完成 - // 6 拒绝 7取消 8 超时 - if ( [sessionModel.contentStatus integerValue] == 6) { //拒绝 - - self.jujueView.hidden = false; - self.starTimeView.hidden = true; - self.cancelQuestionView.hidden = true; - self.jujueyuanyinLab.text = sessionModel.reasonType; - self.jujueBeizhuLab.text = sessionModel.rejectReason; - CGFloat labH = [HQCommonUtils getSpaceLabelHeight: self.jujueyuanyinLab AndLeftisTrue:false withStr:self.jujueyuanyinLab.text withFont:[UIFont systemFontOfSize:14] withWidth: self.jujueyuanyinLab.width withLineSpacing:2]; - - CGFloat beizhulabH = [HQCommonUtils getSpaceLabelHeight: self.jujueBeizhuLab AndLeftisTrue:false withStr:self.jujueBeizhuLab.text withFont:[UIFont systemFontOfSize:14] withWidth: self.jujueyuanyinLab.width withLineSpacing:2]; - - //布局 - self.questionRecordView.height = 0; - self.jujueView.top = self.timeLabel.bottom + kRealValue(16); - self.jujueyuanyinLab.top = 1; - self.jujueBeizhuLab.height = beizhulabH; - self.jujueBeizhuLab.top = self.jujueyuanyinLab.bottom + kRealValue(16); - self.beizhuLabel.top = self.jujueyuanyinLab.bottom + kRealValue(16); - self.jujueView.height = self.beizhuLabel.bottom+ 15; - self.questionRecordView.top = self.jujueView.bottom; - self.doctorinfoHeight = self.questionRecordView.bottom + kRealValue(12); - self.recordStarLabel.hidden = true; - -// NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]}; -// NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString: self.timeLabel.text attributes:attribtDic]; -// // 类型 - NSDictionary * typeattribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]}; - NSMutableAttributedString * typeattribtStr = [[NSMutableAttributedString alloc]initWithString: self.timeLabel.text attributes:typeattribtDic]; - self.timeLabel.attributedText = typeattribtStr; -// self.doctorinfoHeight = self.questionTypeLabel.bottom + kRealValue(15); - } - if ( [sessionModel.contentStatus integerValue] == 1 || [sessionModel.contentStatus integerValue] == 2) { //待确认 - - self.jujueView.hidden = true ; - self.starTimeView.hidden = true; - self.cancelQuestionView.hidden = true; - self.questionRecordView.hidden = YES; - if ( ValidStr(sessionModel.doctorStartTime)) { //如果医生开始时间为空 那么不显示 - - self.starTimeView.hidden = true; - }else - { - self.starTimeView.hidden = false; - self.starTimeLabel.text = [HQCommonUtils getTimeFromTimestamp:[sessionModel.sessionDateLong integerValue] andDateFormat:@"YYYY年MM月dd日 HH:mm"]; - } - - self.doctorinfoHeight = self.timeLabel.bottom + kRealValue(20); - } - if ( [sessionModel.contentStatus integerValue] == 7) { //取消 - - self.jujueView.hidden = YES; - self.starTimeView.hidden = YES; - self.cancelQuestionView.hidden = false; - self.questionRecordView.hidden = YES; - self.jujueyuanyinLab.text = sessionModel.reasonType; - CGFloat labH = [HQCommonUtils getSpaceLabelHeight: self.jujueyuanyinLab AndLeftisTrue:true withStr:self.jujueyuanyinLab.text withFont:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] withWidth: self.jujueyuanyinLab.width withLineSpacing:5]; - self.jujueyuanyinLab.height = labH; - self.jujueView.hidden = YES; - self.doctorinfoHeight = self.timeLabel.bottom + kRealValue(20); - } - if ( [sessionModel.contentStatus integerValue] == 3 || [sessionModel.contentStatus integerValue] == 4 || [sessionModel.contentStatus integerValue] == 5) { //在线咨询 - for (UILabel * currentlab in self.labsArray) { - - [currentlab removeFromSuperview]; - } - [self.labsArray removeAllObjects]; - - self.jujueView.hidden = true ; - self.starTimeView.hidden = false; - self.cancelQuestionView.hidden = true; - self.questionRecordView.hidden = false; - if ( ValidStr(sessionModel.doctorStartTime)) { //如果医生开始时间为空 那么不显示 - - self.starTimeView.hidden = true; - }else - { - self.starTimeView.hidden = false; - NSString * doctorStar = [HQCommonUtils getTimeFromTimestamp:[sessionModel.doctorStartTimeLong integerValue] andDateFormat:@"YYYY年MM月dd日 HH:mm"]; - NSString * doctorend = [HQCommonUtils getTimeFromTimestamp:[sessionModel.doctorEndTimeLong integerValue] andDateFormat:@"HH:mm"]; - - self.starTimeLabel.text = [NSString stringWithFormat:@"%@~%@",doctorStar,doctorend]; - } - - NSArray * recordArray = _model.imList; - CGFloat height = 30; - for (int i = 0 ; i < recordArray.count; i ++) { - - YXRecoredDetailIMListModel * imModel = recordArray[i]; - - - UILabel * recordLabel = [[UILabel alloc] initWithFrame:CGRectMake(14, 45 + 25 * i, self.questionRecordView.width -14, 20)]; - recordLabel.textAlignment = NSTextAlignmentLeft; - recordLabel.font = SYSTEMFONT(15); - NSString * questionType = @""; - NSString * timeString; - if (ValidStr(imModel.startTime) || ValidStr(imModel.endTime)) { - - timeString = @"时长:--"; - }else - { - timeString = [self dateTimeDifferenceWithStartTime:imModel.startTime endTime:imModel.endTime]; - } - if ([imModel.type intValue] == 2) { - questionType = @"视频咨询"; - recordLabel.text = [NSString stringWithFormat:@"%@:%@ %@",questionType,imModel.startTime,timeString]; - }else - { - questionType = @"约定时间"; - NSString * doctorStar = [HQCommonUtils getTimeFromTimestamp:[imModel.startTimLong integerValue] andDateFormat:@"YYYY-MM-dd HH:mm"]; - NSString * doctorend = [HQCommonUtils getTimeFromTimestamp:[imModel.endTimeLong integerValue] andDateFormat:@"HH:mm"]; - recordLabel.text = [NSString stringWithFormat:@"%@:%@~%@",questionType,doctorStar,doctorend]; - } - recordLabel.textColor = CFontColor1; - - - - - if (i == recordArray.count - 1) { - - height = recordLabel.bottom; - self.questionRecordView.height = kRealValue(14) + height; - } - [self.questionRecordView addSubview:recordLabel]; - [self.labsArray addObject:recordLabel]; - } - - - self.doctorinfoHeight = self.questionRecordView.bottom + kRealValue(10); - } - - -} - - --(NSString *)dateTimeDifferenceWithStartTime:(NSString *)startTime endTime:(NSString *)endTime{ - NSDateFormatter *date = [[NSDateFormatter alloc]init]; - [date setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; - NSDate *startD =[date dateFromString:startTime]; - NSDate *endD = [date dateFromString:endTime]; - NSTimeInterval start = [startD timeIntervalSince1970]*1; - NSTimeInterval end = [endD timeIntervalSince1970]*1; - NSTimeInterval value = end - start; - int second = (int)value %60;//秒 - int minute = (int)value /60%60; - int house = (int)value % (24 * 3600)/3600; - int day = (int)value / (24 * 3600); - NSString *str; - if (day != 0) { - str = [NSString stringWithFormat:@"时长:%d天%d小时%d分%d秒",day,house,minute,second]; - }else if (day==0 && house != 0) { - str = [NSString stringWithFormat:@"时长:%d小时%d分%d秒",house,minute,second]; - }else if (day== 0 && house== 0 && minute!=0) { - str = [NSString stringWithFormat:@"时长:%d分%d秒",minute,second]; - }else{ - str = [NSString stringWithFormat:@"时长:%d秒",second]; - } - - return str; -} - - -///将时间戳转为日期时间 - -/// @param timestamp 时间戳 - -/// @param dateFormat 日期样式 YYYY-MM-dd HH:mm:ss - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.h deleted file mode 100644 index 6149610..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// QuestionFileDataView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import -#import "YXRecoredListDetailModel.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^lookDetailBlock)(); - -@interface QuestionFileDataView : UIView - -@property (nonatomic, assign) CGFloat fileHeight; - -@property (nonatomic, copy) lookDetailBlock fileBlock; - -@property (nonatomic, strong) YXRecoredconMedicalRecordsListDO * model; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.m deleted file mode 100644 index 50cdd10..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionFileDataView.m +++ /dev/null @@ -1,103 +0,0 @@ -// -// QuestionFileDataView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "QuestionFileDataView.h" - -@interface QuestionFileDataView () - -@property (nonatomic, strong) UILabel * timeLabel; -@property (nonatomic, strong) UILabel * fileLabel; -@end - -@implementation QuestionFileDataView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - - return self; -} - - -- (void)createUI { - - UIView * timelineV = [[UIView alloc] initWithFrame:CGRectMake(0, 1, self.width , 1)]; - timelineV.backgroundColor = UIColorHex(#E0E0E0); - [self addSubview:timelineV]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(15), 100, 14)]; - titleLabel.text = @"档案"; - titleLabel.font = BOLDSYSTEMFONT(13); - titleLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:titleLabel]; - - UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(15), self.width - kRealValue(33), 14)]; - self.timeLabel = timeLabel; - timeLabel.text = @"生成时间:2020年05月05日 周四 上午"; - timeLabel.font = MEDIUMFONT(11); - timeLabel.textColor = UIColorHex(#999999); - timeLabel.textAlignment = NSTextAlignmentRight; - [self addSubview:timeLabel]; - - UILabel * fileLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18),titleLabel.bottom+ kRealValue(25), self.width - kRealValue(36), 34)]; - fileLabel.text = @""; - fileLabel.numberOfLines = 2; - fileLabel.font = MEDIUMFONT(13); - fileLabel.textColor = UIColorHex(#333333); - fileLabel.textAlignment = NSTextAlignmentLeft; - self.fileLabel = fileLabel; - [self addSubview:fileLabel]; - -// CGFloat fileHeight = [HQCommonUtils getSpaceLabelHeight:fileLabel withStr:fileLabel.text withFont:[UIFont systemFontOfSize:13 weight:UIFontWeightMedium] withWidth:fileLabel.width withLineSpacing:5]; -// fileLabel.height = fileHeight; - - YYLabel * detailLabel = [[YYLabel alloc] initWithFrame:CGRectMake(self.width - 100 - kRealValue(18), fileLabel.bottom + kRealValue(11), 100, 12)]; - detailLabel.text = @"查看详情 >"; - detailLabel.textColor = UIColorHex(#3390FF); - detailLabel.font = MEDIUMFONT(11); - detailLabel.textAlignment = NSTextAlignmentRight; - [self addSubview:detailLabel]; - - [detailLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - [self lookMDetail]; - }]; - - UIView * lineV = [[UIView alloc] initWithFrame:CGRectMake(0, detailLabel.bottom, kScreenWidth - kRealValue(30), 14)]; - lineV.backgroundColor = KWhiteColor; - [self addSubview:lineV]; - - self.fileHeight = lineV.bottom; -} - -- (void)lookMDetail { - - if (self.fileBlock) { - - self.fileBlock(); - } - -} - -- (void)setModel:(YXRecoredconMedicalRecordsListDO *)model { - - _model = model; - - self.fileLabel.text = [NSString stringWithFormat:@"问题描述:%@",_model.medicalDescribe] ; - self.timeLabel.text = [NSString stringWithFormat:@"更新时间:%@",_model.createTime]; - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.h deleted file mode 100644 index 12d8d9c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// QuestionHealthInfoView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface QuestionHealthInfoView : UIView - -@property (nonatomic, strong) NSArray * questionArray; - -@property (nonatomic, assign) CGFloat healthHeight; -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.m deleted file mode 100644 index c8933fd..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionHealthInfoView.m +++ /dev/null @@ -1,140 +0,0 @@ -// -// QuestionHealthInfoView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "QuestionHealthInfoView.h" -#import "YXRecoredListDetailModel.h" -@interface QuestionHealthInfoView () - -@property (nonatomic, strong) NSMutableArray * leftArray; - -@property (nonatomic, strong) NSMutableArray * rightArray; - -@property (nonatomic, strong) UILabel * lastLabel; - -@end - -@implementation QuestionHealthInfoView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ -- (NSMutableArray *)leftArray { - - if (!_leftArray) { - _leftArray = [[NSMutableArray alloc] init]; - } - return _leftArray; -} - -- (NSMutableArray *)rightArray { - - if (!_rightArray) { - - _rightArray = [[NSMutableArray alloc] init]; - } - return _rightArray; -} - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - - } - - return self; -} - - -- (void)createUI { - - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(22), 100, 14)]; - titleLabel.text = @"基本健康信息"; - titleLabel.font = BOLDSYSTEMFONT(13); - titleLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:titleLabel]; - - NSArray * leftArray = @[@"饮食习惯:",@"烟酒习惯:",@"既往史:",@"家族史:",@"过敏史:",@"用药史:"]; - NSArray * rightArray = @[@"",@"",@"",@"",@"",@""]; - - for (int i = 0; i < leftArray.count; i ++) { - - - UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), titleLabel.bottom + kRealValue(20) + 30 * i, 100, 13)]; - leftLabel.text =leftArray[i]; - leftLabel.font = MEDIUMFONT(13); - leftLabel.textAlignment = NSTextAlignmentLeft; - leftLabel.textColor = UIColorHex(#666666); - CGFloat w = [HQCommonUtils getLengthFromText:titleLabel.text andFontSize:13]; - leftLabel.width = w; - [self addSubview:leftLabel]; - - - UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right, leftLabel.top, self.width - leftLabel.right, 13)]; - rightLabel.text =rightArray[i]; - rightLabel.font = MEDIUMFONT(13); - rightLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:rightLabel]; - - [self.leftArray addObject:leftLabel]; - [self.rightArray addObject:rightLabel]; - - } - - -} - -- (void)setQuestionArray:(NSArray *)questionArray { - _questionArray = questionArray; - - - for (UILabel * leftLabel in self.leftArray) { - [leftLabel removeFromSuperview]; - } - for (UILabel * rightLabel in self.rightArray) { - [rightLabel removeFromSuperview]; - } - [self.leftArray removeAllObjects]; - [self.rightArray removeAllObjects]; - - for (int i = 0; i < _questionArray.count; i ++) { - -// NSDictionary * dic = _questionArray[i]; - YXRecoredDetailHealthModel * model = _questionArray[i]; - - UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(42) + 14 + 30 * i, 100, 13)]; - leftLabel.text = [NSString stringWithFormat:@"%@:",model.answerKey] ; - leftLabel.font = MEDIUMFONT(13); - leftLabel.textAlignment = NSTextAlignmentLeft; - leftLabel.textColor = UIColorHex(#666666); - CGFloat w = [HQCommonUtils getLengthFromText:leftLabel.text andFontSize:13]; - [self addSubview:leftLabel]; - - - UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right + kRealValue(25), leftLabel.top, self.width - leftLabel.right - kRealValue(25), 13)]; - rightLabel.text = model.answerValue; - rightLabel.font = MEDIUMFONT(13); - rightLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:rightLabel]; - - [self.leftArray addObject:leftLabel]; - [self.rightArray addObject:rightLabel]; - - if (i == _questionArray.count - 1) { - self.lastLabel = rightLabel; - } - } - self.healthHeight = self.lastLabel.bottom + kRealValue(30); - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.h deleted file mode 100644 index 417ca28..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// QuestionReportView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - - -@interface QuestionReportView : UIView - -@property (nonatomic, strong) NSArray * dataArray; - -@property (nonatomic, assign) CGFloat reportHeight; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.m deleted file mode 100644 index 860df35..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/DetailUserinfoView(咨询人信息)/QuestionReportView.m +++ /dev/null @@ -1,91 +0,0 @@ -// -// QuestionReportView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "QuestionReportView.h" - -@interface QuestionReportView () - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UILabel * hospatilLabel; - - -@end - -@implementation QuestionReportView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(24), 100, 14)]; - titleLabel.text = @"体检报告"; - titleLabel.font = BOLDSYSTEMFONT(13); - titleLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:titleLabel]; - - UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(25), self.width - kRealValue(33), 14)]; - self.timeLabel = timeLabel; - timeLabel.text = @"生成时间:--"; - timeLabel.font = MEDIUMFONT(10); - timeLabel.textColor = UIColorHex(#999999); - timeLabel.textAlignment = NSTextAlignmentRight; - [self addSubview:timeLabel]; - - self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), titleLabel.bottom + kRealValue(17), self.width - kRealValue(36), 13)]; - self.hospatilLabel.text = @""; - self.hospatilLabel.font = BOLDSYSTEMFONT(13); - self.hospatilLabel.textAlignment = NSTextAlignmentLeft; - [self addSubview:self.hospatilLabel]; -// - YYLabel * detailLabel = [[YYLabel alloc] initWithFrame:CGRectMake(self.width - 100 - kRealValue(18), titleLabel.bottom + kRealValue(17), 100, 12)]; - detailLabel.text = @"查看详情 >"; - detailLabel.textColor = UIColorHex(#3390FF); - detailLabel.font = MEDIUMFONT(11); - detailLabel.textAlignment = NSTextAlignmentRight; - [self addSubview:detailLabel]; - - [detailLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { -// [self lookMDetail]; - }]; - -} - -//- (void)lookMDetail{ -// -// if (self.baogaoBlock) { -// self.baogaoBlock(self.bodyModel); -// } -//} -// -// -//- (void)setBodyModel:(YXPhyscialReportListModel *)bodyModel { -// -// _bodyModel = bodyModel; -// -// self.timeLabel.text = [NSString stringWithFormat:@"上传时间:%@年",_bodyModel.medicalYear]; -// self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",_bodyModel.medicalYear,_bodyModel.hospitalName]; -// self.reportHeight = self.hospatilLabel.bottom + kRealValue(20); -//} -// - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.h deleted file mode 100644 index ef830bc..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// FileDataDeatilCenterView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import -#import "YXRecoredListDetailModel.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface FileDataDeatilCenterView : UIView - -@property (nonatomic, assign) CGFloat questionH; - -@property (nonatomic, strong) YXRecoredconMedicalRecordsListDO * medicalModel; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.m deleted file mode 100644 index b1fa8d7..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/FileDataDetailView(档案详情)/FileDataDeatilCenterView.m +++ /dev/null @@ -1,318 +0,0 @@ -// -// FileDataDeatilCenterView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "FileDataDeatilCenterView.h" -#import "XLPhotoBrowser.h" - -@interface FileDataDeatilCenterView () - -@property (nonatomic, strong) UILabel * firstQuestionLabel; - -@property (nonatomic, strong) UILabel * firstAnswerLabel; - -@property (nonatomic, strong) UILabel * secendQuestionLabel; - -@property (nonatomic, strong) UILabel * secendAnswerLabel; - -@property (nonatomic, strong) UILabel * thirdQuestionLabel; - -@property (nonatomic, strong) UILabel * thirdAnswerLabel; - -@property (nonatomic, strong) UILabel * fourthQuestionLabel; - -@property (nonatomic, strong) UILabel * fourthAnswerLabel; - -@property (nonatomic, strong) UILabel * fifthQuestionLabel; - -@property (nonatomic, strong) UILabel * fifthAnswerLabel; - -@property (nonatomic, strong) UILabel * thirdQuestionTitleLabel; - -@property (nonatomic, strong) UIView * hospatilView; - -@property (nonatomic, strong) UILabel * roomLabel; - -@property (nonatomic, strong) UILabel * disNameLabel; - -@property (nonatomic, strong) UIView * pictureView; - -@property (nonatomic, strong) UIView * twoView; - -@property (nonatomic, strong) UIView * thirdView; - -@property (nonatomic, strong) UIView * fourView; - -@property (nonatomic, strong) UILabel * numberLabel; - -@property (nonatomic, strong) UIScrollView * pictScrollView; - -@property (nonatomic, strong) NSMutableArray * pictureArray; - -@end - - -@implementation FileDataDeatilCenterView - -- (NSMutableArray *)pictureArray { - - if (!_pictureArray) { - _pictureArray = [[NSMutableArray alloc] init]; - } - return _pictureArray; -} - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - - } - - return self; -} - -- (void)createUI { - - self.backgroundColor = KWhiteColor; - //第一个问题 - self.firstQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20), kRealValue(24), self.width - kRealValue(30), 14)]; - self.firstQuestionLabel.text = @"1.本次问题持续多久了?"; - self.firstQuestionLabel.font = BOLDSYSTEMFONT(14); - self.firstQuestionLabel.textAlignment = NSTextAlignmentLeft; - self.firstQuestionLabel.textColor = UIColorHex(#333333); - [self addSubview:self.firstQuestionLabel]; - - UIView * firstView = [[UIView alloc] initWithFrame:CGRectMake(0, self.firstQuestionLabel.bottom + kRealValue(15), self.width, 35)]; - firstView.backgroundColor = UIColorHex(#EFEFEF); - [self addSubview:firstView]; - - UIView * lineOne = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 35)]; - lineOne.backgroundColor = UIColorHex(#809999); - [firstView addSubview:lineOne]; - - self.firstAnswerLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(18), 0, self.width - kRealValue(48), 35)]; - self.firstAnswerLabel.text = @"--"; - self.firstAnswerLabel.font = MEDIUMFONT(12); - self.firstAnswerLabel.textAlignment = NSTextAlignmentLeft; - self.firstAnswerLabel.textColor = UIColorHex(#333333); - [firstView addSubview:self.firstAnswerLabel]; - - //第二个问题 - self.secendQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20), firstView.bottom + kRealValue(15), self.width - kRealValue(30), 14)]; - self.secendQuestionLabel.text = @"2.咨询人的问题"; - self.secendQuestionLabel.font = BOLDSYSTEMFONT(14); - self.secendQuestionLabel.textAlignment = NSTextAlignmentLeft; - self.secendQuestionLabel.textColor = UIColorHex(#333333); - [self addSubview:self.secendQuestionLabel]; - - UIView * twoView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(10), self.secendQuestionLabel.bottom + kRealValue(15), self.width - kRealValue(20), 70)]; - twoView.backgroundColor = UIColorHex(#EFEFEF); - twoView.layer.cornerRadius = 10; - self.twoView = twoView; - twoView.layer.masksToBounds = true; - [self addSubview:twoView]; - - self.secendAnswerLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), 11, twoView.width - kRealValue(50), 35)]; - self.secendAnswerLabel.text = @""; - self.secendAnswerLabel.numberOfLines = 0; - self.secendAnswerLabel.font = MEDIUMFONT(12); - self.secendAnswerLabel.textAlignment = NSTextAlignmentLeft; - self.secendAnswerLabel.textColor = UIColorHex(#333333); - self.secendAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.secendAnswerLabel AndLeftisTrue:true withStr:self.secendAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth:twoView.width - kRealValue(50) withLineSpacing:5]; - [twoView addSubview:self.secendAnswerLabel]; - //图片 - self.pictureView = [[UIView alloc] initWithFrame:CGRectMake(0, twoView.bottom + kRealValue(12), self.width, 110)]; - [self addSubview: self.pictureView]; - - UILabel * pictureLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(10), 0, 140, 35)]; - pictureLabel.text = @"上传报告或者患处照片"; - pictureLabel.font = MEDIUMFONT(12); - pictureLabel.textAlignment = NSTextAlignmentLeft; - pictureLabel.textColor = UIColorHex(#666666); - [self.pictureView addSubview:pictureLabel]; - - UILabel * showLabel = [[UILabel alloc] initWithFrame:CGRectMake(140, 0, 100, 35)]; - showLabel.text = @"(仅自己和医生可见)"; - showLabel.font = MEDIUMFONT(11); - showLabel.textAlignment = NSTextAlignmentLeft; - showLabel.textColor = UIColorHex(#333333); - [self.pictureView addSubview:showLabel]; - - UILabel * numberLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width - 10 - 50, 0, 50, 35)]; - numberLabel.text = @"-/8"; - numberLabel.font = MEDIUMFONT(11); - numberLabel.textAlignment = NSTextAlignmentRight; - numberLabel.textColor = UIColorHex(#333333); - self.numberLabel = numberLabel; - [self.pictureView addSubview:numberLabel]; - - UIScrollView * pictScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(pictureLabel.left, pictureLabel.bottom, self.width - kRealValue(20), 62)]; - self.pictScrollView = pictScrollView; - [self.pictureView addSubview:pictScrollView]; - - //第三个问题 - self.thirdQuestionTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20),self.pictureView.bottom + kRealValue(10), self.width - kRealValue(30), 14)]; - self.thirdQuestionTitleLabel.text = @"3.咨询人是否去医院就诊过?"; - self.thirdQuestionTitleLabel.font = BOLDSYSTEMFONT(14); - self.thirdQuestionTitleLabel.textAlignment = NSTextAlignmentLeft; - self.thirdQuestionTitleLabel.textColor = UIColorHex(#333333); - [self addSubview:self.thirdQuestionTitleLabel]; - - UIView * thirdView = [[UIView alloc] initWithFrame:CGRectMake(0, self.thirdQuestionTitleLabel.bottom + kRealValue(15), self.width, 35)]; - thirdView.backgroundColor = UIColorHex(#EFEFEF); - self.thirdView = thirdView; - [self addSubview:thirdView]; - - UIView * linethird = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 35)]; - linethird.backgroundColor = UIColorHex(#809999); - [thirdView addSubview:linethird]; - - self.thirdQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(18), 0, self.width - kRealValue(48), 35)]; - self.thirdQuestionLabel.text = @"A 就诊过"; - self.thirdQuestionLabel.font = MEDIUMFONT(12); - self.thirdQuestionLabel.textAlignment = NSTextAlignmentLeft; - self.thirdQuestionLabel.textColor = UIColorHex(#333333); - [thirdView addSubview:self.thirdQuestionLabel]; - - self.hospatilView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(8), thirdView.bottom + kRealValue(16), self.width - kRealValue(16), 67)]; - self.hospatilView.backgroundColor = UIColorHex(#EFEFEF); - self.hospatilView.layer.cornerRadius = 10; - self.hospatilView.layer.masksToBounds = true; - [self addSubview:self.hospatilView]; - - self.roomLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(16), kRealValue(12), self.hospatilView.width - kRealValue(20), 13)]; - self.roomLabel.text = @"就诊医院及科室:--"; - self.roomLabel.font = MEDIUMFONT(12); - self.roomLabel.textAlignment = NSTextAlignmentLeft; - self.roomLabel.textColor = UIColorHex(#333333); - [self.hospatilView addSubview:self.roomLabel]; - - self.disNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(16), self.roomLabel.bottom + kRealValue(17) , self.hospatilView.width - kRealValue(20), 13)]; - self.disNameLabel.text = @"诊断结果:--"; - self.disNameLabel.font = MEDIUMFONT(12); - self.disNameLabel.textAlignment = NSTextAlignmentLeft; - self.disNameLabel.textColor = UIColorHex(#333333); - [self.hospatilView addSubview:self.disNameLabel]; - //第4个问题 - self.fourthQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20), self.hospatilView.bottom + kRealValue(21), self.width - kRealValue(30), 14)]; - self.fourthQuestionLabel.text = @"4.咨询人期望得到的帮助?"; - self.fourthQuestionLabel.font = BOLDSYSTEMFONT(14); - self.fourthQuestionLabel.textAlignment = NSTextAlignmentLeft; - self.fourthQuestionLabel.textColor = UIColorHex(#333333); - [self addSubview:self.fourthQuestionLabel]; - - UIView *fourView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(10), self.fourthQuestionLabel.bottom + kRealValue(15), self.width - kRealValue(20), 70)]; - fourView.backgroundColor = UIColorHex(#EFEFEF); - fourView.layer.cornerRadius = 10; - fourView.layer.masksToBounds = true; - self.fourView = fourView; - [self addSubview:fourView]; - - self.fourthAnswerLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), 11, fourView.width - kRealValue(50), 35)]; - self.fourthAnswerLabel.text = @""; - self.fourthAnswerLabel.numberOfLines = 0; - self.fourthAnswerLabel.font = MEDIUMFONT(12); - self.fourthAnswerLabel.textAlignment = NSTextAlignmentLeft; - self.fourthAnswerLabel.textColor = UIColorHex(#333333); - self.fourthAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.fourthAnswerLabel AndLeftisTrue:true withStr:self.fourthAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth:twoView.width - kRealValue(50) withLineSpacing:5]; - [fourView addSubview:self.fourthAnswerLabel]; - - self.questionH = fourView.bottom + kRealValue(20); -} - - -- (void)setMedicalModel:(YXRecoredconMedicalRecordsListDO *)medicalModel { - - _medicalModel = medicalModel; - [self.pictureArray removeAllObjects]; - self.firstAnswerLabel.text = _medicalModel.haveTimeValue; - self.secendAnswerLabel.text = _medicalModel.medicalDescribe; - self.secendAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.secendAnswerLabel AndLeftisTrue:true withStr:self.secendAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth: self.width - kRealValue(20) - kRealValue(50) withLineSpacing:5]; - self.twoView.height = self.secendAnswerLabel.bottom + kRealValue(25); - if (!ValidStr(_medicalModel.image)) { - NSArray * array = [_medicalModel.image componentsSeparatedByString:@","]; - self.numberLabel.text = [NSString stringWithFormat:@"%d/9",array.count]; - for (int i = 0 ; i < array.count; i ++) { - - self.pictureView.top = self.twoView.bottom + kRealValue(15); - - NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,array[i]]; - - NSString * str1 = @"\\"; - - photo = [photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; - - NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); - - [self.pictureArray addObject:encodedString3]; - - UIImageView * picView = [[UIImageView alloc] initWithFrame:CGRectMake(66 * i, 0 , 60, 60)]; - picView.backgroundColor = [UIColor grayColor]; - picView.layer.cornerRadius = 5.0; - picView.layer.masksToBounds = true; - picView.userInteractionEnabled = true; - [picView sd_setImageWithURL:[NSURL URLWithString:encodedString3] placeholderImage:PLACEHOLD_IMG]; - - UIButton * imgbtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, picView.width, picView.height)]; - [imgbtn addTarget:self action:@selector(lookPicture:) forControlEvents:UIControlEventTouchUpInside]; - imgbtn.tag = 100 + i; - [picView addSubview:imgbtn]; - [self.pictScrollView addSubview:picView]; - - - } - - }else - { - self.pictureView.hidden = YES; - self.thirdQuestionTitleLabel.top = self.twoView.bottom + kRealValue(10); - self.thirdView.top = self.thirdQuestionTitleLabel.bottom + kRealValue(15); - } - - self.thirdQuestionLabel.text = _medicalModel.tfLookValue; - - if ([_medicalModel.tfLook integerValue] == 0) { - self.hospatilView.hidden = YES; - self.fourthQuestionLabel.top = self.thirdView.bottom + kRealValue(16); - self.fourView.top = self.fourthQuestionLabel.bottom + kRealValue(15); - - } - if ([_medicalModel.tfLook integerValue] == 1) { - self.hospatilView.hidden = false; - self.roomLabel.text = [NSString stringWithFormat:@"就诊医院及科室:%@",_medicalModel.lookOffice] ; - self.disNameLabel.text = [NSString stringWithFormat:@"诊断结果:%@",_medicalModel.lookMedicalName]; - self.fourthQuestionLabel.top = self.hospatilView.bottom + kRealValue(16); - self.fourView.top = self.fourthQuestionLabel.bottom + kRealValue(15); - - } - - self.fourthAnswerLabel.text = _medicalModel.desire; - - self.fourthAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.fourthAnswerLabel AndLeftisTrue:true withStr:self.fourthAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth: self.width - kRealValue(20) - kRealValue(50) withLineSpacing:5]; - self.fourView.height = self.fourthAnswerLabel.bottom + kRealValue(25); - self.questionH = self.fourView.bottom + kRealValue(20); - - -} - -- (void)lookPicture:(UIButton *)indexBtn { - - XLPhotoBrowser *browser = [XLPhotoBrowser showPhotoBrowserWithImages:self.pictureArray currentImageIndex:indexBtn.tag - 100]; - - browser.browserStyle = XLPhotoBrowserStyleSimple; // 微博样式 - - // 自定义pageControl的一些属性 - browser.pageDotColor = [UIColor purpleColor]; ///< 此属性针对动画样式的pagecontrol无效 - browser.currentPageDotColor = [UIColor greenColor]; - browser.pageControlStyle = XLPhotoBrowserPageControlStyleClassic;///< 修改底部pagecontrol的样式为系统样式,默认是弹性动画的样式 - - -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.h deleted file mode 100644 index 90586d4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// HQSearchView.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/4/13. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^searchOnclick)(NSString * fieldtext); - -@interface HQSearchView : UIView - -@property (nonatomic, strong) NSString * searchPlacehold; - -@property (nonatomic, strong) UITextField * searchField; - -@property (nonatomic, copy) searchOnclick searchBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.m deleted file mode 100644 index 7947480..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HQSearchView.m +++ /dev/null @@ -1,97 +0,0 @@ -// -// HQSearchView.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/4/13. -// - -#import "HQSearchView.h" - -@interface HQSearchView () - - -@end - -@implementation HQSearchView - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.searchField = [[UITextField alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(65), 35)]; - self.searchField.returnKeyType = UIReturnKeySearch; - self.searchField.delegate = self; - self.searchField.layer.cornerRadius = 18.0f; - self.searchField.layer.masksToBounds = true; - self.searchField.backgroundColor = UIColorHex(#F1F1F1); - //搜索图标 - - UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 37, 35)]; - - UIImageView *view = [[UIImageView alloc] init]; - //设置图片控制器的的图片 - view.image = [UIImage imageNamed:@"searchLeftIcon"]; - //设置图片的frame - view.width = 15; - view.height = 15; - view.center= leftView.center; - //左边搜索图标的模式 - view.contentMode = UIViewContentModeCenter; - [leftView addSubview:view]; - self.searchField.leftView = leftView; - //左边搜索图标总是显示 - self.searchField.leftViewMode = UITextFieldViewModeAlways; - //右边删除所有图标 - self.searchField.clearButtonMode = UITextFieldViewModeAlways; - - [self addSubview:self.searchField]; - - UIButton * seachBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.searchField.right, 0, 50, 35)]; - [seachBtn setTitle:@"搜索" forState:UIControlStateNormal]; - seachBtn.titleLabel.font = SYSTEMFONT(13); - [seachBtn setTitleColor:CFontColor2 forState:UIControlStateNormal]; - [seachBtn addTarget:self action:@selector(searchAction) forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:seachBtn]; - -} - -- (void)setSearchPlacehold:(NSString *)searchPlacehold { - - _searchPlacehold = searchPlacehold; - - NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:_searchPlacehold attributes: - @{NSForegroundColorAttributeName:[UIColor grayColor], - NSFontAttributeName:SYSTEMFONT(13)} - ]; - self.searchField.attributedPlaceholder = attrString; - -} - -- (BOOL)textFieldShouldReturn:(UITextField*)theTextField { - - [theTextField resignFirstResponder]; - - if (self.searchBlock) { - - self.searchBlock(theTextField.text); - } - return YES; -} - -- (void)searchAction { - - if (self.searchBlock) { - - self.searchBlock(self.searchField.text); - } -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.h deleted file mode 100644 index ee33ee4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// HistoryRecordTable.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface HistoryRecordTable : UITableView - -@property (nonatomic, strong) NSArray * dataArray; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.m deleted file mode 100644 index 6a05e6d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTable.m +++ /dev/null @@ -1,118 +0,0 @@ -// -// HistoryRecordTable.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "HistoryRecordTable.h" -#import "HistoryRecordTableViewCell.h" - -@interface HistoryRecordTable () - -@end - -@implementation HistoryRecordTable - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.clearColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone; - self.estimatedRowHeight = 60; - self.rowHeight = UITableViewAutomaticDimension; - - - -} - -- (void)setDataArray:(NSArray *)dataArray { - - _dataArray = dataArray; - - [self reloadData]; -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 10; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 1; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - HistoryRecordTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"VIDEOCELL"]; - - if (!cell) { - - cell = [[HistoryRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"VIDEOCELL"]; - } - cell.backgroundColor = KWhiteColor; - cell.layer.cornerRadius = 10.0; - - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return kRealValue(12); -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - - UIView * videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(12))]; - - return videoView; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - -} - - -@end - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.h deleted file mode 100644 index 3c043bc..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// HistoryRecordTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface HistoryRecordTableViewCell : UITableViewCell - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.m deleted file mode 100644 index 86e893d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HistoryRecordView(历史记录)/HistoryRecordTableViewCell.m +++ /dev/null @@ -1,153 +0,0 @@ -// -// HistoryRecordTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "HistoryRecordTableViewCell.h" - - -@interface HistoryRecordTableViewCell () - - -@property (nonatomic, strong) UILabel * typeLabel; -@property (nonatomic, strong) UILabel * statusLabel; -@property (nonatomic, strong) UILabel * nameLabel; -@property (nonatomic, strong) UILabel * ageLabel; -@property (nonatomic, strong) UILabel * timeLabel; -@property (nonatomic, strong) UILabel * cardLabel; -@property (nonatomic, strong) UILabel * canisLabel; - -@end - - -@implementation HistoryRecordTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.typeLabel = [[UILabel alloc] init]; - self.typeLabel.text = @" 视频咨询 "; - self.typeLabel.layer.cornerRadius = 5.0; - self.typeLabel.layer.masksToBounds = true; - self.typeLabel.layer.borderColor = UIColorHex(#21BEBD).CGColor; - self.typeLabel.layer.borderWidth = 1.0f; - self.typeLabel.textColor = UIColorHex(#21BEBD); - self.typeLabel.font = SYSTEMFONT(11); - [self.contentView addSubview:self.typeLabel]; - - [self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(10); - make.top.mas_offset(12); - make.height.mas_offset(21); - }]; - [self.typeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.nameLabel = [[UILabel alloc] init]; - self.nameLabel.text = @"张三"; - self.nameLabel.textColor = CFontColor1; - self.nameLabel.font = BOLDSYSTEMFONT(14); - [self.contentView addSubview:self.nameLabel]; - - [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.typeLabel.mas_right).offset(5); - make.top.mas_offset(16); - make.height.mas_offset(14); - }]; - [self.nameLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.ageLabel = [[UILabel alloc] init]; - self.ageLabel.text = @"(男/38岁)"; - self.ageLabel.textColor = CFontColor2; - self.ageLabel.font = BOLDSYSTEMFONT(14); - [self.contentView addSubview:self.ageLabel]; - - [self.ageLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.nameLabel.mas_right); - make.top.mas_offset(16); - make.height.mas_offset(14); - }]; - [self.ageLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.timeLabel = [[UILabel alloc] init]; - self.timeLabel.text = @"2023-01-05 14:23:56"; - self.timeLabel.textColor = UIColorHex(#999999); - self.timeLabel.font = BOLDSYSTEMFONT(14); - self.timeLabel.textAlignment = NSTextAlignmentRight; - [self.contentView addSubview:self.timeLabel]; - - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(@-15); - make.top.mas_offset(12); - make.height.mas_offset(11); - }]; - [self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.cardLabel = [[UILabel alloc] init]; - self.cardLabel.text = @"610456198905167894"; - self.cardLabel.textColor = UIColorHex(#999999); - self.cardLabel.font = MEDIUMFONT(13); - [self.contentView addSubview:self.cardLabel]; - - [self.cardLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(@15); - make.top.mas_equalTo(self.typeLabel.mas_bottom).offset(12); - make.height.mas_offset(11); - }]; - [self.cardLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.statusLabel = [[UILabel alloc] init]; - self.statusLabel.text = @"已完成"; - self.statusLabel.textColor = UIColorHex(#16C716); - self.statusLabel.font = BOLDSYSTEMFONT(14); - self.statusLabel.textAlignment = NSTextAlignmentRight; - [self.contentView addSubview:self.statusLabel]; - - [self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(@-15); - make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(24); - make.height.mas_offset(14); - make.width.mas_offset(90); - }]; - - self.canisLabel = [[UILabel alloc] init]; - self.canisLabel.text = @"症状:高血压、糖尿病 肾结石"; - self.canisLabel.textColor = CFontColor1; - self.canisLabel.font = MEDIUMFONT(14); - self.canisLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.canisLabel]; - - [self.canisLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(@14); - make.top.mas_equalTo(self.cardLabel.mas_bottom).offset(10); - make.height.mas_offset (18); - make.bottom.mas_offset(-18); - make.right.mas_offset(-15); - - }]; - - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedTableViewCell.m deleted file mode 100644 index 9d80ca7..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedTableViewCell.m +++ /dev/null @@ -1,97 +0,0 @@ -// -// HospitalSelectedTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/19. -// - -#import "HospitalSelectedTableViewCell.h" - -@interface HospitalSelectedTableViewCell ( ) - -@property (nonatomic, strong) UIImageView * hospitalImage; - -@property (nonatomic, strong) UILabel * hospitalName; - -@property (nonatomic, strong) UIButton * sureButton; - -@end - -@implementation HospitalSelectedTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - self.hospitalImage = [[UIImageView alloc] init]; - self.hospitalImage.backgroundColor = [UIColor orangeColor]; - [self.contentView addSubview:self.hospitalImage]; - - self.hospitalName = [[UILabel alloc] init]; - self.hospitalName.textAlignment = NSTextAlignmentLeft; - self.hospitalName.font = SYSTEMFONT(15); - self.hospitalName.textColor = CFontColor1; - [self.contentView addSubview:self.hospitalName]; - - self.sureButton = [[UIButton alloc] init]; - [self.sureButton setImage:IMAGE_NAMED(@"chooseCircle") forState:UIControlStateNormal]; - [self.sureButton setImage:IMAGE_NAMED(@"closeImage") forState:UIControlStateSelected]; - [self.sureButton addTarget:self action:@selector(hospitalChoose) forControlEvents:UIControlEventTouchUpInside]; - self.sureButton.selected = true; - self.sureButton.userInteractionEnabled = true; - [self.contentView addSubview:self.sureButton]; - - - [self.hospitalImage mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(@20); - make.top.mas_equalTo(@0); - make.width.height.mas_equalTo(44); - }]; - - [self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(@-17); - make.width.height.mas_equalTo(@25); - make.centerY.mas_equalTo(self.hospitalImage); - }]; - - [self.hospitalName mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.hospitalImage.mas_right).offset(12); - make.right.mas_equalTo(self.sureButton.mas_left).offset(-10); - make.top.mas_equalTo(@15); - make.height.mas_equalTo(@16); - }]; - - -} - - -- (void)hospitalChoose { - - - -} - -- (void)setModel:(YXHospitalModel *)model { - _model = model; - self.hospitalName.text = [NSString stringWithFormat:@"%@",_model.hospitalName]; - self.sureButton.selected = model.isChoose; -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.h deleted file mode 100644 index 14e2ba9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// HospitalSelectedView.h -// healthQuestion -// -// Created by 仁康信息 on 2022/9/19. -// - -#import -#import "HospitalSelectedTableViewCell.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^hospotalSelectBlock)(NSString * hospalalName); - -@interface HospitalSelectedView : UIView - -@property (nonatomic, strong) NSArray * dataArray; - -@property (nonatomic, copy) hospotalSelectBlock hospatlBlcok; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.m deleted file mode 100644 index 1db5b5c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/HospitalSelected/HospitalSelectedView.m +++ /dev/null @@ -1,206 +0,0 @@ -// -// HospitalSelectedView.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/19. -// - -#import "HospitalSelectedView.h" - -@interface HospitalSelectedView () - -@property (nonatomic,strong)UITableView * tableView; - -@end - -@implementation HospitalSelectedView - - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - self.backgroundColor = RGBA(51, 59, 66,0.7); - [self createUI]; - } - - return self; -} - -- (void)createUI { - - UIView * centerView = [[UIView alloc] init]; - centerView.layer.masksToBounds = true; - centerView.layer.cornerRadius = 4; - centerView.backgroundColor = [UIColor whiteColor]; - [self addSubview:centerView]; - - UIView * headView = [[UIView alloc] init]; - headView.backgroundColor = KWhiteColor; - [centerView addSubview:headView]; - - UILabel * headLabel = [[UILabel alloc] init]; - headLabel.text = @"选择医院"; - headLabel.textColor = CFontColor1; - headLabel.font = BOLDSYSTEMFONT(16); - headLabel.textAlignment = NSTextAlignmentCenter; - [headView addSubview:headLabel]; - - - self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; - self.tableView.delegate = self; - self.tableView.dataSource = self; - self.tableView.backgroundColor = KWhiteColor; - self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - [centerView addSubview:self.tableView]; - - UIButton * bottomBtn = [[UIButton alloc] init]; - [bottomBtn setBackgroundColor:UIColorHex(#BD130B)]; - [bottomBtn setTitle:@"确定" forState:UIControlStateNormal]; - [bottomBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - [centerView addSubview:bottomBtn]; - - UIButton * closeBtn = [[UIButton alloc] init]; - [closeBtn setImage:IMAGE_NAMED(@"closeImage") forState:UIControlStateNormal]; - [closeBtn addTarget:self action:@selector(closePopView) forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:closeBtn]; - - [centerView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(kScreenWidth -30); - make.centerX.mas_equalTo(self); - make.height.mas_equalTo(@376); - make.top.mas_equalTo(@172); - }]; - - [headView mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.mas_equalTo(@50); - make.width.top.mas_equalTo(centerView); - }]; - - [headLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.mas_equalTo(0); - make.top.mas_equalTo(@17); - make.height.mas_equalTo(@16); - }]; - - [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.mas_equalTo(0); - make.top.mas_equalTo(headView.mas_bottom).offset(18); - make.bottom.mas_equalTo(bottomBtn.mas_top).offset(-20); - }]; - - [bottomBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(@290); - make.centerX.mas_equalTo(centerView); - make.bottom.mas_equalTo(@-20); - }]; - - [closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.mas_equalTo(self); - make.top.mas_equalTo(centerView.mas_bottom).offset(26); - make.height.width.mas_equalTo(@32); - }]; - - - -} - -- (void)setDataArray:(NSArray *)dataArray { - _dataArray = dataArray; - [self.tableView reloadData]; -} - - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return self.dataArray.count; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - HospitalSelectedTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HospitalCELL"]; - if (!cell) { - - cell = [[HospitalSelectedTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"HospitalCELL"]; - } - cell.backgroundColor = KWhiteColor; - cell.model = self.dataArray[indexPath.row]; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - -} -//每行高度 -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - - return kRealValue(55); -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - return [UIView new]; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - YXHospitalModel * model = self.dataArray[indexPath.row]; - - for (YXHospitalModel * subModel in self.dataArray) { - - if (subModel == model) { - subModel.isChoose = true; - }else - { - subModel.isChoose = false; - } - } - [self.tableView reloadData]; - if (self.hospatlBlcok) { - - self.hospatlBlcok(@"西安市中医院"); - } - -} - -- (void)closePopView { - - [self removeFromSuperview]; -} - -@end - - - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.h deleted file mode 100644 index c3a7912..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// SYLIfeManagerFooterView.h -// shan -// -// Created by aDu on 2016/12/7. -// Copyright © 2016年 DuKaiShun. All rights reserved. -// - -#import - -@interface SYLIfeManagerFooterView : UICollectionReusableView - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.m deleted file mode 100644 index 1ab398d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLIfeManagerFooterView.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// SYLIfeManagerFooterView.m -// shan -// -// Created by aDu on 2016/12/7. -// Copyright © 2016年 DuKaiShun. All rights reserved. -// - -#import "SYLIfeManagerFooterView.h" - -@implementation SYLIfeManagerFooterView - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - self.backgroundColor = [UIColor grayColor]; - } - return self; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.h deleted file mode 100644 index 312a157..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// SYLifeManagerHeaderView.h -// shan -// -// Created by aDu on 2016/12/7. -// Copyright © 2016年 DuKaiShun. All rights reserved. -// - -#import - -@interface SYLifeManagerHeaderView : UICollectionReusableView - -@property (nonatomic, strong) UILabel *headLabel; - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.m deleted file mode 100644 index 3997f40..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerHeaderView.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// SYLifeManagerHeaderView.m -// shan -// -// Created by aDu on 2016/12/7. -// Copyright © 2016年 DuKaiShun. All rights reserved. -// - -#import "SYLifeManagerHeaderView.h" - -@implementation SYLifeManagerHeaderView - -- (id)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self) { - [self addSubview:self.headLabel]; - } - return self; -} - -- (UILabel *)headLabel -{ - if (!_headLabel) { - _headLabel = [UILabel new]; - _headLabel.font = [UIFont systemFontOfSize:16]; - _headLabel.frame = CGRectMake(16, 0, 150, 20); - } - return _headLabel; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.h deleted file mode 100644 index c93cdab..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// SYLifeManagerLayout.h -// shan -// -// Created by aDu on 2016/12/6. -// Copyright © 2016年 DuKaiShun. All rights reserved. -// - -#import - -@protocol SYLifeManagerDelegate - -/** - * 更新数据源 - */ -- (void)moveItemAtIndexPath:(NSIndexPath *)formPath toIndexPath:(NSIndexPath *)toPath; - -/** - * 改变编辑状态 - */ -- (void)didChangeEditState:(BOOL)inEditState; - -@end - -@interface SYLifeManagerLayout : UICollectionViewFlowLayout - -@property (nonatomic, assign) BOOL inEditState; //检测是否处于编辑状态 -@property (nonatomic, weak) id delegate; - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.m deleted file mode 100644 index 4bbff62..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/MoveAddDelete/SYLifeManagerLayout.m +++ /dev/null @@ -1,156 +0,0 @@ -// -// SYLifeManagerLayout.m -// shan -// -// Created by aDu on 2016/12/6. -// Copyright © 2016年 DuKaiShun. All rights reserved. -// - -#import "SYLifeManagerLayout.h" -#import "SYLifeManagerCell.h" -#import "YXToolsModel.h" - -@interface SYLifeManagerLayout () - -@property (nonatomic, strong) UILongPressGestureRecognizer *longGesture; -@property (nonatomic, strong) NSIndexPath *currentIndexPath; //当前indexPath -@property (nonatomic, assign) CGPoint movePoint; //移动的中心点 -@property (nonatomic, strong) UIView *moveView; //移动的视图 - -@end - -@implementation SYLifeManagerLayout - -- (id)initWithCoder:(NSCoder *)aDecoder -{ - self = [super initWithCoder:aDecoder]; - if (self) { - [self configureObserver]; - } - return self; -} - -- (instancetype)init -{ - self = [super init]; - if (self) { - [self configureObserver]; - } - return self; -} - -#pragma mark - 添加观察者 - -- (void)configureObserver -{ - [self addObserver:self forKeyPath:@"collectionView" options:NSKeyValueObservingOptionNew context:nil]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - if ([keyPath isEqualToString:@"collectionView"]) { - [self setUpGestureRecognizers]; - } else { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - -#pragma mark - 长按手势 - -- (void)setUpGestureRecognizers -{ - if (self.collectionView == nil) { - return; - } - _longGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longGesture:)]; - _longGesture.minimumPressDuration = 0.3f; //时间长短 - _longGesture.delegate = self; - [self.collectionView addGestureRecognizer:_longGesture]; -} - -#pragma mark - 手势动画 - -- (void)longGesture:(UILongPressGestureRecognizer *)gesture -{ - if (!self.inEditState) { - [self setInEditState:YES]; - } - switch (gesture.state) { - case UIGestureRecognizerStateBegan: { //手势开始 - CGPoint location = [gesture locationInView:self.collectionView]; - //找到当前点击的cell的位置 - NSIndexPath *indexPath = [self.collectionView indexPathForItemAtPoint:location]; - //判断哪个分区可以被点击并且移动 - if (indexPath == nil || indexPath.section != 0) return; - self.currentIndexPath = indexPath; - UICollectionViewCell *targetCell = [self.collectionView cellForItemAtIndexPath:self.currentIndexPath]; - //得到当前cell的映射(截图) - self.moveView = [targetCell snapshotViewAfterScreenUpdates:YES]; - //隐藏被点击的cell - targetCell.hidden = YES; - //给截图添加上边框,如果不添加的话,截图有一部分是没有边框的,具体原因也没有找到 - self.moveView.layer.borderWidth = 0.5; - self.moveView.layer.borderColor = [UIColor grayColor].CGColor; - [self.collectionView addSubview:self.moveView]; - //放大截图 - self.moveView.transform = CGAffineTransformMakeScale(1.1, 1.1); - self.moveView.center = targetCell.center; - } - break; - case UIGestureRecognizerStateChanged: { //手势在变化 - CGPoint point = [gesture locationInView:self.collectionView]; - //更新cell的位置 - self.moveView.center = point; - NSIndexPath *indexPath = [self.collectionView indexPathForItemAtPoint:point]; - if (indexPath == nil) return; - if (indexPath.section == self.currentIndexPath.section && indexPath.section == 0) { - //通过代理去改变数据源 - if ([self.delegate respondsToSelector:@selector(moveItemAtIndexPath:toIndexPath:)]) { - [self.delegate moveItemAtIndexPath:self.currentIndexPath toIndexPath:indexPath]; - } - //移动的方法 - [self.collectionView moveItemAtIndexPath:self.currentIndexPath toIndexPath:indexPath]; - self.currentIndexPath = indexPath; - } - } - break; - case UIGestureRecognizerStateEnded: { //手势结束 - UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:self.currentIndexPath]; - //手势结束后,把截图隐藏,显示出原先的cell - [UIView animateWithDuration:0.25 animations:^{ - self.moveView.center = cell.center; - } completion:^(BOOL finished) { - [self.moveView removeFromSuperview]; - cell.hidden = NO; - self.moveView = nil; - self.currentIndexPath = nil; - [self.collectionView reloadData]; - }]; - } - break; - default: - break; - } -} - -#pragma mark - 处于编辑状态 - -- (void)setInEditState:(BOOL)inEditState -{ - if (_inEditState != inEditState) { - //通过代理方法改变处于编辑状态的cell - if (_delegate && [_delegate respondsToSelector:@selector(didChangeEditState:)]) { - [_delegate didChangeEditState:inEditState]; - } - } - _inEditState = inEditState; -} - -#pragma mark - 移除观察者 - -- (void)dealloc -{ - [self removeObserver:self forKeyPath:@"collectionView"]; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecordTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecordTableViewCell.m deleted file mode 100644 index bf05ad6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecordTableViewCell.m +++ /dev/null @@ -1,171 +0,0 @@ -// -// QuestionRecordTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "QuestionRecordTableViewCell.h" - -@interface QuestionRecordTableViewCell () - -@property (nonatomic, strong) UILabel * nameLabel; - -@property (nonatomic, strong) UILabel * ageLabel; - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UILabel * diseaseLabel; - -@property (nonatomic, strong) UILabel * numberLabel; - - -@end - -@implementation QuestionRecordTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - - } - - return self; - -} - -- (void)createUI { - - UIView * backView = [[UIView alloc] init]; - backView.backgroundColor = KWhiteColor; - backView.layer.cornerRadius = 10.0; - backView.layer.masksToBounds = true; - [self.contentView addSubview:backView]; - [backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.top.mas_offset(0); - make.right.mas_offset(-15); - make.bottom.mas_offset(-5); - }]; - - self.nameLabel = [[UILabel alloc] init]; - self.nameLabel.text = @"--"; - self.nameLabel.font = SYSTEMFONT(14); - self.nameLabel.textAlignment = NSTextAlignmentLeft; - self.nameLabel.textColor = CFontColor1; - [backView addSubview:self.nameLabel]; - - [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.top.mas_offset(15); - make.height.mas_offset(13); - }]; - [self.nameLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.ageLabel = [[UILabel alloc] init]; - self.ageLabel.text = @"(--)"; - self.ageLabel.font = SYSTEMFONT(13); - self.ageLabel.textColor = UIColorHex(#999999); - self.ageLabel.textAlignment = NSTextAlignmentLeft; - [backView addSubview:self.ageLabel]; - - [self.ageLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_offset(15); - make.left.mas_equalTo(self.nameLabel.mas_right).offset(2); - make.height.mas_offset(13); - }]; - [self.ageLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.timeLabel = [[UILabel alloc] init]; - - self.timeLabel.font = SYSTEMFONT(13); - self.timeLabel.textColor = UIColorHex(#999999); - self.timeLabel.textAlignment = NSTextAlignmentLeft; - [backView addSubview:self.timeLabel]; - - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(15); - make.left.mas_equalTo(self.nameLabel); - make.right.mas_offset(-15); - make.height.mas_offset(13); - make.bottom.mas_offset(-10); - }]; - - self.numberLabel = [[UILabel alloc] init]; - self.numberLabel.text = @"5"; - self.numberLabel.font = MEDIUMFONT(13); - self.numberLabel.textColor =KWhiteColor; - self.numberLabel.textAlignment = NSTextAlignmentCenter; - self.numberLabel.backgroundColor = UIColorHex(#21BEBD); - self.numberLabel.layer.cornerRadius = 8; - self.numberLabel.layer.masksToBounds = true; - [backView addSubview:self.numberLabel]; - - [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(5); - make.right.mas_equalTo(@-15); - make.height.width.mas_offset(15); - }]; - -// self.diseaseLabel = [[UILabel alloc] init]; -// self.diseaseLabel.text = @"症状:高血压、糖尿病症状:高血压、糖尿病症状:高血压、糖尿病症状:高血压、糖尿病症状:高血压、糖尿病症状:高血压、糖尿病"; -// self.diseaseLabel.font = MEDIUMFONT(13); -// self.diseaseLabel.numberOfLines = 0; -// self.diseaseLabel.textColor = UIColorHex(#333333); -// self.diseaseLabel.textAlignment = NSTextAlignmentLeft; -// [backView addSubview:self.diseaseLabel]; -// -// [self.diseaseLabel mas_makeConstraints:^(MASConstraintMaker *make) { -// make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(16); -// make.left.mas_equalTo(@15); -// make.right.mas_equalTo(self.numberLabel.mas_left).offset(-8); -// make.bottom.mas_offset(-20); -// }]; -// -// [self.diseaseLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - -} - -//- (void)setModel:(YXQuestionRecordModel *)model { -// -// _model = model; -// -// self.nameLabel.text = model.memberName; -// NSString * sexString = [_model.memberSex intValue] == 1 ? @"女":@"男"; -// self.ageLabel.text = [NSString stringWithFormat:@"(%@%@)",_model.memberAge,sexString]; -// self.timeLabel.text = _model.createTime; -//// self.numberLabel.text = [NSString stringWithFormat:@"%@",_model.] -//} - -- (void)setIMModel:(YXRecordIMListDateModel *)IMModel { - - _IMModel = IMModel; - - self.nameLabel.text = _IMModel.memberName; - NSString * sexString = [_IMModel.memberSex intValue] == 1 ? @"女":@"男"; - self.ageLabel.text = [NSString stringWithFormat:@"(%@/%@岁)",sexString,_IMModel.memberAge]; - self.timeLabel.text = _IMModel.createTime; - if ([_IMModel.unRedMessage integerValue] != 0) { - self.numberLabel.hidden = NO; - self.numberLabel.text = [NSString stringWithFormat:@"%@",_IMModel.unRedMessage]; - }else - { - self.numberLabel.hidden = YES; - } - -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.h deleted file mode 100644 index e1c025d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// QuestionRecoredTable.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import -#import "YXRecordIMListDateModel.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^RecoredQuestionListClick)(YXRecordIMListDateModel * _Nonnull model ); -typedef void(^VideoRecoredQuestionListClick)(YXRecordIMListDateModel * _Nonnull model ); - -@interface QuestionRecoredTable : UITableView - -@property (nonatomic, strong) NSArray * dataArray; - -@property (nonatomic, copy) RecoredQuestionListClick recordBlock; -@property (nonatomic, copy) VideoRecoredQuestionListClick videoBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.m deleted file mode 100644 index 3a0942a..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/QuestionRecordView/QuestionRecoredTable.m +++ /dev/null @@ -1,141 +0,0 @@ -// -// QuestionRecoredTable.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/28. -// - -#import "QuestionRecoredTable.h" -#import "QuestionRecordTableViewCell.h" - - -@interface QuestionRecoredTable () - - -@end - - -@implementation QuestionRecoredTable - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - if (@available(iOS 11.0, *)) { - self.estimatedRowHeight = 0; - self.estimatedSectionFooterHeight = 0; - self.estimatedSectionHeaderHeight = 0; - self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - } - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.clearColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone; - self.estimatedRowHeight = 60; - self.rowHeight = UITableViewAutomaticDimension; - -} - -- (void)setDataArray:(NSArray *)dataArray { - - _dataArray = dataArray; - - [self reloadData]; -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return self.dataArray.count; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 1; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - QuestionRecordTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"STATUSCELL"]; - if (!cell) { - - cell = [[QuestionRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"STATUSCELL"]; - } - cell.backgroundColor = KClearColor; - - cell.IMModel = self.dataArray[indexPath.section]; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - - - -} -//每行高度 -//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -//{ -// return kRealValue(77); -//} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return kRealValue(5); -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - - UIView * footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(10))]; - - - return footerView; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - YXRecordIMListDateModel * IMModel = self.dataArray[indexPath.section]; - - if (self.recordBlock) { - - self.recordBlock(IMModel); - } - if (self.videoBlock) { - - self.videoBlock(IMModel); - } - -} - - -@end - - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.h deleted file mode 100644 index 5727d1a..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// StopQuestionPopView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/30. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^surePublishBlock)(); - -@interface StopQuestionPopView : UIView - -@property (nonatomic, copy) NSString * questionNumber; - -@property (nonatomic, copy) surePublishBlock publisBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.m deleted file mode 100644 index c2c1ba5..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionPopView.m +++ /dev/null @@ -1,148 +0,0 @@ -// -// StopQuestionPopView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/30. -// - -#import "StopQuestionPopView.h" - -@interface StopQuestionPopView () - -@property (nonatomic, strong) UILabel * questionLabel ; -@property (nonatomic, strong) UILabel * publishLabel ; - -@end - -@implementation StopQuestionPopView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - return self; - -} - - -- (void)createUI { - - self.backgroundColor = RGBA(0, 0, 0, 0.3); - - UIView * popView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(56), kRealValue(176), kScreenWidth - kRealValue(112), kRealValue(253))]; - - popView.backgroundColor = KWhiteColor; - - popView.layer.cornerRadius = 10.0f; - - popView.layer.masksToBounds = true; - - [self addSubview:popView]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(20), popView.width, 14)]; - titleLabel.text = @"系统提示"; - titleLabel.font = SYSTEMFONT(14); - titleLabel.textAlignment = NSTextAlignmentCenter; - titleLabel.textColor = CFontColor1; - [popView addSubview:titleLabel]; - - UILabel * stopLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), titleLabel.bottom + kRealValue(17), popView.width - kRealValue(32), 34)]; - stopLabel.text = @"您当前设置的暂停时间段有正在进行中的咨询:"; - stopLabel.font = SYSTEMFONT(13); - stopLabel.numberOfLines = 2; - stopLabel.textAlignment = NSTextAlignmentLeft; - stopLabel.textColor = UIColorHex(#666666); - [popView addSubview:stopLabel]; - - UIView * questionView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(14),stopLabel.bottom + kRealValue(9), popView.width - kRealValue(28), kRealValue(44))]; - - questionView.backgroundColor = RGBA(33, 190, 189, 0.3); - - questionView.layer.cornerRadius = 10.0f; - - questionView.layer.masksToBounds = true; - - [popView addSubview:questionView]; - - UIImageView * iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(32), kRealValue(17), 10, 10)]; - iconImg.image = [UIImage imageNamed:@"stopPopIcon"]; - [questionView addSubview:iconImg]; - - UILabel * questionLabel = [[UILabel alloc] initWithFrame:CGRectMake(iconImg.right + kRealValue(5),0, popView.width - 50, questionView.height)]; - questionLabel.text = @"视频咨询:1"; - questionLabel.font = SYSTEMFONT(13); - questionLabel.textAlignment = NSTextAlignmentLeft; - questionLabel.textColor = CFontColor1; - self.questionLabel = questionLabel; - [questionView addSubview:questionLabel]; - - - - UILabel * publishLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16),questionView.bottom + kRealValue(11), popView.width - kRealValue(32), 34)]; - publishLabel.text = @"发布后,这2个咨询将被系统自动取消,确认是否发布?"; - self.publishLabel = publishLabel; - publishLabel.font = SYSTEMFONT(13); - publishLabel.textAlignment = NSTextAlignmentLeft; - publishLabel.numberOfLines = 0; - publishLabel.textColor = CFontColor1; - [popView addSubview:publishLabel]; - - UIView * rowLin = [[UIView alloc] initWithFrame:CGRectMake(0, popView.height - kRealValue(49), popView.width, 1)]; - rowLin.backgroundColor = UIColorHex(#E0E0E0); - [popView addSubview:rowLin]; - - - - UIButton * cancelbtn = [[UIButton alloc] initWithFrame:CGRectMake(0, rowLin.bottom , popView.width/2, 48)]; - - [cancelbtn setTitle:@"取消" forState:UIControlStateNormal]; - cancelbtn.titleLabel.font = SYSTEMFONT(13); - [cancelbtn setTitleColor:UIColorHex(#666666) forState:UIControlStateNormal]; - [cancelbtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside]; - [popView addSubview:cancelbtn]; - - UIButton * pubbtn = [[UIButton alloc] initWithFrame:CGRectMake(popView.width/2, rowLin.bottom , popView.width/2, 48)]; - [pubbtn setTitle:@"发布" forState:UIControlStateNormal]; - [pubbtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [pubbtn addTarget:self action:@selector(publishSureAction) forControlEvents:UIControlEventTouchUpInside]; - pubbtn.titleLabel.font = SYSTEMFONT(13); - - [popView addSubview:pubbtn]; - - - UIView * cowLin = [[UIView alloc] initWithFrame:CGRectMake(popView.width/2 - 1, popView.height - kRealValue(49), 1, kRealValue(49))]; - cowLin.backgroundColor = UIColorHex(#E0E0E0); - [popView addSubview:cowLin]; -} - --(void)cancelAction { - - [self removeFromSuperview]; -} - -- (void)publishSureAction { - - if (self.publisBlock) { - self.publisBlock(); - } - -} -- (void)setQuestionNumber:(NSString *)questionNumber { - - _questionNumber = questionNumber; - - self.questionLabel.text = [NSString stringWithFormat:@"视频咨询:%@",_questionNumber]; - self.publishLabel.text = [NSString stringWithFormat:@"发布后,这%@个咨询将被系统自动取消,确认是否发布?", _questionNumber]; -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.h deleted file mode 100644 index e00d8d6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// StopQuestionView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/29. -// - -#import -#import "StopQuestionTableViewCell.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface StopQuestionTableView : UITableView - -@property (nonatomic, strong) NSArray * dataArray; - -@property (nonatomic, copy) chageServiceStatus changeBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.m deleted file mode 100644 index c6add84..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableView.m +++ /dev/null @@ -1,135 +0,0 @@ -// -// StopQuestionView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/29. -// - -#import "StopQuestionTableView.h" -#import "BRPickerView.h" - -@interface StopQuestionTableView () - - -@end - - -@implementation StopQuestionTableView - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - if (@available(iOS 11.0, *)) { - self.estimatedRowHeight = 0; - self.estimatedSectionFooterHeight = 0; - self.estimatedSectionHeaderHeight = 0; - self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - } - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.clearColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone; - self.estimatedRowHeight = 60; - self.rowHeight = UITableViewAutomaticDimension; - -} - -- (void)setDataArray:(NSArray *)dataArray { - - _dataArray = dataArray; - - [self reloadData]; -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return self.dataArray.count; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 1; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - StopQuestionTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"STATUSCELL"]; - if (!cell) { - - cell = [[StopQuestionTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"STATUSCELL"]; - } - cell.backgroundColor = KClearColor; - cell.model = self.dataArray[indexPath.section]; - cell.changeBlock = ^(NSString * _Nullable record_id) { - self.changeBlock(record_id); - }; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; -} -//每行高度 -//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -//{ -// return kRealValue(77); -//} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return kRealValue(32); -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - YXStopServiceListModel * model = self.dataArray[section]; - UIView * footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(32))]; - - UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, kScreenWidth, kRealValue(32))]; - NSDate * starDate = [NSDate br_dateFromString:model.startDay dateFormat:@"yyyy-MM-dd"]; - timeLabel.text = [NSString stringWithFormat:@"%ld年%ld月",starDate.year,starDate.month]; - - timeLabel.textAlignment = NSTextAlignmentLeft; - timeLabel.font = SYSTEMFONT(15); - [footerView addSubview:timeLabel]; - - return footerView; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.h deleted file mode 100644 index db36435..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// StopQuestionTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/4/29. -// - -#import -#import "YXStopServiceModel.h" - -typedef void(^chageServiceStatus)(NSString * _Nullable record_id); - -NS_ASSUME_NONNULL_BEGIN - -@interface StopQuestionTableViewCell : UITableViewCell - -@property (nonatomic, strong) YXStopServiceListModel * model; - -@property (nonatomic, copy) chageServiceStatus changeBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.m deleted file mode 100644 index 37f8827..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/StopQuestion(停止咨询)/StopQuestionTableViewCell.m +++ /dev/null @@ -1,205 +0,0 @@ -// -// StopQuestionTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/4/29. -// - -#import "StopQuestionTableViewCell.h" - -@interface StopQuestionTableViewCell () - -@property (nonatomic, strong) UIImageView * linImg; - -@property (nonatomic, strong) UIView * backView; - -@property (nonatomic, strong) UIButton * statusBtn; - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UILabel * resourLabel; - -@property (nonatomic, strong) UILabel * gonggaoLabel; - -@property (nonatomic, strong) UILabel * statusLabel; - - -@end - -@implementation StopQuestionTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - UIImageView * linv = [[UIImageView alloc] init]; -// [linv setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"xuxian"]]]; - linv.image = [UIImage imageNamed:@"xuxian"]; - linv.contentMode = UIViewContentModeScaleToFill; - linv.clipsToBounds = YES; - self.linImg = linv; - [self.contentView addSubview:linv]; - - [self.linImg mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(27); - make.top.mas_offset(-15); - make.width.mas_offset(1); - make.bottom.mas_offset(15); - }]; - - self.backView = [[UIView alloc] init]; - self.backView.backgroundColor = KWhiteColor; - self.backView.layer.cornerRadius = 10; - [HQCommonUtils addShadowToView:self.backView]; - [self.contentView addSubview:self.backView]; - - [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(40); - make.top.mas_offset(0); - make.right.mas_offset(-15); - make.bottom.mas_offset(-10); - }]; - - self.timeLabel = [[UILabel alloc] init]; - self.timeLabel.text = @"暂停时间:2023-02-10 ~ 03-29"; - self.timeLabel.font = SYSTEMFONT(13);; - self.timeLabel.textAlignment = NSTextAlignmentLeft; - [self.backView addSubview:self.timeLabel]; - - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.top.mas_offset(15); - make.height.mas_offset(13); - }]; - [self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - - UILabel * stopTitleLabel = [[UILabel alloc] init]; - stopTitleLabel.text = @"暂停原因:"; - stopTitleLabel.font = SYSTEMFONT(13); - stopTitleLabel.textAlignment = NSTextAlignmentRight; - [self.backView addSubview:stopTitleLabel]; - - [stopTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(13); - make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(20); - make.height.mas_equalTo(@13); - }]; - - [stopTitleLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - - - self.resourLabel = [[UILabel alloc] init]; - - self.resourLabel.font = SYSTEMFONT(13); - self.resourLabel.textAlignment = NSTextAlignmentCenter; - [self.backView addSubview:self.resourLabel]; - - [self.resourLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(stopTitleLabel.mas_right).offset(8); - make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(12); - make.height.mas_equalTo(@27); - }]; - [self.resourLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - - UILabel * gonggaoTitleLabel = [[UILabel alloc] init]; - gonggaoTitleLabel.font = SYSTEMFONT(13); - gonggaoTitleLabel.textAlignment = NSTextAlignmentLeft; - gonggaoTitleLabel.numberOfLines = 0; - self.gonggaoLabel = gonggaoTitleLabel; - [self.backView addSubview:gonggaoTitleLabel]; - - [gonggaoTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(13); - make.right.mas_offset(-24); - make.bottom.mas_equalTo(@-30); - make.top.mas_equalTo(self.resourLabel.mas_bottom).offset(14); - }]; - - [gonggaoTitleLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.statusBtn = [[UIButton alloc] init]; - [self.statusBtn setTitle:@"开启咨询" forState:UIControlStateNormal]; - [self.statusBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - self.statusBtn.titleLabel.font = SYSTEMFONT(13); - self.statusBtn.layer.cornerRadius = 5.0; - self.statusBtn.layer.masksToBounds = YES; - self.statusBtn.backgroundColor = UIColorHex(#21BEBD); - [self.statusBtn addTarget:self action:@selector(statusChange) forControlEvents:UIControlEventTouchUpInside]; - [self.backView addSubview:self.statusBtn]; - - [self.statusBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.bottom.mas_offset(-5); - make.right.mas_offset(-10); - make.width.mas_offset(70); - make.height.mas_offset(25); - }]; - -} - -- (void)setModel:(YXStopServiceListModel *)model { - - _model = model; - self.timeLabel.text = [NSString stringWithFormat:@"暂停时间:%@~%@",_model.startDay,model.endDay]; - self.resourLabel.text = [NSString stringWithFormat:@"%@",_model.stopReason]; - - NSString * gonggaoString = [NSString stringWithFormat:@"暂停公告:%@",_model.notice]; - NSMutableAttributedString *attriString = - [[NSMutableAttributedString alloc] initWithString:gonggaoString]; - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; - [paragraphStyle setLineSpacing:10]; - //设置距离 - [attriString addAttribute:NSParagraphStyleAttributeName - value:paragraphStyle - range:NSMakeRange(0, [gonggaoString length])]; - self.gonggaoLabel.attributedText = attriString; - if (_model.serviceStatus == 1) { - - [self.statusBtn setTitle:@"已结束" forState:UIControlStateNormal]; - [self.statusBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - self.statusBtn.backgroundColor =KClearColor; - self.statusBtn.userInteractionEnabled = NO; - - } - if (_model.serviceStatus == 0) { - [self.statusBtn setTitle:@"恢复服务" forState:UIControlStateNormal]; - [self.statusBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - self.statusBtn.backgroundColor = UIColorHex(#21BEBD); - self.statusBtn.userInteractionEnabled = YES; - - - } -} - -- (void)statusChange { - - if (self.changeBlock) { - self.changeBlock(self.model.record_id); - } - -} - - - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.h deleted file mode 100644 index 1dbd18c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// YXDTTestView.h -// DTPaperTeacher -// -// Created by syyy on 2023/5/6. -// - -#import - -@interface YXDTTestView : UIView -@property (nonatomic ,copy) void(^returnBlock)(NSString *startTime, NSString *endTime); -@end - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.m deleted file mode 100644 index 3b06c5c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/YXDTTestView.m +++ /dev/null @@ -1,329 +0,0 @@ -// -// YXDTTestView.m -// DTPaperTeacher -// -// Created by syyy on 2023/5/6. -// - -#import "YXDTTestView.h" - -@interface YXDTTestView (){ - int _type;//0开始 1结束 -} -@property (nonatomic, strong) UIView *backView; -@property (nonatomic, strong) YYLabel *titleLab; -@property (nonatomic, strong) UILabel *centerLab; -@property (nonatomic, strong) UIButton *closeBtn; -@property (nonatomic, strong) UIButton *startBtn; -@property (nonatomic, strong) UIButton *endBtn; -@property (nonatomic, strong) UILabel * showTimeLabel; - -@property (nonatomic, strong) NSMutableArray *monthAndDayArr; -@property (nonatomic, strong) NSMutableArray *hourArr; -@property (nonatomic, strong) NSMutableArray *minArr; -@property (nonatomic, strong) UIPickerView *pickerView; - -@property (nonatomic, copy) NSString *monthStr; -@property (nonatomic, copy) NSString *hourStr; -@property (nonatomic, copy) NSString *minStr; - -@property (nonatomic, copy) NSString *startTime; -@property (nonatomic, copy) NSString *endTime; - -@end - -@implementation YXDTTestView - --(NSMutableArray *)monthAndDayArr{ - if (_monthAndDayArr == nil) { - _monthAndDayArr = [NSMutableArray arrayWithCapacity:0]; - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setDateFormat:@"MM月dd日 EEEE"]; - for (int i = 0; i < 7; i++) { - NSDate *Day = [NSDate dateWithTimeInterval:24*60*60*i sinceDate:[NSDate date]]; - NSString *DateStr = [dateFormatter stringFromDate:Day]; - - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Saturday" withString:@"星期六"]; - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Sunday" withString:@"星期日"]; - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Monday" withString:@"星期一"]; - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Tuesday" withString:@"星期二"]; - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Wednesday" withString:@"星期三"]; - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Thursday" withString:@"星期四"]; - DateStr = [DateStr stringByReplacingOccurrencesOfString:@"Friday" withString:@"星期五"]; - - [_monthAndDayArr addObject:DateStr]; - } - } - return _monthAndDayArr; -} - --(NSMutableArray *)hourArr{ - if (_hourArr == nil) { - _hourArr = [NSMutableArray arrayWithCapacity:0]; - for (int i = 0; i < 24; i++) { - if (i<10) { - [_hourArr addObject:[NSString stringWithFormat:@"0%d", i]]; - }else{ - [_hourArr addObject:[NSString stringWithFormat:@"%d", i]]; - } - } - } - return _hourArr; -} - --(NSMutableArray *)minArr{ - if (_minArr == nil) { - _minArr = [NSMutableArray arrayWithCapacity:0]; - for (int i = 0; i < 60; i++) { - if (i<10) { - [_minArr addObject:[NSString stringWithFormat:@"0%d", i]]; - }else{ - [_minArr addObject:[NSString stringWithFormat:@"%d", i]]; - } - } - } - return _minArr; -} - --(instancetype)initWithFrame:(CGRect)frame{ - if (self = [super initWithFrame:frame]) { - - [self configUI]; - - [self configData]; - } - return self; -} - --(void)configUI{ - self.backgroundColor = RGBA(0, 0, 0, 0.5); - - self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height - 300, [UIScreen mainScreen].bounds.size.width, 300)]; - self.backView.backgroundColor = UIColor.whiteColor; - [self addSubview:self.backView]; - UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.backView.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerTopLeft cornerRadii:CGSizeMake(12, 12)]; - CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; - maskLayer.frame = self.backView.bounds; - maskLayer.path = maskPath.CGPath; - self.backView.layer.mask = maskLayer; - - self.titleLab = [[YYLabel alloc]initWithFrame:CGRectMake(20, 10, 200, 20)]; - self.titleLab.text = @"取消"; - self.titleLab.textColor = CFontColor1; - self.titleLab.font = BOLDSYSTEMFONT(13); - [self.backView addSubview:self.titleLab]; - [self.titleLab setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - [self removeFromSuperview]; - } ]; - - self.closeBtn = [[UIButton alloc]initWithFrame:CGRectMake(self.backView.frame.size.width - 75, 10, 55, 20)]; -// [self.closeBtn setImage:[UIImage imageNamed:@"close_Icon"] forState:UIControlStateNormal]; - [self.closeBtn setTitle:@"确定" forState:UIControlStateNormal]; - [self.closeBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - self.closeBtn.titleLabel.font = BOLDSYSTEMFONT(13); - [self.closeBtn addTarget:self action:@selector(closeAct) forControlEvents:UIControlEventTouchUpInside]; - [self.backView addSubview:self.closeBtn]; - - - self.startBtn = [[UIButton alloc]initWithFrame:CGRectMake(20, self.titleLab.bottom + 25, self.backView.frame.size.width/2 - 35, 33)]; - [self.startBtn setTitleColor:UIColor.blackColor forState:UIControlStateNormal]; - self.startBtn.layer.cornerRadius = 5; - self.startBtn.layer.masksToBounds = YES; - self.startBtn.layer.borderWidth = 1; - self.startBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - [self.startBtn setTitle:@"开始时间" forState:UIControlStateNormal]; - self.startBtn.titleLabel.font = SYSTEMFONT(13); - [self.startBtn addTarget:self action:@selector(startBtnAct) forControlEvents:UIControlEventTouchUpInside]; - [self.backView addSubview:self.startBtn]; - -// UIImageView * time1imge = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(10), 9, 15, 15)]; -// time1imge.image = [UIImage imageNamed:@"smallTime"]; -// [self.startBtn addSubview:time1imge]; - - self.endBtn = [[UIButton alloc]initWithFrame:CGRectMake(self.backView.frame.size.width/2 + 15, self.startBtn.top, self.startBtn.width, self.startBtn.height)]; - [self.endBtn setTitleColor:UIColor.blackColor forState:UIControlStateNormal]; - self.endBtn.layer.cornerRadius = 6; - self.endBtn.layer.masksToBounds = YES; - self.endBtn.layer.borderWidth = 1; - self.endBtn.layer.borderColor = UIColorHex(#999999).CGColor; - self.endBtn.titleLabel.font = SYSTEMFONT(13); - [self.endBtn setTitle:@"结束时间" forState:UIControlStateNormal]; - [self.endBtn addTarget:self action:@selector(endBtnAct) forControlEvents:UIControlEventTouchUpInside]; - [self.backView addSubview:self.endBtn]; - -// UIImageView * time2imge = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(10), 9, 15, 15)]; -// time2imge.image = [UIImage imageNamed:@"smallTime"]; -// [self.endBtn addSubview:time2imge]; - - self.centerLab = [[UILabel alloc]initWithFrame:CGRectMake(self.backView.frame.size.width/2 - 7.5, 60, 15, 25)]; - self.centerLab.text = @"至"; - self.centerLab.textAlignment = NSTextAlignmentCenter; - self.centerLab.font = SYSTEMFONT(13); - [self.backView addSubview:self.centerLab]; - - self.showTimeLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 12, 100, 25)]; - self.showTimeLabel.text = @"预计开始时间"; - self.showTimeLabel.textAlignment = NSTextAlignmentCenter; - self.showTimeLabel.font = SYSTEMFONT(16); - self.showTimeLabel.centerX = self.backView.centerX; - [self.backView addSubview:self.showTimeLabel]; - - self.pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 80, [UIScreen mainScreen].bounds.size.width, 200)]; - self.pickerView.delegate = self; - self.pickerView.dataSource = self; - [self.backView addSubview:self.pickerView]; - - UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 10, 50)]; - lab.center = CGPointMake(self.pickerView.center.x + 115, self.pickerView.frame.size.height/2 -1); - lab.text = @":"; - [self.pickerView addSubview:lab]; -} - --(void)configData{ - - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setDateFormat:@"HH-mm"]; - NSDate *currentdate = [NSDate date]; - NSString *DateStr = [dateFormatter stringFromDate:currentdate]; - NSArray *timearr = [DateStr componentsSeparatedByString:@"-"]; - [self.pickerView selectRow:[timearr[0] integerValue] inComponent:1 animated:NO ]; - [self.pickerView selectRow:[timearr[1] integerValue] inComponent:2 animated:NO ]; - self.monthStr = self.monthAndDayArr[0]; - self.hourStr = timearr[0]; - self.minStr = timearr[1]; -// [self setStartAndEndData]; -} - --(void)setStartAndEndData{ - NSDate *currentdate = [NSDate date]; - if (_type == 0) { - NSString * startTime = [NSString stringWithFormat:@"%ld年%@%@%@",(long)currentdate.year, [self.monthStr substringToIndex:6],self.hourStr,self.minStr]; - self.startTime = [NSString stringWithFormat:@"%ld",(long)[self timeSwitchTimestamp:startTime]] ; - [self.startBtn setTitle:[NSString stringWithFormat:@"%@ %@:%@", self.monthStr,self.hourStr,self.minStr] forState:UIControlStateNormal]; - - }else{ - NSString * currEndTime = [NSString stringWithFormat:@"%ld年%@%@%@",(long)currentdate.year, [self.monthStr substringToIndex:6],self.hourStr,self.minStr]; - self.endTime = [NSString stringWithFormat:@"%ld",(long)[self timeSwitchTimestamp:currEndTime]] ; - [self.endBtn setTitle:[NSString stringWithFormat:@"%@ %@:%@", self.monthStr,self.hourStr,self.minStr] forState:UIControlStateNormal]; - - } -} - -- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ - return 3; -} - -- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ - if (component == 0) return self.monthAndDayArr.count; - if (component == 1) return self.hourArr.count; - if (component == 2) return self.minArr.count; - return 0; -} - --(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ - if (component == 0) return [self.monthAndDayArr objectAtIndex:row]; - if (component == 1) return [self.hourArr objectAtIndex:row]; - if (component == 2) return [self.minArr objectAtIndex:row]; - return @""; -} - --(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{ - return 50; -} - --(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{ - if (component == 0) - { - return 220; - } - else - { - return 50; - } -} - --(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ - if (component == 0) { - self.monthStr = self.monthAndDayArr[row]; - }else if (component == 1){ - self.hourStr = self.hourArr[row]; - }else if (component == 2){ - self.minStr = self.minArr[row]; - } - [self setStartAndEndData]; -} - --(void)startBtnAct{ - _type = 0; - self.showTimeLabel.text = @"预计开始时间"; - self.startBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - self.endBtn.layer.borderColor = UIColorHex(#999999).CGColor; -} - --(void)endBtnAct{ - _type = 1; - self.showTimeLabel.text = @"预计结束时间"; - self.startBtn.layer.borderColor = UIColorHex(#999999).CGColor; - self.endBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - -} - --(void)closeAct{ - - if (_type == 0 ){ - - self.startBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - self.endBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - _type = 1; - }else - { - _type = 0; - if (self.startBtn.currentTitle.length == 4 ) { - [EasyTextView showErrorText:@"请选择开始时间"]; - return; - } - if ([self.startTime doubleValue] < [self.endTime doubleValue]) { - - } else if ([self.startTime doubleValue] > [self.endTime doubleValue]) { - [EasyTextView showErrorText:@"结束时间不能小于开始时间"]; - return; - } else if ([self.startTime doubleValue] == [self.endTime doubleValue]) { - - } - if (self.returnBlock) { - self.returnBlock(self.startTime, self.endTime); - } - [self removeFromSuperview]; - - } - - - - -} - -- (NSInteger)timeSwitchTimestamp:(NSString *)formatTime{ - - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - - [formatter setDateStyle:NSDateFormatterMediumStyle]; - - [formatter setTimeStyle:NSDateFormatterShortStyle]; - - [formatter setDateFormat:@"yyyy年MM月dd日HHmm"]; //(@"YYYY-MM-dd hh:mm:ss") ----------设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制 - - NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"]; - - [formatter setTimeZone:timeZone]; - - NSDate* date = [formatter dateFromString:formatTime]; //------------将字符串按formatter转成nsdate - - //时间转时间戳的方法: - NSInteger timeSp = [[NSNumber numberWithDouble:[date timeIntervalSince1970]*1000] integerValue]; - - NSLog(@"将某个时间转化成 时间戳timeSp:%ld",(long)timeSp); //时间戳的值 - - return timeSp; - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.h b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.h deleted file mode 100644 index b2ab9a4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// RefuseQuestionPopView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^refuseQuestionBlock)(NSString * beizhuString,NSString * reasourString); - -typedef void(^cancelReasonBlock)(); - - -@interface RefuseQuestionPopView : UIView - -@property (nonatomic, copy) refuseQuestionBlock popBlock; -@property (nonatomic, copy) cancelReasonBlock upBlock; - -@property (nonatomic, strong) NSArray * dataArray; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.m b/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.m deleted file mode 100644 index 0e6960f..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/HomePage/view/refuseQuestion(拒绝咨询)/RefuseQuestionPopView.m +++ /dev/null @@ -1,271 +0,0 @@ -// -// RefuseQuestionPopView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/4. -// - -#import "RefuseQuestionPopView.h" -#import "UIPlaceHolderTextView.h" -#import "YXCancelReasonModel.h" -@interface RefuseQuestionPopView () - -@property (nonatomic, strong) UIPlaceHolderTextView * beizhuTextView; - -@property (nonatomic, strong) YYLabel * questionLabel; -@property (nonatomic, strong) UITableView * reasourTable; - -@property (nonatomic, copy) NSString * reasour_id; -@property (nonatomic, copy) NSString * reasour_text; - -@end - -@implementation RefuseQuestionPopView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - - } - - return self; - -} - -- (void)createUI { - - self.backgroundColor = RGBA(0, 0, 0, 0.3); - - UIView * popView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(47), kRealValue(176), kScreenWidth - kRealValue(94), kRealValue(323))]; - - popView.backgroundColor = KWhiteColor; - - popView.layer.cornerRadius = 10.0f; - - popView.layer.masksToBounds = true; - -// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)]; -// [popView addGestureRecognizer:tap]; - - [self addSubview:popView]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(20), popView.width, 14)]; - titleLabel.text = @"拒绝原因"; - titleLabel.font = SYSTEMFONT(14); - titleLabel.textAlignment = NSTextAlignmentCenter; - titleLabel.textColor = CFontColor1; - [popView addSubview:titleLabel]; - - UILabel * stopLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(27), titleLabel.bottom + kRealValue(28), 40, 13)]; - stopLabel.text = @"原因:"; - stopLabel.font = MEDIUMFONT(13); - stopLabel.textAlignment = NSTextAlignmentRight; - stopLabel.textColor = UIColorHex(#666666); - [popView addSubview:stopLabel]; - - - UIView * questionView = [[UIView alloc] initWithFrame:CGRectMake(stopLabel.right + kRealValue(9),titleLabel.bottom + kRealValue(18), popView.width - stopLabel.right - kRealValue(35), kRealValue(30))]; - questionView.backgroundColor = KWhiteColor; - questionView.layer.cornerRadius = 10.0f; - questionView.layer.borderColor = UIColorHex(#CCCCCC).CGColor; - questionView.layer.borderWidth = 1.0; - questionView.layer.masksToBounds = true; - [popView addSubview:questionView]; - - UIButton * pubbtn = [[UIButton alloc] initWithFrame:CGRectMake(questionView.width - kRealValue(9) - 13, kRealValue(11), 13, 8)]; - [pubbtn setImage:[UIImage imageNamed:@"garyDown"] forState:UIControlStateNormal]; - [pubbtn addTarget:self action:@selector(cancelReasonAction) forControlEvents:UIControlEventTouchUpInside]; - [questionView addSubview:pubbtn]; - - YYLabel * questionLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kRealValue(13),0, popView.width - kRealValue(22) - 13, questionView.height)]; - questionLabel.text = @"时间不合适"; - self.questionLabel = questionLabel; - questionLabel.font = SYSTEMFONT(13); - questionLabel.textAlignment = NSTextAlignmentLeft; - questionLabel.textColor = CFontColor1; - [questionLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - [self cancelReasonAction]; - }]; - [questionView addSubview:questionLabel]; - - - - - - UILabel * beizhuLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(27), questionView.bottom + kRealValue(27), 40, 13)]; - beizhuLabel.text = @"备注:"; - beizhuLabel.font = MEDIUMFONT(13); - beizhuLabel.textAlignment = NSTextAlignmentRight; - beizhuLabel.textColor = UIColorHex(#666666); - [popView addSubview:beizhuLabel]; - - self.beizhuTextView = [[UIPlaceHolderTextView alloc] initWithFrame:CGRectMake(stopLabel.right + kRealValue(9),questionView.bottom + kRealValue(19), questionView.width, 132)]; - self.beizhuTextView.layer.cornerRadius = 5.0f; - self.beizhuTextView.layer.masksToBounds = true; - self.beizhuTextView.layer.borderColor = UIColorHex(#CCCCCC).CGColor; - self.beizhuTextView.layer.borderWidth = 1.0; - self.beizhuTextView.placeholder = @"请输入拒绝原因详细说明"; - self.beizhuTextView.placeholderColor = UIColorHex(#999999); - self.beizhuTextView.font = SYSTEMFONT(13); - [popView addSubview: self.beizhuTextView]; - - - - - UIButton * cancelbtn = [[UIButton alloc] initWithFrame:CGRectMake(popView.width - kRealValue(15) - 15 , kRealValue(15) , 15, 15)]; - [cancelbtn setImage:[UIImage imageNamed:@"close_Icon"] forState:UIControlStateNormal]; - [cancelbtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside]; - [popView addSubview:cancelbtn]; - - UIButton * submit = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(65), self.beizhuTextView.bottom + kRealValue(30) , popView.width - kRealValue(130), 35)]; - [submit setTitle:@"提交" forState:UIControlStateNormal]; - [submit setTitleColor:KWhiteColor forState:UIControlStateNormal]; - [submit setBackgroundColor:UIColorHex(#21BEBD)]; - submit.layer.cornerRadius =17.5; - submit.layer.masksToBounds = true; - submit.titleLabel.font = SYSTEMFONT(14); - [submit addTarget:self action:@selector(subitAction) forControlEvents:UIControlEventTouchUpInside]; - [popView addSubview:submit]; - - - self.reasourTable = [[UITableView alloc] initWithFrame:CGRectMake(questionView.left + kRealValue(5), questionView.bottom, questionView.width - kRealValue(10), kRealValue(90)) style:UITableViewStyleGrouped]; - self.reasourTable.delegate = self; - self.reasourTable.dataSource = self; - self.reasourTable.backgroundColor = KWhiteColor; - self.reasourTable.hidden = YES; - [popView addSubview:self.reasourTable]; - - self.reasourTable.layer.shadowColor = RGBA(0, 0, 0, 0.3).CGColor; - - self.reasourTable.layer.shadowOffset = CGSizeMake(0, 0); - - self.reasourTable.layer.shadowOpacity = 1; - - self.reasourTable.clipsToBounds = false; - - -} - -- (void)subitAction { - - if (self.popBlock) { - - self.popBlock(self.beizhuTextView.text, self.reasour_id); - } -} - - --(void)cancelAction { - - [self removeFromSuperview]; - -} - -- (void)handleTapGesture:(id)sender { - - self.reasourTable.hidden = true; -} - -- (void)cancelReasonAction { - - self.reasourTable.hidden = false; - -} - -- (void)setDataArray:(NSArray *)dataArray { - - _dataArray = dataArray; - if (_dataArray.count > 0) { - YXCancelReasonModel * model = _dataArray[0]; - self.reasour_id = model.value; - self.questionLabel.text = model.text; - } - - [self.reasourTable reloadData]; - -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return self.dataArray.count; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - YXCancelReasonModel * model = self.dataArray[indexPath.row]; - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"STATUSCELL"]; - if (!cell) { - - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"STATUSCELL"]; - } - cell.backgroundColor = KWhiteColor; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - cell.textLabel.text = model.text; - cell.textLabel.font = SYSTEMFONT(13); - return cell; - - - -} -//每行高度 -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return kRealValue(30); -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - -//组头 --- 组尾 - -- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { - - - return [UIView new]; - -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - return [UIView new]; - -} -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - YXCancelReasonModel * model = self.dataArray[indexPath.row]; - self.reasour_id = model.value; - self.questionLabel.text = model.text; - self.reasourTable.hidden = YES; -} - - -@end - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.h b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.h deleted file mode 100644 index 064ae4f..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// IMUserInfoModel.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/6/29. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface IMUserInfoModel : NSObject - -@property (nonatomic, strong) NSDictionary *IMInfo; - - -@property (nonatomic, copy) NSString * sdkAppId; - -@property (nonatomic, copy) NSString * userSig; - -@property (nonatomic, copy) NSString * userId; - -@property (nonatomic, copy) NSString * value; -@property (nonatomic, copy) NSString * text; -@property (nonatomic, copy) NSString * title; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.m b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.m deleted file mode 100644 index a11c5b6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/IMUserInfoModel.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// IMUserInfoModel.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/6/29. -// - -#import "IMUserInfoModel.h" - -@implementation IMUserInfoModel - -- (void)encodeWithCoder:(NSCoder *)aCoder -{ - [aCoder encodeObject:self.sdkAppId forKey:@"sdkAppId"]; - [aCoder encodeObject:self.userSig forKey:@"userSig"]; - [aCoder encodeObject:self.userId forKey:@"userId"]; - - -} -- (id)initWithCoder:(NSCoder *)aDecoder -{ - self = [super init]; - if (self) - { - self.userId = [aDecoder decodeObjectForKey:@"userId"]; - self.userSig = [aDecoder decodeObjectForKey:@"userSig"]; - self.sdkAppId = [aDecoder decodeObjectForKey:@"sdkAppId"]; - - } - return self; -} - - --(void)setIMInfo:(NSDictionary *)IMInfo { - - _IMInfo = IMInfo; - self.sdkAppId = [_IMInfo objectForKey:@"sdkAppId"]; - self.userSig = [_IMInfo objectForKey:@"userSig"]; - self.userId = [_IMInfo objectForKey:@"userId"]; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.h deleted file mode 100644 index bf2f446..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// YXLoginFoundPasswordViewController.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/5/22. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXLoginFoundPasswordViewController : YXBaseViewController - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.m deleted file mode 100644 index 7dc30b6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginFoundPasswordViewController.m +++ /dev/null @@ -1,209 +0,0 @@ -// -// YXLoginFoundPasswordViewController.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/5/22. -// - -#import "YXLoginFoundPasswordViewController.h" -#import "YXLoginSetPasswordViewController.h" -#import "LVKeyboard.h" -#import "MQTextField.h" - -@interface YXLoginFoundPasswordViewController () - -@property (nonatomic, strong) UITextField * nameTextFild; -@property (nonatomic, strong) UITextField * phoneTextFild; -@property (nonatomic, strong) MQTextField * codeTextFild; -@property (nonatomic, strong)UIButton * codeButton; -@property (nonatomic, strong) LVKeyboard *keyboard; - -@end - -@implementation YXLoginFoundPasswordViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.navigationItem.title = @"修改密码"; - // Do any additional setup after loading the view. - self.view.backgroundColor = UIColorHex(#E0E0E0); - [self createUI]; -} - -- (void)createUI { - - //初始化键盘 - LVKeyboard *keyboard = [[LVKeyboard alloc] init]; - keyboard.delegate = self; - self.keyboard = keyboard; - - UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(151))]; - topView.backgroundColor = KWhiteColor; - [self.view addSubview:topView]; - - - - UIView * nameLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))]; - UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 80, kRealValue(50))]; - nameLabel.text = @"用户姓名"; - nameLabel.textAlignment = NSTextAlignmentLeft; - nameLabel.font = SYSTEMFONT(13); - nameLabel.textColor = UIColorHex(#666666); - [nameLeft addSubview:nameLabel]; - - - self.nameTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(50))]; - self.nameTextFild.placeholder = @"请输入用户姓名"; - self.nameTextFild.returnKeyType = UIReturnKeyDone; - self.nameTextFild.font = [UIFont systemFontOfSize:14]; - self.nameTextFild.backgroundColor = KWhiteColor; - self.nameTextFild.leftView = nameLeft; - self.nameTextFild.leftViewMode = UITextFieldViewModeAlways; - self.nameTextFild.font = SYSTEMFONT(14); - [topView addSubview:self.nameTextFild]; - - UIView * linv = [[UIView alloc] initWithFrame:CGRectMake(16, self.nameTextFild.bottom, kScreenWidth - 32, 1)]; - linv.backgroundColor = UIColorHex(#E0E0E0); - [topView addSubview:linv]; - - UIView * codeLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))]; - UILabel * codeLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 90, kRealValue(50))]; - codeLabel.text = @"身份证号"; - codeLabel.textAlignment = NSTextAlignmentLeft; - codeLabel.font = SYSTEMFONT(13); - codeLabel.textColor = UIColorHex(#666666); - - [codeLeft addSubview:codeLabel]; - - self.codeTextFild = [[MQTextField alloc] initWithFrame:CGRectMake(0, self.nameTextFild.bottom+1, kScreenWidth, kRealValue(50))]; - self.codeTextFild.placeholder = @"请输入用户身份证号"; - self.codeTextFild.font = [UIFont systemFontOfSize:14]; - self.codeTextFild.backgroundColor = KWhiteColor; - self.codeTextFild.inputView = self.keyboard; - self.codeTextFild.delegate = self; - self.codeTextFild.leftView = codeLeft; - self.codeTextFild.leftViewMode = UITextFieldViewModeAlways; - [topView addSubview:self.codeTextFild]; - - UIView * linvCard = [[UIView alloc] initWithFrame:CGRectMake(16, self.codeTextFild.bottom, kScreenWidth - 32, 1)]; - linvCard.backgroundColor = UIColorHex(#E0E0E0); - [topView addSubview:linvCard]; - - - UIView * phoneLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))]; - UILabel * phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 90, kRealValue(50))]; - phoneLabel.text = @"手机号"; - phoneLabel.textAlignment = NSTextAlignmentLeft; - phoneLabel.font = SYSTEMFONT(13); - phoneLabel.textColor = UIColorHex(#666666); - [phoneLeft addSubview:phoneLabel]; - - self.phoneTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, self.codeTextFild.bottom+1, kScreenWidth, kRealValue(50))]; - self.phoneTextFild.placeholder = @"请输入用户手机号"; - self.phoneTextFild.font = [UIFont systemFontOfSize:14]; - self.phoneTextFild.backgroundColor = KWhiteColor; - self.phoneTextFild.leftView = phoneLeft; - self.phoneTextFild.keyboardType = UIKeyboardTypeNumberPad; - self.phoneTextFild.leftViewMode = UITextFieldViewModeAlways; - [topView addSubview:self.phoneTextFild]; - - UIView * phoneLinv = [[UIView alloc] initWithFrame:CGRectMake(16, self.phoneTextFild.bottom, kScreenWidth - 32, 1)]; - phoneLinv.backgroundColor = UIColorHex(#E0E0E0); - [topView addSubview:phoneLinv]; - - - UIButton * loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(48,self.phoneTextFild.bottom+58, kScreenWidth-96, 48)]; - [loginBtn setTitle:@"确定" forState:UIControlStateNormal ]; - loginBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14]; - [loginBtn setBackgroundColor:UIColorHex(#21BEBD)]; - loginBtn.layer.cornerRadius = 20; - loginBtn.layer.masksToBounds = true; - [loginBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - [loginBtn addTarget:self action:@selector(sureFoundAction) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:loginBtn]; -} -#pragma mark - 确定点击 -- (void)sureFoundAction { - - - if (ValidStr(self.nameTextFild.text)) { - [EasyTextView showErrorText:@"请输入用户姓名"]; - return; - } - if (ValidStr(self.codeTextFild.text)) { - [EasyTextView showErrorText:@"请输入用户身份证号"]; - return; - } - if (ValidStr(self.phoneTextFild.text)) { - [EasyTextView showErrorText:@"请输入用户手机号"]; - return; - } - [self showMBProgressHUDWithString:@"信息验证中,请稍候..." autoHidden:false]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:self.nameTextFild.text forKey:@"realname"]; - [parmDic setObject:self.codeTextFild.text forKey:@"idCard"]; - [parmDic setObject:self.phoneTextFild.text forKey:@"phone"]; - - YXNetAPI * chageApi = [[YXNetAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""]; - - [chageApi postSetUserPassword:parmDic]; - - -} - -#pragma mark -网络请求处理 -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self showMBProgressHUDOnlyWithString:message]; - [self hiddenAllMBProgressHUD]; - -} -- (void)Sucess:(id)response tag:(NSString*)tag -{ - if ([tag isEqualToString:@"CHANGEAPI"]) { - [self hiddenAllMBProgressHUD]; - NSString * result = response; - - YXLoginSetPasswordViewController * password = [[YXLoginSetPasswordViewController alloc] init]; - password.result = result; - [self.navigationController pushViewController:password animated:YES]; - } - -} - - --(BOOL)textFieldShouldBeginEditing:(UITextField *)textField { - - if(textField == self.codeTextFild) { - - self.codeTextFild.inputView = self.keyboard; - } - return YES; - -} - -- (void)keyboard:(LVKeyboard *)keyboard didClickDeleteButton:(UIButton *)deleteBtn string:(NSMutableString *)string { - self.codeTextFild.text = string; -} - -- (void)keyboard:(LVKeyboard *)keyboard didClickTextButton:(UIButton *)textBtn string:(NSMutableString *)string { - self.codeTextFild.text = string; -} - - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - [self.codeTextFild resignFirstResponder]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.h deleted file mode 100644 index fd1e2bb..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXLoginProtocolWebViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2024/1/12. -// - -#import "YXBaseWebViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXLoginProtocolWebViewController : YXBaseWebViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.m deleted file mode 100644 index 251f73b..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginProtocolWebViewController.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// YXLoginProtocolWebViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2024/1/12. -// - -#import "YXLoginProtocolWebViewController.h" - -@interface YXLoginProtocolWebViewController () - -@end - -@implementation YXLoginProtocolWebViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.h deleted file mode 100644 index 5a41d64..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// LoginSetPasswordViewController.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/5/22. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXLoginSetPasswordViewController : YXBaseViewController - -@property (nonatomic, copy) NSString * result; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.m deleted file mode 100644 index 8883897..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXLoginSetPasswordViewController.m +++ /dev/null @@ -1,178 +0,0 @@ -// -// LoginSetPasswordViewController.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/5/22. -// - -#import "YXLoginSetPasswordViewController.h" -#import "RSAObjC.h" - -@interface YXLoginSetPasswordViewController () - -@property (nonatomic, strong) UITextField * phoneTextFild; -@property (nonatomic, strong) UITextField * codeTextFild; - - -@end - - -@implementation YXLoginSetPasswordViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.navigationItem.title = @"设置密码"; - self.view.backgroundColor = UIColorHex(#EFEFEF); - [self createUI]; -} - -- (void)createUI { - - UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(100))]; - topView.backgroundColor = KWhiteColor; - [self.view addSubview:topView]; - - - - UIView * phoneLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))]; - UILabel * phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 80, kRealValue(50))]; - phoneLabel.text = @"新密码"; - phoneLabel.textAlignment = NSTextAlignmentLeft; - phoneLabel.font = SYSTEMFONT(13); - phoneLabel.textColor = UIColorHex(#666666); - [phoneLeft addSubview:phoneLabel]; - - - self.phoneTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(50))]; - self.phoneTextFild.placeholder = @"请输入新密码"; - self.phoneTextFild.returnKeyType = UIReturnKeyDone; - self.phoneTextFild.font = [UIFont systemFontOfSize:14]; - self.phoneTextFild.backgroundColor = KWhiteColor; - self.phoneTextFild.leftView = phoneLeft; - self.phoneTextFild.secureTextEntry = YES; - self.phoneTextFild.leftViewMode = UITextFieldViewModeAlways; - self.phoneTextFild.font = SYSTEMFONT(14); - [self.view addSubview:self.phoneTextFild]; - - UIView * linv = [[UIView alloc] initWithFrame:CGRectMake(16, self.phoneTextFild.bottom, kScreenWidth - 32, 1)]; - linv.backgroundColor = UIColorHex(#E0E0E0); - [self.view addSubview:linv]; - - UIView * codeLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))]; - UILabel * codeLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 90, kRealValue(50))]; - codeLabel.text = @"确认密码"; - codeLabel.textAlignment = NSTextAlignmentLeft; - codeLabel.font = SYSTEMFONT(13); - codeLabel.textColor = UIColorHex(#666666); - [codeLeft addSubview:codeLabel]; - - self.codeTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, self.phoneTextFild.bottom+1, kScreenWidth, kRealValue(50))]; - self.codeTextFild.placeholder = @"请输入新密码"; - self.codeTextFild.font = [UIFont systemFontOfSize:14]; - self.codeTextFild.backgroundColor = KWhiteColor; - self.codeTextFild.leftView = codeLeft; - self.codeTextFild.secureTextEntry = YES; - self.codeTextFild.leftViewMode = UITextFieldViewModeAlways; - [self.view addSubview:self.codeTextFild]; - - - UILabel * passwordLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), topView.bottom + kRealValue(8) , kScreenWidth - kRealValue(30), 42)]; - passwordLabel.textColor = UIColorHex(#666666); - passwordLabel.text = @"温馨提示:密码需要为12-32位(包含数字、大写、小写字母、特殊字符)"; - passwordLabel.numberOfLines = 2; - passwordLabel.font =MEDIUMFONT(14); - [passwordLabel sizeToFit]; - [self.view addSubview:passwordLabel]; - - UIButton * loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(48,passwordLabel.bottom+58, kScreenWidth-96, 48)]; - [loginBtn setTitle:@"确定" forState:UIControlStateNormal ]; - loginBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14]; - [loginBtn setBackgroundColor:UIColorHex(#21BEBD)]; - loginBtn.layer.cornerRadius = 20; - loginBtn.layer.masksToBounds = true; - [loginBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - [loginBtn addTarget:self action:@selector(sureFoundAction) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:loginBtn]; -} - -#pragma mark:重新设置密码 -- (void)sureFoundAction { - - - - if (ValidStr(self.phoneTextFild.text) || ValidStr(self.codeTextFild.text)) { - [EasyTextView showErrorText:@"请输入新密码"]; - return; - } - if ([self isValidPassword:self.phoneTextFild.text]) { - - } else { - [EasyTextView showErrorText:@"请按照密码规则,请重新输入"]; - return; - } - if ( ![self.phoneTextFild.text isEqualToString:self.codeTextFild.text]) { - [EasyTextView showErrorText:@"两次输入密码不一致,请重新输入"]; - return; - } - - NSString * publish_key = @" MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB"; - - // 原始数据,要加密的字符串 - NSString *originalString = self.phoneTextFild.text; - - // RSA 加密,使用字符串格式的公钥私钥加密解密, RSAPublickKey 为公钥字符串(NSString 格式) - NSString *encryptStr = [RSAObjC encrypt:originalString PublicKey:publish_key]; - - [self showMBProgressHUDWithString:@"密码重置中,请稍候..." autoHidden:false]; - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:encryptStr forKey:@"newPassword"]; - [parmDic setObject:encryptStr forKey:@"newPasswordConfirm"]; - [parmDic setObject:self.result forKey:@"resetCode"]; - - YXNetAPI * chageApi = [[YXNetAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""]; - - [chageApi postResetUserNewPassword:parmDic]; - - -} - - --(BOOL)isValidPassword:(NSString *)password { - // 定义正则表达式 - NSString *pattern = @"^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*(),.?\":{}|<>]).{12,32}$"; - - // 创建NSPredicate对象 - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", pattern]; - - // 使用NSPredicate对象进行判断 - return [predicate evaluateWithObject:password]; -} - -#pragma mark -网络请求处理 -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self showMBProgressHUDOnlyWithString:message]; - [self hiddenAllMBProgressHUD]; - -} -- (void)Sucess:(id)response tag:(NSString*)tag -{ - if ([tag isEqualToString:@"CHANGEAPI"]) { - [self hiddenAllMBProgressHUD]; - [self.navigationController popToRootViewControllerAnimated:YES]; - [self showMBProgressHUDOnlyWithString:response]; - } - -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.h deleted file mode 100644 index 77ccc8b..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXRegisterViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2024/1/26. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXRegisterViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.m deleted file mode 100644 index 0aab0d2..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/Login/YXRegisterViewController.m +++ /dev/null @@ -1,262 +0,0 @@ -// -// YXRegisterViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2024/1/26. -// - -#import "YXRegisterViewController.h" -#import "YXLoginProtocolWebViewController.h" -@interface YXRegisterViewController () - -@property (nonatomic, strong)UITextField * phoneTextField; -@property (nonatomic, strong)UITextField * codeTextField; -@property (nonatomic, strong)UITextField * passwordTextField; -@property (nonatomic, strong)UITextField * surePasswordTextField; -@property (nonatomic, strong)UITextField * inviteCodeTextField; -@property (nonatomic, strong)UIButton * protocolBtn; -@property (nonatomic, strong)UIButton * codeButton; -@property (nonatomic, copy)NSString * protocolString; - -@end - -@implementation YXRegisterViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = YES; - self.StatusBarStyle = UIStatusBarStyleDefault; - self.view.backgroundColor = CViewBgColor; - [self createUI]; - [self getUserProtocol]; -} - -- (void)createUI -{ - - UIImageView * topBackImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(243))]; - topBackImg.image = IMAGE_NAMED(@"loginTopBimg"); - [self.view addSubview:topBackImg]; - - UIImageView * cenetrImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, kRealValue(70), kRealValue(68), kRealValue(68))]; - cenetrImg.centerX = self.view.centerX; - cenetrImg.image = IMAGE_NAMED(@"login_icon"); - [self.view addSubview:cenetrImg]; - - - UIImageView *titleImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, cenetrImg.bottom + kRealValue(20), kRealValue(109), kRealValue(24))]; - titleImg.centerX = self.view.centerX; - titleImg.image = IMAGE_NAMED(@"loginTitle_Img"); - [self.view addSubview:titleImg]; - - UIButton * leftButton = [[UIButton alloc] initWithFrame:CGRectMake(11, 40, 20, 20)]; - [leftButton setImage:[UIImage imageNamed:@"close_Icon"] forState:UIWindowLevelNormal]; - [leftButton addTarget:self action:@selector(leftBtnClick) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:leftButton]; - - UIView * connetView = [[UIView alloc] init]; - connetView.frame = CGRectMake(0, topBackImg.bottom+1, kScreenWidth, 200); - connetView.backgroundColor = [UIColor whiteColor]; - [self.view addSubview:connetView]; - - self.phoneTextField = [self createTextFieldWithFrame:CGRectMake(10, 0, kScreenWidth-20, 50) placeholder:@"请输入账户名" passWord:NO leftImageView:nil rightImageView:nil Font:14]; - self.phoneTextField.delegate =self; - self.phoneTextField.keyboardType = UIKeyboardTypeNumberPad; - [connetView addSubview:self.phoneTextField]; - - - self.passwordTextField = [self createTextFieldWithFrame:CGRectMake(10, self.phoneTextField.bottom+1, kScreenWidth-20, 50) placeholder:@"请输入密码(6-20位)" passWord:NO leftImageView:nil rightImageView:nil Font:14]; - self.passwordTextField.secureTextEntry = YES; - self.passwordTextField.delegate =self; - [connetView addSubview:self.passwordTextField]; - - - - //平台协议 - UIButton * protocolBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, connetView.bottom+9, 20, 20)]; - [protocolBtn setImage:IMAGE_NAMED(@"login_nomalProtocol") forState:UIControlStateNormal]; - [protocolBtn setImage:IMAGE_NAMED(@"login_selectProtocol") forState:UIControlStateSelected]; - protocolBtn.selected = NO; - [protocolBtn addTarget:self action:@selector(agreeProtocol:) forControlEvents:UIControlEventTouchUpInside]; - self.protocolBtn = protocolBtn; - [self.view addSubview:protocolBtn]; - - UILabel * contentTitle = [[UILabel alloc] initWithFrame:CGRectMake(protocolBtn.right+5,connetView.bottom+9, 300, 20)]; - NSString *text = @"我已阅读并同意《医生端使用协议》"; - NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc]initWithString:text]; - [attributeStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:50/255.0 green:170/255.0 blue:223/255.0 alpha:1] range:NSMakeRange(7, text.length - 7)]; - contentTitle.attributedText = attributeStr; - contentTitle.textAlignment = NSTextAlignmentLeft; - contentTitle.font = [UIFont systemFontOfSize:12]; - contentTitle.userInteractionEnabled = YES; - UITapGestureRecognizer * tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)]; - [contentTitle addGestureRecognizer:tapRecognizer]; - [self.view addSubview:contentTitle]; - - UIButton * loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, self.surePasswordTextField.bottom+140, kScreenWidth-20, 44)]; - loginBtn.mj_y = self.protocolBtn.bottom+25; - [loginBtn setTitle:@"注册" forState:UIControlStateNormal ]; - loginBtn.tag = 100; - loginBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:16]; - [loginBtn setBackgroundImage:[UIImage imageNamed:@"loginBtn_img"] forState:UIControlStateNormal]; - [loginBtn setTitleColor:UIColorTitle1 forState:UIControlStateNormal]; - [loginBtn addTarget:self action:@selector(regisOnClick) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:loginBtn]; - -} -- (void)agreeProtocol:(UIButton *)agreeBtn -{ - agreeBtn.selected = !agreeBtn.selected; - -} - -#pragma mark - 获取协议 -- (void)getUserProtocol { - - YXNetAPI * agreeAPI = [[YXNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""]; - - [agreeAPI getUserAgreementPrivacy:nil]; -} - -// 跳转用户协议 -- (void)tap -{ - - YXLoginProtocolWebViewController * webVC= [[YXLoginProtocolWebViewController alloc] init]; - webVC.webTitle = @"用户注册协议"; - webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,self.protocolString]; - [self.navigationController pushViewController:webVC animated:YES]; -} - - -- (void)xmProtocol -{ - self.protocolBtn.selected = YES; - -} - -#pragma mark - 注册 - -- (void)regisOnClick -{ - if ([NSString stringWithFormat:@"%@",self.passwordTextField.text].length<6||[NSString stringWithFormat:@"%@",self.passwordTextField.text].length>20) - { - [EasyTextView showErrorText:@"密码的长度是6-20位"]; - return; - } - - if (!self.protocolBtn.selected ) - { - [EasyTextView showErrorText:@"请先阅读并同意协议"]; - return; - } - - [self showMBProgressHUDOnlyWithString:@"注册已提交,请等待审核通过后方可登录"]; -} - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - - - if ([tag isEqualToString:@"GetUserRegister"]) - { - [self showMBProgressHUDOnlyWithString:@"注册成功"]; - [self dismissViewControllerAnimated:YES completion:nil]; - } - if ([tag isEqualToString:@"AGREEAPI"]) { - - NSArray * array = response; - NSMutableArray * dataArray = [[NSMutableArray alloc] init]; - - for (NSDictionary * parmDic in array) { - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:parmDic]; - if ([model.value integerValue] == 1) { - self.protocolString = model.text; - } - [dataArray addObject:model]; - - } - - } -} - - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [MBProgressHUD showInfoMessage:message]; - - NSLog(@"apiError=%@",message); - // [self showMessage:message]; - -} - -- (void)leftBtnClick -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} -//实现UITextField代理方法 -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - - [textField resignFirstResponder];//取消第一响应者 - - return YES; -} - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - [self.view endEditing:YES]; -} -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - --(UITextField*)createTextFieldWithFrame:(CGRect)frame placeholder:(NSString*)placeholder passWord:(BOOL)YESorNO leftImageView:(UIView*)leftView rightImageView:(UIView*)rightView Font:(float)font -{ - UITextField*textField=[[UITextField alloc]initWithFrame:frame]; - //灰色提示框 - textField.placeholder=placeholder; - //文字对齐方式 - textField.textAlignment=NSTextAlignmentLeft; - textField.secureTextEntry=YESorNO; - - //边框 - //textField.borderStyle=UITextBorderStyleLine; - //键盘类型 - textField.returnKeyType=UIReturnKeyDone; - //关闭首字母大写 - textField.autocapitalizationType=NO; - //清除按钮 - textField.clearButtonMode=NO; - //左图片 - textField.leftView=leftView; - textField.leftViewMode=UITextFieldViewModeAlways; - //右图片 - textField.rightView=rightView; - //编辑状态下一直存在 - textField.rightViewMode=UITextFieldViewModeAlways; - //自定义键盘 - //textField.inputView - //字体 - textField.font=[UIFont systemFontOfSize:font]; - //字体颜色 - UIView * line2 = [[UIView alloc] initWithFrame:CGRectMake(0, frame.size.height-1, kScreenWidth, 1)]; - line2.backgroundColor = UIColorLine; - [textField addSubview:line2]; - return textField; - -} - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/HQLoginViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/HQLoginViewController.h deleted file mode 100644 index 8c7d580..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/HQLoginViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// HQLoginViewController.h -// healthQuestion -// -// Created by xulei on 2022/8/16. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXLoginViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/YXLoginViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/YXLoginViewController.m deleted file mode 100644 index 87faadd..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Login_Register/register/YXLoginViewController.m +++ /dev/null @@ -1,498 +0,0 @@ -// -// HQLoginViewController.m -// healthQuestion -// -// Created by xulei on 2022/8/16. -// - -#import "YXLoginViewController.h" -#import "TUIC2CChatViewController.h" -#import "YXLoginFoundPasswordViewController.h" -#import "IMUserInfoModel.h" -#import "YXLoginProtocolWebViewController.h" -#import "RSAObjC.h" -#import "YXRegisterViewController.h" -#import "UIDevice+model.h" -#import "LVKeyboard.h" -#import "YXModifyPasswordViewController.h" - -@interface YXLoginViewController () - -@property (nonatomic, strong) UITextField * userNameField; - -@property (nonatomic, strong) UITextField * passwordField; - -@property (nonatomic, strong) UIButton * logoBtn; - -@property (nonatomic, strong) UIView * loginView; - -@property (nonatomic, strong) UIButton * privacyPolicyBtn; - -@property (nonatomic, strong) UIButton * agreenBtn; - -@property (nonatomic, strong) UIButton * regisBtn; - -@property (nonatomic, strong) IMUserInfoModel * model ; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@property (nonatomic, strong) LVKeyboard *keyboard; - -@property (nonatomic, strong) UIButton *toggleButton; - -@end - -@implementation YXLoginViewController - -- (NSMutableArray *)dataArray { - - if (!_dataArray) { - _dataArray = [[NSMutableArray alloc] init]; - } - return _dataArray; -} - - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = YES; - self.view.backgroundColor = KWhiteColor; - [self createUI]; - [self createData]; -// [self ishiderRegisData]; - LVKeyboard *keyboard = [[LVKeyboard alloc] init]; - keyboard.delegate = self; - self.keyboard = keyboard; - - -} - -- (void)createUI { - - UIImageView * topBackImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(243))]; - topBackImg.image = IMAGE_NAMED(@"loginTitle_Img"); - [self.view addSubview:topBackImg]; - - UIImageView * cenetrImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, kRealValue(70), kRealValue(68), kRealValue(68))]; - cenetrImg.centerX = self.view.centerX; - cenetrImg.image = IMAGE_NAMED(@"login_icon"); - [self.view addSubview:cenetrImg]; - - - UIImageView *titleImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, cenetrImg.bottom + kRealValue(20), kRealValue(109), kRealValue(24))]; - titleImg.centerX = self.view.centerX; - titleImg.image = IMAGE_NAMED(@"loginTitle"); - [self.view addSubview:titleImg]; -// - UIView *loginView = [[UIView alloc]init]; - loginView.frame = CGRectMake(0, titleImg.bottom + kRealValue(41), kScreenWidth, kScreenHeight - titleImg.bottom - kRealValue(41)); - [self.view addSubview:loginView]; - loginView.backgroundColor = KWhiteColor; - UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:loginView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(20, 20)]; - CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; - maskLayer.path = maskPath.CGPath; - loginView.layer.mask = maskLayer; - self.loginView = loginView; -// - UITextField *accountField = [[UITextField alloc]init]; - accountField.frame = CGRectMake(kRealValue(35), kRealValue(36), loginView.width - kRealValue(70), 40); - accountField.placeholder = @"请输入用户名"; - accountField.font = BOLDSYSTEMFONT(14); - accountField.textColor = CFontColor1; - self.userNameField = accountField; - self.userNameField.backgroundColor = UIColorHex(#EEEEEE); - self.userNameField.layer.cornerRadius = 20; - self.userNameField.layer.masksToBounds = true; - UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)]; - self.userNameField.leftView = leftview; - self.userNameField.leftViewMode = UITextFieldViewModeAlways; - [loginView addSubview:accountField ]; -// -// - UITextField *passwordField = [[UITextField alloc]init]; - passwordField.frame = CGRectMake(kRealValue(35), accountField.bottom + kRealValue(19), accountField.width, accountField.height); - passwordField.placeholder = @"请输入密码"; - passwordField.font = BOLDSYSTEMFONT(14); - passwordField.textColor = CFontColor1; - passwordField.backgroundColor = UIColorHex(#EEEEEE); - passwordField.secureTextEntry = YES; - self.passwordField = passwordField; - self.passwordField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)]; - self.passwordField.leftViewMode = UITextFieldViewModeAlways; - self.passwordField.layer.cornerRadius = 20; - self.passwordField.layer.masksToBounds = true; - self.passwordField.delegate = self; - self.passwordField.inputView = self.keyboard; - self.toggleButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.toggleButton setImage:[UIImage imageNamed:@"eye"] forState:UIControlStateNormal]; - [self.toggleButton setImage:[UIImage imageNamed:@"eye.slash"] forState:UIControlStateSelected]; - self.toggleButton.frame = CGRectMake(0, 5, 30,30); - [self.toggleButton addTarget:self action:@selector(togglePasswordVisibility) forControlEvents:UIControlEventTouchUpInside]; - // 创建一个容器视图来包含按钮,并增加边距 - UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; - [rightView addSubview:self.toggleButton]; - - // 调整按钮在容器视图中的位置,增加边距 - self.toggleButton.center = CGPointMake(rightView.frame.size.width - self.toggleButton.frame.size.width / 2, rightView.frame.size.height / 2); - self.passwordField.rightView = rightView; - self.passwordField.rightViewMode = UITextFieldViewModeAlways; - [loginView addSubview:passwordField]; - - - UIButton *loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - loginBtn.frame = CGRectMake(kRealValue(35), self.passwordField.bottom + kRealValue(19), kScreenWidth - kRealValue(70), 41); - [loginBtn setTitle:@"登录" forState:UIControlStateNormal]; - [loginBtn.titleLabel setFont:BOLDSYSTEMFONT(14)]; - [loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - [loginBtn setBackgroundImage:[UIImage imageNamed:@"loginBtn_img"] forState:UIControlStateNormal]; - [loginBtn addTarget:self action:@selector(toClickFootBtn:) forControlEvents:UIControlEventTouchUpInside]; - [loginView addSubview:loginBtn]; - - - - UIButton * foundPasswordBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - foundPasswordBtn.frame = CGRectMake(kRealValue(35), loginBtn.bottom + kRealValue(10), kScreenWidth - kRealValue(70), 20); - [foundPasswordBtn setTitle:@"找回密码" forState:UIControlStateNormal]; - foundPasswordBtn.titleLabel.font = MEDIUMFONT(14); - [foundPasswordBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal]; - [foundPasswordBtn addTarget:self action:@selector(foundUserPasswordAction) forControlEvents:UIControlEventTouchUpInside]; - [loginView addSubview:foundPasswordBtn]; - - UIButton * regisBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - regisBtn.frame = CGRectMake(kRealValue(35), foundPasswordBtn.bottom + kRealValue(20), kScreenWidth - kRealValue(70), 20); - [regisBtn setTitle:@"注册" forState:UIControlStateNormal]; - self.regisBtn = regisBtn; - regisBtn.titleLabel.font = MEDIUMFONT(14); - self.regisBtn.hidden = true; - [regisBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal]; - [regisBtn addTarget:self action:@selector(regisAction) forControlEvents:UIControlEventTouchUpInside]; - [loginView addSubview:regisBtn]; - - NSUserDefaults * agreeDefaul = [NSUserDefaults standardUserDefaults]; - - NSString * agree = [agreeDefaul objectForKey:@"LOGINAgree"]; - - self.agreenBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - self.agreenBtn.frame = CGRectMake(kRealValue(28), self.view.bottom - kRealValue(45) - SafetyAreaHeight, kRealValue(20), kRealValue(20)); - [self.agreenBtn addTarget:self action:@selector(agreeProtocolAction:) forControlEvents:UIControlEventTouchUpInside]; - [self.agreenBtn setImage:IMAGE_NAMED(@"login_nomalProtocol") forState:UIControlStateNormal]; - [self.agreenBtn setImage:IMAGE_NAMED(@"login_selectProtocol") forState:UIControlStateSelected]; - [self.view addSubview:self.agreenBtn]; - if ([agree intValue] == 1) { - self.agreenBtn.selected = true; - }else - { - self.agreenBtn.selected = false; - } - //隐私 - YYLabel * yslabel = [[YYLabel alloc] initWithFrame:CGRectMake(self.agreenBtn.right + kRealValue(5) ,self.agreenBtn.top , kScreenWidth - self.agreenBtn.right - kRealValue(47), 40)]; - [self.view addSubview:yslabel]; - yslabel.numberOfLines = 0; - - NSString *string = @"已阅读并同意《用户协议》、《隐私政策》和《相关法律说明》"; - NSMutableAttributedString *attributed = [[NSMutableAttributedString alloc] initWithString:string]; - [attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#3390FF) range:[string rangeOfString:@"《用户协议》"]]; - [attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#3390FF) range:[string rangeOfString:@"《隐私政策》"]]; - [attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#3390FF) range:[string rangeOfString:@"《相关法律说明》"]]; - - YYTextHighlight * protocolHightlight = [[YYTextHighlight alloc] init]; - protocolHightlight.userInfo = @{@"协议":@"《用户协议》"}; - [protocolHightlight setColor:UIColor.blueColor]; - [attributed setTextHighlight:protocolHightlight range:[string rangeOfString:@"《用户协议》"]]; - - YYTextHighlight * layHightlight = [[YYTextHighlight alloc] init]; - layHightlight.userInfo = @{@"隐私":@"《隐私政策》"}; - [layHightlight setColor:UIColor.blueColor]; - [attributed setTextHighlight:layHightlight range:[string rangeOfString:@"《隐私政策》"]]; - - - YYTextHighlight * shuoHightlight = [[YYTextHighlight alloc] init]; - shuoHightlight.userInfo = @{@"说明":@"《相关法律说明》"}; - [shuoHightlight setColor:UIColor.blueColor]; - [attributed setTextHighlight:shuoHightlight range:[string rangeOfString:@"《相关法律说明》"]]; - - attributed.lineSpacing = 3; - attributed.paragraphSpacing = 5; - yslabel.attributedText = attributed; - - yslabel.highlightTapAction = ^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { - NSLog(@"%@, %@, %@, %@", containerView, text.string, NSStringFromRange(range), NSStringFromCGRect(rect)); - NSString *string = [text.string substringWithRange:range]; - NSLog(@"\n %@", string); - if ([string containsString:@"用户协议"]){ - for (IMUserInfoModel * model in self.dataArray) { - - if ([model.value integerValue] == 1) { - - YXLoginProtocolWebViewController * webVC= [[YXLoginProtocolWebViewController alloc] init]; - webVC.webTitle = @"用户协议"; - webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text]; - [self.navigationController pushViewController:webVC animated:YES]; - } - - } - - } - if ([string containsString:@"隐私政策"]){ - for (IMUserInfoModel * model in self.dataArray) { - if ([model.value integerValue] == 2) { - - YXLoginProtocolWebViewController * webVC= [[YXLoginProtocolWebViewController alloc] init]; - webVC.webTitle = @"隐私政策"; - webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text]; - [self.navigationController pushViewController:webVC animated:YES]; - } - } - } - if ([string containsString:@"相关法律说明"]){ - for (IMUserInfoModel * model in self.dataArray) { - if ([model.value integerValue] == 3) { - - YXLoginProtocolWebViewController * webVC= [[YXLoginProtocolWebViewController alloc] init]; - webVC.webTitle = @"相关法律说明"; - webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text]; - [self.navigationController pushViewController:webVC animated:YES]; - } - } - } - }; - -} - -- (void)togglePasswordVisibility { - self.passwordField.secureTextEntry = !self.passwordField.secureTextEntry; - self.toggleButton.selected = !self.toggleButton.selected; -} - -#pragma mark - ACTION -- (void)toClickFootBtn:(UIButton *)button{ - - if (self.agreenBtn.selected == false) { - [EasyTextView showErrorText:@"请选阅读并同意用户服务协议与隐私"]; - return;; - } - - if (self.userNameField.text.length < 1) { - [EasyTextView showErrorText:@"请输入用户名"]; - return;; - } - - if (self.passwordField.text.length < 12 || self.passwordField.text.length > 32) { - - - - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"密码不安全,请先修改密码" preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - - }]; - UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - - YXLoginFoundPasswordViewController * modifVC = [[YXLoginFoundPasswordViewController alloc] init]; - [self.navigationController pushViewController:modifVC animated:YES]; - - }]; - [alertController addAction:cancelAction]; - [alertController addAction:sureAction]; - - [self presentViewController:alertController animated:YES completion:nil]; - - - return;; - } - - NSString * publish_key = @" MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB"; - - // 原始数据,要加密的字符串 - NSString *originalString = self.passwordField.text; - - // RSA 加密,使用字符串格式的公钥私钥加密解密, RSAPublickKey 为公钥字符串(NSString 格式) - NSString *encryptStr = [RSAObjC encrypt:originalString PublicKey:publish_key]; - NSLog(@"加密后:%@", encryptStr); - - [self showMBProgressHUDWithString:@"登录中" autoHidden:YES]; - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - [parmDic setObject:self.userNameField.text forKey:@"username"]; - [parmDic setObject:encryptStr forKey:@"password"]; - - //新增 - UIDevice *currentDevice = [UIDevice currentDevice]; - NSString * phone = [currentDevice getCurrentDeviceModel]; -// NSString * system = [NSString stringWithFormat:@"%.1f",CurrentSystemVersion] ; - [parmDic setObject:phone forKey:@"deviceType"]; - [parmDic setObject:@(CurrentSystemVersion) forKey:@"deviceSystem"]; - - YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil]; - [proctocolApi PostLogin:parmDic]; - - - -} - -- (void)createData { - - YXNetAPI * agreeAPI = [[YXNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""]; - - [agreeAPI getUserAgreementPrivacy:nil]; - -} - -- (void)ishiderRegisData { - - - YXNetAPI * versionAPI = [[YXNetAPI alloc] init:self tag:@"VERSIONAPI" NeedToken:@""]; - - [versionAPI getVesionHideRegis:@{@"type":@"app_update_doctor_ios"}]; - - -} - -#pragma mark -网络请求处理 -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - - [self hiddenAllMBProgressHUD]; - [EasyTextView showErrorText:message]; -} -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - if ([tag isEqualToString:@"LOGINGAPI"]) { - - NSDictionary * dic = response; - YXUserInfo * user = [[YXUserInfo alloc] init]; - user.userInfo = [dic objectForKey:@"userInfo"]; - user.token = [dic objectForKey:@"token"]; - [HQCommonUtils keyedArchiverWithData:user key:LoginUserInfo]; - [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"]; - [[NSUserDefaults standardUserDefaults] synchronize]; - KPostNotification(KNotificationLoginStateChange, @YES); - //登录im - [self loginImAccount]; - } - if ([tag isEqualToString:@"IMAPI"]) { - - NSDictionary * pamrDic = response; - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; - - IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; - iminfoModel.IMInfo = pamrDic; - [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; - - // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 - // 2. 初始化 config 对象 - V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init]; - // 3. 指定 log 输出级别。 - config.logLevel = V2TIM_LOG_INFO; - // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 - [[V2TIMManager sharedInstance] addIMSDKListener:self]; - // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 - [[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config]; - - [ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig]; - - TUICallEngine * engin = [TUICallEngine createInstance]; - - [engin init:[model.sdkAppId intValue] userId:model.userId userSig:model.userSig succ:^{ - [engin addObserver:self]; - } fail:^(int code, NSString * _Nullable errMsg) { - - }]; - - - } - if ([tag isEqualToString:@"AGREEAPI"]) { - - NSArray * array = response; - - for (NSDictionary * parmDic in array) { - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:parmDic]; - - [self.dataArray addObject:model]; - - } - - } - - if ([tag isEqualToString:@"VERSIONAPI"]) { - - NSString * version = response; - - NSBundle *mainBundle = [NSBundle mainBundle]; - if (mainBundle) { - NSString *version = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - - if([version floatValue] < [version floatValue]) { - self.regisBtn.hidden = true; - }else - { - self.regisBtn.hidden = false; - } - } - } -} - -- (void)loginImAccount { - - - YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; - [proctocolApi GetIMLoginAccount:nil]; - - - -} - - -- (void)agreeProtocolAction:(UIButton *)agreeBtn { - - agreeBtn.selected = !agreeBtn.selected; - - -} -#pragma mark:找回密码 -- (void)foundUserPasswordAction { - - YXLoginFoundPasswordViewController * foundVC = [[YXLoginFoundPasswordViewController alloc] init]; - - [self.navigationController pushViewController:foundVC animated:YES]; -} - -#pragma mark:注册 -- (void)regisAction { - - YXRegisterViewController * forgetVc = [[YXRegisterViewController alloc] init]; - - [self presentViewController:forgetVc animated:YES completion:nil]; -} - - - --(BOOL)textFieldShouldBeginEditing:(UITextField *)textField { - - if(textField == self.passwordField) { - - self.passwordField.inputView = self.keyboard; - } - return YES; - -} - -- (void)keyboard:(LVKeyboard *)keyboard didClickDeleteButton:(UIButton *)deleteBtn string:(NSMutableString *)string { - self.passwordField.text = string; -} - -- (void)keyboard:(LVKeyboard *)keyboard didClickTextButton:(UIButton *)textBtn string:(NSMutableString *)string { - self.passwordField.text = string; -} - - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - [self.passwordField resignFirstResponder]; -} -@end - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.h deleted file mode 100644 index 474a03c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXAboutUsViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2024/1/15. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXAboutUsViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.m deleted file mode 100644 index 15e6566..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXAboutUsViewController.m +++ /dev/null @@ -1,236 +0,0 @@ -// -// YXAboutUsViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2024/1/15. -// - -#import "YXAboutUsViewController.h" -#import "YXLoginProtocolWebViewController.h" - -@interface YXAboutUsViewController () - -@property (nonatomic, strong) UITableView * homeTableView; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@end - -@implementation YXAboutUsViewController - -- (NSMutableArray *)dataArray { - - if (!_dataArray) { - _dataArray = [[NSMutableArray alloc] init]; - } - return _dataArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.view.backgroundColor = CViewBgColor; - self.navigationItem.title = @"关于我们"; - [self createUI]; - [self createData]; - -} - -- (void)createUI -{ - self.homeTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight) style:UITableViewStyleGrouped]; - if (@available(iOS 11.0, *)) { - self.homeTableView.estimatedRowHeight = 0; - self.homeTableView.estimatedSectionFooterHeight = 0; - self.homeTableView.estimatedSectionHeaderHeight = 0; - self.homeTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - } - self.homeTableView.delegate = self; - self.homeTableView.backgroundColor = CViewBgColor; - self.homeTableView.dataSource = self; - self.homeTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; - self.homeTableView.showsVerticalScrollIndicator = NO; - [self.view addSubview:self.homeTableView]; -} - -- (void)createData { - - YXNetAPI * agreeAPI = [[YXNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""]; - - [agreeAPI getUserAgreementPrivacy:nil]; - -} - - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self showMBProgressHUDOnlyWithString:message]; - [self hiddenAllMBProgressHUD]; - -} - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - if ([tag isEqualToString:@"AGREEAPI"]) { - - NSArray * array = response; - - for (NSDictionary * parmDic in array) { - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:parmDic]; - - [self.dataArray addObject:model]; - - } - - } -} - - -#pragma mark - DataSource -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - if (section == 0) { - return 2; - } - return 1; -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 2; - -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - - if (indexPath.section == 0) { - - NSArray * sectionOne = @[@"用户协议",@"隐私政策"]; - - - static NSString * cellID = @"cellID"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; - - if (!cell) { - - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID]; - } - cell.selectionStyle = UITableViewCellSelectionStyleNone; - cell.textLabel.font = SYSTEMFONT(14); - cell.textLabel.text = sectionOne[indexPath.row]; - cell.textLabel.textColor = UIColorHex(#666666); - cell.textLabel.font = SYSTEMFONT(14); - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - cell.backgroundColor = KWhiteColor; - return cell; - - - } - if (indexPath.section == 1) { - - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CONNETCELL"]; - - if (!cell) { - - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"CONNETCELL"]; - } - cell.selectionStyle = UITableViewCellSelectionStyleNone; - cell.textLabel.font = SYSTEMFONT(14); - cell.textLabel.text = @"版本号"; - cell.detailTextLabel.text = [[[NSBundle mainBundle]infoDictionary] objectForKey:@"CFBundleShortVersionString"]; - return cell; - - - } - - - return UITableViewCell.new; - -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - - - return 44; - -} - -- (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section -{ - - return CGFLOAT_MIN; -} - - -- (CGFloat )tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section -{ - return kRealValue(5); -} - - -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - - - return UIView.new; - -} - - - - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - - if (indexPath.section == 0) { - - - if (indexPath.row == 0) { - - for (IMUserInfoModel * model in self.dataArray) { - - if ([model.value integerValue] == 1) { - - YXLoginProtocolWebViewController * webVC= [[YXLoginProtocolWebViewController alloc] init]; - webVC.webTitle = @"用户协议"; - webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text]; - [self.navigationController pushViewController:webVC animated:YES]; - } - - } - } - if (indexPath.row == 1) { - - for (IMUserInfoModel * model in self.dataArray) { - - if ([model.value integerValue] == 2) { - - YXLoginProtocolWebViewController * webVC= [[YXLoginProtocolWebViewController alloc] init]; - webVC.webTitle = @"隐私政策"; - webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text]; - [self.navigationController pushViewController:webVC animated:YES]; - } - - } - } - } - - - - - -} - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.h deleted file mode 100644 index 58acff4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// YXGoodAtSicksViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/10. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^SelectedSickBlock)(NSArray * sicksArray); - -@interface YXGoodAtSicksViewController : YXBaseViewController - -@property (nonatomic, copy) NSString * departmentId; - -@property (nonatomic, strong) NSMutableArray * sicksArray; - -@property (nonatomic, copy) SelectedSickBlock sicksBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.m deleted file mode 100644 index a29f390..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXGoodAtSicksViewController.m +++ /dev/null @@ -1,251 +0,0 @@ -// -// YXGoodAtSicksViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/10. -// - -#import "YXGoodAtSicksViewController.h" -#import "YXcustomDelectedView.h" -#import "YXDoctorInfoModel.h" -#import "ZHTagListView.h" - -@interface YXGoodAtSicksViewController () - -@property (nonatomic, strong) NSMutableArray * customArray; - -@property (nonatomic, strong) NSMutableArray * customDataArray; - -@property (nonatomic, strong) NSMutableArray * needArray; - -@property (nonatomic, strong) UIScrollView * mainScrollView; - -@property (nonatomic, strong) ZHTagListView *tagList; - -@property (nonatomic, copy) NSString * reasonString; - -@property (nonatomic, strong) NSArray * buttonArray; - -@end - - -@implementation YXGoodAtSicksViewController - -- (NSMutableArray *)customArray { - - if(!_customArray) { - _customArray = [[NSMutableArray alloc] init]; - } - return _customArray; -} - - -- (NSMutableArray *)needArray { - - if(!_needArray) { - _needArray = [[NSMutableArray alloc] init]; - } - return _needArray; -} - - -- (NSMutableArray *)customDataArray { - - if (!_customDataArray) { - - _customDataArray = [[NSMutableArray alloc] init]; - } - - return _customDataArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.view.backgroundColor = KWhiteColor; - self.isHidenNaviBar = false; - self.navigationItem.title = @"擅长病种"; - [self addNavigationItemWithTitles:@[@"确认"] isLeft:false target:self action:@selector(sureAction) tags:@[@"1111"]]; - [self createUI]; - [self createData]; -} - -- (void)sureAction { - -// NSMutableArray * needArray = [[NSMutableArray alloc] init]; - //如果不点击 - - - for (YXDoctorGoodSicknessModel * model in self.customDataArray) { - - for (NSString * sickName in self.sicksArray) { - - if ([sickName isEqualToString:model.sicksName]) { - - [self.needArray addObject:model]; - } - - } - } - self.sicksBlock(self.needArray); - //如果点击 - [self.navigationController popViewControllerAnimated:YES]; - - -} - - -- (void)createUI { - - self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - [self.view addSubview:self.mainScrollView]; - - NSMutableArray *_dataSource = @[@" ",@" ",@" ",@" "].mutableCopy; - - ZHTagListConfiguration *config = [ZHTagListConfiguration defaultConfiguration]; -// config.tagTextColor = UIColorHex(#21BEBD); - config.tagTextMargin = 11; - config.tagHeight = 27; - config.tagTextFont = SYSTEMFONT(14); - config.tagMaxWidth = kScreenWidth - kRealValue(30); - config.tagListViewInset = UIEdgeInsetsMake(15, 15, 15, 10); - - - ZHTagListView *tagList = [[ZHTagListView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, self.mainScrollView.width - kRealValue(30), 0) configuration:config tagTexts:_dataSource]; - tagList.backgroundColor = KWhiteColor; - [self.mainScrollView addSubview:tagList]; - self.tagList = tagList; - [tagList.tagButtonList enumerateObjectsUsingBlock:^(UIButton * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { -// [obj setBackgroundColor:KRedColor]; - - }]; - - -} - - - -- (void)createData { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - [parmDic setObject:self.departmentId forKey:@"departmentId"]; - - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"ROOMINFO" NeedToken:@""]; - - [homeApi GetInquireDoctorRoomInfo:parmDic]; - -} -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - - - if ([tag isEqualToString:@"ROOMINFO"]) { - - NSArray * resArray = response; - - NSMutableArray * dataArray = [[NSMutableArray alloc] init]; - - for (NSDictionary * dic in resArray) { - YXDoctorGoodSicknessModel * sickModel = [YXDoctorGoodSicknessModel modelWithDictionary:dic]; - [self.customDataArray addObject:sickModel]; - [dataArray addObject:sickModel.sicksName]; - } - //一样的数据 - NSMutableArray * samArray = [[NSMutableArray alloc] init]; - NSMutableArray * difArray = [[NSMutableArray alloc] init]; - - for ( NSString * allName in dataArray) { - - for (NSString * samString in self.sicksArray) { - - if ([allName isEqualToString:samString]) - { - [samArray addObject:allName]; - }else - { - [difArray addObject:allName]; - } - } - } - - - self.tagList.tags = dataArray; - - [self.tagList.tagButtonList enumerateObjectsUsingBlock:^(UIButton * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - - for (NSString * samString in samArray) { - - if ([obj.currentTitle isEqualToString:samString]) - { - [obj setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - obj.selected = true; - obj.layer.borderColor = UIColorHex(#21BEBD).CGColor; - break; - }else - { - [obj setTitleColor:CFontColor1 forState:UIControlStateNormal]; - obj.selected = false; - obj.layer.borderColor = UIColorHex(#666666).CGColor; - } - - } - - - - }]; - - - NSMutableArray * clickArray = [[NSMutableArray alloc] initWithArray:self.sicksArray]; - - [self.tagList setTagClickHandler:^(ZHTagListView *tagListView, NSString *tagText, NSUInteger index) { - UIButton * btn = tagListView.tagButtonList[index]; - self.reasonString = tagText; - btn.selected = !btn.selected; - if (btn.selected == true) { - [btn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - btn.selected = true; - btn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - }else - { - [btn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - btn.selected = false; - btn.layer.borderColor = UIColorHex(#666666).CGColor; - } - [clickArray removeAllObjects]; - for (UIButton * seleBtn in tagListView.tagButtonList) { - - if (seleBtn.selected == true) { - - [clickArray addObject:seleBtn.currentTitle]; - - } - - } - self.sicksArray = clickArray; - }]; - } - - -} - - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.h deleted file mode 100644 index b143eb2..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXMineViewController.h -// healthQuestion -// -// Created by xulei on 2022/8/17. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXMineViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.m deleted file mode 100644 index cabdd78..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXMineViewController.m +++ /dev/null @@ -1,411 +0,0 @@ -// -// YXMineViewController.m -// healthQuestion -// -// Created by xulei on 2022/8/17. -// - -#import "YXMineViewController.h" -#import "GraphView.h" -#import "AAChartKit.h" -#import "YXQuestionStatisticsViewController.h" -#import "YXStopAnnouncementViewController.h" -#import "YXUserCenterInfoViewController.h" -#import "YXModifyPasswordViewController.h" -#import "YXSchedulingSettingViewController.h" -#import "YXDoctorInfoModel.h" -#import "YXworkSetingViewController.h" -#import "YXStopQuestionSettingVC.h" -#import "YXHomePageModel.h" -#import "ChatViewController.h" -#import "TUIC2CChatViewController.h" -#import "YXAboutUsViewController.h" -@interface YXMineViewController () - -@property (strong, nonatomic) AAChartView * aaChartView; - -@property (strong, nonatomic) AAChartModel * configureAreaChartThreshold; - -@property (nonatomic, strong) UILabel * nameLabel; - -@property (nonatomic, strong) UILabel * workLabel; - -@property (nonatomic, strong) UILabel * hospatilLabel; - -@property (nonatomic, strong) UIImageView * heardImage; - -@property (nonatomic, strong) NSMutableArray * dataArray; - -@end - -@implementation YXMineViewController - -#pragma mark:懒加载 - -- (NSMutableArray *)dataArray { - - if (!_dataArray) { - _dataArray = [[NSMutableArray alloc] init]; - } - return _dataArray; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.view.backgroundColor = UIColorHex(#EFEFEF); - self.navigationItem.title = @"我的"; - [self createUI]; -} - -- (void)viewWillAppear:(BOOL)animated { - - [super viewWillAppear:animated]; - [self docotrUserInfo]; - - -} - -- (void)docotrUserInfo { - - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"DoctorINFO" NeedToken:@""]; - - [homeApi GetInquireDoctorInfo:nil]; - -} - - -- (void) createUI{ - self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(19), 100, 20)]; - self.nameLabel.textColor = CFontColor1; - self.nameLabel.font = SYSTEMFONT(21); - self.nameLabel.text = @""; - self.nameLabel.textAlignment = NSTextAlignmentLeft; - [self.view addSubview:self.nameLabel]; - - self.workLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLabel.right + kRealValue(12), kRealValue(25), 100, 13)]; - self.workLabel.textColor = CFontColor1; - self.workLabel.font = SYSTEMFONT(13); - self.workLabel.text = @""; - CGFloat workW = [HQCommonUtils getLengthFromText:self.workLabel.text andFontSize:13]; - self.workLabel.width = workW; - self.workLabel.textAlignment = NSTextAlignmentLeft; - [self.view addSubview:self.workLabel]; - - self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), self.nameLabel.bottom + kRealValue(17), kScreenWidth - kRealValue(65), 20)]; - self.hospatilLabel.textColor = CFontColor1; - self.hospatilLabel.font = SYSTEMFONT(13); - self.hospatilLabel.text = @""; - self.hospatilLabel.textAlignment = NSTextAlignmentLeft; - [self.view addSubview:self.hospatilLabel]; - - self.heardImage = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(24) - 60, kRealValue(10), 60, 60)]; - self.heardImage.layer.cornerRadius = 30.0; - self.heardImage.layer.masksToBounds = true; - [self.view addSubview:self.heardImage]; - - UIView * toolsView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.heardImage.bottom + kRealValue(22), kScreenWidth - kRealValue(30), kRealValue(104))]; - toolsView.backgroundColor = KWhiteColor; - toolsView.layer.cornerRadius = 10; - toolsView.layer.masksToBounds = true; - [self.view addSubview:toolsView]; - [HQCommonUtils addShadowToView:toolsView]; - - CGFloat mager = (toolsView.width - kRealValue(28) - kRealValue(47) * 4)/3; - - NSArray * array = @[@[@"小助手",@"smallHelp_icon"],@[@"咨询统计",@"questionStatistics_icon"],@[@"排班设置",@"schedulingSeting_icon"],@[@"暂停服务",@"stopHelp_icon"]]; - for (int i = 0; i < array.count; i ++) { - - UIImageView * toolsImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(14) + (kRealValue(47) + mager) * i , kRealValue(17), kRealValue(47), kRealValue(47))]; - toolsImg.image = [UIImage imageNamed:array[i][1]]; - [toolsView addSubview:toolsImg]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(toolsImg.left-kRealValue(10), toolsImg.bottom + kRealValue(10), toolsImg.width + kRealValue(20), 13)]; - titleLabel.text = array[i][0]; - titleLabel.font = SYSTEMFONT(13); - titleLabel.textColor = CFontColor1; - titleLabel.textAlignment = NSTextAlignmentCenter; - [toolsView addSubview:titleLabel]; - - UIButton * clickBtn = [[UIButton alloc] initWithFrame:CGRectMake(toolsImg.left, kRealValue(17), toolsImg.width, kRealValue(80))]; - clickBtn.tag = 500+ i; - [clickBtn addTarget:self action:@selector(toolsAction:) forControlEvents:UIControlEventTouchUpInside]; - [toolsView addSubview:clickBtn]; - } - - UIView * infoView = [[UIView alloc] initWithFrame:CGRectMake(toolsView.left, toolsView.bottom + kRealValue(10), toolsView.width, kRealValue(150))]; - infoView.backgroundColor = KWhiteColor; - infoView.layer.cornerRadius = 5; - infoView.layer.masksToBounds = true; - [self.view addSubview:infoView]; - [HQCommonUtils addShadowToView:infoView]; - - UITableView * table = [[UITableView alloc] initWithFrame:CGRectMake(toolsView.left, toolsView.bottom + kRealValue(10), toolsView.width, kRealValue(150))]; - table.delegate = self; - table.dataSource = self; - table.backgroundColor = KWhiteColor; - table.showsVerticalScrollIndicator = false; - table.showsHorizontalScrollIndicator = false; - table.layer.cornerRadius = 5; - table.layer.masksToBounds = true; - table.scrollEnabled = false; - table.separatorStyle = UITableViewCellSeparatorStyleSingleLine; - [self.view addSubview:table]; - [HQCommonUtils addShadowToView:table]; - - - UIButton * outLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(48), kScreenHeight - kTabBarHeight - kTopHeight -kRealValue(100) , kScreenWidth - kRealValue(96), kRealValue(40))]; - outLoginBtn.backgroundColor = KWhiteColor; - [outLoginBtn setTitle:@"退出登录" forState:UIControlStateNormal]; - [outLoginBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - outLoginBtn.layer.cornerRadius = 20; - outLoginBtn.layer.masksToBounds = YES; - outLoginBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - outLoginBtn.titleLabel.font = SYSTEMFONT(14); - [outLoginBtn addTarget:self action:@selector(outLoginUserinfo) forControlEvents:UIControlEventTouchUpInside]; - outLoginBtn.layer.borderWidth = 1.0f; - [self.view addSubview:outLoginBtn]; - -} - -- (void)toolsAction:(UIButton *)toolsBtn { - - switch (toolsBtn.tag) { - case 500: - { - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"FOUNDSMALLAPI" NeedToken:@""]; - [homeApi getHomeFoundSmallHelpData:nil]; - //小助手 - } - break; - case 501: - { - //咨询统计 - YXQuestionStatisticsViewController * statisVc = [[YXQuestionStatisticsViewController alloc] init]; - - [self.navigationController pushViewController:statisVc animated:YES]; - - } - break; - case 502: - { - //时间 -// SchedulingSettingViewController * timeVc = [[SchedulingSettingViewController alloc] init]; -// -// [self.navigationController pushViewController:timeVc animated:YES]; - YXworkSetingViewController * statisVc = [[YXworkSetingViewController alloc] init]; - - [self.navigationController pushViewController:statisVc animated:YES]; - - } - break; - case 503: - { - //暂停服务 - YXStopQuestionSettingVC * stopVC = [[YXStopQuestionSettingVC alloc] init]; - - [self.navigationController pushViewController:stopVC animated:YES]; - } - break; - - default: - break; - } - -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 3; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - - return kRealValue(50); - -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - NSArray * array = @[@[@"个人信息设置",@"mainHeard_icon"],@[@"账号安全设置(修改密码)",@"AccountSafety_icon"],@[@"关于我们",@"aboutUS_Icon"]]; - - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"BILLCELL"]; - - if (!cell) { - - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BILLCELL"]; - } - cell.backgroundColor = KWhiteColor; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - cell.imageView.image = [UIImage imageNamed:array[indexPath.row][1]]; - cell.textLabel.text = array[indexPath.row][0]; - cell.textLabel.font = SYSTEMFONT(14); - return cell; - -} - - -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (indexPath.row == 0) { - - YXUserCenterInfoViewController * infoVC = [[YXUserCenterInfoViewController alloc] init]; - - [self.navigationController pushViewController:infoVC animated:YES]; - } - if (indexPath.row == 1) { - - YXModifyPasswordViewController * modifVC = [[YXModifyPasswordViewController alloc] init]; - - [self.navigationController pushViewController:modifVC animated:YES]; - - } - if (indexPath.row == 2) { - - YXAboutUsViewController * aboutVC = [[YXAboutUsViewController alloc] init]; - - [self.navigationController pushViewController:aboutVC animated:YES]; - } - -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - - - if ([tag isEqualToString:@"DoctorINFO"]) { - - NSDictionary * parDic = response; - - YXDoctorInfoModel * model = [YXDoctorInfoModel modelWithDictionary:parDic]; - self.nameLabel.text = model.doctorName; - CGFloat w = [HQCommonUtils getLengthFromText:self.nameLabel.text andFontSize:21]; - self.nameLabel.width = w; - self.workLabel.text = [NSString stringWithFormat:@"%@",model.doctorTitle] ; - self.workLabel.left = self.nameLabel.right + kRealValue(10); - CGFloat workW = [HQCommonUtils getLengthFromText:self.workLabel.text andFontSize:13]; - self.workLabel.width = workW; - self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",model.resourceName,model.departmentName]; - - NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photo]; - - NSString * str1 = @"\\"; - - photo = [photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; - - NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); - - [self.heardImage sd_setImageWithURL:[NSURL URLWithString:encodedString3] placeholderImage:[UIImage imageNamed:@"doctorNoImage"]]; - } - if ([tag isEqualToString:@"FOUNDSMALLAPI"]) { - - NSDictionary * responDic = response; - - YXZJSmallHelpModel * helpModel = [YXZJSmallHelpModel modelWithDictionary:responDic]; - - if ([ESCTUIManager TUIUserStatus] == false) { - - - [self loginImAccount]; - return; - } - - ChatViewController * chatVC = [[ChatViewController alloc] init]; - chatVC.isGroupID = YES; - chatVC.chatID = helpModel.groupId; - chatVC.smallHelp_id = helpModel.help_Id; - chatVC.member = helpModel.member; - chatVC.isVideo = YES; - chatVC.eableSendReport = YES; - chatVC.eableMapTools = false; - chatVC.isVideo = false; - chatVC.navTitle = @"小助手"; - chatVC.eablehaveHelathData = YES; - chatVC.memberSex = @"2"; - [self.navigationController pushViewController:chatVC animated:YES]; - } - if ([tag isEqualToString:@"loginIMAPI"]) { - - NSDictionary * pamrDic = response; - - IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; - - IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; - iminfoModel.IMInfo = pamrDic; - [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; - - // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 - // 2. 初始化 config 对象 - V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init]; - // 3. 指定 log 输出级别。 - config.logLevel = V2TIM_LOG_INFO; - // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 - [[V2TIMManager sharedInstance] addIMSDKListener:self]; - // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 - [[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config]; - - [ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig]; - - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"FOUNDSMALLAPI" NeedToken:@""]; - - [homeApi getHomeFoundSmallHelpData:nil]; - } - - -} - -- (void)loginImAccount { - - YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"loginIMAPI" NeedToken:nil]; - [proctocolApi GetIMLoginAccount:nil]; - -} - -- (void)outLoginUserinfo { - - - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"是否确定退出登录?" preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - - }]; - UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo]; - [ESCTUIManager outLoginTUISDK]; - KPostNotification(KNotificationLoginStateChange, @NO); - }]; - [alertController addAction:cancelAction]; - [alertController addAction:sureAction]; - - [self presentViewController:alertController animated:YES completion:nil]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.h deleted file mode 100644 index 7f3ac37..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXUserCenterInfoViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/6. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXUserCenterInfoViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.m deleted file mode 100644 index ae9ba04..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/YXUserCenterInfoViewController.m +++ /dev/null @@ -1,631 +0,0 @@ -// -// YXUserCenterInfoViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/6. -// - -#import "YXUserCenterInfoViewController.h" -#import "YXcustomDelectedView.h" -#import "UIPlaceHolderTextView.h" -#import "YXuserAddGoodPopView.h" -#import "YXDoctorInfoModel.h" -#import "YXGoodAtSicksViewController.h" - -@interface YXUserCenterInfoViewController () - -@property (nonatomic, strong) NSMutableArray * customArray; - -@property (nonatomic, strong) NSMutableArray * customDataArray; - -@property (nonatomic, strong) NSMutableArray * sicksArray; - - -@property (nonatomic, copy) NSString *departmentId; -@property (nonatomic, copy) NSString *doctor_Id; - - -@property (nonatomic, strong) UIScrollView * mainScrollView; - -@property (nonatomic, strong) UIPlaceHolderTextView * shanchangTextView; - -@property (nonatomic, strong) UIPlaceHolderTextView * jianjieTextView; - -@property (nonatomic, strong) UIImageView * headImg; - -@property(nonatomic,strong) UIAlertController *sheetVC;//选择框 - -@property (nonatomic, strong) UIView * bingView;//擅长病种 - -@property (nonatomic, strong) UIView * shangView;//个人擅长 - -@property (nonatomic, strong) UILabel * sinceLabel ; - -@property (nonatomic, assign) CGFloat sinceW ; - - -@end - -@implementation YXUserCenterInfoViewController - - --(UIAlertController *)sheetVC -{ - - if (!_sheetVC) { - _sheetVC=[UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; - - UIAlertAction *takePhoto=[UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self takePhoto]; - }]; - UIAlertAction *chosePhoto=[UIAlertAction actionWithTitle:@"去相册中选择" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self pushImagePickerController]; - }]; - UIAlertAction *cancel=[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { - }]; - - - - if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) - { - [_sheetVC addAction:takePhoto]; - } - [_sheetVC addAction:chosePhoto]; - [_sheetVC addAction:cancel]; - } - return _sheetVC; - -} - -- (NSMutableArray *)customArray { - - if (!_customArray) { - - _customArray = [[NSMutableArray alloc] init]; - } - - return _customArray; -} - -- (NSMutableArray *)customDataArray { - - if (!_customDataArray) { - - _customDataArray = [[NSMutableArray alloc] init]; - } - - return _customDataArray; -} - -- (NSMutableArray *)sicksArray { - - if (!_sicksArray) { - - _sicksArray = [[NSMutableArray alloc] init]; - } - - return _sicksArray; - -} -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.view.backgroundColor = UIColorHex(#EFEFEF); - self.navigationItem.title = @"个人信息"; - [self createUI]; - //请求医生信息 - [self docotrUserInfo]; - -} - -- (void)docotrUserInfo { - - [self showMBProgressHUDWithString:@"数据加载中,请稍候" autoHidden:false]; - YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"DoctorINFO" NeedToken:@""]; - - [homeApi GetInquireDoctorInfo:nil]; - -} - -- (void)createUI { - - UIScrollView * mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth,kScreenHeight - kTopHeight - SafetyAreaHeight - 50)]; - self.mainScrollView = mainScrollView; - [self.view addSubview:mainScrollView]; - - UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 260)]; - topView.backgroundColor = KWhiteColor; - [mainScrollView addSubview:topView]; - - UILabel * headLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(24), 100, 14)]; - headLabel.text = @"头像"; - headLabel.textColor = CFontColor1; - headLabel.font = SYSTEMFONT(14); - headLabel.textAlignment = NSTextAlignmentLeft; - [topView addSubview:headLabel]; - - UIImageView * accowImg = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 12, kRealValue(25), 16, 22)]; - accowImg.image = [UIImage imageNamed:@"garyRight"]; - [topView addSubview:accowImg]; - - UIImageView * headImg = [[UIImageView alloc] initWithFrame:CGRectMake(accowImg.left - 57 , kRealValue(8), 45, 45)]; - self.headImg = headImg; - headImg.userInteractionEnabled = true; - [topView addSubview:headImg]; - - UIButton * changeBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth - 77, 0, 77, headImg.height)]; - [changeBtn addTarget:self action:@selector(chageUserHeard) forControlEvents:UIControlEventTouchUpInside]; - [topView addSubview:changeBtn]; - - NSArray * titleArray = @[@[@"姓名",@"请输入姓名"],@[@"医院",@"请输入医院名称"],@[@"科室",@"请输入科室"],@[@"职称",@"请输入职称"]]; - for (int i = 0 ; i < titleArray.count; i ++) { - - UIView * lineView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(14), headImg.bottom + 9 + i * kRealValue(45), kScreenWidth - kRealValue(28), 1)]; - lineView.backgroundColor = UIColorHex(#E0E0E0); - [topView addSubview:lineView]; - - UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(headLabel.left, lineView.bottom + kRealValue(15), 100, 14)]; - leftLabel.text = titleArray[i][0] ; - leftLabel.textColor = CFontColor1; - leftLabel.textAlignment = NSTextAlignmentLeft; - leftLabel.font = MEDIUMFONT(14); - [topView addSubview:leftLabel]; - - UITextField * inputField = [[UITextField alloc] initWithFrame:CGRectMake(topView.width - kRealValue(17) - 200, leftLabel.top, 200, 15)]; - inputField.placeholder = titleArray[i][1] ; - inputField.font = SYSTEMFONT(14); - inputField.textAlignment = NSTextAlignmentRight; - inputField.tag = 10 + i; - [topView addSubview:inputField]; - } - //擅长病种 - UIView * bingView = [[UIView alloc] initWithFrame:CGRectMake(0, topView.bottom + kRealValue(10), kScreenWidth, kRealValue(200))]; - bingView.backgroundColor = KWhiteColor; - self.bingView = bingView; - [mainScrollView addSubview:bingView]; - - UILabel * sinceLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(24), 55, 14)]; - sinceLabel.text = @"擅长病种"; - sinceLabel.textColor = CFontColor1; - sinceLabel.font = SYSTEMFONT(14); - sinceLabel.textAlignment = NSTextAlignmentLeft; - self.sinceLabel = sinceLabel; - CGFloat sinceW = [HQCommonUtils getLengthFromText:sinceLabel.text andFontSize:14]; - self.sinceW = sinceW; - sinceLabel.width = sinceW + 10; - [bingView addSubview:sinceLabel]; - - UIButton * addTagBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(10) - kRealValue(50), kRealValue(15), kRealValue(49), kRealValue(27))]; - [addTagBtn setTitle:@"添加" forState:UIControlStateNormal]; - [addTagBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [addTagBtn setBackgroundColor:KWhiteColor]; - [addTagBtn addTarget:self action:@selector(addUserInfo) forControlEvents:UIControlEventTouchUpInside]; - addTagBtn.layer.borderWidth = 1.0; - addTagBtn.layer.masksToBounds = YES; - addTagBtn.titleLabel.font = SYSTEMFONT(14); - addTagBtn.layer.cornerRadius = 13; - addTagBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - [bingView addSubview:addTagBtn]; - - - CGFloat pointX = sinceLabel.right; - CGFloat pointY = 10; - CGFloat allWidth = kScreenWidth-sinceW- 20; - UIFont *titleFont = [UIFont systemFontOfSize:14]; - for(int i = 0; i < self.customDataArray.count; i++) { - -// CGRect rect = [array[i] boundingRectWithSize:CGSizeMake(MAXFLOAT, 25) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : titleFont} context:nil]; - CGFloat width = 22; - - if (pointX + width > allWidth) {//换行 - pointX = sinceLabel.right;//X从新开始 - pointY += 40;//换行后Y+ - } - YXcustomDelectedView * custView = [[YXcustomDelectedView alloc] initWithFrame:CGRectMake(pointX, pointY, width, 25)]; - custView.delectBlock = ^(NSInteger btnTag) { - [self reloadCustomView:btnTag]; - }; - custView.btntag = 100 + i; - pointX += (width + 10);//每次X都加上宽和间距5 - - [bingView addSubview:custView]; - [self.customArray addObject:custView]; - } - UIView * lastView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), sinceLabel.bottom + kRealValue(10), 100, 13)]; - if (self.customArray.count > 0) { - - lastView = [self.customArray lastObject]; - } - bingView.height = lastView.bottom + 20; - - //个人擅长页面 - UIView * shangView = [[UIView alloc] initWithFrame:CGRectMake(0, bingView.bottom, kScreenWidth, kRealValue(500))]; - shangView.backgroundColor = KWhiteColor; - self.shangView = shangView; - [mainScrollView addSubview:shangView]; - - UILabel * gerenLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), 0, sinceLabel.width, 14)]; - gerenLabel.text = @"个人擅长"; - gerenLabel.textColor = CFontColor1; - gerenLabel.font = SYSTEMFONT(14); - gerenLabel.textAlignment = NSTextAlignmentLeft; - [shangView addSubview:gerenLabel]; - - self.shanchangTextView = [[UIPlaceHolderTextView alloc] initWithFrame:CGRectMake(kRealValue(14), gerenLabel.bottom + kRealValue(15), kScreenWidth - kRealValue(28), 179)]; - self.shanchangTextView.placeholder = @"请输入个人擅长方向"; - self.shanchangTextView.font = SYSTEMFONT(14); - self.shanchangTextView.backgroundColor = UIColorHex(#EFEFEF); - self.shanchangTextView.layer.cornerRadius = 5; - self.shanchangTextView.layer.masksToBounds = true; - [shangView addSubview:self.shanchangTextView]; - - UILabel * jianjieLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), self.shanchangTextView.bottom + kRealValue(23), sinceLabel.width, 14)]; - jianjieLabel.text = @"个人简介"; - jianjieLabel.textColor = CFontColor1; - jianjieLabel.font = MEDIUMFONT(14); - jianjieLabel.textAlignment = NSTextAlignmentLeft; - [shangView addSubview:jianjieLabel]; - - self.jianjieTextView = [[UIPlaceHolderTextView alloc] initWithFrame:CGRectMake(kRealValue(14), jianjieLabel.bottom + kRealValue(15), kScreenWidth - kRealValue(28), 179)]; - self.jianjieTextView.placeholder = @"请输入个人简介"; - self.jianjieTextView.font = SYSTEMFONT(14); - self.jianjieTextView.backgroundColor = UIColorHex(#EFEFEF); - self.jianjieTextView.layer.cornerRadius = 5; - self.jianjieTextView.layer.masksToBounds = true; - [shangView addSubview:self.jianjieTextView]; - - shangView.height = self.jianjieTextView.bottom + kRealValue(33); - - - - - UIButton * saveBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(47), kScreenHeight - SafetyAreaHeight - kTopHeight - 40, kScreenWidth - kRealValue(94), 40)]; - saveBtn.backgroundColor = KWhiteColor; - saveBtn.layer.cornerRadius = 20.0f; - saveBtn.layer.masksToBounds = true; - [saveBtn setTitle:@"保存" forState:UIControlStateNormal]; - [saveBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - saveBtn.titleLabel.font = SYSTEMFONT(14); - saveBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - saveBtn.layer.borderWidth = 1.0f; - [saveBtn addTarget:self action:@selector(saveUserInfo) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:saveBtn]; - mainScrollView.contentSize = CGSizeMake(kScreenWidth, shangView.bottom + SafetyAreaHeight + kRealValue(50)); - -} - -#pragma mark:删除病种 - -- (void)reloadCustomView:(NSInteger)btnTag { - - [self.customDataArray removeObjectAtIndex:btnTag]; - [self.sicksArray removeObjectAtIndex:btnTag]; - [self reloadCenterView:self.customDataArray]; -} - -#pragma marr:更新中间视图 - -- (void)reloadCenterView:(NSMutableArray *)customArray { - - for (YXcustomDelectedView * cusView in self.customArray) { - - [cusView removeFromSuperview]; - } - - CGFloat pointX = self.sinceLabel.right; - CGFloat pointY = 10; - CGFloat allWidth = kScreenWidth-self.sinceW- 20; - UIFont *titleFont = [UIFont systemFontOfSize:14]; - for(int i = 0; i < customArray.count; i++) { - - CGRect rect = [customArray[i] boundingRectWithSize:CGSizeMake(MAXFLOAT, 25) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : titleFont} context:nil]; - CGFloat width = rect.size.width +22; - - if (pointX + width > allWidth) {//换行 - pointX = self.sinceLabel.right;//X从新开始 - pointY += 40;//换行后Y+ - } - YXcustomDelectedView * custView = [[YXcustomDelectedView alloc] initWithFrame:CGRectMake(pointX, pointY, width, 25)]; - custView.delectBlock = ^(NSInteger btnTag) { - [self reloadCustomView:btnTag]; - }; - custView.btntag = 100 + i; - custView.titleString = customArray[i]; - pointX += (width + 10);//每次X都加上宽和间距5 - - [self.bingView addSubview:custView]; - [self.customArray addObject:custView]; - } - UIView * lastView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.sinceLabel.bottom + kRealValue(10), 100, 13)]; - if (self.customArray.count > 0) { - - lastView = [self.customArray lastObject]; - } - self.bingView.height = lastView.bottom + 30; - self.shangView.frame = CGRectMake(0, self.bingView.bottom, kScreenWidth, kRealValue(500)); - self.shangView.height = self.jianjieTextView.bottom + kRealValue(33); - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth, self.shangView.bottom + SafetyAreaHeight + kRealValue(50)); - -} - -#pragma mark:添加擅长病种 -- (void)addUserInfo { - -// userAddGoodPopView * popView = [[userAddGoodPopView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; -// MJWeakSelf -// popView.popBlock = ^(NSString * _Nonnull inputString) -// { -// -// [weakSelf.customDataArray addObject:inputString]; -// [weakSelf reloadCenterView:weakSelf.customDataArray]; -// }; -// popView.alpha = 0; -// -// [kAppWindow addSubview:popView]; -// -// [UIView animateWithDuration:0.5 animations:^{ -// popView.alpha = 1; -// }]; - YXGoodAtSicksViewController * goodVC = [[YXGoodAtSicksViewController alloc] init]; - goodVC.departmentId = self.departmentId; - goodVC.sicksArray = self.customDataArray; - goodVC.sicksBlock = ^(NSArray * _Nonnull sicksArray) { - [self.customDataArray removeAllObjects]; - [self.sicksArray removeAllObjects]; - - self.sicksArray = sicksArray.mutableCopy; - - for (YXDoctorGoodSicknessModel * sickModel in sicksArray) { - - [self.customDataArray addObject:sickModel.sicksName]; - [self reloadCenterView:self.customDataArray]; - - } - }; - [self.navigationController pushViewController:goodVC animated:YES]; -} - -#pragma mark:更新头像 -- (void)chageUserHeard { - - [self presentViewController:self.sheetVC animated:YES completion:nil]; - -} - -- (void)pushImagePickerController -{ - UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; - imagePickerController.delegate = self; - imagePickerController.allowsEditing = YES; - imagePickerController.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; - [self presentViewController:imagePickerController animated:YES completion:^{}]; -} - -- (void)takePhoto -{ - // 跳转到相机或相册页面 - UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; - imagePickerController.delegate = self; - imagePickerController.allowsEditing = YES; - imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; - [self presentViewController:imagePickerController animated:YES completion:^{}]; -} - -#pragma mark - image picker delegte -- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info -{ - [picker dismissViewControllerAnimated:YES completion:^{}]; - //先把图片转成NSData - NSString *type = [info objectForKey:UIImagePickerControllerMediaType]; - //当选择的类型是图片 - if ([type isEqualToString:@"public.image"]) - { - //先把图片转成NSData - UIImage* image = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; - - NSData *data; - if (UIImagePNGRepresentation(image) == nil) - { - data = UIImageJPEGRepresentation(image, 1.0); - } - else - { - data = UIImagePNGRepresentation(image); - } - self.headImg.image=image; - - //上传图片 - [self upHeardPhoto]; - - //图片保存的路径 - //这里将图片放在沙盒的documents文件夹中 - NSString * DocumentsPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; - - //文件管理器 - NSFileManager *fileManager = [NSFileManager defaultManager]; - - //把刚刚图片转换的data对象拷贝至沙盒中 并保存为image.png - [fileManager createDirectoryAtPath:DocumentsPath withIntermediateDirectories:YES attributes:nil error:nil]; - [fileManager createFileAtPath:[DocumentsPath stringByAppendingString:@"/image.png"] contents:data attributes:nil]; - [picker dismissViewControllerAnimated:YES completion:nil ]; - } - - -} -- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker -{ - [self dismissViewControllerAnimated:YES completion:^{}]; -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - [self hiddenAllMBProgressHUD]; - - - if ([tag isEqualToString:@"DoctorINFO"]) { - - NSDictionary * parDic = response; - - YXDoctorInfoModel * model = [YXDoctorInfoModel modelWithDictionary:parDic]; - self.doctor_Id = model.doctor_Id; - //姓名 - UITextField * nameField = [self.view viewWithTag:10]; - nameField.text = model.doctorName; - //医院 - UITextField * hospitalField = [self.view viewWithTag:11]; - hospitalField.text = model.resourceName; - //科室 - UITextField * roomField = [self.view viewWithTag:12]; - roomField.text = model.departmentName; - //职称 - UITextField * workField = [self.view viewWithTag:13]; - workField.text = model.doctorTitle; - - NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photo]; - - NSString * str1 = @"\\"; - - photo = [photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; - - NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); - - [self.headImg sd_setImageWithURL:[NSURL URLWithString:encodedString3] placeholderImage:PLACEHOLD_IMG]; - // - [self.customArray removeAllObjects]; - self.sicksArray = model.goodAtSicknessName; - for (YXDoctorGoodSicknessModel * sickModel in model.goodAtSicknessName) { - [self.customDataArray addObject:sickModel.sicksName]; - [self reloadCenterView:self.customDataArray]; - - } - //个人擅长 - self.shanchangTextView.text = model.goodAt; - //个人简介 - self.jianjieTextView.text = model.introduction; - self.departmentId = model.departmentId; - - } - if ([tag isEqualToString:@"UPLOADAPI"]) - { - NSMutableArray * imageUrlArray = [[NSMutableArray alloc] init]; - - NSArray * array = response; - - [imageUrlArray addObjectsFromArray:array]; - - NSString * headImg ; - for (NSString * imageString in imageUrlArray) { - - headImg = imageString; - } - [self updateUserHeard:headImg]; - } - if ([tag isEqualToString:@"DOCTORINFO"]) { - - [self.navigationController popViewControllerAnimated:YES]; - } - -} - -#pragma mark:上传图片 - -- (void)upHeardPhoto { - - [self showMBProgressHUDWithString:@"上传中" autoHidden:NO]; - - NSMutableArray * photoArray = [[NSMutableArray alloc] init]; - - [photoArray addObject:self.headImg.image]; - - YXNetAPI * upApi = [[YXNetAPI alloc] init:self tag:@"UPLOADAPI" NeedToken:@""]; - - [upApi postImageArrayUpload:photoArray]; -} - -#pragma mark:更新头像 - -- (void)updateUserHeard:(NSString *)heardImg { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - [parmDic setObject:heardImg forKey:@"avatar"]; - - YXNetAPI * upApi = [[YXNetAPI alloc] init:self tag:@"AVATAR" NeedToken:@""]; - - [upApi updateUserAvatar:parmDic]; - -} - -#pragma mark:保存 -- (void)saveUserInfo { - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - - //姓名 - UITextField * nameField = [self.view viewWithTag:10]; - [parmDic setObject:nameField.text forKey:@"doctorName"]; - //医院 - UITextField * hospitalField = [self.view viewWithTag:11]; - [parmDic setObject:hospitalField.text forKey:@"resourceName"]; - //科室 - UITextField * roomField = [self.view viewWithTag:12]; - [parmDic setObject:roomField.text forKey:@"departmentName"]; - //职称 - UITextField * workField = [self.view viewWithTag:13]; - [parmDic setObject:workField.text forKey:@"doctorTitle"]; - //擅长病重 -// for (DoctorGoodSicknessModel * sickModel in self.sicksArray) { -// [self.customDataArray addObject:sickModel.sicksName]; -// [self reloadCenterView:self.customDataArray]; -// } - NSMutableArray * array = [[NSMutableArray alloc] init]; - NSMutableString *resultString = [[NSMutableString alloc] init]; - - for (YXDoctorGoodSicknessModel * sickMode in self.sicksArray) { - NSMutableDictionary * sickDic = [[NSMutableDictionary alloc] init]; - [sickDic setObject:sickMode.sicks_id forKey:@"id"]; - [sickDic setObject:sickMode.sicksName forKey:@"sicksName"]; - [array addObject:sickDic]; - [resultString appendString:sickMode.sicks_id]; - [resultString appendString:@","]; - // 移除末尾的拼接字符 - - } - //去掉最后符合 - if ([resultString length] > 0) { - [resultString deleteCharactersInRange:NSMakeRange([resultString length] - 1, 1)]; - } - [parmDic setObject:array forKey:@"goodAtSicknessName"]; - //个人简介 - - [parmDic setObject:resultString forKey:@"goodAtSickness"]; - - [parmDic setObject:self.shanchangTextView.text forKey:@"goodAt"]; - - [parmDic setObject:self.jianjieTextView.text forKey:@"introduction"]; - [parmDic setObject:self.departmentId forKey:@"departmentId"]; - [parmDic setObject:self.doctor_Id forKey:@"id"]; - YXNetAPI * infoApi = [[YXNetAPI alloc] init:self tag:@"DOCTORINFO" NeedToken:@""]; - - [infoApi postUpdateDoctorInfo:parmDic]; -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.h deleted file mode 100644 index 3f1f33d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// YXModifyPasswordViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXModifyPasswordViewController : YXBaseViewController - -@property (nonatomic, copy) NSString * result; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.m deleted file mode 100644 index ccf6ea3..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/modifyPassword(修改密码)/YXModifyPasswordViewController.m +++ /dev/null @@ -1,214 +0,0 @@ -// -// YXModifyPasswordViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXModifyPasswordViewController.h" - -#import "LineTextField.h" -#import "RSAObjC.h" -#import "LVKeyboard.h" - -@interface YXModifyPasswordViewController () - -@property (nonatomic, strong) LineTextField * oldPasswordField; - -@property (nonatomic, strong) LineTextField * nowPasswordField; - -@property (nonatomic, strong) LineTextField * againPasswordField; - -@end - -@implementation YXModifyPasswordViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"修改密码"; - self.view.backgroundColor = UIColorHex(#EFEFEF); - [self createUI]; -} - -- (void)createUI { - - UIView * topview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 156)]; - topview.backgroundColor = KWhiteColor; - [self.view addSubview:topview]; - - self.oldPasswordField = [self createTextFieldWithFrame:CGRectMake(kRealValue(16), 0, kScreenWidth - kRealValue(32), 52) withLeftText:@"原密码" isShow:false]; - self.oldPasswordField.placeholder = @"请输入原密码"; - self.oldPasswordField.backgroundColor = KWhiteColor; - self.oldPasswordField.delegate = self; -// [self.oldPasswordField becomeFirstResponder]; - [topview addSubview:self.oldPasswordField]; - - self.nowPasswordField = [self createTextFieldWithFrame:CGRectMake(kRealValue(16), self.oldPasswordField.bottom, kScreenWidth - kRealValue(32), 52) withLeftText:@"新密码" isShow:YES]; - self.nowPasswordField.backgroundColor = KWhiteColor; - self.nowPasswordField.placeholder = @"请输入新密码"; - self.nowPasswordField.delegate = self; - [topview addSubview:self.nowPasswordField]; - - self.againPasswordField = [self createTextFieldWithFrame:CGRectMake(kRealValue(16), self.nowPasswordField.bottom, kScreenWidth - kRealValue(32), 52) withLeftText:@"确认密码" isShow:YES]; - self.againPasswordField.backgroundColor = KWhiteColor; - self.againPasswordField.placeholder = @"再次输入新密码"; - self.againPasswordField.delegate = self; - [topview addSubview:self.againPasswordField]; - - UILabel * showLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), topview.bottom + kRealValue(14), kScreenWidth - kRealValue(32), 40)]; - showLabel.text = @"温馨提示:密码需要为12-32位(包含数字、大写、小写字母、特殊字符)"; - showLabel.textColor = UIColorHex(#999999); - showLabel.font = SYSTEMFONT(13); - showLabel.numberOfLines = 2; - showLabel.textAlignment = NSTextAlignmentLeft; - [self.view addSubview:showLabel]; - - - UIButton * submitBtn = [[UIButton alloc] init]; - submitBtn.backgroundColor = KWhiteColor; - submitBtn.layer.cornerRadius = 20; - submitBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - submitBtn.layer.borderWidth = 1.0f; - [submitBtn setTitle:@"提交" forState:UIControlStateNormal]; - [submitBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [submitBtn addTarget:self action:@selector(submitPasswordAction) forControlEvents:UIControlEventTouchUpInside]; - submitBtn.titleLabel.font = SYSTEMFONT(14); - [self.view addSubview:submitBtn]; - - [submitBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.mas_offset(40); - make.left.mas_equalTo(@47); - make.right.mas_offset(-47); - make.top.mas_equalTo(showLabel.mas_bottom).offset(60); - }]; -} - -- (LineTextField *)createTextFieldWithFrame:(CGRect)frame - withLeftText:(NSString *)leftString - isShow:(BOOL)isShow{ - - LineTextField * textField = [[LineTextField alloc] initWithFrame:frame]; - - UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 90, 52)]; - UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(15), leftView.width, 13)]; - leftLabel.centerY = leftView.centerY; - leftLabel.textColor = CFontColor2; - leftLabel.text = leftString; - leftLabel.textAlignment = NSTextAlignmentLeft; - leftLabel.font = MEDIUMFONT(13); - [leftView addSubview:leftLabel]; - textField.leftView = leftView; - textField.leftViewMode = UITextFieldViewModeAlways; - textField.secureTextEntry = isShow; - - return textField; - -} - -- (void)submitPasswordAction { - - if ( (self.nowPasswordField.text.length >= 33 && self.oldPasswordField.text.length < 12) || (self.againPasswordField.text.length >= 33 && self.againPasswordField.text.length < 12)) { - - [MBProgressHUD showErrorMessage:@"请输入12-32位的密码"]; - return; - - } - - if (!isValidPassword(self.nowPasswordField.text) || !isValidPassword(self.againPasswordField.text)) { - [EasyTextView showErrorText:@"请按照密码规则,请重新输入"]; - return; - } - - if (![self.nowPasswordField.text isEqualToString:self.againPasswordField.text]) { - - [MBProgressHUD showErrorMessage:@"两次输入不一致,请重新输入"]; - return; - } - //username 登录账号 oldpassword 老密码 password 新密码 confirmpassword 二次确认的密码 - YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; - - - NSString * publish_key = @" MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB"; - - // 原始数据,要加密的字符串 - NSString * oldString = self.oldPasswordField.text; - - // RSA 加密,使用字符串格式的公钥私钥加密解密, RSAPublickKey 为公钥字符串(NSString 格式) - NSString * oldEncryptStr = [RSAObjC encrypt:oldString PublicKey:publish_key]; - NSLog(@"加密后:%@", oldEncryptStr); - - - - NSString * password = self.nowPasswordField.text; - NSString * passwordEncryptStr = [RSAObjC encrypt:password PublicKey:publish_key]; - - NSString * confirmpassword = self.againPasswordField.text; - NSString * confirmEncryptStr = [RSAObjC encrypt:confirmpassword PublicKey:publish_key]; - - NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:user.username forKey:@"username"]; - [parmDic setObject:oldEncryptStr forKey:@"oldpassword"]; - [parmDic setObject:passwordEncryptStr forKey:@"password"]; - [parmDic setObject:confirmEncryptStr forKey:@"confirmpassword"]; - YXNetAPI * passwordApi = [[YXNetAPI alloc] init:self tag:@"PASSWORDAPI" NeedToken:@""]; - [passwordApi updateDoctorLoginPassword:parmDic]; -} - -- (void)Failed:(NSString*)message tag:(NSString*)tag -{ - [EasyTextView showErrorText:message]; - -} - - -- (void)Sucess:(id)response tag:(NSString*)tag -{ - - - if ([tag isEqualToString:@"PASSWORDAPI"]) { - NSString * message = response; - - [EasyTextView showSuccessText:message]; - - - - double delayInSeconds = 2.0; - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); - dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - [self.navigationController popToRootViewControllerAnimated:YES]; - }); - - } -} -BOOL isValidPassword(NSString *password) { - // 定义正则表达式 - NSString *pattern = @"^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*(),.?\":{}|<>]).{12,32}$"; - - // 创建NSPredicate对象 - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", pattern]; - - // 使用NSPredicate对象进行判断 - return [predicate evaluateWithObject:password]; -} - -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - if ([string isEqualToString:@"!"]) { // 检测是否是中文感叹号 - NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:@"!"]; // 将其替换为英文感叹号 - textField.text = newString; - return NO; - } - return YES; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.h deleted file mode 100644 index a6a37c5..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXCustomSchedulingViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/9. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXCustomSchedulingViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.m deleted file mode 100644 index 84cdae0..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXCustomSchedulingViewController.m +++ /dev/null @@ -1,73 +0,0 @@ -// -// YXCustomSchedulingViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/9. -// - -#import "YXCustomSchedulingViewController.h" -#import "YXCustomSchedulingTable.h" -#import "YXAddSchedulingTimeTableViewCell.h" - -@interface YXCustomSchedulingViewController () - -@property (nonatomic, strong) YXCustomSchedulingTable * homeTable; - -@end - -@implementation YXCustomSchedulingViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.view.backgroundColor = UIColorHex(#EFEFEF); - self.isHidenNaviBar = false; - self.navigationItem.title = @"排班设置"; - [self createUI]; - // Do any additional setup after loading the view. -} - -- (void)createUI { - - UIButton * submitBtn = [[UIButton alloc] init]; - submitBtn.backgroundColor = KWhiteColor; - submitBtn.layer.cornerRadius = 20; - submitBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - submitBtn.layer.borderWidth = 1.0f; - [submitBtn setTitle:@"生成排班" forState:UIControlStateNormal]; - [submitBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [submitBtn addTarget:self action:@selector(submitTimeAction) forControlEvents:UIControlEventTouchUpInside]; - submitBtn.titleLabel.font = SYSTEMFONT(14); - [self.view addSubview:submitBtn]; - - [submitBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(@150); - make.height.mas_offset(34); - make.centerX.mas_equalTo(self.view); - make.bottom.mas_equalTo(@-10); - }]; - - self.homeTable = [[YXCustomSchedulingTable alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; - self.homeTable.backgroundColor = UIColorHex(#EFEFEF); - self.homeTable.addDelegate = self; - [self.view addSubview:self.homeTable]; - - [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.top.mas_offset(15); - make.right.mas_offset(-15); - make.bottom.mas_equalTo(submitBtn.mas_top).offset(-15); - }]; - - -} - -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.h deleted file mode 100644 index d1b748d..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXSchedulingSettingViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXSchedulingSettingViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.m deleted file mode 100644 index a4db6c2..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/controller/schedulingSetting(排班设置)/YXSchedulingSettingViewController.m +++ /dev/null @@ -1,133 +0,0 @@ -// -// YXSchedulingSettingViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXSchedulingSettingViewController.h" -#import "YXSchedulingSetingTable.h" -#import "YXSchedulingSettingModel.h" -#import "YXAddSchedulingTimeTableViewCell.h" -#import "YXDTTestView.h" -#import "YXCustomSchedulingViewController.h" - -@interface YXSchedulingSettingViewController () - -@property (nonatomic, strong) YXSchedulingSetingTable * homeTable; - -@end - -@implementation YXSchedulingSettingViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - self.navigationItem.title = @"排班设置"; - self.view.backgroundColor = UIColorHex(#EFEFEF); - [self createUI]; - [self createData]; -} - -- (void)createUI { - - UIButton * customBtn = [[UIButton alloc] init]; - customBtn.backgroundColor = KClearColor; - [customBtn setTitle:@"自定义排班" forState:UIControlStateNormal]; - [customBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [customBtn addTarget:self action:@selector(customAction) forControlEvents:UIControlEventTouchUpInside]; - customBtn.titleLabel.font = SYSTEMFONT(14); - [self.view addSubview:customBtn]; - - [customBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.mas_offset(40); - make.left.mas_equalTo(@113); - make.right.mas_offset(-133); - make.bottom.mas_equalTo(-20); - }]; - - - UIButton * submitBtn = [[UIButton alloc] init]; - submitBtn.backgroundColor = KWhiteColor; - submitBtn.layer.cornerRadius = 20; - submitBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor; - submitBtn.layer.borderWidth = 1.0f; - [submitBtn setTitle:@"生成排班" forState:UIControlStateNormal]; - [submitBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [submitBtn addTarget:self action:@selector(submitTimeAction) forControlEvents:UIControlEventTouchUpInside]; - submitBtn.titleLabel.font = SYSTEMFONT(14); - [self.view addSubview:submitBtn]; - - [submitBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.width.left.right.mas_equalTo(customBtn); - make.bottom.mas_equalTo(customBtn.mas_top).offset(-10); - }]; - - - - self.homeTable = [[YXSchedulingSetingTable alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; - self.homeTable.backgroundColor = UIColorHex(#EFEFEF); - self.homeTable.addDelegate = self; - [self.view addSubview:self.homeTable]; - - [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.top.mas_offset(15); - make.right.mas_offset(-15); - make.bottom.mas_equalTo(submitBtn.mas_top).offset(-15); - }]; - - - -} - -- (void)createData { - - NSArray * dataArray = @[@{@"time":@"08:00-12:00",@"isSelected":@NO},@{@"time":@"08:00-12:00",@"isSelected":@YES},@{@"time":@"08:00-12:00",@"isSelected":@NO}]; - - NSMutableArray * timeArray = [[NSMutableArray alloc] init]; - - for (NSDictionary * parDic in dataArray) { - - YXSchedulingSettingModel * model = [YXSchedulingSettingModel modelWithDictionary:parDic]; - - [timeArray addObject:model]; - } -// [timeArray removeAllObjects]; - self.homeTable.timeArray = timeArray; -} -#pragma mark:新增时间段 -- (void)addSchedulingTime { - - YXDTTestView *vi = [[YXDTTestView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; - [kAppWindow addSubview:vi]; - vi.returnBlock = ^(NSString *startTime, NSString *endTime) { - NSLog(@"开始时间 = %@", startTime); - NSLog(@"结束时间 = %@", endTime); - - }; - -} - -- (void)submitTimeAction { - - -} - -- (void)customAction { - - YXCustomSchedulingViewController * customvc = [[YXCustomSchedulingViewController alloc] init]; - - [self.navigationController pushViewController:customvc animated:YES]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.h deleted file mode 100644 index 246a087..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// YXBillListModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/17. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXBillListDetailModel : NSObject - -@property (nonatomic, copy) NSString * bill_id; -@property (nonatomic, copy) NSString * sessionId; -@property (nonatomic, copy) NSString * userId; -@property (nonatomic, copy) NSString * userName; -@property (nonatomic, copy) NSString * operateType; -@property (nonatomic, copy) NSString * operateType_dictText; -@property (nonatomic, copy) NSString * incomeTime; -@property (nonatomic, copy) NSString * accountMoney; -@property (nonatomic, copy) NSString * income; -@property (nonatomic, copy) NSString * waterType; -@property (nonatomic, copy) NSString * operateTypeName; -@property (nonatomic, copy) NSString * createTime; - -@end - - -@interface YXBillListModel : NSObject - -@property (nonatomic, copy) NSArray * records; -@property (nonatomic, copy) NSString * optimizeCountSql; -@property (nonatomic, copy) NSString * searchCount; -@property (nonatomic, copy) NSString * total; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.m deleted file mode 100644 index 5e31de1..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXBillListModel.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// YXBillListModel.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/17. -// - -#import "YXBillListModel.h" - -@implementation YXBillListDetailModel - - -+ (NSDictionary *)modelCustomPropertyMapper -{ - NSDictionary * dic =@{@"bill_id" :@"id"}; - return dic; -} - -@end - -@implementation YXBillListModel - -+ (NSDictionary *)modelContainerPropertyGenericClass -{ - - - return @{@"records":[YXBillListDetailModel class], - }; - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXSchedulingSettingModel.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXSchedulingSettingModel.h deleted file mode 100644 index cf8a8f1..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/model/YXSchedulingSettingModel.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// YXSchedulingSettingModel.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXSchedulingSettingModel : NSObject - -@property (nonatomic, copy) NSString * time; - -@property (nonatomic, assign) BOOL isSelected; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/AddSchedulingTimeTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/AddSchedulingTimeTableViewCell.h deleted file mode 100644 index 8b79015..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/AddSchedulingTimeTableViewCell.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// YXAddSchedulingTimeTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol schedulingTimeAddProtocol - -- (void)addSchedulingTime; - -@end - -@interface YXAddSchedulingTimeTableViewCell : UITableViewCell - -@property (nonatomic, weak)id addDelegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/WeakTitleTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/WeakTitleTableViewCell.h deleted file mode 100644 index 57da7d9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/WeakTitleTableViewCell.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXWeakTitleTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/9. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXWeakTitleTableViewCell : UITableViewCell - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.h deleted file mode 100644 index bdc0025..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// YXCustomSchedulingTable.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/9. -// - -#import -#import "YXSectionOneTableViewCell.h" -#import "YXTimeDisanceTableViewCell.h" -#import "YXAddSchedulingTimeTableViewCell.h" -#import "YXVideoAudioTableViewCell.h" -#import "YXSchedulingDateTableViewCell.h" -#import "YXJumpHolidayTableViewCell.h" -#import "YXWeakTitleTableViewCell.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXCustomSchedulingTable : UITableView - -@property (nonatomic, strong) NSArray * timeArray; - -@property (nonatomic, weak)id addDelegate; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.m deleted file mode 100644 index 685121c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXCustomSchedulingTable.m +++ /dev/null @@ -1,305 +0,0 @@ -// -// YXCustomSchedulingTable.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/9. -// - -#import "YXCustomSchedulingTable.h" - - -@interface YXCustomSchedulingTable () - - -@end - - -@implementation YXCustomSchedulingTable - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - if (@available(iOS 11.0, *)) { - self.estimatedRowHeight = 0; - self.estimatedSectionFooterHeight = 0; - self.estimatedSectionHeaderHeight = 0; - self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - } - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.clearColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone;; - self.estimatedRowHeight = 60; - [self setSeparatorColor:KWhiteColor]; - self.rowHeight = UITableViewAutomaticDimension; - -} - -- (void)setTimeArray:(NSArray *)timeArray { - - _timeArray = timeArray; - - [self reloadData]; - -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 3; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - - if (section == 0 ) { - - return self.timeArray.count + 4; - } - if (section == 1) { - - return 3; - } - - return 1; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - if (indexPath.section == 0) { - - if (indexPath.row == 0) { - YXSectionOneTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"SECTIONONE"]; - if (!cell) { - - cell = [[YXSectionOneTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SECTIONONE"]; - } - cell.backgroundColor = KWhiteColor; - cell.sectionTitle = @"选择时间"; - cell.isShow = true; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - } - if (indexPath.row == 1) { - - YXWeakTitleTableViewCell * weekCell = [self dequeueReusableCellWithIdentifier:@"WEEKEDCELL"]; - if (!weekCell) { - - weekCell = [[YXWeakTitleTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"WEEKEDCELL"]; - } - weekCell.backgroundColor = KWhiteColor; - weekCell.selectionStyle = UITableViewCellSelectionStyleNone; - return weekCell; - - } - if (indexPath.row == 2) { - - YXSectionOneTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"SECTIONONE"]; - if (!cell) { - - cell = [[YXSectionOneTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SECTIONONE"]; - } - cell.backgroundColor = KWhiteColor; - cell.sectionTitle = @"在线时间"; - cell.isShow = true; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - } - else if ( indexPath.row >2 && indexPath.row <= self.timeArray.count ) { - - YXTimeDisanceTableViewCell * timeCell = [self dequeueReusableCellWithIdentifier:@"TIMECELL"]; - if (!timeCell) { - - timeCell = [[YXTimeDisanceTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"TIMECELL"]; - } - timeCell.model = self.timeArray[indexPath.row - 1]; - timeCell.backgroundColor = KWhiteColor; - timeCell.selectionStyle = UITableViewCellSelectionStyleNone; - return timeCell; - - }else { - YXAddSchedulingTimeTableViewCell * addCell = [self dequeueReusableCellWithIdentifier:@"ADDCELL"]; - if (!addCell) { - - addCell = [[YXAddSchedulingTimeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ADDCELL"]; - } - addCell.addDelegate = self.addDelegate; - addCell.backgroundColor = KWhiteColor; - addCell.selectionStyle = UITableViewCellSelectionStyleNone; - return addCell; - - } - - } - if (indexPath.section == 1) { - - if (indexPath.row == 0) { - YXSectionOneTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"SECTIIONTWO"]; - if (!cell) { - - cell = [[YXSectionOneTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SECTIIONTWO"]; - } - cell.sectionTitle = @"视频咨询"; - cell.isShow = false; - cell.backgroundColor = KWhiteColor; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - }else { - - YXVideoAudioTableViewCell * videoCell = [self dequeueReusableCellWithIdentifier:@"VIDEOCELL"]; - if (!videoCell) { - - videoCell = [[YXVideoAudioTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"VIDEOCELL"]; - } - videoCell.backgroundColor = KWhiteColor; - if (indexPath.row == 1) { videoCell.leftString = @"上午"; } - if (indexPath.row == 2) { videoCell.leftString = @"下午"; } - videoCell.selectionStyle = UITableViewCellSelectionStyleNone; - return videoCell; - } - } - - if (indexPath.section == 2) { - - YXJumpHolidayTableViewCell * jumpcell = [self dequeueReusableCellWithIdentifier:@"JUMPCELL"]; - if (!jumpcell) { - - jumpcell = [[YXJumpHolidayTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"JUMPCELL"]; - } - jumpcell.backgroundColor = KWhiteColor; - jumpcell.selectionStyle = UITableViewCellSelectionStyleNone; - return jumpcell; - } - - return UITableViewCell.new; - - -} -//每行高度 -//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -//{ -// return kRealValue(77); -//} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return kRealValue(10); -} -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - - -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - -} - --(void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath - -{ - - if([cell respondsToSelector:@selector(tintColor)]) { - - if(tableView ==self) { - - CGFloat cornerRadius =5.f; - - cell.backgroundColor=UIColor.clearColor; - - CAShapeLayer * layer = [[CAShapeLayer alloc]init]; - - CGMutablePathRef pathRef = CGPathCreateMutable(); - - CGRect bounds = CGRectInset(cell.bounds,0,0); - - BOOL addLine =NO; - - if(indexPath.row==0&& indexPath.row== [tableView numberOfRowsInSection:indexPath.section]-1) { - - CGPathAddRoundedRect(pathRef,nil, bounds, cornerRadius, cornerRadius); - - }else if(indexPath.row==0) { - - CGPathMoveToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMaxY(bounds)); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMinY(bounds),CGRectGetMidX(bounds),CGRectGetMinY(bounds), cornerRadius); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMinY(bounds),CGRectGetMaxX(bounds),CGRectGetMidY(bounds), cornerRadius); - - CGPathAddLineToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMaxY(bounds)); - - addLine =YES; - - }else if(indexPath.row== [tableView numberOfRowsInSection:indexPath.section]-1) { - - CGPathMoveToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMinY(bounds)); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMaxY(bounds),CGRectGetMidX(bounds),CGRectGetMaxY(bounds), cornerRadius); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMaxY(bounds),CGRectGetMaxX(bounds),CGRectGetMidY(bounds), cornerRadius); - - CGPathAddLineToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMinY(bounds)); - - }else{ - - CGPathAddRect(pathRef,nil, bounds); - - addLine =YES; - - } - - layer.path= pathRef; - - CFRelease(pathRef); - - layer.fillColor= [UIColor colorWithWhite:1.f alpha:0.8f].CGColor; - - if(addLine ==YES) { - - CALayer* lineLayer = [[CALayer alloc]init]; - - CGFloat lineHeight = (1.f/ [UIScreen mainScreen].scale); - - lineLayer.frame=CGRectMake(CGRectGetMinX(bounds)+10, bounds.size.height-lineHeight, bounds.size.width-10, lineHeight); - - lineLayer.backgroundColor= tableView.separatorColor.CGColor; - - [layer addSublayer:lineLayer]; - - } - - UIView*testView = [[UIView alloc]initWithFrame:bounds]; - - [testView.layer insertSublayer:layer atIndex:0]; - - testView.backgroundColor=UIColor.clearColor; - - cell.backgroundView= testView; - - } - - } - -} -@end - - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXWeakTitleTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXWeakTitleTableViewCell.m deleted file mode 100644 index 8962531..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/CustomScheduling(自定义排班)/YXWeakTitleTableViewCell.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// YXWeakTitleTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/9. -// - -#import "YXWeakTitleTableViewCell.h" - -@implementation YXWeakTitleTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - NSArray * weekedArray = @[@"周一",@"周二",@"周三",@"周四",@"周五",@"周六",@"周天"]; - - CGFloat w = (kScreenWidth - 46 )/ 7; - - UIButton * lastBtn; - for (int i = 0; i < weekedArray.count; i ++) { - - UIButton * weekendBtn = [[UIButton alloc] init]; - [weekendBtn setTitle:weekedArray[i] forState:UIControlStateNormal]; - weekendBtn.titleLabel.font = MEDIUMFONT(13); - [weekendBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; - [weekendBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - - [self.contentView addSubview:weekendBtn]; - - [weekendBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_offset(w); - make.height.mas_offset(45); - make.top.mas_offset(2); - make.left.equalTo (lastBtn ? lastBtn.mas_right: @17); - make.bottom.equalTo (@-10); - }]; - lastBtn = weekendBtn; - if (i == 0) { - - weekendBtn.selected = true; - } - - } - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/JumpHolidayTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/JumpHolidayTableViewCell.h deleted file mode 100644 index c443768..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/JumpHolidayTableViewCell.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// YXJumpHolidayTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXJumpHolidayTableViewCell : UITableViewCell - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXAddSchedulingTimeTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXAddSchedulingTimeTableViewCell.m deleted file mode 100644 index b459fd9..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXAddSchedulingTimeTableViewCell.m +++ /dev/null @@ -1,64 +0,0 @@ -// -// YXAddSchedulingTimeTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXAddSchedulingTimeTableViewCell.h" - -@implementation YXAddSchedulingTimeTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - - return self; - -} - -- (void)createUI { - - UIButton * addBtn = [[UIButton alloc] init]; - - [addBtn setTitle:@" 新增时间段" forState:UIControlStateNormal]; - [addBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - addBtn.titleLabel.font = SYSTEMFONT(14); - [addBtn setImage:[UIImage imageNamed:@"addQuestionPeople"] forState:UIControlStateNormal]; - [addBtn addTarget:self action:@selector(addQuestionTime) forControlEvents:UIControlEventTouchUpInside]; - [self.contentView addSubview:addBtn]; - - [addBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.mas_offset(0); - make.top.mas_offset(10); - make.height.mas_offset(30); - make.bottom.mas_offset(-10); - }]; -} - -- (void)addQuestionTime { - - if ([self.addDelegate respondsToSelector:@selector(addSchedulingTime)]) { - - [self.addDelegate addSchedulingTime]; - } - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXJumpHolidayTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXJumpHolidayTableViewCell.m deleted file mode 100644 index 44bb011..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXJumpHolidayTableViewCell.m +++ /dev/null @@ -1,82 +0,0 @@ -// -// YXJumpHolidayTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXJumpHolidayTableViewCell.h" - - -@interface YXJumpHolidayTableViewCell () - -@property (nonatomic, strong) UILabel * sectionLabel; - -@property (nonatomic, strong) UISwitch * rightSlider; - -@end - - -@implementation YXJumpHolidayTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - self.sectionLabel = [[UILabel alloc] init]; - self.sectionLabel.textColor = CFontColor1; - self.sectionLabel.text = @"自动跳过法定节假日?"; - self.sectionLabel.font = MEDIUMFONT(14); - self.sectionLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.sectionLabel]; - - [self.sectionLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.top.height.mas_offset(15); - make.width.mas_offset(200); - make.bottom.mas_offset(-20); - }]; - - self.rightSlider = [[UISwitch alloc] init]; - [self.rightSlider setOn:YES animated:YES]; - [self.rightSlider setOnTintColor: UIColorHex(#59D5D4)]; - self.rightSlider.transform = CGAffineTransformMakeScale(0.6, 0.6); - [self.rightSlider addTarget:self action:@selector(switchChange:) forControlEvents:UIControlEventValueChanged]; - [self.contentView addSubview:self.rightSlider]; - - [self.rightSlider mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_offset(-15); - make.top.mas_offset(15); - make.height.mas_offset(17); - make.bottom.mas_offset(-20); - }]; -} - -- (void) switchChange:(UISwitch*)sw { - if(sw.on == YES) { - NSLog(@"开关切换为开"); - } else if(sw.on == NO) { - NSLog(@"开关切换为关"); - } -} - - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.h deleted file mode 100644 index 6979243..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// YXSchedulingDateTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXSchedulingDateTableViewCell : UITableViewCell - -@property (nonatomic, copy) NSString * weekString; -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.m deleted file mode 100644 index 05dae08..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingDateTableViewCell.m +++ /dev/null @@ -1,150 +0,0 @@ -// -// YXSchedulingDateTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXSchedulingDateTableViewCell.h" - -@interface YXSchedulingDateTableViewCell () - -@property (nonatomic, strong) UIButton * leftBtn; - -@property (nonatomic, strong) UIButton * centerBtn; - -@property (nonatomic, strong) UIButton * rightBtn; - -@property (nonatomic, strong) NSMutableArray * buttonArray; -@end - -@implementation YXSchedulingDateTableViewCell - -- (NSMutableArray *)buttonArray { - - if (!_buttonArray) { - - _buttonArray = [[NSMutableArray alloc] init]; - } - return _buttonArray; -} - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - UIView * backView = [[UIView alloc] init]; - backView.backgroundColor = UIColorHex(#E0E0E0); - backView.layer.cornerRadius = 18; - backView.layer.masksToBounds = true; - [self.contentView addSubview:backView]; - - [backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.right.mas_offset(-15); - make.height.mas_offset(35); - make.top.mas_offset(0); - make.bottom.mas_offset(-10); - }]; - - self.leftBtn = [[UIButton alloc] init]; - [self.leftBtn setTitle:@"周一" forState:UIControlStateNormal]; - [self.leftBtn setImage:[UIImage imageNamed:@"square_nomal"] forState:UIControlStateNormal]; - [self.leftBtn setImage:[UIImage imageNamed:@"square_selected"] forState:UIControlStateSelected]; - [self.leftBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - self.leftBtn.titleLabel.font = SYSTEMFONT(13); - [self.leftBtn addTarget:self action:@selector(weakButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - [backView addSubview:self.leftBtn]; - - [self.leftBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.bottom.mas_offset(0); - make.width.mas_offset(100); - make.height.mas_equalTo(backView); - }]; - - self.centerBtn = [[UIButton alloc] init]; - [self.centerBtn setTitle:@" 上午" forState:UIControlStateNormal]; - [self.centerBtn setImage:[UIImage imageNamed:@"square_nomal"] forState:UIControlStateNormal]; - [self.centerBtn setImage:[UIImage imageNamed:@"square_selected"] forState:UIControlStateSelected]; - [self.centerBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - self.centerBtn.titleLabel.font = SYSTEMFONT(13); - [self.centerBtn addTarget:self action:@selector(morningButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - - [backView addSubview:self.centerBtn]; - - [self.centerBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.bottom.mas_offset(0); - make.width.mas_offset(100); - make.centerX.mas_equalTo(backView); - }]; - - self.rightBtn = [[UIButton alloc] init]; - [self.rightBtn setTitle:@" 下午" forState:UIControlStateNormal]; - [self.rightBtn setImage:[UIImage imageNamed:@"square_nomal"] forState:UIControlStateNormal]; - [self.rightBtn setImage:[UIImage imageNamed:@"square_selected"] forState:UIControlStateSelected]; - [self.rightBtn setTitleColor:CFontColor1 forState:UIControlStateNormal]; - self.rightBtn.titleLabel.font = SYSTEMFONT(13); - [self.rightBtn addTarget:self action:@selector(afternoonButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - [backView addSubview:self.rightBtn]; - - [self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.bottom.mas_offset(0); - make.width.mas_offset(100); - make.right.mas_offset(-10); - }]; - - -} - -- (void)setWeekString:(NSString *)weekString { - - _weekString = weekString; - - - [self.leftBtn setTitle:_weekString forState:UIControlStateNormal]; - -} - -- (void)weakButtonAction:(UIButton *)weakBtn { - - weakBtn.selected = !weakBtn.selected; - - self.centerBtn.selected = weakBtn.selected; - self.rightBtn.selected = weakBtn.selected; -} - -- (void)morningButtonAction:(UIButton *)morningBtn { - - morningBtn.selected = !morningBtn.selected; - if (morningBtn.selected) { - self.leftBtn.selected = YES; - } -} - -- (void)afternoonButtonAction:(UIButton *)afterBtn { - - afterBtn.selected = !afterBtn.selected; - if (afterBtn.selected) { - self.leftBtn.selected = YES; - } -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.h deleted file mode 100644 index 313e51c..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// YXSchedulingSetingTable.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import -#import "YXSectionOneTableViewCell.h" -#import "YXTimeDisanceTableViewCell.h" -#import "YXAddSchedulingTimeTableViewCell.h" -#import "YXVideoAudioTableViewCell.h" -#import "YXSchedulingDateTableViewCell.h" -#import "YXJumpHolidayTableViewCell.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface YXSchedulingSetingTable : UITableView - -@property (nonatomic, strong) NSArray * timeArray; - -@property (nonatomic, weak)id addDelegate; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.m deleted file mode 100644 index 1b2a517..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSchedulingSetingTable.m +++ /dev/null @@ -1,308 +0,0 @@ -// -// YXSchedulingSetingTable.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXSchedulingSetingTable.h" - - -@interface YXSchedulingSetingTable () - - -@end - - -@implementation YXSchedulingSetingTable - - -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - - if (self = [super initWithFrame:frame style:style]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - if (@available(iOS 11.0, *)) { - self.estimatedRowHeight = 0; - self.estimatedSectionFooterHeight = 0; - self.estimatedSectionHeaderHeight = 0; - self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; - } - self.delegate = self; - self.dataSource = self; - self.backgroundColor = UIColor.clearColor; - self.showsVerticalScrollIndicator = false; - self.showsHorizontalScrollIndicator = false; - self.separatorStyle = UITableViewCellSeparatorStyleNone;; - self.estimatedRowHeight = 60; - [self setSeparatorColor:KWhiteColor]; - self.rowHeight = UITableViewAutomaticDimension; - -} - -- (void)setTimeArray:(NSArray *)timeArray { - - _timeArray = timeArray; - - [self reloadData]; - -} - -#pragma mark - tableview的代理方法 -//组数 -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 4; -} -//每组多少行 -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - - if (section == 0 ) { - - return self.timeArray.count + 2; - } - if (section == 1) { - - return 3; - } - if (section == 2) { - - return 8; - } - return 1; -} -//注册cell -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - - if (indexPath.section == 0) { - - if (indexPath.row == 0) { - YXSectionOneTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"SECTIONONE"]; - if (!cell) { - - cell = [[YXSectionOneTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SECTIONONE"]; - } - cell.backgroundColor = KWhiteColor; - cell.sectionTitle = @"在线时间"; - cell.isShow = true; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - }else if ( indexPath.row > 0 && indexPath.row <= self.timeArray.count ) { - - YXTimeDisanceTableViewCell * timeCell = [self dequeueReusableCellWithIdentifier:@"TIMECELL"]; - if (!timeCell) { - - timeCell = [[YXTimeDisanceTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"TIMECELL"]; - } - timeCell.model = self.timeArray[indexPath.row - 1]; - timeCell.backgroundColor = KWhiteColor; - timeCell.selectionStyle = UITableViewCellSelectionStyleNone; - return timeCell; - - }else { - YXAddSchedulingTimeTableViewCell * addCell = [self dequeueReusableCellWithIdentifier:@"ADDCELL"]; - if (!addCell) { - - addCell = [[YXAddSchedulingTimeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ADDCELL"]; - } - addCell.addDelegate = self.addDelegate; - addCell.backgroundColor = KWhiteColor; - addCell.selectionStyle = UITableViewCellSelectionStyleNone; - return addCell; - - } - - } - if (indexPath.section == 1) { - - if (indexPath.row == 0) { - YXSectionOneTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"SECTIIONTWO"]; - if (!cell) { - - cell = [[YXSectionOneTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SECTIIONTWO"]; - } - cell.sectionTitle = @"视频咨询"; - cell.isShow = false; - cell.backgroundColor = KWhiteColor; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - }else { - - YXVideoAudioTableViewCell * videoCell = [self dequeueReusableCellWithIdentifier:@"VIDEOCELL"]; - if (!videoCell) { - - videoCell = [[YXVideoAudioTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"VIDEOCELL"]; - } - videoCell.backgroundColor = KWhiteColor; - if (indexPath.row == 1) { videoCell.leftString = @"上午"; } - if (indexPath.row == 2) { videoCell.leftString = @"下午"; } - videoCell.selectionStyle = UITableViewCellSelectionStyleNone; - return videoCell; - } - } - if (indexPath.section == 2) { - - if (indexPath.row == 0) { - YXSectionOneTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"SECTIIONTHREE"]; - if (!cell) { - - cell = [[YXSectionOneTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SECTIIONTHREE"]; - } - cell.backgroundColor = KWhiteColor; - cell.sectionTitle = @"日期"; - cell.isShow = true; - cell.selectionStyle = UITableViewCellSelectionStyleNone; - return cell; - }else - { - NSArray * array = @[@" 周一",@" 周二",@" 周三",@" 周四",@" 周五",@" 周六",@" 周天"]; - YXSchedulingDateTableViewCell * dateCell = [self dequeueReusableCellWithIdentifier:@"DATACELL"]; - if (!dateCell) { - - dateCell = [[YXSchedulingDateTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"DATACELL"]; - } - dateCell.weekString = array[indexPath.row - 1]; - dateCell.backgroundColor = KWhiteColor; - dateCell.selectionStyle = UITableViewCellSelectionStyleNone; - return dateCell; - } - } - if (indexPath.section == 3) { - - YXJumpHolidayTableViewCell * jumpcell = [self dequeueReusableCellWithIdentifier:@"JUMPCELL"]; - if (!jumpcell) { - - jumpcell = [[YXJumpHolidayTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"JUMPCELL"]; - } - jumpcell.backgroundColor = KWhiteColor; - jumpcell.selectionStyle = UITableViewCellSelectionStyleNone; - return jumpcell; - } - - return UITableViewCell.new; - - -} -//每行高度 -//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -//{ -// return kRealValue(77); -//} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - - return kRealValue(10); -} -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { - - return CGFLOAT_MIN; -} - - -////cell点击事件 -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - - -} - --(void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath - -{ - - if([cell respondsToSelector:@selector(tintColor)]) { - - if(tableView ==self) { - - CGFloat cornerRadius =5.f; - - cell.backgroundColor=UIColor.clearColor; - - CAShapeLayer * layer = [[CAShapeLayer alloc]init]; - - CGMutablePathRef pathRef = CGPathCreateMutable(); - - CGRect bounds = CGRectInset(cell.bounds,0,0); - - BOOL addLine =NO; - - if(indexPath.row==0&& indexPath.row== [tableView numberOfRowsInSection:indexPath.section]-1) { - - CGPathAddRoundedRect(pathRef,nil, bounds, cornerRadius, cornerRadius); - - }else if(indexPath.row==0) { - - CGPathMoveToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMaxY(bounds)); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMinY(bounds),CGRectGetMidX(bounds),CGRectGetMinY(bounds), cornerRadius); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMinY(bounds),CGRectGetMaxX(bounds),CGRectGetMidY(bounds), cornerRadius); - - CGPathAddLineToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMaxY(bounds)); - - addLine =YES; - - }else if(indexPath.row== [tableView numberOfRowsInSection:indexPath.section]-1) { - - CGPathMoveToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMinY(bounds)); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMinX(bounds),CGRectGetMaxY(bounds),CGRectGetMidX(bounds),CGRectGetMaxY(bounds), cornerRadius); - - CGPathAddArcToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMaxY(bounds),CGRectGetMaxX(bounds),CGRectGetMidY(bounds), cornerRadius); - - CGPathAddLineToPoint(pathRef,nil,CGRectGetMaxX(bounds),CGRectGetMinY(bounds)); - - }else{ - - CGPathAddRect(pathRef,nil, bounds); - - addLine =YES; - - } - - layer.path= pathRef; - - CFRelease(pathRef); - - layer.fillColor= [UIColor colorWithWhite:1.f alpha:0.8f].CGColor; - - if(addLine ==YES) { - - CALayer* lineLayer = [[CALayer alloc]init]; - - CGFloat lineHeight = (1.f/ [UIScreen mainScreen].scale); - - lineLayer.frame=CGRectMake(CGRectGetMinX(bounds)+10, bounds.size.height-lineHeight, bounds.size.width-10, lineHeight); - - lineLayer.backgroundColor= tableView.separatorColor.CGColor; - - [layer addSublayer:lineLayer]; - - } - - UIView*testView = [[UIView alloc]initWithFrame:bounds]; - - [testView.layer insertSublayer:layer atIndex:0]; - - testView.backgroundColor=UIColor.clearColor; - - cell.backgroundView= testView; - - } - - } - -} -@end - - - diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.h deleted file mode 100644 index 452cce8..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// YXSectionOneTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXSectionOneTableViewCell : UITableViewCell - -@property (nonatomic, copy) NSString * sectionTitle; - -@property (nonatomic, assign) BOOL isShow; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.m deleted file mode 100644 index 3dbd2be..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXSectionOneTableViewCell.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// YXSectionOneTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXSectionOneTableViewCell.h" - - -@interface YXSectionOneTableViewCell () - -@property (nonatomic, strong) UILabel * sectionLabel; - -@property (nonatomic, strong) UISwitch * rightSlider; - -@end - - -@implementation YXSectionOneTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - return self; -} - -- (void)createUI { - - self.sectionLabel = [[UILabel alloc] init]; - self.sectionLabel.textColor = CFontColor1; - self.sectionLabel.font = BOLDSYSTEMFONT(15); - self.sectionLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.sectionLabel]; - - [self.sectionLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.top.height.mas_offset(15); - make.width.mas_offset(100); - make.bottom.mas_offset(-20); - }]; - - self.rightSlider = [[UISwitch alloc] init]; - [self.rightSlider setOn:YES animated:YES]; - [self.rightSlider setOnTintColor: UIColorHex(#59D5D4)]; - self.rightSlider.transform = CGAffineTransformMakeScale(0.6, 0.6); - [self.rightSlider addTarget:self action:@selector(switchChange:) forControlEvents:UIControlEventValueChanged]; - [self.contentView addSubview:self.rightSlider]; - - [self.rightSlider mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_offset(-15); - make.top.mas_offset(15); - make.height.mas_offset(17); - make.bottom.mas_offset(-20); - }]; -} - -- (void) switchChange:(UISwitch*)sw { - if(sw.on == YES) { - NSLog(@"开关切换为开"); - } else if(sw.on == NO) { - NSLog(@"开关切换为关"); - } -} - -- (void)setSectionTitle:(NSString *)sectionTitle { - - _sectionTitle = sectionTitle; - - self.sectionLabel.text = _sectionTitle; -} - -- (void)setIsShow:(BOOL)isShow { - - _isShow = isShow; - - self.rightSlider.hidden = _isShow; -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXTimeDisanceTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXTimeDisanceTableViewCell.m deleted file mode 100644 index 9df9651..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXTimeDisanceTableViewCell.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// YXTimeDisanceTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXTimeDisanceTableViewCell.h" - -@interface YXTimeDisanceTableViewCell () - -@property (nonatomic, strong) UILabel * timeLabel; - -@property (nonatomic, strong) UISwitch * rightSlider; - - -@end - -@implementation YXTimeDisanceTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.timeLabel = [[UILabel alloc] init]; - self.timeLabel.textColor = UIColorHex(#333333); - self.timeLabel.font = MEDIUMFONT(13); - self.timeLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.timeLabel]; - - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.top.height.mas_offset(15); - make.width.mas_offset(200); - make.bottom.mas_offset(-20); - }]; - - self.rightSlider = [[UISwitch alloc] init]; - [self.rightSlider setOn:YES animated:YES]; - [self.rightSlider setOnTintColor: UIColorHex(#59D5D4)]; - self.rightSlider.transform = CGAffineTransformMakeScale(0.6, 0.6); - [self.rightSlider addTarget:self action:@selector(switchChange:) forControlEvents:UIControlEventValueChanged]; - [self.contentView addSubview:self.rightSlider]; - - [self.rightSlider mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_offset(-15); - make.top.mas_offset(15); - make.height.mas_offset(17); - make.bottom.mas_offset(-20); - }]; - - UIView * lineV = [[UIView alloc] init]; - lineV.backgroundColor = UIColorHex(#E0E0E0); - [self.contentView addSubview:lineV]; - - [lineV mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.mas_offset(0); - make.height.mas_offset(1); - make.bottom.mas_offset(0); - }]; - -} - -- (void) switchChange:(UISwitch*)sw { - if(sw.on == YES) { - NSLog(@"开关切换为开"); - } else if(sw.on == NO) { - NSLog(@"开关切换为关"); - } -} - -- (void)setModel:(YXSchedulingSettingModel *)model { - - _model = model; - - self.timeLabel.text = _model.time; - - [self.rightSlider setOn:_model.isSelected]; - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.h deleted file mode 100644 index 99875d5..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// YXVideoAudioTableViewCell.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface YXVideoAudioTableViewCell : UITableViewCell - -@property (nonatomic, copy) NSString * leftString; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.m deleted file mode 100644 index f632867..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/SchedulingSettingView(排班设置)/YXVideoAudioTableViewCell.m +++ /dev/null @@ -1,110 +0,0 @@ -// -// YXVideoAudioTableViewCell.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/8. -// - -#import "YXVideoAudioTableViewCell.h" - -@interface YXVideoAudioTableViewCell () - -@property (nonatomic, strong) UILabel * leftLabel; - -@property (nonatomic, strong) UITextField * numberField; - -@end - -@implementation YXVideoAudioTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - - [self createUI]; - } - - return self; - -} - -- (void)createUI { - - self.leftLabel = [[UILabel alloc] init]; - self.leftLabel.textColor = UIColorHex(#333333); - self.leftLabel.font = BOLDSYSTEMFONT(13); - self.leftLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:self.leftLabel]; - - [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(28); - make.top.height.mas_offset(20); - make.width.mas_offset(40); - make.bottom.mas_offset(-20); - }]; - - UILabel * maxLabel = [[UILabel alloc] init]; - maxLabel.textColor = UIColorHex(#333333); - maxLabel.font = MEDIUMFONT(14); - maxLabel.text = @"最大可预约"; - maxLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:maxLabel]; - - [maxLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.leftLabel.mas_right).offset(20); - make.top.height.mas_offset(20); - make.bottom.mas_offset(-20); - }]; - [maxLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - - self.numberField = [[UITextField alloc] init]; - self.numberField.layer.cornerRadius = 5.0; - self.numberField.layer.masksToBounds = true; - self.numberField.layer.borderColor = UIColorHex(#CCCCCC).CGColor; - self.numberField.layer.borderWidth = 1.0f; - self.numberField.keyboardType = UIKeyboardTypeNumberPad; - [self.contentView addSubview:self.numberField]; - - [self.numberField mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(maxLabel.mas_right).offset(11); - make.height.mas_offset(30); - make.width.mas_offset(58); - make.bottom.mas_offset(-15); - }]; - - UILabel * peopleLabel = [[UILabel alloc] init]; - peopleLabel.textColor = UIColorHex(#333333); - peopleLabel.font = MEDIUMFONT(14); - peopleLabel.text = @"人"; - peopleLabel.textAlignment = NSTextAlignmentLeft; - [self.contentView addSubview:peopleLabel]; - - [peopleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.numberField.mas_right).offset(10); - make.top.height.mas_offset(20); - make.bottom.mas_offset(-20); - make.width.mas_offset(35); - }]; -} - -- (void)setLeftString:(NSString *)leftString { - - _leftString = leftString; - - self.leftLabel.text = _leftString; - - -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.h deleted file mode 100644 index 59ff2cd..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// YXcustomDelectedView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/6. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^delectOneBlock)(NSInteger btnTag); - -@interface YXcustomDelectedView : UIView - -@property (nonatomic, copy) NSString * titleString; - -@property (nonatomic, assign) NSInteger btntag; - -@property (nonatomic, copy) delectOneBlock delectBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.m deleted file mode 100644 index 0353670..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXcustomDelectedView.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// YXcustomDelectedView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/6. -// - -#import "YXcustomDelectedView.h" - -@interface YXcustomDelectedView () - -@property (nonatomic, strong) UILabel * nameLabel; -@property (nonatomic, strong) UIButton * cancelBtn ; - -@end - -@implementation YXcustomDelectedView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - - return self; -} - --(void)createUI { - - UIButton * cancelBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width - 18, 0, 18, 18)]; - [cancelBtn setImage:[UIImage imageNamed:@"delected_Icon"] forState:UIControlStateNormal]; - self.cancelBtn = cancelBtn; - [cancelBtn addTarget:self action:@selector(delectedAction:) forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:cancelBtn]; - - - self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 7, self.width-10, 27)]; - self.nameLabel.textAlignment = NSTextAlignmentCenter; - self.nameLabel.textColor = CFontColor1; - self.nameLabel.font = SYSTEMFONT(13); - self.nameLabel.layer.borderColor = UIColorHex(#BBBBBB).CGColor; - self.nameLabel.layer.cornerRadius = 5.0; - self.nameLabel.layer.masksToBounds = true; - self.nameLabel.layer.borderWidth = 1.0f; - [self addSubview:self.nameLabel]; -} - -- (void)setBtntag:(NSInteger)btntag { - - _btntag = btntag; - self.cancelBtn.tag = _btntag; - - - -} - -- (void)setTitleString:(NSString *)titleString { - _titleString = titleString; - self.nameLabel.text = _titleString; -} - -- (void)delectedAction:(UIButton *)btn { - - if (self.delectBlock) { - - self.delectBlock(btn.tag - 100); - - } - -} -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.h b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.h deleted file mode 100644 index 6b077eb..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// YXuserAddGoodPopView.h -// healthQuestion -// -// Created by 仁康信息 on 2023/5/6. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^addBlcok)(NSString *inputString); - -@interface YXuserAddGoodPopView : UIView - -@property (nonatomic, copy) addBlcok popBlock; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.m b/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.m deleted file mode 100644 index 4ffdbed..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/Mine/view/YXuserAddGoodPopView.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// YXuserAddGoodPopView.m -// healthQuestion -// -// Created by 仁康信息 on 2023/5/6. -// - -#import "YXuserAddGoodPopView.h" -#import "UIPlaceHolderTextView.h" - -@interface YXuserAddGoodPopView () - -@property (nonatomic, strong) UIPlaceHolderTextView * addTextView; - -@end - -@implementation YXuserAddGoodPopView - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -- (instancetype)initWithFrame:(CGRect)frame { - - if (self = [super initWithFrame:frame]) { - - [self createUI]; - } - - return self; -} - -- (void)createUI { - - self.backgroundColor = RGBA(0, 0, 0, 0.3); - - UIView * popView = [[UIView alloc] initWithFrame:CGRectMake(0, kScreenHeight - kRealValue(254), kScreenWidth, kRealValue(254))]; - popView.backgroundColor = KWhiteColor; - UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:popView.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerTopLeft cornerRadii:CGSizeMake(10, 10)]; - CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init]; - maskLayer.frame = popView.bounds; - maskLayer.path = maskPath.CGPath; - popView.layer.mask = maskLayer; - [self addSubview:popView]; - - UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(26), popView.width, 14)]; - titleLabel.text = @"擅长病种"; - titleLabel.font = MEDIUMFONT(14); - titleLabel.textAlignment = NSTextAlignmentCenter; - titleLabel.textColor = CFontColor1; - [popView addSubview:titleLabel]; - - - UIPlaceHolderTextView * textView = [[UIPlaceHolderTextView alloc] initWithFrame:CGRectMake(kRealValue(16), titleLabel.bottom + kRealValue(32), kScreenWidth - kRealValue(32), kRealValue(90))]; - textView.backgroundColor = UIColorHex(#EFEFEF); - self.addTextView = textView; - textView.font = SYSTEMFONT(13); - textView.placeholder = @"请输入您擅长的病种"; - textView.layer.cornerRadius = 10; - textView.layer.masksToBounds = true; - [popView addSubview:textView]; - - UIButton * cancelbtn = [[UIButton alloc] initWithFrame:CGRectMake(popView.width - kRealValue(15) - 9 , kRealValue(15) , 9, 9)]; - [cancelbtn setImage:[UIImage imageNamed:@"close_Icon"] forState:UIControlStateNormal]; - [cancelbtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside]; - [popView addSubview:cancelbtn]; - - UIButton * sureBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(47) ,textView.bottom + kRealValue(31) , popView.width - kRealValue(94), 40)]; - sureBtn.backgroundColor = UIColorHex(#21BEBD); - sureBtn.layer.cornerRadius = 20; - [sureBtn setTitle:@"确定" forState:UIControlStateNormal]; - [sureBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - sureBtn.titleLabel.font = MEDIUMFONT(14); - [sureBtn addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside]; - [popView addSubview:sureBtn]; - - - - - -} - --(void)cancelAction { - - [self removeFromSuperview]; - -} - -- (void)sureAction { - - if (ValidStr(self.addTextView.text)) { - - [MBProgressHUD showErrorMessage:@"请输入内容"]; - return; - } - - if(self.popBlock) { - - self.popBlock(self.addTextView.text); - } - [self removeFromSuperview]; -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.h deleted file mode 100644 index dbf46e3..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ChatListViewController.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/2/13. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface ChatListViewController : YXBaseViewController - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.m deleted file mode 100644 index 5a826ff..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/ChatList/ChatListViewController.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// ChatListViewController.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/2/13. -// - -#import "ChatListViewController.h" -#import "TUIConversationListController.h" -#import "TUIC2CChatViewController.h" -#import "TUIConversationCell.h" -#import "ChatViewController.h" - -@interface ChatListViewController () - -@end - -@implementation ChatListViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. - self.isHidenNaviBar = false; - TUIConversationListController *vc = [[TUIConversationListController alloc] init]; - vc.delegate = self; - // 把 TUIConversationListController 添加到自己的 ViewController - [self addChildViewController:vc]; - [self.view addSubview:vc.view]; - -} - -//会话列表代理 - -- (void)conversationListController:(TUIConversationListController *)conversationController - didSelectConversation:(TUIConversationCell *)conversation -{ - - // 会话列表点击事件,通常是打开聊天界面 - TUIConversationCellData * data11 = conversation; -// // 创建会话信息 - - ChatViewController * chatVC = [[ChatViewController alloc] init]; - if (!ValidStr(data11.userID)) { - chatVC.chatID = data11.userID; - chatVC.isGroupID = false; - - }else - { - chatVC.chatID = data11.groupID; - chatVC.isGroupID = YES; - } - chatVC.navTitle = data11.title; - [self.navigationController pushViewController:chatVC animated:true]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.h deleted file mode 100644 index 1f91a73..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// ChatMapViewController.h -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/7/5. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^sendUserSoSLocation)(CLLocationCoordinate2D coordinate); - -@interface ChatMapViewController : YXBaseViewController - -@property (nonatomic, copy) sendUserSoSLocation mapBlcok; - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.m deleted file mode 100644 index 199eb61..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/ChatMapViewController.m +++ /dev/null @@ -1,157 +0,0 @@ -// -// ChatMapViewController.m -// DoctorXinjiang -// -// Created by 仁康信息 on 2023/7/5. -// - -#import "ChatMapViewController.h" - -@interface ChatMapViewController () -{ - CLLocationCoordinate2D coordinate; -} -@property (nonatomic, strong) MAMapView *mapView; -@property (nonatomic, strong) AMapSearchAPI *search; -@property (nonatomic, assign) BOOL userFirstLoca; -@end - -@implementation ChatMapViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.navigationItem.title = @"选择位置"; - self.view.backgroundColor = KWhiteColor; - // Do any additional setup after loading the view. - [self createUI]; -} - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - - [self.mapView setCompassImage:[UIImage imageNamed:@"compass"]]; -} - -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - - // 开启定位 - self.mapView.showsUserLocation = YES; - self.mapView.userTrackingMode = MAUserTrackingModeFollow; -} - -- (void)viewDidDisappear:(BOOL)animated -{ - [super viewDidDisappear:animated]; - [self.mapView setCompassImage:nil]; -} - -- (void)createUI { - - self.mapView = [[MAMapView alloc] initWithFrame:self.view.bounds]; - self.mapView.zoomLevel = 17; - self.mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.mapView.userTrackingMode = MAUserTrackingModeFollow; - [self.view addSubview:self.mapView]; - self.search.delegate = self; - self.mapView.delegate = self; - [self addNavigationItemWithTitles:@[@"发送"] isLeft:NO target:self action:@selector(sendMapmessate) tags:@[@"100"]]; - -} - -- (void)sendMapmessate { - - if (self.userFirstLoca == NO) { - [self showMBProgressHUDOnlyWithString:@"正在获取您的位置,请稍候"]; - } - if (self.mapBlcok) { - self.mapBlcok(coordinate); - } - [self.navigationController popViewControllerAnimated:YES]; - - -} - -#pragma mark - MAMapviewDelegate -- (MAAnnotationView *)mapView:(MAMapView *)mapView viewForAnnotation:(id)annotation -{ - if ([annotation isKindOfClass:[MAPointAnnotation class]]) - { - - } - - return nil; -} - -#pragma mark - MAMapViewDelegate - -- (void)mapViewRequireLocationAuth:(CLLocationManager *)locationManager -{ - [locationManager requestAlwaysAuthorization]; -} - - -- (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated -{ -} - - -- (void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation -{ - // 目的是只用第一次定位的数据,即用户的初始位置 - if (self.userFirstLoca == NO) { - self.userFirstLoca = YES; -// self.userFirstCoor = userLocation.location.coordinate; - coordinate = userLocation.location.coordinate; - MAPointAnnotation *ann = [[MAPointAnnotation alloc] init]; - ann.coordinate = userLocation.location.coordinate; - //固定Annotation并放置地图中心点 - ann.lockedToScreen = YES; - ann.lockedScreenPoint = CGPointMake(mapView.center.x, mapView.center.y); - [mapView addAnnotation:ann]; - } -} - -/* 地图移动结束后调用此接口 */ -- (void)mapView:(MAMapView *)mapView mapDidMoveByUser:(BOOL)wasUserAction -{ - // 将指定view坐标系的坐标转换为经纬度 - CLLocationCoordinate2D moveCoor = [mapView convertPoint:CGPointMake(mapView.center.x, mapView.center.y-64) toCoordinateFromView:mapView]; - - // 通过坐标点得到经纬度,从而进行反地理编码 - AMapReGeocodeSearchRequest *rego = [[AMapReGeocodeSearchRequest alloc] init]; - // 是否返回扩展信(因为我们需要得到附近地理位置信息,所以设为YES) - rego.requireExtension = YES; - rego.location = [AMapGeoPoint locationWithLatitude:moveCoor.latitude longitude:moveCoor.longitude]; - coordinate = CLLocationCoordinate2DMake(moveCoor.latitude , moveCoor.longitude); - [self.search AMapReGoecodeSearch:rego]; -} - -/* 逆地理编码查询回调函数 */ -- (void)onReGeocodeSearchDone:(AMapReGeocodeSearchRequest *)request response:(AMapReGeocodeSearchResponse *)response -{ - // reGeodeVC就是一个简单的tableView布局,数据来源就是response.regeocode.pois -} - -/* 这个是reGeodeVC点击tableViewCell的回调 */ -#pragma mark - ReGeocodeDelegate --(void)selectAMapAPI:(AMapPOI *)poi -{ - // 将地图的中心点移至poi点 - coordinate = CLLocationCoordinate2DMake(poi.location.latitude, poi.location.longitude); - [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(poi.location.latitude, poi.location.longitude) animated:YES]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.h b/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.h deleted file mode 100644 index 2fb2fb6..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// CurrentLocationViewController.h -// healthQuestion -// -// Created by 仁康信息 on 2023/8/15. -// - -#import "YXBaseViewController.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface CurrentLocationViewController : YXBaseViewController - -@property (nonatomic, assign) double longitude; - -@property (nonatomic, assign) double latitude; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.m b/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.m deleted file mode 100644 index 2097fd0..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Project/TUIChat/Controller/CurrentLocationViewController.m +++ /dev/null @@ -1,138 +0,0 @@ -// -// CurrentLocationViewController.m -// healthQuestion -// -// Created by 仁康信息 on 2023/8/15. -// - -#import "CurrentLocationViewController.h" - -@interface CurrentLocationViewController () -{ - CLLocationCoordinate2D coordinate; -} -@property (nonatomic, strong) MAMapView *mapView; -@property (nonatomic, strong) AMapSearchAPI *search; -@property (nonatomic, assign) BOOL userFirstLoca; - -@end - -@implementation CurrentLocationViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - self.isHidenNaviBar = false; - self.navigationItem.title = @"我的位置"; - self.view.backgroundColor = KWhiteColor; - // Do any additional setup after loading the view. - [self createUI]; -} - - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - -// [self.mapView setCompassImage:[UIImage imageNamed:@"pin"]]; -} - -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - - -} - -- (void)viewDidDisappear:(BOOL)animated -{ - [super viewDidDisappear:animated]; - [self.mapView setCompassImage:nil]; -} - -- (void)createUI { - - self.mapView = [[MAMapView alloc] initWithFrame:self.view.bounds]; - self.mapView.zoomLevel = 17; - self.mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - // 设置中心点时带动画效果 - [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(self.latitude, self.longitude) animated:YES]; - - [self.view addSubview:self.mapView]; - self.search.delegate = self; - self.mapView.delegate = self; - - MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; - pointAnnotation.coordinate = CLLocationCoordinate2DMake(self.latitude, self.longitude); - [_mapView addAnnotation:pointAnnotation]; - -} - -#pragma mark - MAMapviewDelegate -- (MAAnnotationView *)mapView:(MAMapView *)mapView viewForAnnotation:(id)annotation -{ - if ([annotation isKindOfClass:[MAPointAnnotation class]]) - { - static NSString *pointReuseIndentifier = @"pointReuseIndentifier"; - MAPinAnnotationView*annotationView = (MAPinAnnotationView*)[mapView dequeueReusableAnnotationViewWithIdentifier:pointReuseIndentifier]; - if (annotationView == nil) - { - annotationView = [[MAPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:pointReuseIndentifier]; - } - annotationView.canShowCallout= YES; //设置气泡可以弹出,默认为NO - annotationView.animatesDrop = YES; //设置标注动画显示,默认为NO - annotationView.draggable = YES; //设置标注可以拖动,默认为NO - annotationView.pinColor = MAPinAnnotationColorPurple; - annotationView.centerOffset = CGPointMake(0, -18); -// annotationView.image = [UIImage imageNamed:@"pin"]; - return annotationView; - } - return nil; -} -#pragma mark - MAMapViewDelegate - -- (void)mapViewRequireLocationAuth:(CLLocationManager *)locationManager -{ - [locationManager requestAlwaysAuthorization]; -} - - -- (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated -{ -} - - -- (void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation -{ - -} - -/* 地图移动结束后调用此接口 */ -- (void)mapView:(MAMapView *)mapView mapDidMoveByUser:(BOOL)wasUserAction -{ - -} - -/* 逆地理编码查询回调函数 */ -- (void)onReGeocodeSearchDone:(AMapReGeocodeSearchRequest *)request response:(AMapReGeocodeSearchResponse *)response -{ - // reGeodeVC就是一个简单的tableView布局,数据来源就是response.regeocode.pois -} - -/* 这个是reGeodeVC点击tableViewCell的回调 */ -#pragma mark - ReGeocodeDelegate --(void)selectAMapAPI:(AMapPOI *)poi -{ - // 将地图的中心点移至poi点 - [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(self.latitude, self.longitude) animated:YES]; -} -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.h b/DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.h deleted file mode 100644 index 7d6d617..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// HQConst.h -// healthQuestion -// -// Created by xulei on 2022/8/12. -// - -#import - -#import - -extern NSString * const LoginUserInfo; - -extern NSString * const LoginSeccess; - -extern NSString * const LogoutSeccess; - -extern NSString * const IMLoginUserInfo; diff --git a/DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.m b/DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.m deleted file mode 100644 index 8170dd4..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Supporting Files/HQConst.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// HQConst.m -// healthQuestion -// -// Created by xulei on 2022/8/12. -// - -#import "HQConst.h" - - -NSString * const LoginUserInfo = @"LoginUserInfo"; - -NSString * const LoginSeccess = @"LoginSeccess"; - -NSString * const LogoutSeccess = @"LogoutSeccess"; - -NSString * const IMLoginUserInfo = @"IMUserInfo"; diff --git a/DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.h b/DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.h deleted file mode 100644 index c0801b7..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.h +++ /dev/null @@ -1,95 +0,0 @@ -// -// HQCommonUtils.h -// healthQuestion -// -// Created by xulei on 2022/8/16. -// - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface HQCommonUtils : NSObject - - - -/** - * 判断APP是否第一次运行。使用UserDefault来记录的,key为RunCount - * @return 返回BOOL值。YES表示第一次运行APP,NO相反 - */ -+ (BOOL)isFirstRunApp; - -/** - * 判断用户是否第一次登录。使用UserDefault来记录的,key为LoginCount - * @return 返回BOOL值。YES表示第一次登录,NO相反 - */ -+ (BOOL)isFirstLogin; - -/** - * 判断APP是否登录 - */ -+ (BOOL)isLogin; - -+ (NSString *)SFZHID; - - -+ (NSString *)loginID; - -//判断密码是否满足 8位 包含大小写数字 -+ (BOOL )isOrNoPasswordStyle:(NSString *)passWordName; - -//归档和解归档 -+ (void)keyedArchiverWithData:(nullable id)responseObject key:(NSString *)key; -+ (nullable id)keyedUnarchiverWithKey:(NSString *)key; -//编码问题 -+(NSString*)DataTOjsonString:(id)object; - - -//计算UILabel的高度(带有行间距的情况) -+(CGFloat)getSpaceLabelHeight:(UILabel *)label - AndLeftisTrue:(BOOL)isLeft - withStr:(NSString*)str - withFont:(UIFont*)font - withWidth:(CGFloat)width - withLineSpacing:(CGFloat)linespace; - -//计算宽度 -+(CGFloat)getLengthFromText:(NSString *)text andFontSize:(CGFloat)fontSize; - - -+ (NSMutableAttributedString *)firstString:(NSString *)firstString - firstColor:(UIColor *)firstColor firstSize:(CGFloat)firstSize secondString:(NSString *)secondString secondColor:(UIColor *)secondColor secondSize:(CGFloat)secondSize - thirdString:(NSString *)thirdString thirdColor:(UIColor *)thirdColor thirdSize:(CGFloat)thirdSize; - -/* - 添加阴影 : 注意与贝塞尔裁圆 - */ -+ (void)addShadowToView:(UIView *)shadowView; - -+(UITextField*)createTextFieldWithplaceholder:(NSString*)placeholder passWord:(BOOL)YESorNO leftImageView:(UIView*)leftView isShowLeft:(BOOL)isLeft rightImageView:(UIView*)rightView isShowRight:(BOOL)isRigt Font:(float)font textColor:(UIColor *)color; - -+(BOOL)isMobileNumber:(NSString *)mobileNum; - - -///将时间戳转为日期时间 - -/// @param timestamp 时间戳 - -/// @param dateFormat 日期样式 YYYY-MM-dd HH:mm:ss - -+ (NSString *)getTimeFromTimestamp:(NSInteger )timestamp andDateFormat:(NSString *)dateFormat; - -///将日期时间转为时间戳 -+ (NSString *)getTimestampFromTime:(NSString *)CurrentTime; - -/* - 获取当前控制器 - */ - -+ (UIViewController *)getCurrentVC; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.m b/DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.m deleted file mode 100644 index cece443..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Utils/HQCommonUtils.m +++ /dev/null @@ -1,435 +0,0 @@ -// -// HQCommonUtils.m -// healthQuestion -// -// Created by xulei on 2022/8/16. -// - -#import "HQCommonUtils.h" -#import "YXUserInfo.h" - -@implementation HQCommonUtils - -+ (BOOL)isFirstRunApp -{ - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - NSInteger runCount = [ud integerForKey:@"RunCount"]; - if (0 == runCount) - { - [ud setInteger:++runCount forKey:@"RunCount"]; - [ud synchronize]; - return YES; - } - return NO; -} - -+ (BOOL)isFirstLogin -{ - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - NSInteger loginCount = [ud integerForKey:@"LoginCount"]; - if (0 == loginCount) - { - [ud setInteger:++loginCount forKey:@"LoginCount"]; - [ud synchronize]; - return YES; - } - return NO; -} - -+ (BOOL)isLogin -{ - if ([self keyedUnarchiverWithKey:LoginUserInfo] == nil) - { - return NO; - } - return YES; -} - - -+ (NSString *)loginID -{ - NSString *string = nil; - if ([self isLogin]) - { - YXUserInfo *userInfo = [self keyedUnarchiverWithKey:LoginUserInfo]; - string = [NSString stringWithFormat:@"%@",userInfo.user_id]; - } - else - { - string = @"0"; - } - - - return string; -} - -+ (NSString *)SFZHID -{ - NSString *string = nil; - if ([self isLogin]) - { - YXUserInfo *userInfo = [self keyedUnarchiverWithKey:LoginUserInfo]; - string = [NSString stringWithFormat:@"%@",userInfo.idCard]; - } - else - { - string = @""; - } - - - return string; -} - -+(CGFloat)getLengthFromText:(NSString *)text andFontSize:(CGFloat)fontSize{ - NSDictionary *attrbute = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize]}; - return [text boundingRectWithSize:CGSizeMake(MAXFLOAT, 50) - options:NSStringDrawingUsesLineFragmentOrigin attributes:attrbute context:nil].size.width;; -} -/*! - * @brief 把格式化的JSON格式的字符串转换成字典 - * @param jsonString JSON格式的字符串 - * @return 返回字典 - */ -+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString -{ - if (jsonString == nil) { - return nil; - } - - NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - NSError *err; - NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData - options:NSJSONReadingMutableContainers - error:&err]; - if(err) { - NSLog(@"json解析失败:%@",err); - return nil; - } - return dic; -} - - -+ (void)keyedArchiverWithData:(nullable id)responseObject key:(NSString *)key -{ - NSMutableData *saveData = [NSMutableData data]; - NSKeyedArchiver *keyedArchiver = [[NSKeyedArchiver alloc]initForWritingWithMutableData:saveData]; - [keyedArchiver encodeObject:responseObject forKey:key]; - [keyedArchiver finishEncoding]; - - // 获取沙盒目录 - NSString *fullPath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:key]; - if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]) - { - [[NSFileManager defaultManager] removeItemAtPath:fullPath error:nil]; - } - //写到文件中 - [saveData writeToFile:fullPath atomically:YES]; -} -+ (nullable id)keyedUnarchiverWithKey:(NSString *)key -{ - // 获取数据目录 - NSString *fullPath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:key]; - - NSData *saveData = [NSData dataWithContentsOfFile:fullPath]; - - NSKeyedUnarchiver *keyedUnarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:saveData]; - - return [keyedUnarchiver decodeObjectForKey:key]; -} -+(NSString*)DataTOjsonString:(id)object -{ - NSString *jsonString = nil; - NSError *error; - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:object - options:NSJSONWritingPrettyPrinted - error:&error]; - if (!jsonData) { - } else { - jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - } - return jsonString; -} -//计算UILabel的高度(带有行间距的情况) -+(CGFloat)getSpaceLabelHeight:(UILabel *)label - AndLeftisTrue:(BOOL)isLeft - withStr:(NSString*)str - withFont:(UIFont*)font - withWidth:(CGFloat)width - withLineSpacing:(CGFloat)linespace{ - NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init]; - paraStyle.lineBreakMode = NSLineBreakByCharWrapping; - if(isLeft == true) { - paraStyle.alignment = NSTextAlignmentLeft; - }else - { - paraStyle.alignment = NSTextAlignmentRight; - } - //设置行间距 - paraStyle.lineSpacing = linespace; - paraStyle.hyphenationFactor = 1.0; - paraStyle.firstLineHeadIndent = 0.0; - paraStyle.paragraphSpacingBefore = 0.0; - paraStyle.headIndent = 0; - paraStyle.tailIndent = 0; - //设置字间距 NSKernAttributeName:@1.5f - NSDictionary *dic = @{NSFontAttributeName:font, - NSParagraphStyleAttributeName:paraStyle, - NSKernAttributeName:@1.0f - }; - if(str.length < 1) { - str = @" "; - } - NSAttributedString *attributeStr = [[NSAttributedString alloc] initWithString:str attributes:dic]; - label.attributedText = attributeStr; - CGSize size = [str boundingRectWithSize:CGSizeMake(width, MAXFLOAT) - options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil].size; - return size.height; -} - - -+ (NSMutableAttributedString *)firstString:(NSString *)firstString - firstColor:(UIColor *)firstColor firstSize:(CGFloat)firstSize secondString:(NSString *)secondString secondColor:(UIColor *)secondColor secondSize:(CGFloat)secondSize - thirdString:(NSString *)thirdString thirdColor:(UIColor *)thirdColor thirdSize:(CGFloat)thirdSize{ - - - - NSMutableAttributedString * firstPart = [[NSMutableAttributedString alloc] initWithString:firstString]; - NSDictionary * firstAttributes = @{ NSFontAttributeName:[UIFont boldSystemFontOfSize:firstSize],NSForegroundColorAttributeName:firstColor}; - [firstPart setAttributes:firstAttributes range:NSMakeRange(0,firstPart.length)]; - - NSMutableAttributedString * secondPart = [[NSMutableAttributedString alloc] initWithString:secondString]; - NSDictionary * secondAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:secondSize],NSForegroundColorAttributeName:secondColor}; - [secondPart setAttributes:secondAttributes range:NSMakeRange(0,secondPart.length)]; - [firstPart appendAttributedString:secondPart]; - - NSMutableAttributedString * thirdPart = [[NSMutableAttributedString alloc] initWithString:thirdString]; - NSDictionary * thirdAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:thirdSize],NSForegroundColorAttributeName:thirdColor}; - [thirdPart setAttributes:thirdAttributes range:NSMakeRange(0,thirdPart.length)]; - [firstPart appendAttributedString:thirdPart]; - - return firstPart; -} - -+ (void)addShadowToView:(UIView *)shadowView { - - shadowView.layer.masksToBounds = NO; - shadowView.backgroundColor = [UIColor whiteColor]; - shadowView.layer.shadowColor = [UIColor blackColor].CGColor; - shadowView.layer.shadowOffset = CGSizeMake(0, 4); - shadowView.layer.shadowOpacity = 0.15; - shadowView.layer.shadowRadius = 5; - shadowView.layer.cornerRadius = 8; - -} - -+(UITextField*)createTextFieldWithplaceholder:(NSString*)placeholder passWord:(BOOL)YESorNO leftImageView:(UIView*)leftView isShowLeft:(BOOL)isLeft rightImageView:(UIView*)rightView isShowRight:(BOOL)isRigt Font:(float)font textColor:(UIColor *)color -{ - UITextField*textField=[[UITextField alloc]init]; - //灰色提示框 - textField.placeholder=placeholder; - //文字对齐方式 - textField.textAlignment=NSTextAlignmentLeft; - textField.secureTextEntry=YESorNO; - - //边框 - //textField.borderStyle=UITextBorderStyleLine; - //键盘类型 - textField.returnKeyType=UIReturnKeyDone; - //关闭首字母大写 - textField.autocapitalizationType=NO; - //清除按钮 - textField.clearButtonMode=NO; - //左图片 - if (isLeft == true) { - - textField.leftView=leftView; - textField.leftViewMode=UITextFieldViewModeAlways; - } - if (isRigt == true) { - textField.rightView=rightView; - //编辑状态下一直存在 - textField.rightViewMode=UITextFieldViewModeAlways; - } - //右图片 - - //自定义键盘 - //textField.inputView - //字体 - textField.font=[UIFont systemFontOfSize:font]; - //字体颜色 - - textField.textColor = color; - - return textField; - -} - - -+ (BOOL)isOrNoPasswordStyle:(NSString *)passWordName - -{ - bool isAlow = true; - - if (passWordName.length >= 33) - - { - - isAlow = false; - - } - - else if ([self JudgeTheillegalCharacter:passWordName]) - - { - - isAlow = false; - - } - - else if (![self judgePassWordLegal:passWordName]) - - { - - isAlow = false; - - } - - return isAlow; - -} - -+ (BOOL)JudgeTheillegalCharacter:(NSString *)content{ - - //提示标签不能输入特殊字符 - - NSString *str =@"^[A-Za-z0-9\\u4e00-\u9fa5]+$"; - - NSPredicate* emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", str]; - - if (![emailTest evaluateWithObject:content]) { - - return YES; - - } - - return NO; - -} - -+ (BOOL)judgePassWordLegal:(NSString *)pass{ - - BOOL result ; - - // 判断长度大于6位后再接着判断是否同时包含数字和大小写字母 - - NSString * regex =@"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,18}$"; - - NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; - - result = [pred evaluateWithObject:pass]; - - - return result; - -} - -+(BOOL)isMobileNumber:(NSString *)mobileNum -{ - //手机号以13, 15,18,17开头,八个 \d 数字字符 - NSString *mobileRegex = @"[1][3456789][0-9]{9}"; - NSPredicate *mobilePredicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", mobileRegex]; - - return [mobilePredicate evaluateWithObject:mobileNum]; - -} - -///将时间戳转为日期时间 - -/// @param timestamp 时间戳 - -/// @param dateFormat 日期样式 YYYY-MM-dd HH:mm:ss - -+ (NSString *)getTimeFromTimestamp:(NSInteger )timestamp andDateFormat:(NSString *)dateFormat{ - - //将对象类型的时间转换为NSDate类型 -  NSTimeInterval _interval= timestamp / 1000.0; -   NSDate *date = [NSDate dateWithTimeIntervalSince1970:_interval]; -    NSDateFormatter *objDateformat = [[NSDateFormatter alloc] init]; - //设置时间格式 - - [objDateformat setDateFormat:dateFormat]; - - //将时间转换为字符串 - - NSString *timeStr = [objDateformat stringFromDate:date]; - - return timeStr; -} - -+ (NSString *)getTimestampFromTime:(NSString *)CurrentTime { - - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - - [formatter setDateStyle:NSDateFormatterMediumStyle]; - - [formatter setTimeStyle:NSDateFormatterShortStyle]; - - [formatter setDateFormat:@"yyyyMMddHHmmss"]; //(@"YYYY-MM-dd hh:mm:ss") ----------设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制 - - //设置时区选择北京时间 - - NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"]; - - [formatter setTimeZone:timeZone]; - - NSDate* date = [formatter dateFromString:CurrentTime]; //------------将字符串按formatter转成nsdate - - //时间转时间戳的方法: - - NSInteger timeSp = [[NSNumber numberWithDouble:[date timeIntervalSince1970]] integerValue] * 1000; - - - return [NSString stringWithFormat:@"%ld",(long)timeSp]; -} - -+ (UIViewController *)getCurrentVC { - - return [self currentViewControllerWithRootViewController:[self getKeyWindow].rootViewController]; - -} - -+ (UIWindow *)getKeyWindow { - if (@available(iOS 13.0, *)) { - for (UIWindowScene* windowScene in [UIApplication sharedApplication].connectedScenes) { - if (windowScene.activationState == UISceneActivationStateForegroundActive) { - for (UIWindow *window in windowScene.windows) { - if (window.isKeyWindow) { - return window; - break; - } - } - } - } - } - else { - return [UIApplication sharedApplication].keyWindow; - } - return nil; -} - -+ (UIViewController*)currentViewControllerWithRootViewController:(UIViewController*)rootViewController { - if (rootViewController.presentedViewController) { - UIViewController* presentedViewController = rootViewController.presentedViewController; - return [self currentViewControllerWithRootViewController:presentedViewController]; - } else if ([rootViewController isKindOfClass:[UINavigationController class]]) { - UINavigationController* navigationController = (UINavigationController*)rootViewController; - return [self currentViewControllerWithRootViewController:navigationController.visibleViewController]; - } else if ([rootViewController isKindOfClass:[UITabBarController class]]) { - UITabBarController *tabBarController = (UITabBarController *)rootViewController; - return [self currentViewControllerWithRootViewController:tabBarController.selectedViewController]; - } else { - return rootViewController; - } -} - -@end diff --git a/DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.h b/DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.h deleted file mode 100644 index ce8dba7..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// LineTextField.h -// healthQuestion -// -// Created by 仁康信息 on 2022/9/21. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface LineTextField : UITextField - -- (void)drawRect:(CGRect)rect; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.m b/DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.m deleted file mode 100644 index cd361c0..0000000 --- a/DoctorXinjiang/DoctorXinjiang/Utils/LineTextField.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// LineTextField.m -// healthQuestion -// -// Created by 仁康信息 on 2022/9/21. -// - -#import "LineTextField.h" - -@implementation LineTextField - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, UIColorHex(#E0E0E0).CGColor); - CGContextFillRect(context, CGRectMake(0, CGRectGetHeight(self.frame) - 0.5, CGRectGetWidth(self.frame), 0.5)); -} - -@end