From 57643da94dba7d3129c0010e282497e5d9ea3a88 Mon Sep 17 00:00:00 2001 From: History <2596007731@qq.com> Date: Thu, 22 Jan 2026 09:35:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=96=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XinjiangProject.xcodeproj/project.pbxproj | 16 +- .../XinjiangProject/Define/StatusMacros.h | 28 +- .../JKCQNetworkingWithCache.h | 2 + .../JKCQNetworkingWithCache.m | 40 +- .../Manager/NetworkHelpManager/XJPNetAPI.h | 17 + .../Manager/NetworkHelpManager/XJPNetAPI.m | 49 +++ .../Project/Base/XJBaseWebViewVC.m | 2 +- .../Login/XJLoginTopChangeViewController.m | 367 ++++++++++++++---- .../Controller/XJEditSystemViewController.m | 6 +- .../Controller/XJMyCenterViewController.m | 48 ++- .../MainCenter/Model/XJMineCenterUserModel.h | 3 + .../MainCenter/Model/XJMineCenterUserModel.m | 7 + .../MonitoringWarchViewController.m | 294 ++++++++++---- .../View/MonitoringWarchTableHeardView.m | 7 +- .../View/MonitoringWatchTableView.m | 268 +++++++------ .../View/MonitoringWatchTableViewCell.h | 2 +- .../Controller/QuestionViewController.m | 138 +++---- .../Project/Qusetion/Model/UPAppVesionModel.h | 26 ++ .../Project/Qusetion/Model/UPAppVesionModel.m | 12 + .../Project/SOS/View/XJSOSAddressView.m | 6 +- .../Project/TUIChat/ChatViewController.m | 64 ++- .../DoctorCardCell/DoctorIDCardMessageCell.h | 3 +- .../DoctorCardCell/DoctorIDCardMessageCell.m | 2 +- .../ThirdParty/PSCheckVersion/PSAppInfo.m | 18 +- .../PSCheckVersion/PSCheckVersionView.m | 13 +- .../ThirdParty/TYMapNavSheet/TYMapNavSheet.m | 2 +- 26 files changed, 1057 insertions(+), 383 deletions(-) create mode 100644 XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.h create mode 100644 XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.m diff --git a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj index a3e55d8..7e4ae32 100644 --- a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj +++ b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj @@ -375,7 +375,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = A7CC5LW224; ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch"; @@ -395,12 +395,12 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UIUserInterfaceStyle = Light; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 15; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.6; + MARKETING_VERSION = 1.0.8; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -419,7 +419,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = A7CC5LW224; ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch"; @@ -439,12 +439,12 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UIUserInterfaceStyle = Light; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 15; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.6; + MARKETING_VERSION = 1.0.8; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -509,7 +509,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.4; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -565,7 +565,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.4; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; diff --git a/XinjiangProject/XinjiangProject/Define/StatusMacros.h b/XinjiangProject/XinjiangProject/Define/StatusMacros.h index b883c79..fd71787 100755 --- a/XinjiangProject/XinjiangProject/Define/StatusMacros.h +++ b/XinjiangProject/XinjiangProject/Define/StatusMacros.h @@ -78,20 +78,38 @@ //#define IntervenH5 @"https://starry.out.icdat.cn" //开发环境地址 彭杰 http://192.168.1.37 + //#define Http @"http://192.168.1.37"// //#define H5DevHost @"xjgateway.mcrm.vip:8888"// //#define IntervenH5 @"https://xjconsole.mcrm.vip:8888" //#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀 //#define SCHEME @"https" // - - //#define Http @"http://192.168.1.23"//昊 //正式地址 -#define Http @"https://api-jkglpt.iosp.ydpt.tech"// -#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"// -#define IntervenH5 @"https://console-jkglpt.iosp.ydpt.tech" +//#define Http @"https://api-jkglpt.iosp.ydpt.tech"// +//#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"// +//#define IntervenH5 @"https://console-jkglpt.iosp.ydpt.tech" +//#define SCHEME @"https" // + +//卫鑫本地 +//#define Http @"https://api-jkglpt.iosp.ydpt.tech"// +//#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"// +//#define IntervenH5 @"http://192.168.1.26:9876" +//#define SCHEME @"https" // + +//测试 +#define Http @"https://api-xj.tri.icdat.cn"// +#define H5DevHost @"api-xj.tri.icdat.cn"// +#define IntervenH5 @"https://console-xj.tri.icdat.cn" #define SCHEME @"https" // +//新疆项目后期的调试环境由阿里云迁移至公司内部主机服务器,功能联调和测试可用以下的环境地址 +//https://api-xj.tri.icdat.cn +//https://console-xj.tri.icdat.cn/ +//接口: http://api-xj.tri.dt.io/ +//后台: http://console-xj.tri.dt.io/ +//大屏: http://screen-xj.tri.dt.io/home + #endif /* StatusMacros_h */ diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.h b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.h index 22c78d3..8d267e5 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.h +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.h @@ -53,4 +53,6 @@ typedef void (^FileDownloadFail)(int code, NSString * desc); #pragma mark - 下载文件方法 - (void)downLoadFileWithUrl:(NSString *)urlStr Path:(NSString*)path downloadProgress:(void (^)(NSProgress *downloadProgress))progress SuccessBlock:(FileDownloadSucc)success FileDownloadFail:(FileDownloadFail)failure; +#pragma mark - 表单带参数 +- (void)httpPostFormDataRequest:(NSString *)api params:(NSMutableDictionary *)params; @end diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m index ffea220..65047ae 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m @@ -20,6 +20,8 @@ typedef NS_ENUM(NSInteger, RequestType) { RequestTypeMultiUpload,//多个上传 RequestTypeDownload, RequestTypeUpLoadVideo,//上传视频 + RequestTypeParmFormData//参数表单 + }; @implementation JKCQNetworkingWithCache @@ -115,6 +117,13 @@ typedef NS_ENUM(NSInteger, RequestType) { //5.开始启动下载任务 [task resume]; } + +#pragma mark:表单上传参数 +- (void)httpPostFormDataRequest:(NSString *)api params:(NSMutableDictionary *)params { + + + [self httpRequestWithUrlStr:api params:params requestType:RequestTypeParmFormData isCache:YES cacheKey:api imageKey:nil withData:nil withDataArray:nil]; +} #pragma mark - 网络请求统一处理 /** @@ -326,6 +335,35 @@ typedef NS_ENUM(NSInteger, RequestType) { }]; + }else if(requestType == RequestTypeParmFormData) {//参数表单上传 + + [session.requestSerializer setValue:@"application/x-www-form-urlencoded;charset=utf-8" forHTTPHeaderField:@"Content-Type"]; + [session POST:url parameters:nil headers:@{@"X-Access-Token":self.needToken} constructingBodyWithBlock:^(id _Nonnull formData) { + + // 这里我们通过将每一个键值对转换成 multipart 数据块来实现 + [formData appendPartWithFormData:[params[@"userId"] dataUsingEncoding:NSUTF8StringEncoding] name:@"userId"]; + + } progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + // 请求成功处理 + [weakSelf dealWithResponseObject:responseObject cacheUrl:url]; + + + + } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + // 请求失败处理 + NSString * statusCode = [error.userInfo objectForKey:@"NSLocalizedDescription"]; + if ([statusCode containsString:@"(401)"]) { + DLog(@"%@",error.userInfo); + [EasyTextView showErrorText:@"身份验证过期"]; + [HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo]; + KPostNotification(KNotificationLoginStateChange, @NO); + } + else { + [MBProgressHUD hideHUDForView:[HQCommonUtils getCurrentVC].view animated:YES]; + [EasyTextView showErrorText:@"请求超时"]; + } + }]; + } } @@ -375,7 +413,7 @@ typedef NS_ENUM(NSInteger, RequestType) { } if ([response.allKeys containsObject:@"code"]) { - if ([[response objectForKey:@"code"] integerValue] == 200) + if ([[response objectForKey:@"code"] integerValue] == 200 ||( [[response objectForKey:@"code"] integerValue] == 0 && [url containsString:@"listAll"])) { flag = true; }else diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h index b617a0d..b51a0d2 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h @@ -73,6 +73,7 @@ - (void)getOneKeyQuestionByID:(NSMutableDictionary *)parmDic; - (void)postSearchOneKeyQuestionData:(NSMutableDictionary *)parmDic; - (void)getHistoryReportById:(NSMutableDictionary *)parmDic; +- (void)recordDoctorCardInfoClick:(NSMutableDictionary *)parmDic; #pragma mark:咨询人管理 @@ -125,6 +126,8 @@ - (void)getInterMonitoringMaxMinData:(NSMutableDictionary *)parmDic; +- (void)getWarningWatchListV2Data:(NSMutableDictionary *)parmDic; + - (void)getWranHistoryList:(NSMutableDictionary *)parmDic; - (void)getSOSDoctorRecordList:(NSMutableDictionary *)parmDic; @@ -134,4 +137,18 @@ - (void)getSOSSmallSumData:(NSMutableDictionary *)parmDic; - (void)healthAccountLogin:(NSMutableDictionary *)parmDic; + +//版本更新 +- (void)GetAppVesionUpdata:(NSMutableDictionary *)parmDic; + +#pragma mark:模拟数据 +//获取模拟用户信息(判断是否为模拟) +- (void)postSimulationUser:(NSMutableDictionary *)parmDic; +//获取系统用户数据(查询全部用户,不做租户隔离) +- (void)getSimulationUserList:(NSMutableDictionary *)parmDic; +//开启模拟 +- (void)postStartedSimulationUser:(NSMutableDictionary *)parmDic; +//恢复用户状态 +- (void)postRecoverySimulationUser:(NSMutableDictionary *)parmDic; + @end diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m index 08879b0..bed43ee 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m @@ -100,6 +100,13 @@ } +//记录医生信息 +- (void)recordDoctorCardInfoClick:(NSMutableDictionary *)parmDic { + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/con-message/saveReadLog",Http] params:parmDic]; + +} + - (void)GetAllHistoryChatRecord:(NSMutableDictionary *)parmDic { //http://192.168.1.28/health-consultation/?groupId=1801087415104962560&pageNo=1&pageSize=10 [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectImMessagePageListSession",Http] params:parmDic]; @@ -741,6 +748,13 @@ [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/indexDataNew",Http] params:parmDic]; } +//更新接口 +- (void)getWarningWatchListV2Data:(NSMutableDictionary *)parmDic { + + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/indexDataNew/v2",Http] params:parmDic]; + +} - (void)getInterMonitoringMaxMinData:(NSMutableDictionary *)parmDic { @@ -778,5 +792,40 @@ [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/sys/mLoginAnYan",Http] params:parmDic]; +} +//版本更新 + +- (void)GetAppVesionUpdata:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/version/getSysVersionDetailByPackageName",Http] params:parmDic]; + +} + +#pragma mark:模拟用户 + +- (void)postSimulationUser:(NSMutableDictionary *)parmDic { + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/test/fakeUser",Http] params:parmDic]; + +} +//获取系统用户数据(查询全部用户,不做租户隔离) +- (void)getSimulationUserList:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/sys/user/listAll",Http] params:parmDic]; + + +} +//开启模拟 +- (void)postStartedSimulationUser:(NSMutableDictionary *)parmDic{ + + [httpRequest httpPostFormDataRequest:[NSString stringWithFormat:@"%@/health-system/test/fake",Http] params:parmDic]; + +} +//恢复用户状态 +- (void)postRecoverySimulationUser:(NSMutableDictionary *)parmDic{ + + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/test/restore",Http] params:parmDic]; + } @end diff --git a/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m b/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m index 13efaa6..efc1f69 100644 --- a/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m +++ b/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m @@ -65,7 +65,7 @@ - (void)addSubviews{ WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init]; WKPreferences *preferences = [[WKPreferences alloc]init]; - preferences.javaScriptEnabled = YES; +// preferences.javaScriptEnabled = YES; preferences.javaScriptCanOpenWindowsAutomatically = YES; preferences.minimumFontSize = 10; configuration.preferences = preferences; diff --git a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m index 699ab14..51f2fa0 100644 --- a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m @@ -17,6 +17,9 @@ #import "MQTextField.h" #import "XJTYFoundPassWordViewController.h" +#import "SimulationViewController.h" + + @interface XJLoginTopChangeViewController () @property (nonatomic, strong) UITextField * userNameField; @@ -49,6 +52,16 @@ @property (nonatomic, strong) UIButton * foundPasswordBtn; +@property (nonatomic, assign) NSInteger tapCount; +@property (nonatomic, strong) NSDate *firstTapDate; + +@property (nonatomic, strong) UILabel * topLoginTitleLab; + +@property (nonatomic, strong) UIButton * bottomChangeBtn; + +@property (nonatomic, assign) NSTimeInterval lastClickTime; + + @end @implementation XJLoginTopChangeViewController @@ -95,6 +108,7 @@ UILabel *headLab = [[UILabel alloc] initWithFrame:CGRectMake(24, topBackImg.bottom - kRealValue(46) - 58, 300, 58)]; headLab.numberOfLines = 0; headLab.textColor = KWhiteColor; + headLab.userInteractionEnabled = true; headLab.textAlignment = NSTextAlignmentLeft; NSString *text = @"你好呀,\n欢迎使用 健康油我"; @@ -118,7 +132,11 @@ [homeBtn addTarget:self action:@selector(backHomeAction) forControlEvents:UIControlEventTouchUpInside]; [topBackImg addSubview:homeBtn]; - + // 添加点击手势识别器 + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleImageTap:)]; + [headLab addGestureRecognizer:tapGestureRecognizer]; + + // 初始化计数器 // UIView *loginView = [[UIView alloc]init]; loginView.frame = CGRectMake(0, topBackImg.bottom - kRealValue(20), kScreenWidth, kScreenHeight - topBackImg.bottom - kRealValue(20)); @@ -130,40 +148,51 @@ loginView.layer.mask = maskLayer; self.loginView = loginView; // 新增切换逻辑 - CGFloat btnWidth = (kScreenWidth - kRealValue(37) * 2) / 2 ; +// CGFloat btnWidth = (kScreenWidth - kRealValue(37) * 2) / 2 ; +// +// self.leftLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(37), kRealValue(40), btnWidth, 48)]; +// [self.leftLoginBtn setTitle:@"平台统一认证" forState:UIControlStateNormal]; +// [self.leftLoginBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; +// [self.leftLoginBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal]; +// self.leftLoginBtn.selected = true; +// self.leftLoginBtn.titleLabel.font = MEDIUMFONT(16); +// [self.leftLoginBtn setBackgroundImage:[UIImage imageNamed:@"leftLoginNomal"] forState:UIControlStateNormal]; +// [self.leftLoginBtn setBackgroundImage:[UIImage imageNamed:@"loginSelectedImg"] forState:UIControlStateSelected]; +// [self.leftLoginBtn addTarget:self action:@selector(accountLoginTypeClick) forControlEvents:UIControlEventTouchUpInside]; +// +// [self.loginView addSubview:self.leftLoginBtn]; +// +// self.rightLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.leftLoginBtn.right, kRealValue(40), btnWidth, 48)]; +// [self.rightLoginBtn setTitle:@"健康系统认证" forState:UIControlStateNormal]; +// [self.rightLoginBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; +// [self.rightLoginBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal]; +// self.rightLoginBtn.selected = false; +// self.rightLoginBtn.titleLabel.font = MEDIUMFONT(16); +// [self.rightLoginBtn setBackgroundImage:[UIImage imageNamed:@"loginNomalImg"] forState:UIControlStateNormal]; +// [self.rightLoginBtn setBackgroundImage:[UIImage imageNamed:@"rightLoginSelected"] forState:UIControlStateSelected]; +// [self.rightLoginBtn addTarget:self action:@selector(healthLoginTypeClick) forControlEvents:UIControlEventTouchUpInside]; +// [self.loginView addSubview:self.rightLoginBtn]; +// - self.leftLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(37), kRealValue(40), btnWidth, 48)]; - [self.leftLoginBtn setTitle:@"平台统一认证" forState:UIControlStateNormal]; - [self.leftLoginBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; - [self.leftLoginBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal]; - self.leftLoginBtn.selected = true; - self.leftLoginBtn.titleLabel.font = MEDIUMFONT(16); - [self.leftLoginBtn setBackgroundImage:[UIImage imageNamed:@"leftLoginNomal"] forState:UIControlStateNormal]; - [self.leftLoginBtn setBackgroundImage:[UIImage imageNamed:@"loginSelectedImg"] forState:UIControlStateSelected]; - [self.leftLoginBtn addTarget:self action:@selector(accountLoginTypeClick) forControlEvents:UIControlEventTouchUpInside]; - - [self.loginView addSubview:self.leftLoginBtn]; + //1月21日新需求 + + self.topLoginTitleLab = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(40), kScreenWidth, 20)];; + self.topLoginTitleLab.text = @"平台统一认证"; + self.topLoginTitleLab.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold]; + self.topLoginTitleLab.textColor = UIColorHex(#2EB8B2); + self.topLoginTitleLab.textAlignment = NSTextAlignmentCenter; + [self.loginView addSubview:self.topLoginTitleLab]; - self.rightLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.leftLoginBtn.right, kRealValue(40), btnWidth, 48)]; - [self.rightLoginBtn setTitle:@"健康系统认证" forState:UIControlStateNormal]; - [self.rightLoginBtn setTitleColor:KWhiteColor forState:UIControlStateSelected]; - [self.rightLoginBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal]; - self.rightLoginBtn.selected = false; - self.rightLoginBtn.titleLabel.font = MEDIUMFONT(16); - [self.rightLoginBtn setBackgroundImage:[UIImage imageNamed:@"loginNomalImg"] forState:UIControlStateNormal]; - [self.rightLoginBtn setBackgroundImage:[UIImage imageNamed:@"rightLoginSelected"] forState:UIControlStateSelected]; - [self.rightLoginBtn addTarget:self action:@selector(healthLoginTypeClick) forControlEvents:UIControlEventTouchUpInside]; - [self.loginView addSubview:self.rightLoginBtn]; UITextField *accountField = [[UITextField alloc]init]; - accountField.frame = CGRectMake(kRealValue(37),self.leftLoginBtn.bottom + kRealValue(24), loginView.width - kRealValue(74), 48); + accountField.frame = CGRectMake(kRealValue(25),self.topLoginTitleLab.bottom + kRealValue(24), loginView.width - kRealValue(50), 48); accountField.placeholder = @"请输入员工编号或用户名"; accountField.font = BOLDSYSTEMFONT(14); accountField.textColor = CFontColor1; self.userNameField = accountField; self.userNameField.backgroundColor = UIColorHex(#EEEEEE); - self.userNameField.layer.cornerRadius = 24; + self.userNameField.layer.cornerRadius = 8; self.userNameField.layer.masksToBounds = true; UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 48)]; UIImageView * userLeftImg = [[UIImageView alloc] initWithFrame:CGRectMake(16, 14, 20, 20)]; @@ -176,7 +205,7 @@ // // MQTextField * passwordField = [[MQTextField alloc]init]; - passwordField.frame = CGRectMake(kRealValue(35), accountField.bottom + kRealValue(19), accountField.width, accountField.height); + passwordField.frame = CGRectMake(kRealValue(25), accountField.bottom + kRealValue(19), accountField.width, accountField.height); passwordField.placeholder = @"请输入密码"; passwordField.font = BOLDSYSTEMFONT(14); passwordField.textColor = CFontColor1; @@ -190,7 +219,7 @@ [passLeftview addSubview:passLeftImg]; self.passwordField.leftView = passLeftview; self.passwordField.leftViewMode = UITextFieldViewModeAlways; - self.passwordField.layer.cornerRadius = 24; + self.passwordField.layer.cornerRadius = 8; self.passwordField.layer.masksToBounds = true; self.passwordField.delegate = self; self.passwordField.inputView = self.keyboard; @@ -213,27 +242,25 @@ UIButton *loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - loginBtn.frame = CGRectMake(kRealValue(37), self.passwordField.bottom + kRealValue(20), WIDTH - kRealValue(74), 48); + loginBtn.frame = CGRectMake(kRealValue(25), self.passwordField.bottom + kRealValue(20), WIDTH - kRealValue(50), 48); [loginBtn setTitle:@"登录" forState:UIControlStateNormal]; [loginBtn.titleLabel setFont:BOLDSYSTEMFONT(16)]; loginBtn.backgroundColor = UIColorHex(#2EB8B2); - loginBtn.layer.cornerRadius = 24; + loginBtn.layer.cornerRadius = 8; loginBtn.layer.masksToBounds = true; [loginBtn setTitleColor:[UIColor whiteColor] 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(23), WIDTH - kRealValue(70), 20); - [foundPasswordBtn setTitle:@"统一认证找回密码" forState:UIControlStateNormal]; - foundPasswordBtn.titleLabel.font = MEDIUMFONT(14); + foundPasswordBtn.frame = CGRectMake(loginBtn.right - 52, loginBtn.bottom + kRealValue(22), 52, 12); + [foundPasswordBtn setTitle:@"找回密码" forState:UIControlStateNormal]; + foundPasswordBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular]; [foundPasswordBtn setTitleColor:UIColorHex(#B6B6B6) forState:UIControlStateNormal]; [foundPasswordBtn addTarget:self action:@selector(foundUserPasswordAction) forControlEvents:UIControlEventTouchUpInside]; self.foundPasswordBtn = foundPasswordBtn; [loginView addSubview:foundPasswordBtn]; - - - + [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"]; [[NSUserDefaults standardUserDefaults] synchronize]; @@ -245,6 +272,25 @@ //隐私 + + self.agreenBtn = [[UIButton alloc] init]; + [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]; + if ([agree intValue] == 1) { + self.agreenBtn.selected = true; + }else + { + self.agreenBtn.selected = false; + } + [self.view addSubview:self.agreenBtn]; + + [self.agreenBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(25); + make.top.mas_equalTo(loginBtn.mas_bottom).offset(18); + make.width.height.mas_offset(kRealValue(20)); + }]; + NSString *string = @"我已阅读并同意用户协议和隐私政策"; YYLabel * yslabel = [[YYLabel alloc] init]; yslabel.textColor = UIColorHex(#B6B6B6); @@ -252,9 +298,10 @@ [self.view addSubview:yslabel]; [yslabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.bottom.mas_offset(-29 - SafetyAreaHeight); - make.centerX.mas_equalTo(self.view); + make.left.mas_equalTo(self.agreenBtn.mas_right).offset(5); + make.top.mas_equalTo(loginBtn.mas_bottom).offset(22); }]; + yslabel.numberOfLines = 0; NSMutableAttributedString *attributed = [[NSMutableAttributedString alloc] initWithString:string]; // 1️⃣ 给整段文字设置默认样式(灰色) @@ -324,23 +371,28 @@ } }; - self.agreenBtn = [[UIButton alloc] init]; - [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]; - if ([agree intValue] == 1) { - self.agreenBtn.selected = true; - }else - { - self.agreenBtn.selected = false; - } - [self.view addSubview:self.agreenBtn]; + //底部切换 + self.bottomChangeBtn = [[UIButton alloc] init]; + [self.bottomChangeBtn setTitle:@"非掌油用户登录入口" forState:UIControlStateNormal]; - [self.agreenBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(yslabel.mas_left).offset(-5); - make.width.height.mas_offset(kRealValue(20)); - make.centerY.mas_equalTo(yslabel); + [self.bottomChangeBtn setTitle:@"掌油用户登录入口" forState:UIControlStateSelected]; + + [self.bottomChangeBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal]; + self.bottomChangeBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular]; + self.bottomChangeBtn.selected = false; + [self.bottomChangeBtn addTarget:self action:@selector(healthLoginTypeClick:) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:self.bottomChangeBtn]; + + [self.bottomChangeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_offset(-40); + make.centerX.mas_equalTo(self.view); + make.width.mas_offset(130); }]; + // 昨天改的今天不要了 那就隐藏吧 + self.bottomChangeBtn.hidden = true; + + } @@ -371,6 +423,15 @@ return;; } + NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; + + if (self.lastClickTime > 0 && now - self.lastClickTime < 5) { + [EasyTextView showErrorText:@"操作过于频繁,请稍候再试!"]; + return; // 👈 只提示,不再继续 + } + + self.lastClickTime = now; + NSString * publish_key = @" MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB"; // 原始数据,要加密的字符串 @@ -404,29 +465,29 @@ } else //健康系统登录 { - 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) { - - XJLoginFoundPasswordViewController * modifVC = [[XJLoginFoundPasswordViewController alloc] init]; - [self.navigationController pushViewController:modifVC animated:YES]; - - }]; - [alertController addAction:cancelAction]; - [alertController addAction:sureAction]; - - [self presentViewController:alertController animated:YES completion:nil]; - - - 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) { +// +// XJLoginFoundPasswordViewController * modifVC = [[XJLoginFoundPasswordViewController alloc] init]; +// [self.navigationController pushViewController:modifVC animated:YES]; +// +// }]; +// [alertController addAction:cancelAction]; +// [alertController addAction:sureAction]; +// +// [self presentViewController:alertController animated:YES completion:nil]; +// +// +// return; +// } XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil]; [proctocolApi PostLogin:parmDic]; @@ -557,6 +618,45 @@ } } } + if([tag isEqualToString:@"SIMLOGINGAPI"]) { + //'人员类型(1:员工 2: 小助手 3: 专家 4: 医疗点 5: 操作人员 6: 专业人员 7:驻场人员 8:其他 9:医院管理员 10: 医院体检医生 11:医院前台 12: 健康室管理员 13: 健康打卡管理员 15:医疗点医护人员)' + [self hiddenAllMBProgressHUD]; + NSDictionary * dic = response; + + HQUserInfo * user = [[HQUserInfo 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]; + + [[NSUserDefaults standardUserDefaults] setObject:user.token forKey:@"SIMTOKEN"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + NSString * avatar = @""; + NSString * placeholdImg ; + if (!ValidStr(user.avatar)) { + avatar = user.avatar; + }else + { + if ([user.sex_dictText isEqualToString:@"女"]) { + placeholdImg = @"heard_man"; + }else + { + placeholdImg = @"heard_woman"; + } + } + + [[NSUserDefaults standardUserDefaults] setObject:avatar forKey:@"AVATAR"]; + [[NSUserDefaults standardUserDefaults] setObject:placeholdImg forKey:@"placeholdImg"]; + + [[NSUserDefaults standardUserDefaults] synchronize]; + + KPostNotification(KNotificationLoginStateChange, @YES); + + + } } @@ -668,15 +768,122 @@ } //健康系统登录方法 -- (void)healthLoginTypeClick { - self.loginType = 2; - self.leftLoginBtn.selected = false; - self.rightLoginBtn.selected = true; - [self.foundPasswordBtn setTitle:@"健康系统找回密码" forState:UIControlStateNormal]; +- (void)healthLoginTypeClick:(UIButton *)changeBtn { + + changeBtn.selected = !changeBtn.selected; + + if (changeBtn.selected == true) { + self.loginType = 2; + self.topLoginTitleLab.text = @"健康系统认证"; + + }else + { + self.loginType = 1; + self.topLoginTitleLab.text = @"平台统一认证"; + + } } + +//模拟功能 +- (void)handleImageTap:(UITapGestureRecognizer *)sender { + // 获取当前点击时间 + NSDate *currentTapDate = [NSDate date]; + + // 如果是第一次点击,记录时间 + if (self.tapCount == 0) { + self.firstTapDate = currentTapDate; + } + + // 计算点击间隔时间 + NSTimeInterval timeInterval = [currentTapDate timeIntervalSinceDate:self.firstTapDate]; + + // 如果间隔时间超过2秒,重置计数器 + if (timeInterval > 2.0) { + self.tapCount = 0; + self.firstTapDate = currentTapDate; + } + + // 增加点击计数 + self.tapCount += 1; + + // 如果点击次数达到5次,触发事件 + if (self.tapCount == 5) { + [self handleFiveContinuousTaps]; + + // 重置计数器 + self.tapCount = 0; + } +} + +- (void)handleFiveContinuousTaps { + // 在这里实现击5次触发事件的逻辑 + 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) { + self.userNameField.text = @"admin"; + self.passwordField.text = @"#fCjW%x2dv@a"; + //模拟用户system登录 + [self loginModelUser]; + + }]; + [alertController addAction:cancelAction]; + [alertController addAction:sureAction]; + + [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil]; +} + +- (void)loginModelUser { + + + //测试 +//#if DEBUG +// self.passwordField.text = @"#fCjW%x2dv@a"; + + + +//#else +// self.passwordField.text = @"&ZzW$3**@VLA"; + +//#endif + + + 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]; + + [self showMBProgressHUDWithString:@"登录中" autoHidden:false]; + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + + [parmDic setObject:self.userNameField.text forKey:@"username"]; + //新增 + UIDevice *currentDevice = [UIDevice currentDevice]; + NSString * phone = [currentDevice getCurrentDeviceModel]; +// NSString * system = [NSString stringWithFormat:@"%.1f",CurrentSystemVersion] ; + if (!ValidStr(phone)) { + [parmDic setObject:phone forKey:@"deviceType"]; + + } + [parmDic setObject:@(CurrentSystemVersion) forKey:@"deviceSystem"]; + + [parmDic setObject:encryptStr forKey:@"password"]; + + XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"SIMLOGINGAPI" NeedToken:nil]; + [proctocolApi PostLogin:parmDic]; + + +} + + @end diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEditSystemViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEditSystemViewController.m index e369cb5..1897dac 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEditSystemViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEditSystemViewController.m @@ -9,6 +9,7 @@ #import "XJLoginFoundPasswordViewController.h" #import "XJMineCenterUserModel.h" #import "ADJumpViewController.h" +#import "XJTYFoundPassWordViewController.h" @interface XJEditSystemViewController () @@ -188,8 +189,9 @@ if (indexPath.row == 0) { - XJLoginFoundPasswordViewController * loginVC = [[XJLoginFoundPasswordViewController alloc] init]; - [self.navigationController pushViewController:loginVC animated:YES]; + XJTYFoundPassWordViewController * xjVC = [[XJTYFoundPassWordViewController alloc] init]; + xjVC.webUrl = @"https://sso.iosp.ydpt.tech/SSOManageClient/userController/changePassword"; + [self.navigationController pushViewController:xjVC animated:YES]; } if (indexPath.row == 1) { diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m index bc19a2b..75bc16b 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m @@ -17,12 +17,14 @@ #import "XJEditSystemViewController.h" #import "XJSOSLookDoctoreViewController.h" #import "XJEmergencyListViewController.h" +#import "SimulationViewController.h" @interface XJMyCenterViewController () @property (nonatomic, strong) XJMyCenterTableView * homeTable; - +@property (nonatomic, assign) NSInteger tapCount; +@property (nonatomic, strong) NSDate *firstTapDate; @end @implementation XJMyCenterViewController @@ -93,7 +95,11 @@ topView.backgroundColor = UIColorHex(#21BEBD); [self.view addSubview:topView]; - + // 添加点击手势识别器 + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleImageTap:)]; + [topView addGestureRecognizer:tapGestureRecognizer]; + // 初始化计数器 + self.tapCount = 0; self.homeTable = [[XJMyCenterTableView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(25), kScreenWidth - kRealValue(30), kScreenHeight - kRealValue(25) - kTopHeight - kTabBarHeight) style:UITableViewStyleGrouped]; self.homeTable.heardDelegate =self; @@ -283,6 +289,44 @@ } +- (void)handleImageTap:(UITapGestureRecognizer *)sender { + // 获取当前点击时间 + NSDate *currentTapDate = [NSDate date]; + + // 如果是第一次点击,记录时间 + if (self.tapCount == 0) { + self.firstTapDate = currentTapDate; + } + + // 计算点击间隔时间 + NSTimeInterval timeInterval = [currentTapDate timeIntervalSinceDate:self.firstTapDate]; + + // 如果间隔时间超过2秒,重置计数器 + if (timeInterval > 2.0) { + self.tapCount = 0; + self.firstTapDate = currentTapDate; + } + + // 增加点击计数 + self.tapCount += 1; + + // 如果点击次数达到5次,触发事件 + if (self.tapCount == 5) { + [self handleFiveContinuousTaps]; + + // 重置计数器 + self.tapCount = 0; + } +} + + +- (void)handleFiveContinuousTaps { + //模拟 + + SimulationViewController * simVC = [[SimulationViewController alloc] init]; + + [self.navigationController pushViewController:simVC animated:YES]; +} diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.h b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.h index b835132..70256ba 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.h +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.h @@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * text; @property (nonatomic, copy) NSString * title; +@property (nonatomic, copy) NSString * username; +@property (nonatomic, copy) NSString * userId_id; + @end NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.m index 747dbc0..edc480e 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/XJMineCenterUserModel.m @@ -9,4 +9,11 @@ @implementation XJMineCenterUserModel ++ (NSDictionary *)modelCustomPropertyMapper +{ + NSDictionary * dic =@{@"userId_id" :@"id"}; + return dic; +} + + @end diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m index 7552c62..cac295e 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m @@ -62,38 +62,38 @@ MJWeakSelf - self.homeTable.popBlock = ^(MonitoringListDataModel *model) { - if ([model.wdType isEqualToString:@"heart_rate"]) { + self.homeTable.popBlock = ^(NSString *type) { + if ([type isEqualToString:@"heart_rate"]) { [weakSelf showPickStringView:BRStringPickerComponentMulti withTitle: @"心率阈值" - withDataArray:@[@[@"40次/分钟", @"45次/分钟", @"50次/分钟"], @[@"100次/分钟",@"110次/分钟",@"120次/分钟",@"130次/分钟",@"140次/分钟",@"150次/分钟"]] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax]; + withDataArray:@[@[@"40次/分钟", @"45次/分钟", @"50次/分钟"], @[@"100次/分钟",@"110次/分钟",@"120次/分钟",@"130次/分钟",@"140次/分钟",@"150次/分钟"]] withType:type]; } - if ([model.wdType isEqualToString:@"spo2"]) { + if ([type isEqualToString:@"spo2"]) { [weakSelf showPickStringView:BRStringPickerComponentSingle withTitle: @"血氧阈值(下限)" - withDataArray:@[@"75%", @"80%", @"85%",@"90%"] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax]; + withDataArray:@[@"75%", @"80%", @"85%",@"90%"] withType:type]; } - if ([model.wdType isEqualToString:@"stress"]) { + if ([type isEqualToString:@"stress"]) { [weakSelf showPickStringView:BRStringPickerComponentSingle withTitle: @"压力阈值(上限)" - withDataArray:@[@"80", @"81", @"82",@"83",@"84",@"85",@"86",@"87",@"88",@"89",@"90",@"91",@"92",@"93",@"94",@"95",@"96",@"97",@"98",@"99"] withType:model.wdType withLeft:model.warnMin withRight:model.warnMin]; + withDataArray:@[@"80", @"81", @"82",@"83",@"84",@"85",@"86",@"87",@"88",@"89",@"90",@"91",@"92",@"93",@"94",@"95",@"96",@"97",@"98",@"99"] withType:type]; } - if ([model.wdType isEqualToString:@"temperature"]) { + if ([type isEqualToString:@"temperature"]) { [weakSelf showPickStringView:BRStringPickerComponentMulti withTitle: @"体温阈值" withDataArray:@[@[@"34.0℃", @"34.1℃", @"34.2℃",@"34.3℃",@"34.4℃",@"34.5℃",@"34.6℃",@"34.7℃",@"34.8℃",@"34.9℃",@"35.0℃",@"35.1℃",@"35.2℃",@"35.3℃",@"35.4℃",@"35.5℃",@"35.6℃",@"35.7℃",@"35.8℃",@"35.9℃"], - @[@"37.2℃", @"37.3℃", @"37.4℃",@"37.5℃",@"37.6℃",@"37.7℃",@"37.8℃",@"37.9℃",@"38.0℃",@"38.1℃",@"38.2℃",@"38.3℃",@"38.4℃"]] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax]; + @[@"37.2℃", @"37.3℃", @"37.4℃",@"37.5℃",@"37.6℃",@"37.7℃",@"37.8℃",@"37.9℃",@"38.0℃",@"38.1℃",@"38.2℃",@"38.3℃",@"38.4℃"]] withType:type]; } @@ -208,7 +208,9 @@ [parmDic setObject:User_ID forKey:@"userId"]; XJPNetAPI * sosApi = [[XJPNetAPI alloc] init:self tag:@"DETAILAPI" NeedToken:@""]; - [sosApi getMinitringWatchData:parmDic]; +// [sosApi getMinitringWatchData:parmDic]; + [sosApi getWarningWatchListV2Data:parmDic]; + } @@ -257,16 +259,18 @@ [self hiddenAllMBProgressHUD]; [EasyTextView showSuccessText:@"保存成功"]; + [self createDetail]; } } - - (void)showPickStringView:(BRStringPickerMode)stringModel withTitle:(NSString *)title withDataArray:(NSArray *)array - withType:(NSString *)type - withLeft:(NSString *)leftString - withRight:(NSString *)rightString{ + withType:(NSString *)type { + + BRStringPickerView *textPickerView = + [[BRStringPickerView alloc] initWithPickerMode:stringModel]; + UIView * customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 30)]; UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, kScreenWidth/2, 20)]; @@ -283,95 +287,217 @@ rightLabel.textColor = CFontColor2; [customView addSubview:rightLabel]; - /// 多列文本选择器 - BRStringPickerView *textPickerView = [[BRStringPickerView alloc]initWithPickerMode:stringModel]; textPickerView.title = title; + textPickerView.pickerStyle.doneBtnFrame = CGRectMake(self.view.width - 120, 0, 120, 45); textPickerView.pickerStyle.doneBtnTitle = @"保存并同步"; textPickerView.pickerStyle.doneTextFont = SYSTEMFONT(13); textPickerView.pickerStyle.doneTextColor = UIColorHex(#21BEBD); - // 设置数据源 textPickerView.dataSourceArr = array; - if (stringModel == 0) { //单列 - NSInteger selectedOnes = 0; + // ✅ 拿到当前指标 model + MonitoringListDataModel * vo = [self modelForType:type]; + + // =============================== + // 单列 Picker(spo2 / stress) + // =============================== + if (stringModel == BRStringPickerComponentSingle) { + + NSString *defaultValue = @""; if ([type isEqualToString:@"spo2"]) { - - for (NSString * dataString in array) { - - if ( [dataString intValue] == [leftString intValue]) { - textPickerView.selectIndex = selectedOnes; - } - selectedOnes ++; - } + defaultValue = [NSString stringWithFormat:@"%.0f", [vo.warnMin floatValue]]; } - - if ([type isEqualToString:@"stress"]) { - - for (NSString * dataString in array) { - - if ( [dataString intValue] == [rightString intValue]) { - textPickerView.selectIndex = selectedOnes; - } - selectedOnes ++; - } + else if ([type isEqualToString:@"stress"]) { + defaultValue = [NSString stringWithFormat:@"%.0f", [vo.warnMax floatValue]]; } - - textPickerView.resultModelBlock = ^(BRResultModel *resultModel) { - NSString *valueStr = [self extractNumberFromString:resultModel.value]; + NSInteger index = + [self indexOfValue:defaultValue inArray:array]; + textPickerView.selectIndex = index; + + textPickerView.resultModelBlock = + ^(BRResultModel *resultModel) { + + NSString *minValue = + [self pureNumberStringFrom:resultModel.value]; + if ([type isEqualToString:@"spo2"]) { - [self settingWithType:type MaxAndMin:@"0" minValue:valueStr]; + [self settingWithType:type + MaxAndMin:@"0" + minValue:minValue]; } if ([type isEqualToString:@"stress"]) { - [self settingWithType:type MaxAndMin:valueStr minValue:@"0"]; + [self settingWithType:type + MaxAndMin:minValue + minValue:@"0"]; } }; - } else { - - [textPickerView addSubViewToPicker:customView]; + } - NSInteger selectedLeft = 0; + // =============================== + // 双列 Picker(heart_rate / temperature) + // =============================== + else { + textPickerView.pickerHeaderView = customView; - for (NSString * dataString in array[0]) { - - if ( [dataString intValue] == [leftString intValue]) { - break; - } - selectedLeft ++; + NSArray *minArray = array[0]; + NSArray *maxArray = array[1]; + + NSString *minStr = @""; + NSString *maxStr = @""; + + if ([type isEqualToString:@"heart_rate"]) { + minStr = [NSString stringWithFormat:@"%.0f", [vo.warnMin floatValue]]; + maxStr = [NSString stringWithFormat:@"%.0f", [vo.warnMax floatValue]]; } - - NSInteger selectedRight = 0; - - for (NSString * dataString in array[1]) { - - if ( [dataString intValue] == [rightString intValue]) { - break; - } - selectedRight ++; + else if ([type isEqualToString:@"temperature"]) { + minStr = [NSString stringWithFormat:@"%.1f", [vo.warnMin floatValue]]; + maxStr = [NSString stringWithFormat:@"%.1f", [vo.warnMax floatValue]]; } - textPickerView.selectIndexs = @[@(selectedLeft),@(selectedRight)]; + NSInteger minIndex = + [self indexOfValue:minStr inArray:minArray]; + NSInteger maxIndex = + [self indexOfValue:maxStr inArray:maxArray]; - textPickerView.resultModelArrayBlock = ^(NSArray * _Nullable resultModelArr) { + textPickerView.selectIndexs = @[@(minIndex), @(maxIndex)]; + + textPickerView.resultModelArrayBlock = + ^(NSArray * _Nullable resultModelArr) { + + BRResultModel *minModel = resultModelArr[0]; + BRResultModel *maxModel = resultModelArr[1]; + + NSString * minValue = + [self pureNumberStringFrom:minModel.value]; + + NSString * maxValue = + [self pureNumberStringFrom:maxModel.value]; - - BRResultModel *resultModel1 = resultModelArr[1]; - BRResultModel *resultModel2 = resultModelArr[0]; - - NSString *maxValue = [self extractNumberFromString:resultModel1.value]; - NSString *minValue = [self extractNumberFromString:resultModel2.value]; - - [self settingWithType:type MaxAndMin:maxValue minValue:minValue]; + [self settingWithType:type + MaxAndMin:maxValue + minValue:minValue]; }; } [textPickerView show]; - - } +// +//- (void)showPickStringView:(BRStringPickerMode)stringModel +// withTitle:(NSString *)title +// withDataArray:(NSArray *)array +// withType:(NSString *)type +// withLeft:(NSString *)leftString +// withRight:(NSString *)rightString{ +// +// +// /// 多列文本选择器 +// BRStringPickerView *textPickerView = [[BRStringPickerView alloc]initWithPickerMode:stringModel]; +// textPickerView.title = title; +// textPickerView.pickerStyle.doneBtnFrame = CGRectMake(self.view.width - 120, 0, 120, 45); +// textPickerView.pickerStyle.doneBtnTitle = @"保存并同步"; +// textPickerView.pickerStyle.doneTextFont = SYSTEMFONT(13); +// textPickerView.pickerStyle.doneTextColor = UIColorHex(#21BEBD); +// // 设置数据源 +// textPickerView.dataSourceArr = array; +// +// // ✅ 拿到当前指标 model +// MonitoringListDataModel * vo = [self modelForType:type]; +// +// if (stringModel == BRStringPickerComponentSingle) { +// +// NSString *defaultValue = @""; +// +// if ([type isEqualToString:@"spo2"]) { +// defaultValue = [NSString stringWithFormat:@"%.0f", [vo.warnMin floatValue]]; +// } +// else if ([type isEqualToString:@"stress"]) { +// defaultValue = [NSString stringWithFormat:@"%.0f", [vo.warnMax floatValue]]; +// } +// +// NSInteger index = +// [self indexOfValue:defaultValue inArray:array]; +// +// textPickerView.selectIndex = index; +// +// textPickerView.resultModelBlock = +// ^(BRResultModel *resultModel) { +// +// NSString *minValue = +// [self pureNumberStringFrom:resultModel.value]; +// +// if ([type isEqualToString:@"spo2"]) { +// [self settingWithType:type +// MaxAndMin:@"0" +// minValue:minValue]; +// } +// if ([type isEqualToString:@"stress"]) { +// [self settingWithType:type +// MaxAndMin:minValue +// minValue:@"0"]; +// } +// }; +// } +// +// // =============================== +// // 双列 Picker(heart_rate / temperature) +// // =============================== +// else { +// +// NSArray *minArray = array[0]; +// NSArray *maxArray = array[1]; +// +// NSString *minStr = @""; +// NSString *maxStr = @""; +// +// if ([type isEqualToString:@"heart_rate"]) { +// minStr = [NSString stringWithFormat:@"%.0f", [vo.warnMin floatValue]]; +// maxStr = [NSString stringWithFormat:@"%.0f", [vo.warnMax floatValue]]; +// } +// else if ([type isEqualToString:@"temperature"]) { +// minStr = [NSString stringWithFormat:@"%.1f", [vo.warnMin floatValue]]; +// maxStr = [NSString stringWithFormat:@"%.1f", [vo.warnMax floatValue]]; +// } +// +// NSInteger minIndex = +// [self indexOfValue:minStr inArray:minArray]; +// NSInteger maxIndex = +// [self indexOfValue:maxStr inArray:maxArray]; +// +// textPickerView.selectIndexs = @[@(minIndex), @(maxIndex)]; +// +// textPickerView.resultModelArrayBlock = +// ^(NSArray * _Nullable resultModelArr) { +// +// BRResultModel *minModel = resultModelArr[0]; +// BRResultModel *maxModel = resultModelArr[1]; +// +// NSString * minValue = +// [self pureNumberStringFrom:minModel.value]; +// +// NSString * maxValue = +// [self pureNumberStringFrom:maxModel.value]; +// +// [self settingWithType:type +// MaxAndMin:maxValue +// minValue:minValue]; +// }; +// } +// +// [textPickerView show]; +// +//} +- (NSString *)pureNumberStringFrom:(NSString *)string { + NSCharacterSet *set = + [[NSCharacterSet characterSetWithCharactersInString:@"0123456789."] invertedSet]; + + NSString *result = + [[string componentsSeparatedByCharactersInSet:set] componentsJoinedByString:@""]; + + return result; +} // 提取字符串中的第一个数字(包括小数),例如从 @"34.1m" 提取 @"34.1" - (NSString *)extractNumberFromString:(NSString *)input { @@ -481,6 +607,28 @@ } + +- (MonitoringListDataModel *)modelForType:(NSString *)type { + for (MonitoringListDataModel * vo in self.model.indexItemVos) { + if ([vo.wdType isEqualToString:type]) { + return vo; + } + } + return nil; +} + +- (NSInteger)indexOfValue:(NSString *)value + inArray:(NSArray *)array { + + for (NSInteger i = 0; i < array.count; i++) { + NSString *item = array[i]; + if ([item containsString:value]) { + return i; + } + } + return 0; // 找不到默认选第一个 +} + //- (void)showNowImage:(BOOL)isShow { // // LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"boxNoData" titleStr:@"暂无数据" detailStr:@""]; // diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m index e574128..bf6b428 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m @@ -80,6 +80,7 @@ UIButton * stepIconBtn = [[UIButton alloc] initWithFrame:CGRectMake(StepView.width - kRealValue(9) - 20, kRealValue(16), 20, 20)]; [stepIconBtn setImage:[UIImage imageNamed:@"garyRight"] forState:UIControlStateNormal]; + stepIconBtn.userInteractionEnabled = false; [StepView addSubview:stepIconBtn]; UIImageView * stepBackImg =[[UIImageView alloc] initWithFrame:CGRectMake(0, stepImg.bottom + kRealValue(4), StepView.width, kRealValue(114))]; @@ -134,6 +135,7 @@ UIButton * sleepIconBtn = [[UIButton alloc] initWithFrame:CGRectMake(sleepView.width - kRealValue(9) - 20, kRealValue(16), 20, 20)]; [sleepIconBtn setImage:[UIImage imageNamed:@"garyRight"] forState:UIControlStateNormal]; + sleepIconBtn.userInteractionEnabled = false; [sleepView addSubview:sleepIconBtn]; UIView * blueView = [[UIView alloc] initWithFrame:CGRectMake(sleepView.width - kRealValue(29) , self.sleepTimeLabel.bottom + kRealValue(11), kRealValue(17), kRealValue(34))]; @@ -221,7 +223,10 @@ _heardModel = heardModel; - self.allNumberLabel.text = [NSString stringWithFormat:@"累计约步行%.0f公里",_heardModel.distance]; + self.allNumberLabel.text = + [NSString stringWithFormat:@"累计约步行%.0f公里", + _heardModel.distance / 1000.0]; + CGFloat minutes = _heardModel.aveSleep; NSString *timeString; diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m index e5f8d66..97845d0 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m @@ -14,7 +14,8 @@ @property (nonatomic, strong) MonitoringWarchTableHeardView * badHeardView; -@property (nonatomic, strong) MonitoringWatchTableFooterView * badfooterView; +//@property (nonatomic, strong) MonitoringWatchTableFooterView * badfooterView; +@property (nonatomic, strong) NSMutableArray * customArray; @end @@ -22,6 +23,14 @@ @implementation MonitoringWatchTableView +- (NSMutableArray *)customArray { + + if (!_customArray) { + _customArray = [[NSMutableArray alloc] init]; + } + return _customArray; +} + - (MonitoringWarchTableHeardView *)badHeardView { if (!_badHeardView) { @@ -35,20 +44,22 @@ return _badHeardView; } -- (MonitoringWatchTableFooterView *)badfooterView { - - if (!_badfooterView) { - - _badfooterView = [[MonitoringWatchTableFooterView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(165))]; - } - return _badfooterView; - -} +//- (MonitoringWatchTableFooterView *)badfooterView { +// +// if (!_badfooterView) { +// +// _badfooterView = [[MonitoringWatchTableFooterView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(165))]; +// } +// return _badfooterView; +// +//} - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { if (self = [super initWithFrame:frame style:style]) { + + [self createUI]; } return self; @@ -74,10 +85,13 @@ - (void)setModel:(MonitoringDataModel *)model { + [self.customArray removeAllObjects]; + _model = model; + [self buildCustomArray]; self.badHeardView.heardModel = _model; - self.badfooterView.footModel = _model; +// self.badfooterView.footModel = _model; [self reloadData]; } @@ -91,12 +105,38 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 4; + + return self.customArray.count; } +- (void)buildCustomArray { + [self.customArray removeAllObjects]; + + NSArray *orderArray = @[@"心率", @"血氧饱和度", @"压力", @"体温"]; + + for (NSString *typeName in orderArray) { + for (MonitoringListDataModel *listModel in self.model.indexItemVos) { + + // 排除 睡眠 / 步数(如果接口里可能混着) + if ([listModel.wdTypeName isEqualToString:@"睡眠"] || + [listModel.wdTypeName isEqualToString:@"步数"]) { + continue; + } + + if ([listModel.wdTypeName isEqualToString:typeName]) { + [self.customArray addObject:listModel]; + break; // 找到就跳出,防止重复 + } + } + } +} + + - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + MonitoringListDataModel * listModel = self.customArray[indexPath.section]; + MonitoringWatchTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"CELLID"]; if (!cell) { @@ -104,51 +144,52 @@ cell = [[MonitoringWatchTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CELLID"]; } cell.backgroundColor = CViewBgColor; - if (indexPath.section == 0) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"心率"]) { - cell.listModel = listModel; - } - - } - - - } - if (indexPath.section == 1) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) { - cell.listModel = listModel; - } - - } - - } - if (indexPath.section == 2) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"压力"]) { - cell.listModel = listModel; - } - - } - - } - if (indexPath.section == 3) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"体温"]) { - cell.listModel = listModel; - } - - } - - } +// if (indexPath.section == 0) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"心率"]) { +// cell.listModel = listModel; +// } +// +// } +// +// +// } +// if (indexPath.section == 1) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) { +// cell.listModel = listModel; +// } +// +// } +// +// } +// if (indexPath.section == 2) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"压力"]) { +// cell.listModel = listModel; +// } +// +// } +// +// } +// if (indexPath.section == 3) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"体温"]) { +// cell.listModel = listModel; +// } +// +// } +// +// } + cell.listModel = listModel; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.popBlock = self.popBlock; cell.historyBlock = self.historyBlock; @@ -160,61 +201,66 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString * lookType; - if (indexPath.section == 0) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"心率"]) { - - if (self.detailBlock) { - self.detailBlock(listModel.wdType, listModel.dataDate); - } - } - - } - - - } - if (indexPath.section == 1) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) { - - if (self.detailBlock) { - self.detailBlock(listModel.wdType, listModel.dataDate); - } - } - - } - - } - if (indexPath.section == 2) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"压力"]) { - if (self.detailBlock) { - self.detailBlock(listModel.wdType, listModel.dataDate); - } - } - - } - - } - if (indexPath.section == 3) { - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"体温"]) { - if (self.detailBlock) { - self.detailBlock(listModel.wdType, listModel.dataDate); - } - } - - } - + MonitoringListDataModel * listModel = self.customArray[indexPath.section]; + + if (self.detailBlock) { + self.detailBlock(listModel.wdType, listModel.dataDate); } +// if (indexPath.section == 0) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"心率"]) { +// +// if (self.detailBlock) { +// self.detailBlock(listModel.wdType, listModel.dataDate); +// } +// } +// +// } +// +// +// } +// if (indexPath.section == 1) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) { +// +// if (self.detailBlock) { +// self.detailBlock(listModel.wdType, listModel.dataDate); +// } +// } +// +// } +// +// } +// if (indexPath.section == 2) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"压力"]) { +// if (self.detailBlock) { +// self.detailBlock(listModel.wdType, listModel.dataDate); +// } +// } +// +// } +// +// } +// if (indexPath.section == 3) { +// +// for (MonitoringListDataModel * listModel in self.model.indexItemVos) { +// +// if ([listModel.wdTypeName isEqualToString:@"体温"]) { +// if (self.detailBlock) { +// self.detailBlock(listModel.wdType, listModel.dataDate); +// } +// } +// +// } +// +// } } diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h index d3ccdec..58a4b09 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h @@ -8,7 +8,7 @@ #import #import "MonitoringDataModel.h" -typedef void(^showPickStringBlock)(MonitoringListDataModel * model); +typedef void(^showPickStringBlock)(NSString * type); typedef void(^showHistoryListBlock)(NSString * type); diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m index ec1ed56..d1b42b2 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m @@ -25,6 +25,8 @@ #import "RoomDoctorRecordsVC.h" #import "HomeQusetionRecordsModel.h" #import "XJDoctorMainViewController.h" +#import "UPAppVesionModel.h" + @interface QuestionViewController () @@ -32,7 +34,8 @@ @property (nonatomic, assign) NSInteger page; -//@property (nonatomic, strong) PSCheckVersionView * checkVersionView; +@property (nonatomic, strong) PSCheckVersionView * checkVersionView; + @property (nonatomic, strong) UIView * coverView; //定位相关 @property (nonatomic, strong) AMapSearchAPI *search; @@ -83,11 +86,13 @@ name:KNotificAgreeProtoocl object:nil]; [self createUI]; + [self getUpDateinfo]; self.page = 1; [self verifyTokenData]; [self initCompleteBlock]; [self configLocationManager]; [self reGeocodeAction]; + // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 [[V2TIMManager sharedInstance] addIMSDKListener:self]; // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 @@ -128,7 +133,10 @@ if (!ValidStr(UserDefaultObjectForKey(@"HTTPS"))) { [self verifyTokenData]; - } } + } + + +} - (void)reGeocodeAction @@ -175,14 +183,15 @@ #pragma mark:更新 - (void)getUpDateinfo { -// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; -// // 获取应用的版本号 -// [parmDic setObject:@"com.question.QinghaiProvince" forKey:@"pkg"]; -// -// JKCQAPI * homeRemakerApi = [[JKCQAPI alloc] init:self tag:@"UPVERSION" NeedToken:@""]; -// [homeRemakerApi getABMUpdate:parmDic]; - + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + // 获取应用的版本号 + [parmDic setObject:@"com.questionTools.XinjiangProject" forKey:@"packageName"]; + [parmDic setObject:@"2" forKey:@"androidOrIos"]; + + XJPNetAPI * homeRemakerApi = [[XJPNetAPI alloc] init:self tag:@"UPVERSION" NeedToken:@""]; + [homeRemakerApi GetAppVesionUpdata:parmDic]; + } - (void)initCompleteBlock @@ -510,48 +519,31 @@ if ([tag isEqualToString:@"UPVERSION"]) { - NSString * upVersion = [NSString stringWithFormat:@"%@",response] ; + NSDictionary * dic = response; - NSString * version = [NSString stringWithFormat:@"%@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]] ; - NSString *lastChar; - if (!ValidStr(version)) { - NSArray * array = [version componentsSeparatedByString:@"."]; - - if (array.count >0) { - lastChar = [NSString stringWithFormat:@"%@", [array lastObject]]; - } - NSLog(@"Last character: %@", lastChar); - - } + UPAppVesionModel * model = [UPAppVesionModel modelWithDictionary:dic]; + // 避免1.0.10 跟 1.0.1 出错 - /** -// * 当前版本号 -// */ -// @property (nonatomic, copy) NSString *currentVersion; -// -// /** -// * 更新版本号 -// */ -// @property (nonatomic, copy) NSString *releaseVersion; -// -// /** -// * 更新日志 -// */ -// @property (nonatomic, copy) NSString *releaseLog; -// -// /** -// * 更新时间(yyyy-MM-dd HH:mm) -// */ -// @property (nonatomic, copy) NSString *releaseDate; + NSString *version = + [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; + + NSString *versionCode = + [version stringByReplacingOccurrencesOfString:@"." withString:@""]; + + NSInteger loctaionVesion = [versionCode integerValue]; + + NSDictionary * infoDic = @{ + @"version":[NSString stringWithFormat:@"%@",model.versionName] , + @"releaseNotes":model.updateContent, + @"currentVersionReleaseDate":model.updateTime}; - NSDictionary * dic = @{ - @"version":[NSString stringWithFormat:@"1.0.%@",upVersion] , - @"releaseNotes":@"修复已知问题,提升用户体验感!"}; + PSAppInfo * info = [[PSAppInfo alloc] initWithDict:infoDic]; + //是否需要强制更新 - PSAppInfo * info = [[PSAppInfo alloc] initWithDict:dic]; + BOOL isNeed = [model.forced integerValue] == 1 ? YES : NO; - if ([upVersion intValue] > [lastChar intValue]) { - [self show:info]; + if ( model.versionNo > loctaionVesion) { + [self show:info isNeedUpdate:isNeed]; }else { DLog(@"不需要更新"); @@ -559,33 +551,43 @@ } } - -- (void)show:(PSAppInfo *)info { +//是否需要更新 +- (void)show:(PSAppInfo *)info isNeedUpdate:(BOOL)isNeed { -// if (_coverView) { return; } -// -// __weak typeof(self)weakSelf = self; -// -// self.checkVersionView = [[PSCheckVersionView alloc] -// initWithAppInfo:info -// confirm:^{ -// [self jumpAppStoreUpdate]; -// }]; -// -// [self.coverView addSubview:self.checkVersionView]; -// [self.checkVersionView mas_makeConstraints:^(MASConstraintMaker *make) { -// make.width.equalTo(self.coverView).multipliedBy(0.69); -// make.height.equalTo(self.coverView).multipliedBy(0.57); -// make.center.equalTo(self.coverView); -// }]; -// [[UIApplication sharedApplication].keyWindow.rootViewController.view addSubview:self.coverView]; + + __weak typeof(self)weakSelf = self; + + if(isNeed == true) { //强制更新 + self.checkVersionView = [[PSCheckVersionView alloc] + initWithAppInfo:info + confirm:^{ + [weakSelf jumpAppStoreUpdate]; + }]; + + }else { + self.checkVersionView = [[PSCheckVersionView alloc] initWithAppInfo:info confirm:^{ + + [weakSelf jumpAppStoreUpdate]; + + } cancel:^{ + + [self.coverView removeFromSuperview]; + }]; + } + [self.coverView addSubview:self.checkVersionView]; + [self.checkVersionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.equalTo(self.coverView).multipliedBy(0.75); + make.height.equalTo(self.coverView).multipliedBy(0.33); + make.center.equalTo(self.coverView); + }]; + + [[UIApplication sharedApplication].keyWindow.rootViewController.view addSubview:self.coverView]; } - (void)jumpAppStoreUpdate { - UIApplication *application = [UIApplication sharedApplication];// 打电话 - - [application openURL:[NSURL URLWithString:@"https://api.cqygjk.com/health-system/api/anon/sys/toAppDown?pkg=com.question.QinghaiProvince&type=2"] options:@{} completionHandler:nil];// + //强制退出 + exit(0); } diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.h b/XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.h new file mode 100644 index 0000000..a695e22 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.h @@ -0,0 +1,26 @@ +// +// UPAppVesionModel.h +// XinjiangProject +// +// Created by Apple on 2025/12/25. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UPAppVesionModel : NSObject + +@property (nonatomic, copy) NSString * deviceType; +@property (nonatomic, strong) NSArray * ignoreFlag; +@property (nonatomic, copy) NSString * appUrl; +@property (nonatomic, copy) NSString * appStatus; +@property (nonatomic, copy) NSString * forced; +@property (nonatomic, assign) NSInteger versionNo; +@property (nonatomic, copy) NSString * updateContent; +@property (nonatomic, copy) NSString * versionName; +@property (nonatomic, copy) NSString * updateTime; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.m new file mode 100644 index 0000000..fa00475 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Model/UPAppVesionModel.m @@ -0,0 +1,12 @@ +// +// UPAppVesionModel.m +// XinjiangProject +// +// Created by Apple on 2025/12/25. +// + +#import "UPAppVesionModel.h" + +@implementation UPAppVesionModel + +@end diff --git a/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m b/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m index e145dd4..cc80778 100644 --- a/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m +++ b/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m @@ -105,7 +105,7 @@ [self.addressLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(kRealValue(18)); - make.right.mas_offset(kRealValue(-15)); + make.right.mas_offset(kRealValue(-50)); make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(11); make.bottom.mas_offset(-26); }]; @@ -179,7 +179,7 @@ self.samllPhoneBtn.hidden = false; [self.addressLabel mas_remakeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(kRealValue(18)); - make.right.mas_offset(kRealValue(-15)); + make.right.mas_offset(kRealValue(-50)); make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(11); make.bottom.mas_offset(-25); }]; @@ -190,7 +190,7 @@ [self.addressLabel mas_remakeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(kRealValue(18)); - make.right.mas_offset(kRealValue(-15)); + make.right.mas_offset(kRealValue(-50)); make.top.mas_equalTo(self.hospitalName.mas_bottom).offset(11); make.bottom.mas_offset(-25); }]; diff --git a/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m b/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m index ea4df15..c9befc4 100644 --- a/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m +++ b/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m @@ -449,9 +449,36 @@ if ([cell isKindOfClass:DoctorIDCardMessageCell.class]) { DoctorIDCardMessageCell * endCell = cell; - //7月6日新增 点击判断 + NSLog(@"--%@",endCell.messageData.innerMessage.msgID); + + //7月6日新增 点击判断 // 获取当前日期和时间 + //@property(nonatomic, strong) NSString *groupId; + +// @property(nonatomic, strong) NSString *fromUser; +// +// @property(nonatomic, strong) NSString *toUser; +// endCell.messageData.innerMessage.groupID; +// endCell.messageData.innerMessage.userID; + + NSLog(@"--%@",endCell.messageData.innerMessage.groupID); + NSLog(@"--%@",endCell.messageData.innerMessage.userID); + NSString * groupId = endCell.messageData.innerMessage.groupID; + NSString * msgId = endCell.messageData.innerMessage.msgID; + NSString * fromAccount = endCell.messageData.identifier; + + + // !2025年12月10号 新疆卡片不让点击需求-- 李龙 + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:groupId forKey:@"groupId"]; + [parmDic setObject:fromAccount forKey:@"fromAccount"]; + [parmDic setObject:User_ID forKey:@"toAccount"]; + [parmDic setObject:msgId forKey:@"msgId"]; + + [self RecordCardInfo:parmDic]; + //小助手id + endCell.messageData.identifier; NSDate *currentDate = endCell.messageData.innerMessage.timestamp; // 获取自1970年1月1日以来的时间间隔(以秒为单位) @@ -488,6 +515,13 @@ } +- (void)RecordCardInfo:(NSDictionary *)parmDic { + [self showMBProgressHUDOnlyWithString:@"加载中,请稍候..."]; + XJPNetAPI * endApi = [[XJPNetAPI alloc] init:self tag:@"ClickInfo" NeedToken:@""]; + [endApi recordDoctorCardInfoClick:parmDic]; + + +} #pragma mark:网络请求 - (void)Failed:(NSString*)message tag:(NSString*)tag { @@ -512,19 +546,27 @@ } if ([tag isEqualToString:@"TIME"]) { - NSString * isExpired =[NSString stringWithFormat:@"%@",response] ; - - if ([isExpired integerValue]== 0) { - XJExpertMainViewController * experVC= [[XJExpertMainViewController alloc] init]; - experVC.doctorId = self.doctorCardID; - [self.navigationController pushViewController:experVC animated:YES]; - }else - { - [EasyTextView showErrorText:@"医生信息已过期"]; - } +// NSString * isExpired =[NSString stringWithFormat:@"%@",response] ; +// +// if ([isExpired integerValue]== 0) { +// XJExpertMainViewController * experVC= [[XJExpertMainViewController alloc] init]; +// experVC.doctorId = self.doctorCardID; +// [self.navigationController pushViewController:experVC animated:YES]; +// }else +// { +// [EasyTextView showErrorText:@"医生信息已过期"]; +// } } + if ([tag isEqualToString:@"ClickInfo"]) { + + XJExpertMainViewController * experVC= [[XJExpertMainViewController alloc] init]; + experVC.doctorId = self.doctorCardID; + [self.navigationController pushViewController:experVC animated:YES]; + + } + if ([tag isEqualToString:@"ENDPICTUREAPI"]) { [self hiddenAllMBProgressHUD]; if( self.isGroupID == false) { diff --git a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.h b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.h index a264aec..7b1fccf 100644 --- a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.h +++ b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.h @@ -21,7 +21,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong) NSDate * msgTime; - (void)fillWithData:(DoctiorIDCardCellData *)data; // 绘制 UI - +//是否可以点击 +//@property (nonatomic, assign) bool isClick; @end diff --git a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m index 142f6cc..c87aa7a 100644 --- a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m +++ b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m @@ -23,7 +23,7 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - +// self.isClick = true; [self createUI]; } diff --git a/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSAppInfo.m b/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSAppInfo.m index 56a2dda..8f13392 100755 --- a/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSAppInfo.m +++ b/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSAppInfo.m @@ -34,18 +34,20 @@ } - (NSString *)formatReleaseDate { - + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ssZ"; - NSDate *date = [dateFormatter dateFromString:self.releaseDate]; - NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"]; - [dateFormatter setTimeZone:timeZone]; - dateFormatter.dateFormat = @"yyyy-MM-dd HH:mm"; - NSString *releaseDate= [dateFormatter stringFromDate:date]; + dateFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss"; - return releaseDate; + NSDate *date = [dateFormatter dateFromString:self.releaseDate]; + if (!date) return @""; + + dateFormatter.timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"]; + dateFormatter.dateFormat = @"yyyy-MM-dd HH:mm"; + + return [dateFormatter stringFromDate:date]; } + - (NSString *)formatFileSizeByMB { CGFloat fileSizeByMB = ([self.fileSize integerValue] /(1000 *1000)); diff --git a/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSCheckVersionView.m b/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSCheckVersionView.m index db9b614..315b751 100755 --- a/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSCheckVersionView.m +++ b/XinjiangProject/XinjiangProject/ThirdParty/PSCheckVersion/PSCheckVersionView.m @@ -84,7 +84,7 @@ self.titleLabel.textColor = kRGBColor(23, 24, 28); self.titleLabel.font = [UIFont systemFontOfSize:16.0f];; self.titleLabel.textAlignment = NSTextAlignmentLeft; - self.titleLabel.text = @"最新版本"; + self.titleLabel.text = @"发现新版本"; [self.contentView addSubview:self.titleLabel]; self.latestVersionLabel = [[UILabel alloc] init]; @@ -111,11 +111,11 @@ [self.contentView addSubview:self.currentVersionLabel]; self.updateTimeLabel = [[UILabel alloc] init]; - self.updateTimeLabel.textColor = KClearColor; + self.updateTimeLabel.textColor = kRGBColor(119, 119, 119); self.updateTimeLabel.font = [UIFont systemFontOfSize:12.0f]; self.updateTimeLabel.textAlignment = NSTextAlignmentLeft; -// self.updateTimeLabel.text = [NSString stringWithFormat: -// @"更新时间: %@",self.appInfo.releaseDate]; + self.updateTimeLabel.text = [NSString stringWithFormat: + @"更新时间: %@",self.appInfo.releaseDate]; [self.contentView addSubview:self.updateTimeLabel]; self.updateExplainLabel = [[UILabel alloc] init]; @@ -142,11 +142,14 @@ self.confirmButton.titleLabel.font = [UIFont systemFontOfSize:16.0f]; [self.confirmButton setTitleColor:kRGBColor(69, 149, 236) forState:UIControlStateNormal]; - [self.confirmButton setTitle:@"立即更新" forState:UIControlStateNormal]; + [self.confirmButton setTitle:@"请前往移动平台更新" forState:UIControlStateNormal]; [self addSubview:self.confirmButton]; [self.confirmButton addTarget:self action:@selector(confirmButtonDidClicked) forControlEvents:UIControlEventTouchUpInside]; if (!self.isCompulsoryUpdate) { + + [self.confirmButton setTitle:@"我知道了" forState:UIControlStateNormal]; + self.centerLineView = [[UIView alloc] init]; self.centerLineView.backgroundColor = kRGBColor(223, 223, 223); [self addSubview:self.centerLineView]; diff --git a/XinjiangProject/XinjiangProject/ThirdParty/TYMapNavSheet/TYMapNavSheet.m b/XinjiangProject/XinjiangProject/ThirdParty/TYMapNavSheet/TYMapNavSheet.m index 15fbe54..873c063 100644 --- a/XinjiangProject/XinjiangProject/ThirdParty/TYMapNavSheet/TYMapNavSheet.m +++ b/XinjiangProject/XinjiangProject/ThirdParty/TYMapNavSheet/TYMapNavSheet.m @@ -54,7 +54,7 @@ } if ([[UIApplication sharedApplication]canOpenURL:[NSURL URLWithString:@"iosamap://"]]){ - NSString *TYurlString = [NSString stringWithFormat:@"iosamap://navi?sourceApplication=%@&backScheme=applicationScheme&poiname=fangheng&poiid=BGVIS&lat=%f&lon=%f&dev=0&style=3", + NSString *TYurlString = [NSString stringWithFormat:@"iosamap://navi?sourceApplication=%@&backScheme=applicationScheme&poiname=&poiid=BGVIS&lat=%f&lon=%f&dev=0&style=3", [LocationDataDic objectForKey:@"toName"], _endCoor.latitude, _endCoor.longitude]; NSDictionary *dic = @{@"name": @"高德地图",