11 Commits
Author SHA1 Message Date
History 3c241b193b 新疆1.0.8版本 2026-01-22 17:14:35 +08:00
History a7d78ef4d8 模拟功能 2026-01-22 09:35:35 +08:00
History 57643da94d 新疆修改 2026-01-22 09:35:14 +08:00
History 4aba54ce74 更新新疆需求 2025-11-21 13:46:29 +08:00
History 2ec6c65bef 新疆员工端更新请求地址,手机号、icon 2025-11-05 10:41:28 +08:00
History 8f7d08f1e1 改图标 2025-10-10 15:09:10 +08:00
History 2d2396bd53 新疆修改 2025-09-30 11:24:46 +08:00
History b2d90a7c81 修改应急中心 2025-09-26 13:47:44 +08:00
History 0ffc7ba2b2 修改员工端项目名称图标 2025-07-14 10:06:00 +08:00
History 4eec6512e7 删除文件 2025-07-02 18:36:30 +08:00
History cc4663206b 修改组织关系!删除无用代码 2025-07-02 18:34:25 +08:00
934 changed files with 10374 additions and 3478 deletions
@@ -381,26 +381,26 @@
GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch";
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "新疆亚克西"; INFOPLIST_KEY_CFBundleDisplayName = "健康油我";
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSCameraUsageDescription = "健康咨询员工端需要访问您的相机用来档案功能,是否同意?"; INFOPLIST_KEY_NSCameraUsageDescription = "健康油我需要访问您的相机用来档案功能,是否同意?";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康咨询员工端需要访问您的麦克风用来视频录制,是否同意?"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康油我需要访问您的麦克风用来视频录制,是否同意?";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "新疆员工端需要访问您的相册上传图片,方便您的使用,是否同意?"; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "健康油我需要访问您的相册上传图片,方便您的使用,是否同意?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康咨询想使用您的相册功能 是否同意?"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康油我想使用您的相册功能 是否同意?";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UIUserInterfaceStyle = Light; INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 15.6; IPHONEOS_DEPLOYMENT_TARGET = 15;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0.8;
PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -425,26 +425,26 @@
GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch";
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "新疆亚克西"; INFOPLIST_KEY_CFBundleDisplayName = "健康油我";
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSCameraUsageDescription = "健康咨询员工端需要访问您的相机用来档案功能,是否同意?"; INFOPLIST_KEY_NSCameraUsageDescription = "健康油我需要访问您的相机用来档案功能,是否同意?";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康咨询员工端需要访问您的麦克风用来视频录制,是否同意?"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康油我需要访问您的麦克风用来视频录制,是否同意?";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "新疆员工端需要访问您的相册上传图片,方便您的使用,是否同意?"; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "健康油我需要访问您的相册上传图片,方便您的使用,是否同意?";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康咨询想使用您的相册功能 是否同意?"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康油我想使用您的相册功能 是否同意?";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UIUserInterfaceStyle = Light; INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 15.6; IPHONEOS_DEPLOYMENT_TARGET = 15;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0.8;
PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -509,7 +509,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.4; IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
@@ -565,7 +565,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.4; IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
@@ -1,6 +1,6 @@
// //
// NSArray+Sudoku.h // NSArray+Sudoku.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/3/4. // Created by Apple on 2024/3/4.
// //
@@ -1,6 +1,6 @@
// //
// NSArray+Sudoku.m // NSArray+Sudoku.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/3/4. // Created by Apple on 2024/3/4.
// //
@@ -1,6 +1,6 @@
// //
// NSAttributedString+Extension.h // NSAttributedString+Extension.h
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/3/14. // Created by 仁康信息 on 2023/3/14.
// //
@@ -1,6 +1,6 @@
// //
// NSAttributedString+Extension.m // NSAttributedString+Extension.m
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/3/14. // Created by 仁康信息 on 2023/3/14.
// //
@@ -1,6 +1,6 @@
// //
// UIDevice+model.h // UIDevice+model.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/3/29. // Created by Apple on 2024/3/29.
// //
@@ -1,6 +1,6 @@
// //
// UIDevice+model.m // UIDevice+model.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/3/29. // Created by Apple on 2024/3/29.
// //
@@ -1,6 +1,6 @@
// //
// UIImage+RoundedCorner.h // UIImage+RoundedCorner.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/4/24. // Created by Apple on 2024/4/24.
// //
@@ -1,6 +1,6 @@
// //
// UIImage+RoundedCorner.m // UIImage+RoundedCorner.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/4/24. // Created by Apple on 2024/4/24.
// //
@@ -63,31 +63,39 @@
#pragma mark: 网络前缀 #pragma mark: 网络前缀
#define ResourceAddress [NSString stringWithFormat:@"%@/file/show/",Http] #define ResourceAddress [NSString stringWithFormat:@"%@/file/show/",Http]
//生产环境 //开发环境地址 彭杰 http://192.168.1.37
//#define Http @"https://api.cqygjk.com"//
//#define H5Http @"https://console.cqygjk.com/"///
//#define H5DevHost @"cqyt.out.yg.icdat.cn"//
//#define IntervenH5 @"https://console.cqygjk.com"
//#define Http UserDefaultObjectForKey(@"HTTPS")// //#define Http @"http://192.168.1.37"//
//#define H5DevHost UserDefaultObjectForKey(@"H5DevHost")// //#define H5DevHost @"xjgateway.mcrm.vip:8888"//
//#define IntervenH5 UserDefaultObjectForKey(@"IntervenH5") //#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"//
//正文斌 @"http://192.168.1.28"。青海项目:https://quarry-api.yg.icdat.cn 四合一://https://starry.test.icdat.cn //#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"//
//#define IntervenH5 @"https://console-jkglpt.iosp.ydpt.tech"
//#define SCHEME @"https" //
//#define Http @"https://starry.test.icdat.cn" //卫鑫本地
//#define H5DevHost @"starry.test.icdat.cn"// //#define Http @"https://api-jkglpt.iosp.ydpt.tech"//
//#define IntervenH5 @"https://starry.out.icdat.cn" //#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"//
//#define IntervenH5 @"http://192.168.1.26:9876"
//#define SCHEME @"https" //
//开发环境地址 //测试
#define Http @"http://cqyt.dev.yg.dt.io"// #define Http @"https://api-xj.tri.icdat.cn"//
#define H5DevHost @"cqyt.dev.yg.dt.io"// #define H5DevHost @"api-xj.tri.icdat.cn"//
#define IntervenH5 @"http://cms.dev.yg.dt.io" #define IntervenH5 @"https://console-xj.tri.icdat.cn"
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀 #define SCHEME @"https" //
#define SCHEME @"http" //
//新疆项目后期的调试环境由阿里云迁移至公司内部主机服务器,功能联调和测试可用以下的环境地址
//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 */ #endif /* StatusMacros_h */
@@ -25,7 +25,7 @@
//高德key //高德key
#define AMAPSDKKEY @"e5e5b1aa469fcf577c829165bae860dd" #define AMAPSDKKEY @"43f28dcc5782a0aa98169624f6e94b76"
#define KNotificAgreeProtoocl @"AGREEPMAP" #define KNotificAgreeProtoocl @"AGREEPMAP"
@@ -184,10 +184,12 @@ alpha:1.0])
//数据验证 //数据验证
#define StrValid(f) ([f isKindOfClass:[NSNull class]] || f == nil || [f length] < 1 || [f isEqualToString:@"(null)"] || [f isEqualToString:@"<null>"] || [f isEqualToString:@"null"]? YES : NO) #define StrValid(f) ([f isKindOfClass:[NSNull class]] || f == nil || [f length] < 1 || [f isEqualToString:@"(null)"] || [f isEqualToString:@"<null>"] || [f isEqualToString:@"null"]? YES : NO)
#define SafeStr(f) (StrValid(f) ? f:@"")
#define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound)
#define ValidStr(f) StrValid(f) #define ValidStr(f) StrValid(f)
#define SafeStr(f) (!StrValid(f) ? f:@"-")
#define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound)
#define ValidDict(f) (f!=nil && [f isKindOfClass:[NSDictionary class]]) #define ValidDict(f) (f!=nil && [f isKindOfClass:[NSDictionary class]])
#define ValidArray(f) (f!=nil && [f isKindOfClass:[NSArray class]] && [f count]>0) #define ValidArray(f) (f!=nil && [f isKindOfClass:[NSArray class]] && [f count]>0)
#define ValidNum(f) (f!=nil && [f isKindOfClass:[NSNumber class]]) #define ValidNum(f) (f!=nil && [f isKindOfClass:[NSNumber class]])
@@ -1,6 +1,6 @@
// //
// CQAudioPlayManager.h // CQAudioPlayManager.h
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/12/5. // Created by 仁康信息 on 2023/12/5.
// //
@@ -1,6 +1,6 @@
// //
// CQAudioPlayManager.m // CQAudioPlayManager.m
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/12/5. // Created by 仁康信息 on 2023/12/5.
// //
@@ -1,6 +1,6 @@
// //
// DownToolsManager.h // DownToolsManager.h
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/12/1. // Created by 仁康信息 on 2023/12/1.
// //
@@ -1,6 +1,6 @@
// //
// DownToolsManager.m // DownToolsManager.m
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/12/1. // Created by 仁康信息 on 2023/12/1.
// //
@@ -53,4 +53,6 @@ typedef void (^FileDownloadFail)(int code, NSString * desc);
#pragma mark - 下载文件方法 #pragma mark - 下载文件方法
- (void)downLoadFileWithUrl:(NSString *)urlStr Path:(NSString*)path downloadProgress:(void (^)(NSProgress *downloadProgress))progress SuccessBlock:(FileDownloadSucc)success FileDownloadFail:(FileDownloadFail)failure; - (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 @end
@@ -20,6 +20,8 @@ typedef NS_ENUM(NSInteger, RequestType) {
RequestTypeMultiUpload,//多个上传 RequestTypeMultiUpload,//多个上传
RequestTypeDownload, RequestTypeDownload,
RequestTypeUpLoadVideo,//上传视频 RequestTypeUpLoadVideo,//上传视频
RequestTypeParmFormData//参数表单
}; };
@implementation JKCQNetworkingWithCache @implementation JKCQNetworkingWithCache
@@ -115,6 +117,13 @@ typedef NS_ENUM(NSInteger, RequestType) {
//5.开始启动下载任务 //5.开始启动下载任务
[task resume]; [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 - 网络请求统一处理 #pragma mark - 网络请求统一处理
/** /**
@@ -142,6 +151,15 @@ typedef NS_ENUM(NSInteger, RequestType) {
if (![self requestBeforeJudgeConnect]) {//断网 if (![self requestBeforeJudgeConnect]) {//断网
[self showError:@"请检查网络设置"]; [self showError:@"请检查网络设置"];
DYLog(@"\n\n----%@------\n\n",@"没有网络"); DYLog(@"\n\n----%@------\n\n",@"没有网络");
UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject;
for (UIWindow *window in UIApplication.sharedApplication.windows) {
if (window.isKeyWindow) {
keyWindow = window;
break;
}
}
[MBProgressHUD hideHUDForView:keyWindow animated:YES];
return; return;
} }
@@ -188,9 +206,19 @@ typedef NS_ENUM(NSInteger, RequestType) {
}else }else
{ {
NSLog(@"%@",url); NSLog(@"%@",url);
UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject;
for (UIWindow *window in UIApplication.sharedApplication.windows) {
if (window.isKeyWindow) {
keyWindow = window;
break;
}
}
[MBProgressHUD hideHUDForView:keyWindow animated:YES];
[self showError:@"网络服务出错"]; [self showError:@"网络服务出错"];
} }
// } // }
@@ -218,6 +246,17 @@ typedef NS_ENUM(NSInteger, RequestType) {
} }
else else
{ {
NSLog(@"%@",url);
UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject;
for (UIWindow *window in UIApplication.sharedApplication.windows) {
if (window.isKeyWindow) {
keyWindow = window;
break;
}
}
[MBProgressHUD hideHUDForView:keyWindow animated:YES];
[self showError:@"网络服务出错"]; [self showError:@"网络服务出错"];
} }
@@ -296,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<AFMultipartFormData> _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:@"请求超时"];
}
}];
} }
} }
@@ -345,7 +413,7 @@ typedef NS_ENUM(NSInteger, RequestType) {
} }
if ([response.allKeys containsObject:@"code"]) { 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; flag = true;
}else }else
@@ -1,27 +0,0 @@
//
// SDGETHealthTokenManager.h
// EscortProject
//
// Created by 仁康信息 on 2024/1/4.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^successBlock)(NSDictionary *responseObject);
typedef void (^failedBlock)(NSError *error);
@interface SDGETHealthTokenManager : NSObject
+(SDGETHealthTokenManager *)getHealthTokenManager;
- (void)getTokenSuccess:(successBlock)success
failed:(failedBlock)failed;
-(void)getUserJoinStatusSuccess:(successBlock)success
failed:(failedBlock)failed;
@end
NS_ASSUME_NONNULL_END
@@ -1,195 +0,0 @@
//
// SDGETHealthTokenManager.m
// EscortProject
//
// Created by 仁康信息 on 2024/1/4.
//
#import "SDGETHealthTokenManager.h"
#include <CommonCrypto/CommonDigest.h>
#import "RSAObjC.h"
@interface SDGETHealthTokenManager ()
@property (nonatomic,strong)AFHTTPSessionManager *session;
@end
@implementation SDGETHealthTokenManager
#pragma mark - 初始化单例
+(SDGETHealthTokenManager *)getHealthTokenManager
{
static SDGETHealthTokenManager *manager = nil;
static dispatch_once_t pred;
dispatch_once(&pred, ^{
manager = [[self alloc] init];
});
return manager;
}
-(id)init
{
self = [super init];
if (self) {
_session = [AFHTTPSessionManager manager];
/***********请求的序列化**********/
//传Json 对象
_session.requestSerializer = [AFJSONRequestSerializer serializer];
//设置超时时间
[_session.requestSerializer willChangeValueForKey:@"timeoutInterval"];
_session.requestSerializer.timeoutInterval = 10.f;
[_session.requestSerializer didChangeValueForKey:@"timeoutInterval"];
/**********响应的序列化**************/
_session.responseSerializer = [AFJSONResponseSerializer serializer];
_session.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json",@"text/json",@"text/plain" ,@"text/javascript",@"text/html",nil];
}
return self;
}
-(void)httpRequestWithURL:(NSString *)url
parameters:(NSDictionary*)paraDic
hearders:(NSDictionary *)hearder
success:(successBlock)success
failed:(failedBlock)failed
{
NSString *fullURL = [NSString stringWithFormat:@"%@/%@",BASEURL,url];
[_session POST:fullURL parameters:paraDic headers:hearder progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
success(responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
failed(error);
}];
}
-(void)httpRequestGetWithURL:(NSString *)url
parameters:(NSDictionary*)paraDic
hearders:(NSDictionary *)hearder
success:(successBlock)success
failed:(failedBlock)failed
{
NSString *fullURL = [NSString stringWithFormat:@"%@/%@",BASEURL,url];
[_session GET:fullURL parameters:paraDic headers:hearder progress:nil success:^(NSURLSessionTask *task, NSDictionary * responseObject) {
success(responseObject);
} failure:^(NSURLSessionTask *operation, NSError *error) {
failed(error);
}];
}
- (void)getTokenSuccess:(successBlock)success failed:(failedBlock)failed {
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
NSMutableDictionary * headerDic = [[NSMutableDictionary alloc] init];
NSDate * date = [NSDate date];
NSDateFormatter *matter = [[NSDateFormatter alloc] init];
matter.dateFormat = @"yyyyMMddHHmmss";
NSString * dateString = [matter stringFromDate:date];
[dic setObject:dateString forKey:@"timeSign"];
NSMutableDictionary * sigDic = [[NSMutableDictionary alloc] init];
[sigDic setObject:dateString forKey:@"timeSign"];
NSString * needSersy = [sigDic modelToJSONString];
// 时间戳
NSError *parseError;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:sigDic options:0 error:&parseError];
if (parseError) {
//解析出错
}
NSString * str = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// 时间戳
NSMutableString * str3 = [[NSMutableString alloc]initWithString:str];
[str3 replaceOccurrencesOfString:@"\\" withString:@"" options:1 range:NSMakeRange(0, str3.length)];
[str3 appendString:@"dd05f1c54d63749eda95f9fa6d49v442a"];
NSString * md5str = [self getMd5_32Bit_String:str3];
[headerDic setObject:dateString forKey:@"X-TIMESTAMP"];
[headerDic setObject:md5str forKey:@"X-Sign"];
[self httpRequestGetWithURL:@"gateway/sys/getPublicKey" parameters:dic hearders:@{@"X-TIMESTAMP":dateString,@"X-Sign":md5str} success:^(NSDictionary * _Nonnull responseObject) {
if ([responseObject.allKeys containsObject:@"code"]) {
if ([[responseObject objectForKey:@"code"] integerValue] == 200)
{
NSString *pubkey ;
if ([responseObject.allKeys containsObject:@"result"]) {
pubkey = [NSString stringWithFormat:@"-----BEGIN PUBLIC KEY-----\n%@\n-----END PUBLIC KEY-----",responseObject[@"result"]];
// 时间戳
}
HQUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo];
NSString *ret = [RSAObjC encrypt:user.idCard PublicKey:pubkey];
DLog(@"encrypted: %@", ret);
if (ValidStr(ret)) {
// KPostNotification(KNotificationLoginStateChange, @NO);
return;
}
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
[parmDic setObject:[NSString stringWithFormat:@"RSA_%@",ret] forKey: @"idcard"];
NSDate * date = [NSDate date];
NSDateFormatter *matter = [[NSDateFormatter alloc] init];
matter.dateFormat = @"yyyyMMddHHmmss";
NSString * dateString = [matter stringFromDate:date];
NSError *parseError;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmDic options:0 error:&parseError];
if (parseError) {
//解析出错
}
NSString * str = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// 时间戳
NSMutableString * str3 = [[NSMutableString alloc]initWithString:str];
[str3 replaceOccurrencesOfString:@"\\" withString:@"" options:1 range:NSMakeRange(0, str3.length)];
[str3 appendString:@"dd05f1c54d63749eda95f9fa6d49v442a"];
NSString * md5str = [self getMd5_32Bit_String:str3];
[self httpRequestWithURL:@"gateway/sys/thirdAppGetTokenByIdCard" parameters:parmDic hearders:@{@"X-TIMESTAMP":dateString,@"X-Sign":md5str} success:success failed:failed];
}
else
{
success(responseObject);
}
}
} failed:^(NSError * _Nonnull error) {
}];
}
- (NSString *)getMd5_32Bit_String:(NSString *)srcString {
// 参数 srcString 传进来的字符串
// 参数 isUppercase 是否需要大小写
const char *cStr = [srcString UTF8String];
unsigned char digest[CC_MD5_DIGEST_LENGTH];
CC_MD5( cStr, (CC_LONG)srcString.length, digest );
NSMutableString *result = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++)
[result appendFormat:@"%02X", digest[i]];
return result;
}
@end
@@ -1,33 +0,0 @@
//
// SDHttpRequest.h
// colorPrintingMaster
//
// Created by 青山小明 on 17/5/3.
// Copyright © 2017年 zhangming. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^successBlock)(NSDictionary *responseObject);
typedef void (^failedBlock)(NSError *error);
@interface SDHttpRequest : NSObject
+(SDHttpRequest *)httpRequest;
#pragma mark - 首页
- (void)getInterWatchDataUrlWithParm:(NSMutableDictionary *)parmDic
Success:(successBlock)success
failed:(failedBlock)failed;
#pragma mark -
-(void)postWithParameter:(NSDictionary *)para
images:(NSArray *)images
success:(successBlock)success
failed:(failedBlock)failed;
//获取服务地址
- (void)getChangeUrlSuccess:(successBlock)success
failed:(failedBlock)failed;
@end
@@ -1,133 +0,0 @@
//
// SDHttpRequest.m
// colorPrintingMaster
//
// Created by 青山小明 on 17/5/3.
// Copyright © 2017年 zhangming. All rights reserved.
//
#import "SDHttpRequest.h"
#import "AFNetworking.h"
#include <CommonCrypto/CommonDigest.h>
#import "RSAObjC.h"
//static SDHttpRequest *singleton = nil;
@interface SDHttpRequest ()
@property (nonatomic,strong)AFHTTPSessionManager *session;
@end
@implementation SDHttpRequest
#pragma mark - 初始化单例
+(SDHttpRequest *)httpRequest
{
static SDHttpRequest *manager = nil;
static dispatch_once_t pred;
dispatch_once(&pred, ^{
manager = [[self alloc] init];
});
return manager;
}
-(id)init
{
self = [super init];
if (self) {
_session = [AFHTTPSessionManager manager];
/***********请求的序列化**********/
//传Json 对象
_session.requestSerializer = [AFJSONRequestSerializer serializer];
//设置超时时间
[_session.requestSerializer willChangeValueForKey:@"timeoutInterval"];
_session.requestSerializer.timeoutInterval = 30.f;
[_session.requestSerializer didChangeValueForKey:@"timeoutInterval"];
/**********响应的序列化**************/
_session.responseSerializer = [AFJSONResponseSerializer serializer];
_session.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json",@"text/json",@"text/plain" ,@"text/javascript",@"text/html",nil];
}
return self;
}
#pragma mark---请求调用的方法
-(void)httpRequestWithURL:(NSString *)url
parameters:(NSDictionary*)paraDic
success:(successBlock)success
failed:(failedBlock)failed
{
NSUserDefaults * tokenDefaul = [NSUserDefaults standardUserDefaults];
NSString * token = [tokenDefaul objectForKey:KHEALTHTOKEN];
NSString *fullURL = [NSString stringWithFormat:@"%@/%@",BASEURL,url];
[_session POST:fullURL parameters:paraDic headers: @{@"X-Access-Token":token} progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
success(responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
failed(error);
}];
}
- (void)uploadImagesWithURL:(NSString *)url
parameters:(NSDictionary *)paraDic
hearders:(NSDictionary *)hearder
imagesKey:(NSString *)imagesKey
images:(NSArray *)images
success:(successBlock)success
failed:(failedBlock)failed
{
NSString *fullURL = [NSString stringWithFormat:@"%@/%@",BASEURL,url];
[_session POST:fullURL parameters:paraDic headers:hearder constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
for (UIImage *image in images)
{
[formData appendPartWithFileData:UIImageJPEGRepresentation(image, 0.5)
name:imagesKey
fileName:@"1.jpeg"
mimeType:@"image/jpeg"];
}
} progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
success(responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
failed(error);
}];
}
-(void)httpRequestGetWithURL:(NSString *)url
parameters:(NSDictionary*)paraDic
success:(successBlock)success
failed:(failedBlock)failed
{
NSUserDefaults * tokenDefaul = [NSUserDefaults standardUserDefaults];
NSString * token = [tokenDefaul objectForKey:KHEALTHTOKEN];
NSString *fullURL = [NSString stringWithFormat:@"%@/%@",BASEURL,url];
[_session GET:fullURL parameters:paraDic headers:@{@"X-Access-Token":token} progress:nil success:^(NSURLSessionTask *task, NSDictionary * responseObject) {
success(responseObject);
} failure:^(NSURLSessionTask *operation, NSError *error) {
failed(error);
}];
}
#pragma mark - 首页
- (void)getInterWatchDataUrlWithParm:(NSMutableDictionary *)parmDic
Success:(successBlock)success
failed:(failedBlock)failed {
//参数
[self httpRequestGetWithURL:@"health-watch/watchH5Api/indexDataNew"
parameters:parmDic success:success failed:failed];
}
@end
@@ -9,7 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "JKCQNetworkingWithCache.h" #import "JKCQNetworkingWithCache.h"
@interface JKCQAPI : NSObject @interface XJPNetAPI : NSObject
@property (nonatomic,strong) JKCQNetworkingWithCache * httpRequest; @property (nonatomic,strong) JKCQNetworkingWithCache * httpRequest;
@@ -73,6 +73,7 @@
- (void)getOneKeyQuestionByID:(NSMutableDictionary *)parmDic; - (void)getOneKeyQuestionByID:(NSMutableDictionary *)parmDic;
- (void)postSearchOneKeyQuestionData:(NSMutableDictionary *)parmDic; - (void)postSearchOneKeyQuestionData:(NSMutableDictionary *)parmDic;
- (void)getHistoryReportById:(NSMutableDictionary *)parmDic; - (void)getHistoryReportById:(NSMutableDictionary *)parmDic;
- (void)recordDoctorCardInfoClick:(NSMutableDictionary *)parmDic;
#pragma mark:咨询人管理 #pragma mark:咨询人管理
@@ -123,4 +124,31 @@
- (void)getMinitringWatchData:(NSMutableDictionary *)parmDic; - (void)getMinitringWatchData:(NSMutableDictionary *)parmDic;
- (void)getInterMonitoringMaxMinData:(NSMutableDictionary *)parmDic;
- (void)getWarningWatchListV2Data:(NSMutableDictionary *)parmDic;
- (void)getWranHistoryList:(NSMutableDictionary *)parmDic;
- (void)getSOSDoctorRecordList:(NSMutableDictionary *)parmDic;
- (void)getSOSDoctorDetailInfo:(NSMutableDictionary *)parmDic;
- (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 @end
@@ -1,18 +1,12 @@
//
// API.m
// XZYNetworking
//
// Created by on 2017/12/25.
// Copyright © 2017 . All rights reserved.
//
#import "JKCQAPI.h"
#import "XJPNetAPI.h"
#define needToken httpRequest.needToken #define needToken httpRequest.needToken
#define isLoginFlag httpRequest.isLoginFlag #define isLoginFlag httpRequest.isLoginFlag
@implementation JKCQAPI @implementation XJPNetAPI
#pragma mark - init方法 #pragma mark - init方法
@synthesize httpRequest; @synthesize httpRequest;
@@ -106,6 +100,13 @@
} }
//
- (void)recordDoctorCardInfoClick:(NSMutableDictionary *)parmDic {
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/con-message/saveReadLog",Http] params:parmDic];
}
- (void)GetAllHistoryChatRecord:(NSMutableDictionary *)parmDic { - (void)GetAllHistoryChatRecord:(NSMutableDictionary *)parmDic {
//http://192.168.1.28/health-consultation/?groupId=1801087415104962560&pageNo=1&pageSize=10 //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]; [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectImMessagePageListSession",Http] params:parmDic];
@@ -550,7 +551,7 @@
- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic { - (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic {
//GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url HTTP/1.1 //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=qh_ios_jump_url",Http] params:parmDic]; [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url",Http] params:parmDic];
} }
@@ -747,5 +748,84 @@
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/indexDataNew",Http] params:parmDic]; [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 {
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/thresholdSetting",Http] params:parmDic];
}
- (void)getWranHistoryList:(NSMutableDictionary *)parmDic {
// https://health-api.tzgl.shuziweidao.com/health-watch/watchH5Api/historicalWarn?eventType=spo2&queryDate=2025-07-01&userId=1898914204455915521&pageNo=1&pageSize=100
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/historicalWarn",Http] params:parmDic];
}
//
- (void)getSOSDoctorRecordList:(NSMutableDictionary *)parmDic {
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/initUserOrderPage",Http] params:parmDic];
}
- (void)getSOSDoctorDetailInfo:(NSMutableDictionary *)parmDic {
//GET https://cqyt.test.yg.icdat.cn/health-emergency/api/emergency/order/orderThrough?id=1744265549623332865 HTTP/1.1
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/getOrderById",Http] params:parmDic];
}
//
- (void)getSOSSmallSumData:(NSMutableDictionary *)parmDic {
//
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/orderThrough",Http] params:parmDic];
}
//
- (void)healthAccountLogin:(NSMutableDictionary *)parmDic {
[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 @end
@@ -1,6 +1,6 @@
// //
// ESCTUIManager.h // ESCTUIManager.h
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/2/16. // Created by 仁康信息 on 2023/2/16.
// //
@@ -1,6 +1,6 @@
// //
// ESCTUIManager.m // ESCTUIManager.m
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/2/16. // Created by 仁康信息 on 2023/2/16.
// //
@@ -76,10 +76,10 @@
[TUIChatConfig defaultConfig].enableAudioCall = isAudio; // YES:开启,NO:关闭 [TUIChatConfig defaultConfig].enableAudioCall = isAudio; // YES:开启,NO:关闭
// 把 TUIC2CChatViewController 添加到自己的 ViewController // 把 TUIC2CChatViewController 添加到自己的 ViewController
HQBaseViewController * currentVc =(HQBaseViewController *)[HQCommonUtils getCurrentVC]; XJBaseViewController * currentVc =(XJBaseViewController *)[HQCommonUtils getCurrentVC];
if (!currentVc) { if (!currentVc) {
currentVc = [[HQBaseViewController alloc] init]; currentVc = [[XJBaseViewController alloc] init];
} }
[currentVc addChildViewController:vc]; [currentVc addChildViewController:vc];
[currentVc.view addSubview:vc.view]; [currentVc.view addSubview:vc.view];
@@ -51,21 +51,40 @@
- (void)setUserInfo:(NSDictionary *)userInfo { - (void)setUserInfo:(NSDictionary *)userInfo {
if (![userInfo isKindOfClass:[NSDictionary class]]) {
return;
}
_userInfo = userInfo; _userInfo = userInfo;
self.user_id = [_userInfo objectForKey:@"id"];
self.avatar = [NSString stringWithFormat:@"%@%@",ResourceAddress,[_userInfo objectForKey:@"avatar"]]; // 一个小工具块,用于安全取值(避免 NSNull)
self.phone = [_userInfo objectForKey:@"phone"]; id (^safeValue)(id obj) = ^id(id obj) {
self.realname = [_userInfo objectForKey:@"realname"]; return (obj && ![obj isKindOfClass:[NSNull class]]) ? obj : nil;
self.username = [_userInfo objectForKey:@"username"]; };
self.sex = [_userInfo objectForKey:@"sex"];
self.idCard = [_userInfo objectForKey:@"idCard"]; self.user_id = safeValue(userInfo[@"id"]);
self.personType = [_userInfo objectForKey:@"personType"];
self.secondDepart = [_userInfo objectForKey:@"secondDepart"]; NSString *avatarPath = safeValue(userInfo[@"avatar"]);
self.sex_dictText = [_userInfo objectForKey:@"sex_dictText"]; self.avatar = avatarPath ? [NSString stringWithFormat:@"%@%@", ResourceAddress, avatarPath] : nil;
self.depart_id = [self.secondDepart objectForKey:@"id"];
self.parentId = [self.secondDepart objectForKey:@"parentId"]; self.phone = safeValue(userInfo[@"phone"]);
self.departName = [self.secondDepart objectForKey:@"departName"]; self.realname = safeValue(userInfo[@"realname"]);
self.username = safeValue(userInfo[@"username"]);
self.sex = safeValue(userInfo[@"sex"]);
self.idCard = safeValue(userInfo[@"idCard"]);
self.personType = safeValue(userInfo[@"personType"]);
self.sex_dictText = safeValue(userInfo[@"sex_dictText"]);
NSDictionary *secondDepart = safeValue(userInfo[@"secondDepart"]);
if ([secondDepart isKindOfClass:[NSDictionary class]]) {
self.secondDepart = secondDepart;
self.depart_id = safeValue(secondDepart[@"id"]);
self.parentId = safeValue(secondDepart[@"parentId"]);
self.departName = safeValue(secondDepart[@"departName"]);
} else {
self.secondDepart = nil;
self.depart_id = self.parentId = self.departName = nil;
}
} }
@@ -13,7 +13,6 @@
//初始化服务 //初始化服务
-(void)initService; -(void)initService;
- (void)chageUrlService;
//初始化 window //初始化 window
-(void)initWindow; -(void)initWindow;
@@ -6,8 +6,9 @@
// //
#import "AppDelegate+AppService.h" #import "AppDelegate+AppService.h"
#import "HQBaseTabBarController.h" #import "XJBaseTabBarController.h"
#import "HQLoginViewController.h" //#import "XJLoginViewController.h"
#import "XJLoginTopChangeViewController.h"
#import <IQKeyboardManager/IQKeyboardManager.h> #import <IQKeyboardManager/IQKeyboardManager.h>
#import <AMapFoundationKit/AMapFoundationKit.h> #import <AMapFoundationKit/AMapFoundationKit.h>
@@ -52,12 +53,21 @@
object:nil]; object:nil];
if ([HQCommonUtils isLogin]) { if ([HQCommonUtils isLogin]) {
//腾讯im //腾讯im
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; #if DEBUG
[proctocolApi GetIMLoginAccount:nil]; // [self loginImAccount];
#else
[self loginImAccount];
#endif
} }
} }
- (void)loginImAccount {
XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
[proctocolApi GetIMLoginAccount:nil];
}
#pragma mark ————— 初始化window ————— #pragma mark ————— 初始化window —————
-(void)initWindow{ -(void)initWindow{
@@ -65,13 +75,13 @@
self.window.backgroundColor = KWhiteColor; self.window.backgroundColor = KWhiteColor;
//直接进入显示登录页面 //直接进入显示登录页面
// if ([HQCommonUtils isLogin]) { // if ([HQCommonUtils isLogin]) {
self.mainTabBar = [HQBaseTabBarController new]; self.mainTabBar = [XJBaseTabBarController new];
self.mainTabBar.delegate =self; self.mainTabBar.delegate =self;
self.window.rootViewController = self.mainTabBar; self.window.rootViewController = self.mainTabBar;
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
// }else { // }else {
// HQLoginViewController * loginvc = [[HQLoginViewController alloc] init]; // HQLoginViewController * loginvc = [[HQLoginViewController alloc] init];
// HQBaseNavigationController * nav = [[HQBaseNavigationController alloc] initWithRootViewController:loginvc]; // XJBaseNavigationController * nav = [[XJBaseNavigationController alloc] initWithRootViewController:loginvc];
// self.window.rootViewController = nav; // self.window.rootViewController = nav;
// } // }
// [self.window makeKeyAndVisible]; // [self.window makeKeyAndVisible];
@@ -86,102 +96,6 @@
[[TUICallEngine createInstance] addObserver:self]; [[TUICallEngine createInstance] addObserver:self];
} }
#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:@"com.question.QinghaiProvince" forKey:@"pkg"];
[session GET:@"https://base.icdat.cn/v2/url" parameters:parmDic headers:@{@"X-ClientSign":@"Quarry"} 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];
NSString * apiString = [resultDic objectForKey:@"api"];
//判断是否正在审
BOOL isExmine;
if ([apiString containsString:@"api.out.icdat.cn"]) { //正在审
isExmine = true;
}else
{
isExmine = false;
}
[[NSUserDefaults standardUserDefaults] setObject:@(isExmine) forKey:@"isExmine"];
[[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];
}
KPostNotification(KNotificAgreeProtoocl, nil);
}
}
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSString * statusCode = [error.userInfo objectForKey:@"NSLocalizedDescription"];
//请求超时
if (error.code == -1001) {
[EasyTextView showErrorText:@"请求超时"];
}
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.cqygjk.com" forKey:@"HTTPS"];
[[NSUserDefaults standardUserDefaults] setObject:@"https://yyjk.cqygjk.com/" forKey:@"BASEURL"];
[[NSUserDefaults standardUserDefaults] setObject:@"api.cqygjk.com" forKey:@"IntervenH5"];
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.cqygjk.com" forKey:@"H5DevHost"];
[[NSUserDefaults standardUserDefaults] synchronize];
KPostNotification(KNotificAgreeProtoocl, nil);
}];
}
#pragma mark: 键盘回收 #pragma mark: 键盘回收
- (void)initIQKeyBord { - (void)initIQKeyBord {
@@ -230,7 +144,7 @@
paragraphStyle.alignment = NSTextAlignmentLeft; paragraphStyle.alignment = NSTextAlignmentLeft;
NSMutableAttributedString *message = [[NSMutableAttributedString alloc] initWithString:@"\n亲,感谢您对健康咨询员工端一直以来的信任!我们依据最新的监管要求更新了健康咨询员工端《隐私权政策》,特向您说明如下\n1.为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n2.基于您的明示授权,我们可能会获取您的位置(为您提供服务)等信息,您有权拒绝或取消授权;\n3.我们会采取业界先进的安全措施保护您的信息安全;\n4.未经您同意,我们不会从第三方处获取、共享或向提供您的信息;" attributes:@{ NSMutableAttributedString *message = [[NSMutableAttributedString alloc] initWithString:@"\n亲,感谢您对健康油我一直以来的信任!我们依据最新的监管要求更新了健康油我《隐私权政策》,特向您说明如下\n1.为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n2.基于您的明示授权,我们可能会获取您的位置(为您提供服务)等信息,您有权拒绝或取消授权;\n3.我们会采取业界先进的安全措施保护您的信息安全;\n4.未经您同意,我们不会从第三方处获取、共享或向提供您的信息;" attributes:@{
NSParagraphStyleAttributeName:paragraphStyle, NSParagraphStyleAttributeName:paragraphStyle,
}]; }];
@@ -245,7 +159,6 @@
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
//更新用户授权高德SDK隐私协议状态. since 8.1.0 //更新用户授权高德SDK隐私协议状态. since 8.1.0
[MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree]; [MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree];
[self chageUrlService];
}]; }];
@@ -254,7 +167,6 @@
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
//更新用户授权高德SDK隐私协议状态. since 8.1.0 //更新用户授权高德SDK隐私协议状态. since 8.1.0
[MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusNotAgree]; [MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusNotAgree];
[self chageUrlService];
}]; }];
[alert addAction:conform]; [alert addAction:conform];
@@ -305,7 +217,7 @@
if (islogin) {//登录成功 重置Tabbar if (islogin) {//登录成功 重置Tabbar
self.mainTabBar = nil; self.mainTabBar = nil;
self.mainTabBar = [HQBaseTabBarController new]; self.mainTabBar = [XJBaseTabBarController new];
self.mainTabBar.delegate =self; self.mainTabBar.delegate =self;
self.window.rootViewController = self.mainTabBar; self.window.rootViewController = self.mainTabBar;
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
@@ -314,8 +226,8 @@
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = KWhiteColor; self.window.backgroundColor = KWhiteColor;
HQLoginViewController * loginvc = [[HQLoginViewController alloc] init]; XJLoginTopChangeViewController * loginvc = [[XJLoginTopChangeViewController alloc] init];
HQBaseNavigationController * nav = [[HQBaseNavigationController alloc] initWithRootViewController:loginvc]; XJBaseNavigationController * nav = [[XJBaseNavigationController alloc] initWithRootViewController:loginvc];
self.window.rootViewController = nav; self.window.rootViewController = nav;
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
@@ -6,7 +6,7 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "HQBaseTabBarController.h" #import "XJBaseTabBarController.h"
/**腾讯IM**/ /**腾讯IM**/
#import "TUIDefine.h" #import "TUIDefine.h"
#import "TUIBaseChatViewController.h" #import "TUIBaseChatViewController.h"
@@ -22,7 +22,7 @@
@property (nonatomic,assign)NSInteger allowRotate; @property (nonatomic,assign)NSInteger allowRotate;
@property (strong, nonatomic) HQBaseTabBarController * mainTabBar; @property (strong, nonatomic) XJBaseTabBarController * mainTabBar;
@property (nonatomic,assign)NSInteger unreadNumber; @property (nonatomic,assign)NSInteger unreadNumber;
@@ -20,10 +20,6 @@
//前缀请求 //前缀请求
//初始化高德地图 //初始化高德地图
[self configureAPIKey]; [self configureAPIKey];
//前缀请求
[self chageUrlService];
[self initService]; [self initService];
//初始化window //初始化window
[self initWindow]; [self initWindow];
@@ -41,7 +37,7 @@
#if DEBUG #if DEBUG
#else #else
[CheckProjectTool testAll]; // [CheckProjectTool testAll];
#endif #endif
@@ -1,18 +0,0 @@
//
// DownPDFFileVC.h
// EscortProject
//
// Created by 仁康信息 on 2023/12/1.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DownPDFFileVC : HQBaseViewController
@property (nonatomic, strong) NSString * PDFUrl;
@end
NS_ASSUME_NONNULL_END
@@ -1,5 +1,5 @@
// //
// HQBaseNavigationController.h // XJBaseNavigationController.h
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/12. // Created by xulei on 2022/8/12.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface HQBaseNavigationController : UINavigationController @interface XJBaseNavigationController : UINavigationController
/*! /*!
* *
@@ -1,15 +1,15 @@
// //
// HQBaseNavigationController.m // XJBaseNavigationController.m
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/12. // Created by xulei on 2022/8/12.
// //
#import "HQBaseNavigationController.h" #import "XJBaseNavigationController.h"
#import "XYTransitionProtocol.h" #import "XYTransitionProtocol.h"
#import "XYTransition.h" #import "XYTransition.h"
@interface HQBaseNavigationController ()<UINavigationControllerDelegate,UIGestureRecognizerDelegate> @interface XJBaseNavigationController ()<UINavigationControllerDelegate,UIGestureRecognizerDelegate>
@property (nonatomic, weak) id popDelegate; @property (nonatomic, weak) id popDelegate;
@property (nonatomic,strong) UIPercentDrivenInteractiveTransition *interactivePopTransition; @property (nonatomic,strong) UIPercentDrivenInteractiveTransition *interactivePopTransition;
@@ -18,7 +18,7 @@
@end @end
@implementation HQBaseNavigationController @implementation XJBaseNavigationController
//APP生命周期中 //APP生命周期中
+ (void)initialize + (void)initialize
@@ -124,8 +124,8 @@
-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{ -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
if ([viewController isKindOfClass:[HQBaseViewController class]]) { if ([viewController isKindOfClass:[XJBaseViewController class]]) {
HQBaseViewController * vc = (HQBaseViewController *)viewController; XJBaseViewController * vc = (XJBaseViewController *)viewController;
if (vc.isHidenNaviBar) { if (vc.isHidenNaviBar) {
vc.view.top = 0; vc.view.top = 0;
[vc.navigationController setNavigationBarHidden:YES animated:animated]; [vc.navigationController setNavigationBarHidden:YES animated:animated];
@@ -1,5 +1,5 @@
// //
// HQBaseTabBarController.h // XJBaseTabBarController.h
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/12. // Created by xulei on 2022/8/12.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface HQBaseTabBarController : UITabBarController @interface XJBaseTabBarController : UITabBarController
/** /**
@@ -1,23 +1,22 @@
// //
// HQBaseTabBarController.m // XJBaseTabBarController.m
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/12. // Created by xulei on 2022/8/12.
// //
#import "HQBaseTabBarController.h" #import "XJBaseTabBarController.h"
#import "HQTabBar.h" #import "HQTabBar.h"
#import "MyCenterViewController.h" #import "XJMyCenterViewController.h"
#import "ChatListViewController.h" #import "ChatListViewController.h"
// //
#import "QuestionViewController.h" #import "QuestionViewController.h"
#import "MyCenterViewController.h" #import "XJSosCenterViewController.h"
#import "SosCenterViewController.h" #import "MonitoringWarchViewController.h"
#import "HeartBadViewController.h"
// //
@interface HQBaseTabBarController ()<UITabBarControllerDelegate> @interface XJBaseTabBarController ()<UITabBarControllerDelegate>
@property (nonatomic,strong) NSMutableArray * VCS;//tabbar root VC @property (nonatomic,strong) NSMutableArray * VCS;//tabbar root VC
@@ -34,7 +33,7 @@
@end @end
@implementation HQBaseTabBarController @implementation XJBaseTabBarController
- (void)viewDidLoad { - (void)viewDidLoad {
@@ -75,18 +74,18 @@
_VCS = @[].mutableCopy; _VCS = @[].mutableCopy;
QuestionViewController * questionVC = [[QuestionViewController alloc]init]; QuestionViewController * questionVC = [[QuestionViewController alloc]init];
[self setupChildViewController:questionVC title:@"咨询" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"]; [self setupChildViewController:questionVC title:@"咨询" imageName:@"questionTabBar_nomal" seleceImageName:@"questionTabBar_selected"];
SosCenterViewController * sosVC = [[SosCenterViewController alloc]init]; XJSosCenterViewController * sosVC = [[XJSosCenterViewController alloc]init];
[self setupChildViewController:sosVC title:@"就医" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"]; [self setupChildViewController:sosVC title:@"应急" imageName:@"sosCenterTabBar_nomal" seleceImageName:@"sosCenterTabBar_selected"];
HeartBadViewController * jianceVC = [[HeartBadViewController alloc]init]; MonitoringWarchViewController * jianceVC = [[MonitoringWarchViewController alloc]init];
[self setupChildViewController:jianceVC title:@"监测" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"]; [self setupChildViewController:jianceVC title:@"监测" imageName:@"monitoringTabBar_nomal" seleceImageName:@"monitoringTabBar_selected"];
MyCenterViewController * centerVC = [[MyCenterViewController alloc] init]; XJMyCenterViewController * centerVC = [[XJMyCenterViewController alloc] init];
[self setupChildViewController:centerVC title:@"我的" imageName:@"mine_normal" seleceImageName:@"mine_selected"]; [self setupChildViewController:centerVC title:@"我的" imageName:@"mineTabBar_nomal" seleceImageName:@"mineTabBar_selected"];
self.viewControllers = _VCS; self.viewControllers = _VCS;
@@ -105,7 +104,7 @@
[controller.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:UIColorHex(#21BEBD),NSFontAttributeName:SYSTEMFONT(10.0f)} forState:UIControlStateSelected]; [controller.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:UIColorHex(#21BEBD),NSFontAttributeName:SYSTEMFONT(10.0f)} forState:UIControlStateSelected];
// //
HQBaseNavigationController *nav = [[HQBaseNavigationController alloc]initWithRootViewController:controller]; XJBaseNavigationController *nav = [[XJBaseNavigationController alloc]initWithRootViewController:controller];
[_VCS addObject:nav]; [_VCS addObject:nav];
@@ -1,5 +1,5 @@
// //
// HQBaseViewController.h // XJBaseViewController.h
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/11. // Created by xulei on 2022/8/11.
@@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface HQBaseViewController : UIViewController @interface XJBaseViewController : UIViewController
/** /**
* *
@@ -5,14 +5,14 @@
// Created by xulei on 2022/8/11. // Created by xulei on 2022/8/11.
// //
#import "HQBaseViewController.h" #import "XJBaseViewController.h"
#import "HQLoginViewController.h" #import "XJLoginViewController.h"
@interface HQBaseViewController ()<MBProgressHUDDelegate> @interface XJBaseViewController ()<MBProgressHUDDelegate>
@end @end
@implementation HQBaseViewController @implementation XJBaseViewController
- (UIStatusBarStyle)preferredStatusBarStyle{ - (UIStatusBarStyle)preferredStatusBarStyle{
return _StatusBarStyle; return _StatusBarStyle;
@@ -1,5 +1,5 @@
// //
// BaseWebViewVC.h // XJBaseWebViewVC.h
// ScarHousekeeper // ScarHousekeeper
// //
// Created by 张小万 on 2021/1/21. // Created by 张小万 on 2021/1/21.
@@ -25,7 +25,7 @@ typedef enum {
- (void)startFunction; - (void)startFunction;
@end @end
@interface BaseWebViewVC : HQBaseViewController<UIAlertViewDelegate,WKNavigationDelegate, WKUIDelegate, WebJSExport, WKScriptMessageHandler> @interface XJBaseWebViewVC : XJBaseViewController<UIAlertViewDelegate,WKNavigationDelegate, WKUIDelegate, WebJSExport, WKScriptMessageHandler>
@property (nonatomic, strong) NSString *webUrl; @property (nonatomic, strong) NSString *webUrl;
@property (nonatomic, strong) NSString *webTitle; @property (nonatomic, strong) NSString *webTitle;
@@ -1,13 +1,13 @@
// //
// BaseWebViewVC.m // XJBaseWebViewVC.m
// ScarHousekeeper // ScarHousekeeper
// //
// Created by on 2021/1/21. // Created by on 2021/1/21.
// //
#import "BaseWebViewVC.h" #import "XJBaseWebViewVC.h"
@interface BaseWebViewVC ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate> @interface XJBaseWebViewVC ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
@property (nonatomic, strong)NSURL *originalUrl; @property (nonatomic, strong)NSURL *originalUrl;
@property (nonatomic, copy)NSString *videoUrl; @property (nonatomic, copy)NSString *videoUrl;
@@ -16,7 +16,7 @@
@end @end
@implementation BaseWebViewVC @implementation XJBaseWebViewVC
#pragma mark - LifeCycle #pragma mark - LifeCycle
@@ -65,7 +65,7 @@
- (void)addSubviews{ - (void)addSubviews{
WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init]; WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init];
WKPreferences *preferences = [[WKPreferences alloc]init]; WKPreferences *preferences = [[WKPreferences alloc]init];
preferences.javaScriptEnabled = YES; // preferences.javaScriptEnabled = YES;
preferences.javaScriptCanOpenWindowsAutomatically = YES; preferences.javaScriptCanOpenWindowsAutomatically = YES;
preferences.minimumFontSize = 10; preferences.minimumFontSize = 10;
configuration.preferences = preferences; configuration.preferences = preferences;
@@ -1,6 +1,6 @@
// //
// CustomSystemEvaluateModel.h // CustomSystemEvaluateModel.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/19. // Created by Apple on 2024/6/19.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemEvaluateModel.m // CustomSystemEvaluateModel.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/19. // Created by Apple on 2024/6/19.
// //
@@ -1,6 +1,6 @@
// //
// CustomTUIHistoryModel.h // CustomTUIHistoryModel.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/21. // Created by Apple on 2024/6/21.
// //
@@ -36,6 +36,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString * title; @property (nonatomic, copy) NSString * title;
@property (nonatomic, assign) CGFloat systemHeight; @property (nonatomic, assign) CGFloat systemHeight;
@property (nonatomic, assign) MessageType msgType; @property (nonatomic, assign) MessageType msgType;
//地图
@property (nonatomic, assign) CGFloat Longitude;
@property (nonatomic, assign) CGFloat Latitude;
@end @end
@@ -1,6 +1,6 @@
// //
// CustomTUIHistoryModel.m // CustomTUIHistoryModel.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/21. // Created by Apple on 2024/6/21.
// //
@@ -1,6 +1,6 @@
// //
// CustomTextModel.h // CustomTextModel.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/19. // Created by Apple on 2024/6/19.
// //
@@ -1,6 +1,6 @@
// //
// CustomTextModel.m // CustomTextModel.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/19. // Created by Apple on 2024/6/19.
// //
@@ -1,6 +1,6 @@
// //
// CustomTUIModel.h // CustomTUIModel.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/17. // Created by Apple on 2024/6/17.
// //
@@ -1,6 +1,6 @@
// //
// CustomTUIModel.m // CustomTUIModel.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/17. // Created by Apple on 2024/6/17.
// //
@@ -1,6 +1,6 @@
// //
// CustomTUIBaseMessageController.h // CustomTUIBaseMessageController.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/12. // Created by Apple on 2024/6/12.
// //
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface CustomTUIBaseMessageController : HQBaseViewController @interface CustomTUIBaseMessageController : XJBaseViewController
@property(nonatomic, strong) NSString * groupID; @property(nonatomic, strong) NSString * groupID;
@@ -1,6 +1,6 @@
// //
// CustomTUIBaseMessageController.m // CustomTUIBaseMessageController.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/12. // Created by Apple on 2024/6/12.
// //
@@ -84,7 +84,7 @@
[parmDic setObject:self.groupID forKey:@"groupId"]; [parmDic setObject:self.groupID forKey:@"groupId"];
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"HISTORYAPI" NeedToken:@""]; XJPNetAPI * agreeAPI = [[XJPNetAPI alloc] init:self tag:@"HISTORYAPI" NeedToken:@""];
[agreeAPI GetAllHistoryChatRecord:nil]; [agreeAPI GetAllHistoryChatRecord:nil];
@@ -1,6 +1,6 @@
// //
// CustomTUIHistoryTable.h // CustomTUIHistoryTable.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomTUIHistoryTable.m // CustomTUIHistoryTable.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomAudioCell.h // CustomAudioCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomAudioCell.m // CustomAudioCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomDoctorIDTableViewCell.h // CustomDoctorIDTableViewCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/7/5. // Created by Apple on 2024/7/5.
// //
@@ -1,6 +1,6 @@
// //
// CustomDoctorIDTableViewCell.m // CustomDoctorIDTableViewCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/7/5. // Created by Apple on 2024/7/5.
// //
@@ -1,6 +1,6 @@
// //
// CustomHealthFileVideoCell.h // CustomHealthFileVideoCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomHealthFileVideoCell.m // CustomHealthFileVideoCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomHealthReportVideoCell.h // CustomHealthReportVideoCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomHealthReportVideoCell.m // CustomHealthReportVideoCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomMapMessageCell.h // CustomMapMessageCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/12. // Created by Apple on 2024/6/12.
// //
@@ -8,10 +8,12 @@
#import <TIMCommon/TUIBubbleMessageCell.h> #import <TIMCommon/TUIBubbleMessageCell.h>
#import <TIMCommon/TUIMessageCell.h> #import <TIMCommon/TUIMessageCell.h>
#import "CustomMapMessageCellData.h" #import "CustomMapMessageCellData.h"
#import "CustomTUIHistoryModel.h"
@interface CustomMapMessageCell : UITableViewCell @interface CustomMapMessageCell : UITableViewCell
@property (nonatomic, strong) CustomTUIHistoryModel * model;
@end @end
@@ -1,18 +1,24 @@
// //
// CustomMapMessageCell.m // CustomMapMessageCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/12. // Created by Apple on 2024/6/12.
// //
#import "CustomMapMessageCell.h" #import "CustomMapMessageCell.h"
#import<CommonCrypto/CommonDigest.h>
@interface CustomMapMessageCell () @interface CustomMapMessageCell ()
@property (nonatomic, strong) UIImageView * heardImage; @property (nonatomic, strong) UIImageView * heardImage;
@property (nonatomic, strong) UILabel * connetLabel; @property (nonatomic, strong) UILabel * nickNameLabel;
@property (nonatomic, strong) UILabel * myTextLabel; // 展示文本
@property (nonatomic, strong) UIImageView * mapImage; //
@property (nonatomic, strong) UIView * backView;
@end @end
@@ -45,9 +51,10 @@
- (void)createUI { - (void)createUI {
self.heardImage = [[UIImageView alloc] init]; self.heardImage = [[UIImageView alloc] init];
self.heardImage.backgroundColor = KRedColor; self.heardImage.backgroundColor = KWhiteColor;
self.heardImage.image = [UIImage imageNamed:@"heard_man"];
[self.contentView addSubview:self.heardImage]; [self.contentView addSubview:self.heardImage];
self.heardImage.layer.cornerRadius = 15; self.heardImage.layer.cornerRadius = 20;
self.heardImage.layer.masksToBounds = true; self.heardImage.layer.masksToBounds = true;
[self.heardImage mas_makeConstraints:^(MASConstraintMaker *make) { [self.heardImage mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -56,20 +63,174 @@
make.height.width.mas_equalTo(@30); make.height.width.mas_equalTo(@30);
}]; }];
self.connetLabel = [[UILabel alloc] init]; self.nickNameLabel = [[UILabel alloc] init];
self.connetLabel.backgroundColor = KRedColor; self.nickNameLabel.text = @"全科医生";
[self.contentView addSubview:self.heardImage]; [self.contentView addSubview:self.nickNameLabel];
self.connetLabel.layer.cornerRadius = 10; self.nickNameLabel.font = SYSTEMFONT(12);
self.connetLabel.layer.masksToBounds = true; [self.nickNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
self.connetLabel.numberOfLines = 0;
[self.connetLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.heardImage.right).offset(8); make.left.mas_equalTo(self.heardImage.mas_right).offset(10);
make.top.mas_equalTo(@10); make.top.mas_equalTo(@10);
make.width.mas_equalTo(@245.0); make.width.mas_equalTo(@300.0);
make.height.mas_offset(13);
}]; }];
[self.connetLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
//姓名
self.backView = [[UIView alloc] init];
self.backView.layer.cornerRadius = 10;
self.backView.backgroundColor = KWhiteColor;
[self.contentView addSubview:self.backView];
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.heardImage.mas_right).offset(10);
make.width.mas_offset(245);
make.top.mas_equalTo(self.nickNameLabel.mas_bottom).offset(8);
make.height.mas_offset(170);
}];
self.myTextLabel = [[UILabel alloc] init];
self.myTextLabel.font = SYSTEMFONT(15);
self.myTextLabel.textColor = CFontColor1;
self.myTextLabel.text = @"我的位置";
[self.backView addSubview:self.myTextLabel];
[self.myTextLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_offset(10);
make.top.mas_offset(0);
make.right.mas_offset(-10);
make.height.mas_offset(25);
}];
self.mapImage = [[UIImageView alloc] init];
self.mapImage.backgroundColor = KRedColor;
[self.backView addSubview:self.mapImage];
[self.mapImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_offset(0);
make.top.mas_equalTo(self.myTextLabel.mas_bottom);
}];
}
- (void)setModel:(CustomTUIHistoryModel *)model {
_model = model;
// self.nickNameLabel.text = _model.fromAccountName;
if (_model.isSelf == true) { //头像在右
[self.heardImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.width.mas_offset(40);
make.top.mas_equalTo(@10);
make.right.mas_equalTo(self.contentView.mas_right).offset(-10);
}];
self.nickNameLabel.textAlignment = NSTextAlignmentRight;
[self.nickNameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.heardImage.mas_left).offset(-10);
make.top.mas_equalTo(@10);
make.width.mas_equalTo(@245.0);
make.height.mas_offset(13);
}];
[self.backView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.nickNameLabel.mas_bottom).offset(8);
make.width.mas_offset(245);
make.right.mas_equalTo(self.heardImage.mas_left).offset(-10);
make.height.mas_equalTo(@170);
}];
}else
{
[self.heardImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(@15);
make.top.mas_equalTo(@8);
make.height.width.mas_equalTo(@40);
}];
self.nickNameLabel.textAlignment = NSTextAlignmentLeft;
[self.nickNameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.heardImage.mas_right).offset(10);
make.top.mas_equalTo(@10);
make.width.mas_equalTo(@300.0);
make.height.mas_offset(13);
}];
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.heardImage.mas_right).offset(10);
make.width.mas_offset(245);
make.top.mas_equalTo(self.nickNameLabel.mas_bottom).offset(8);
make.height.mas_offset(170);
}];
}
[self.contentView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.left.right.mas_equalTo(@0);
make.bottom.mas_equalTo(self.backView.mas_bottom).offset(10);
}];
NSString * MapPictureImg = [self mapLocationImage:_model.Longitude Withlation:_model.Latitude];
[self.mapImage sd_setImageWithURL:[NSURL URLWithString:MapPictureImg] placeholderImage:nil];
NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,_model.avatar];
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:PLACEHOLD_IMG];
}
- (NSString *)mapLocationImage:(CGFloat)longLation Withlation:(CGFloat)lation {
// 0: self.longLation,self.lation
//https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png
NSString * staciUrl = @"https://restapi.amap.com/v3/staticmap?key=e9926badd26aaa766d13439c88a83f2d";
NSString * mapKey = @"e9926badd26aaa766d13439c88a83f2d";
NSString * loctaionUrl = @"https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
NSString * needMdString = [NSString stringWithFormat:@"key=%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15124d58f7223ac9738312a8d187a21f2b",mapKey,longLation,lation,loctaionUrl,longLation,lation];
NSString * mapUrl = [NSString stringWithFormat:@"%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15&sig=%@",staciUrl,longLation,lation,loctaionUrl,longLation,lation,[self md5:needMdString]];
return mapUrl;
}
//md加密
- (NSString *)md5:(NSString *)str
{
const char *cStr = [str UTF8String];
unsigned char result[16];
CC_MD5(cStr, strlen(cStr), result); // This is the md5 call
return [NSString stringWithFormat:
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
result[0], result[1], result[2], result[3],
result[4], result[5], result[6], result[7],
result[8], result[9], result[10], result[11],
result[12], result[13], result[14], result[15]
];
} }
@@ -1,6 +1,6 @@
// //
// CustomReviceTableViewCell.h // CustomReviceTableViewCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/7/5. // Created by Apple on 2024/7/5.
// //
@@ -1,6 +1,6 @@
// //
// CustomReviceTableViewCell.m // CustomReviceTableViewCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/7/5. // Created by Apple on 2024/7/5.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemImageCell.h // CustomSystemImageCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemImageCell.m // CustomSystemImageCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemTextCell.h // CustomSystemTextCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemTextCell.m // CustomSystemTextCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemVideoCell.h // CustomSystemVideoCell.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomSystemVideoCell.m // CustomSystemVideoCell.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/14. // Created by Apple on 2024/6/14.
// //
@@ -1,6 +1,6 @@
// //
// CustomMapMessageCellData.h // CustomMapMessageCellData.h
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/12. // Created by Apple on 2024/6/12.
// //
@@ -1,6 +1,6 @@
// //
// CustomMapMessageCellData.m // CustomMapMessageCellData.m
// EscortProject // XinjiangProject
// //
// Created by Apple on 2024/6/12. // Created by Apple on 2024/6/12.
// //
@@ -27,11 +27,11 @@
+ (NSString *)mapLocationImage:(CGFloat)longLation Withlation:(CGFloat)lation { + (NSString *)mapLocationImage:(CGFloat)longLation Withlation:(CGFloat)lation {
// 0: self.longLation,self.lation // 0: self.longLation,self.lation
//https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png //https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png
NSString * staciUrl = @"https://restapi.amap.com/v3/staticmap?key=9e4aac9a04b8296e9039adce3b472f28"; NSString * staciUrl = @"https://restapi.amap.com/v3/staticmap?key=e9926badd26aaa766d13439c88a83f2d";
NSString * mapKey = @"9e4aac9a04b8296e9039adce3b472f28"; NSString * mapKey = @"e9926badd26aaa766d13439c88a83f2d";
NSString * loctaionUrl = @"https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png"; NSString * loctaionUrl = @"https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
NSString * needMdString = [NSString stringWithFormat:@"key=%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=154985aa1abb49ce2daa20d032a374eb58",mapKey,longLation,lation,loctaionUrl,longLation,lation]; NSString * needMdString = [NSString stringWithFormat:@"key=%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15124d58f7223ac9738312a8d187a21f2b",mapKey,longLation,lation,loctaionUrl,longLation,lation];
NSString * mapUrl = [NSString stringWithFormat:@"%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15&sig=%@",staciUrl,longLation,lation,loctaionUrl,longLation,lation,[self md5:needMdString]]; NSString * mapUrl = [NSString stringWithFormat:@"%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15&sig=%@",staciUrl,longLation,lation,loctaionUrl,longLation,lation,[self md5:needMdString]];
@@ -1,16 +0,0 @@
//
// LoginFoundPasswordViewController.h
// EscortProject
//
// Created by 仁康信息 on 2023/5/22.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface LoginFoundPasswordViewController : HQBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -1,18 +0,0 @@
//
// LoginSetPasswordViewController.h
// EscortProject
//
// Created by 仁康信息 on 2023/5/22.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface LoginSetPasswordViewController : HQBaseViewController
@property (nonatomic, copy) NSString * result;
@end
NS_ASSUME_NONNULL_END
@@ -1,6 +1,6 @@
// //
// IMUserInfoModel.h // IMUserInfoModel.h
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/6/29. // Created by 仁康信息 on 2023/6/29.
// //
@@ -1,6 +1,6 @@
// //
// IMUserInfoModel.m // IMUserInfoModel.m
// EscortProject // XinjiangProject
// //
// Created by 仁康信息 on 2023/6/29. // Created by 仁康信息 on 2023/6/29.
// //
@@ -0,0 +1,16 @@
//
// XJLoginFoundPasswordViewController.h
// XinjiangProject
//
// Created by 仁康信息 on 2023/5/22.
//
#import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJLoginFoundPasswordViewController : XJBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -1,25 +1,23 @@
// //
// LoginFoundPasswordViewController.m // XJLoginFoundPasswordViewController.m
// EscortProject // XinjiangProject
// //
// Created by on 2023/5/22. // Created by on 2023/5/22.
// //
#import "LoginFoundPasswordViewController.h" #import "XJLoginFoundPasswordViewController.h"
#import "LoginSetPasswordViewController.h" #import "XJLoginSetPasswordViewController.h"
#import "LVKeyboard.h" #import "JXIDNumTextField.h"
#import "MQTextField.h" @interface XJLoginFoundPasswordViewController ()<UITextFieldDelegate>
@interface LoginFoundPasswordViewController ()<LVKeyboardDelegate,UITextFieldDelegate>
@property (nonatomic, strong)UITextField * nameTextFild; @property (nonatomic, strong)UITextField * nameTextFild;
@property (nonatomic, strong)UITextField * phoneTextFild; @property (nonatomic, strong)UITextField * phoneTextFild;
@property (nonatomic, strong)MQTextField * codeTextFild; @property (nonatomic, strong)JXIDNumTextField * codeTextFild;
@property (nonatomic, strong)UIButton * codeButton; @property (nonatomic, strong)UIButton * codeButton;
@property (nonatomic, strong) LVKeyboard *keyboard;
@end @end
@implementation LoginFoundPasswordViewController @implementation XJLoginFoundPasswordViewController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
@@ -33,10 +31,6 @@
- (void)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))]; UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(151))];
topView.backgroundColor = KWhiteColor; topView.backgroundColor = KWhiteColor;
@@ -76,12 +70,11 @@
[codeLeft addSubview:codeLabel]; [codeLeft addSubview:codeLabel];
self.codeTextFild = [[MQTextField alloc] initWithFrame:CGRectMake(0, self.nameTextFild.bottom+1, kScreenWidth, kRealValue(50))]; self.codeTextFild = [[JXIDNumTextField alloc] initWithFrame:CGRectMake(0, self.nameTextFild.bottom+1, kScreenWidth, kRealValue(50))];
self.codeTextFild.placeholder = @"请输入用户身份证号"; self.codeTextFild.placeholder = @"请输入用户身份证号";
self.codeTextFild.font = [UIFont systemFontOfSize:14]; self.codeTextFild.font = [UIFont systemFontOfSize:14];
self.codeTextFild.backgroundColor = KWhiteColor; self.codeTextFild.backgroundColor = KWhiteColor;
self.codeTextFild.inputView = self.keyboard; // self.codeTextFild.delegate = self;
self.codeTextFild.delegate = self;
self.codeTextFild.leftView = codeLeft; self.codeTextFild.leftView = codeLeft;
self.codeTextFild.leftViewMode = UITextFieldViewModeAlways; self.codeTextFild.leftViewMode = UITextFieldViewModeAlways;
[topView addSubview:self.codeTextFild]; [topView addSubview:self.codeTextFild];
@@ -146,7 +139,7 @@
[parmDic setObject:self.codeTextFild.text forKey:@"idCard"]; [parmDic setObject:self.codeTextFild.text forKey:@"idCard"];
[parmDic setObject:self.phoneTextFild.text forKey:@"phone"]; [parmDic setObject:self.phoneTextFild.text forKey:@"phone"];
JKCQAPI * chageApi = [[JKCQAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""]; XJPNetAPI * chageApi = [[XJPNetAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""];
[chageApi postSetUserPassword:parmDic]; [chageApi postSetUserPassword:parmDic];
@@ -167,7 +160,7 @@
[self hiddenAllMBProgressHUD]; [self hiddenAllMBProgressHUD];
NSString * result = response; NSString * result = response;
LoginSetPasswordViewController * password = [[LoginSetPasswordViewController alloc] init]; XJLoginSetPasswordViewController * password = [[XJLoginSetPasswordViewController alloc] init];
password.result = result; password.result = result;
[self.navigationController pushViewController:password animated:YES]; [self.navigationController pushViewController:password animated:YES];
} }
@@ -179,24 +172,12 @@
if(textField == self.codeTextFild) { if(textField == self.codeTextFild) {
self.codeTextFild.inputView = self.keyboard; // self.codeTextFild.inputView = self.keyboard;
} }
return YES; 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 #pragma mark - Navigation
@@ -0,0 +1,18 @@
//
// XJLoginSetPasswordViewController.h
// XinjiangProject
//
// Created by 仁康信息 on 2023/5/22.
//
#import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJLoginSetPasswordViewController : XJBaseViewController
@property (nonatomic, copy) NSString * result;
@end
NS_ASSUME_NONNULL_END
@@ -1,15 +1,15 @@
// //
// LoginSetPasswordViewController.m // XJLoginSetPasswordViewController.m
// EscortProject // XinjiangProject
// //
// Created by on 2023/5/22. // Created by on 2023/5/22.
// //
#import "LoginSetPasswordViewController.h" #import "XJLoginSetPasswordViewController.h"
#import "RSAObjC.h" #import "RSAObjC.h"
#import "HQLoginViewController.h" #import "XJLoginViewController.h"
@interface LoginSetPasswordViewController () @interface XJLoginSetPasswordViewController ()
@property (nonatomic, strong) UITextField * phoneTextFild; @property (nonatomic, strong) UITextField * phoneTextFild;
@property (nonatomic, strong) UITextField * codeTextFild; @property (nonatomic, strong) UITextField * codeTextFild;
@@ -19,7 +19,7 @@
@end @end
@implementation LoginSetPasswordViewController @implementation XJLoginSetPasswordViewController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
@@ -169,7 +169,7 @@
[parmDic setObject:encryptStr forKey:@"newPasswordConfirm"]; [parmDic setObject:encryptStr forKey:@"newPasswordConfirm"];
[parmDic setObject:self.result forKey:@"resetCode"]; [parmDic setObject:self.result forKey:@"resetCode"];
JKCQAPI * chageApi = [[JKCQAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""]; XJPNetAPI * chageApi = [[XJPNetAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""];
[chageApi postResetUserNewPassword:parmDic]; [chageApi postResetUserNewPassword:parmDic];
@@ -0,0 +1,16 @@
//
// XJLoginTopChangeViewController.h
// XinjiangProject
//
// Created by Apple on 2025/10/31.
//
#import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJLoginTopChangeViewController : XJBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,891 @@
//
// XJLoginTopChangeViewController.m
// XinjiangProject
//
// Created by Apple on 2025/10/31.
//
#import "XJLoginTopChangeViewController.h"
#import "TUIC2CChatViewController.h"
#import "XJLoginFoundPasswordViewController.h"
#import "IMUserInfoModel.h"
#import "RSAObjC.h"
#import "XJMineCenterUserModel.h"
#import "ADJumpViewController.h"
#import "XJRegisterViewController.h"
#import "LVKeyboard.h"
#import "MQTextField.h"
#import "XJTYFoundPassWordViewController.h"
#import "SimulationViewController.h"
@interface XJLoginTopChangeViewController ()<V2TIMSDKListener,V2TIMSDKListener,LVKeyboardDelegate,UITextFieldDelegate>
@property (nonatomic, strong) UITextField * userNameField;
@property (nonatomic, strong) MQTextField * passwordField;
@property (nonatomic, strong) UIButton * logoBtn;
@property (nonatomic, strong) UIView * loginView;
@property (nonatomic, strong) UIButton * privacyPolicyBtn;
@property (nonatomic, strong) UIButton * agreenBtn;
@property (nonatomic, strong) IMUserInfoModel * model ;
@property (nonatomic, strong) NSMutableArray * dataArray;
@property (nonatomic, strong) UIButton * regisBtn;
@property (nonatomic, strong) LVKeyboard *keyboard;
@property (nonatomic, strong) UIButton *toggleButton;
@property (nonatomic, strong) UIButton * leftLoginBtn;
@property (nonatomic, strong) UIButton * rightLoginBtn;
@property (nonatomic, assign) NSInteger loginType;
@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
- (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.loginType = 1;
[self setNeedsStatusBarAppearanceUpdate];
//初始化键盘
LVKeyboard *keyboard = [[LVKeyboard alloc] init];
keyboard.delegate = self;
self.keyboard = keyboard;
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
- (void)createUI {
UIImageView * topBackImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(251))];
topBackImg.image = IMAGE_NAMED(@"XJLoginTopImg");
topBackImg.userInteractionEnabled = true;
[self.view addSubview:topBackImg];
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欢迎使用 健康油我";
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
style.lineSpacing = 6; // 设置行间距为10
style.alignment = NSTextAlignmentLeft;
NSDictionary *attributes = @{
NSFontAttributeName: BOLDSYSTEMFONT(20),
NSForegroundColorAttributeName: KWhiteColor,
NSParagraphStyleAttributeName: style
};
headLab.attributedText = [[NSAttributedString alloc] initWithString:text attributes:attributes];
[self.view addSubview:headLab];
UIButton * homeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
homeBtn.frame = CGRectMake(kRealValue(15), kRealValue(40),kRealValue(100), 41);
[homeBtn setTitle:@"< 去首页" forState:UIControlStateNormal];
[homeBtn.titleLabel setFont:BOLDSYSTEMFONT(14)];
[homeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[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));
[self.view addSubview:loginView];
loginView.backgroundColor = KWhiteColor;
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:loginView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(16, 16)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.path = maskPath.CGPath;
loginView.layer.mask = maskLayer;
self.loginView = loginView;
// 新增切换逻辑
// 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];
//
//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];
UITextField *accountField = [[UITextField alloc]init];
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 = 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)];
userLeftImg.image = [UIImage imageNamed:@"userInputLeftImg"];
[leftview addSubview:userLeftImg];
self.userNameField.leftView = leftview;
self.userNameField.leftViewMode = UITextFieldViewModeAlways;
self.userNameField.autocapitalizationType = UITextAutocapitalizationTypeNone;
[loginView addSubview:accountField ];
//
//
MQTextField * passwordField = [[MQTextField alloc]init];
passwordField.frame = CGRectMake(kRealValue(25), 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;
UIView * passLeftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 48)];
UIImageView * passLeftImg = [[UIImageView alloc] initWithFrame:CGRectMake(16, 14, 20, 20)];
passLeftImg.image = [UIImage imageNamed:@"passLockImg"];
[passLeftview addSubview:passLeftImg];
self.passwordField.leftView = passLeftview;
self.passwordField.leftViewMode = UITextFieldViewModeAlways;
self.passwordField.layer.cornerRadius = 8;
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, 9, 30,30);
[self.toggleButton addTarget:self action:@selector(togglePasswordVisibility) forControlEvents:UIControlEventTouchUpInside];
// 创建一个容器视图来包含按钮,并增加边距
UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 48)];
[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(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 = 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(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];
NSUserDefaults * agreeDefaul = [NSUserDefaults standardUserDefaults];
NSString * agree = [agreeDefaul objectForKey:@"LOGINAgree"];
//隐私
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);
yslabel.textAlignment = NSTextAlignmentCenter;
[self.view addSubview:yslabel];
[yslabel mas_makeConstraints:^(MASConstraintMaker *make) {
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️⃣ 给整段文字设置默认样式(灰色)
attributed.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular];
attributed.color = UIColorHex(#B6B6B6); // 默认灰色
[attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#2EB8B2) range:[string rangeOfString:@"用户协议"]];
[attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#2EB8B2) range:[string rangeOfString:@"隐私政策"]];
YYTextHighlight * protocolHightlight = [[YYTextHighlight alloc] init];
protocolHightlight.userInfo = @{@"协议":@"用户协议"};
[protocolHightlight setColor:UIColorHex(#2EB8B2)];
[attributed setTextHighlight:protocolHightlight range:[string rangeOfString:@"用户协议"]];
YYTextHighlight * layHightlight = [[YYTextHighlight alloc] init];
layHightlight.userInfo = @{@"隐私":@"隐私政策"};
[layHightlight setColor:UIColorHex(#2EB8B2)];
[attributed setTextHighlight:layHightlight range:[string rangeOfString:@"隐私政策"]];
attributed.lineSpacing = 3;
attributed.paragraphSpacing = 5;
yslabel.attributedText = attributed;
yslabel.highlightTapAction = ^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
NSString *string = [text.string substringWithRange:range];
if ([string containsString:@"用户协议"]){
if (self.dataArray.count <= 0) {
[EasyTextView showErrorText:@"暂无用户协议"];
return;
}
for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 1) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
webVC.webTitle = @"用户协议";
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
if ([string containsString:@"隐私政策"]){
if (self.dataArray.count <= 0) {
[EasyTextView showErrorText:@"暂无隐私政策"];
return;
}
for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 2) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
webVC.webTitle = @"隐私政策";
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
if ([string containsString:@"相关法律说明"]){
for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 3) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
webVC.webTitle = @"相关法律说明";
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
};
//底部切换
self.bottomChangeBtn = [[UIButton alloc] init];
[self.bottomChangeBtn setTitle:@"非掌油用户登录入口" forState:UIControlStateNormal];
[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;
}
- (void)createData {
XJPNetAPI * agreeAPI = [[XJPNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
[agreeAPI getUserAgreementPrivacy:nil];
}
#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 < 1) {
[EasyTextView showErrorText:@"请输入密码"];
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";
// 原始数据,要加密的字符串
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"];
[parmDic setObject:encryptStr forKey:@"password"];
//新增
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"];
//统一平台登录
if (self.loginType == 1) {
XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil];
[proctocolApi healthAccountLogin:parmDic];
}
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;
// }
XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil];
[proctocolApi PostLogin:parmDic];
}
}
#pragma mark -网络请求处理
- (void)Failed:(NSString*)message tag:(NSString*)tag
{
[self hiddenAllMBProgressHUD];
[EasyTextView showErrorText:message];
// [self showMBProgressHUDOnlyWithString:message];
}
- (void)Sucess:(id)response tag:(NSString*)tag
{
if ([tag isEqualToString:@"LOGINGAPI"]) {
[self hiddenAllMBProgressHUD];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AVATAR"];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"placeholdImg"];
NSDictionary * dic = response;
HQUserInfo * user = [[HQUserInfo alloc] init];
id (^safeValue)(id obj) = ^id(id obj) {
return (obj && ![obj isKindOfClass:[NSNull class]]) ? obj : nil;
};
NSDictionary *userInfo = safeValue(dic[@"userInfo"]);
if ([userInfo isKindOfClass:[NSDictionary class]]) {
user.userInfo = userInfo;
}
NSString *token = safeValue(dic[@"token"]);
if ([token isKindOfClass:[NSString class]]) {
user.token = token;
}
[HQCommonUtils keyedArchiverWithData:user key:LoginUserInfo];
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSString * avatar = @"";
NSString * placeholdImg ;
if (!ValidStr(user.avatar) && ![user.avatar isEqualToString:ResourceAddress]) {
avatar = user.avatar;
}else
{
if ([user.sex_dictText isEqualToString:@""]) {
placeholdImg = @"heard_woman";
}else
{
placeholdImg = @"heard_man";
}
}
if (ValidStr(user.personType) || [user.personType intValue] != 1 ) {
[self showMBProgressHUDOnlyWithString:@"账号或登录密码错误,请重试"];
return;
}
[[NSUserDefaults standardUserDefaults] setObject:avatar forKey:@"AVATAR"];
[[NSUserDefaults standardUserDefaults] setObject:placeholdImg forKey:@"placeholdImg"];
[[NSUserDefaults standardUserDefaults] synchronize];
KPostNotification(KNotificationLoginStateChange, @YES);
#if DEBUG
[self loginImAccount];
#else
[self loginImAccount];
#endif
}
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<V2TIMSDKListener> 的实现类,如果您不需要监听 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];
}
if ([tag isEqualToString:@"AGREEAPI"]) {
NSArray * array = response;
for (NSDictionary * parmDic in array) {
XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
https://api.cqygjk.com/health-consultation/api/consult/conDoctor/selectDictList?dictKey=qh_jump_url
[self.dataArray addObject:model];
}
}
if ([tag isEqualToString:@"VERSIONAPI"]) {
NSString * version = response;
NSBundle *mainBundle = [NSBundle mainBundle];
if (mainBundle) {
NSString *version = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
// NSString *build = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
// NSString *displayName = [mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
// NSString *fullVersion = [NSString stringWithFormat:@"%@ %@ (Build %@)", displayName, version, build];
if([version floatValue] < [version floatValue]) {
self.regisBtn.hidden = true;
}else
{
self.regisBtn.hidden = false;
}
}
}
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);
}
}
- (void)backHomeAction {
KPostNotification(KNotificationLoginStateChange, @YES);
}
- (void)loginImAccount {
XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
[proctocolApi GetIMLoginAccount:nil];
}
//建议整体禁用(复制、粘贴、全选等都被禁用了)
-(BOOL)canPerformAction:(SEL)action withSender:(id)sender{
UIMenuController *menuController = [UIMenuController sharedMenuController];
if (menuController) {
[UIMenuController sharedMenuController].menuVisible = NO;
}
return NO;
}
- (void)agreeProtocolAction:(UIButton *)agreeBtn {
agreeBtn.selected = !agreeBtn.selected;
}
#pragma mark:找回密码
- (void)foundUserPasswordAction {
// GastoremteroscopeViewController * resultAppointVC = [[GastoremteroscopeViewController alloc] init];
// [self.navigationController pushViewController:resultAppointVC animated:YES];
if (self.loginType == 1) { //统一平台找回密码
XJTYFoundPassWordViewController * xjVC = [[XJTYFoundPassWordViewController alloc] init];
xjVC.webUrl = @"https://sso.iosp.ydpt.tech/SSOManageClient/userController/changePassword";
[self.navigationController pushViewController:xjVC animated:YES];
}else
{
XJLoginFoundPasswordViewController * foundVC = [[XJLoginFoundPasswordViewController alloc] init];
[self.navigationController pushViewController:foundVC animated:YES];
}
}
- (void)ishiderRegisData {
XJPNetAPI * versionAPI = [[XJPNetAPI alloc] init:self tag:@"VERSIONAPI" NeedToken:@""];
[versionAPI getVesionHideRegis:@{@"type":@"app_update_user_ios"}.mutableCopy];
}
#pragma mark:注册
- (void)regisAction {
XJRegisterViewController * forgetVc = [[XJRegisterViewController 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];
}
- (void)togglePasswordVisibility {
self.passwordField.secureTextEntry = !self.passwordField.secureTextEntry;
self.toggleButton.selected = !self.toggleButton.selected;
}
#pragma mark:顶部点击
- (void)accountLoginTypeClick {
self.loginType = 1;
self.leftLoginBtn.selected = true;
self.rightLoginBtn.selected = false;
[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
@@ -1,15 +1,15 @@
// //
// HQLoginViewController.h // XJLoginViewController.h
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/16. // Created by xulei on 2022/8/16.
// //
#import "HQBaseViewController.h" #import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface HQLoginViewController : HQBaseViewController @interface XJLoginViewController : XJBaseViewController
@end @end
@@ -5,17 +5,19 @@
// Created by xulei on 2022/8/16. // Created by xulei on 2022/8/16.
// //
#import "HQLoginViewController.h" #import "XJLoginViewController.h"
#import "TUIC2CChatViewController.h" #import "TUIC2CChatViewController.h"
#import "LoginFoundPasswordViewController.h" #import "XJLoginFoundPasswordViewController.h"
#import "IMUserInfoModel.h" #import "IMUserInfoModel.h"
#import "RSAObjC.h" #import "RSAObjC.h"
#import "MineCenterUserModel.h" #import "XJMineCenterUserModel.h"
#import "ADJumpViewController.h" #import "ADJumpViewController.h"
#import "HQRegisterViewController.h" #import "XJRegisterViewController.h"
#import "LVKeyboard.h" #import "LVKeyboard.h"
#import "MQTextField.h" #import "MQTextField.h"
@interface HQLoginViewController ()<V2TIMSDKListener,V2TIMSDKListener,LVKeyboardDelegate,UITextFieldDelegate> #import "XJTYFoundPassWordViewController.h"
@interface XJLoginViewController ()<V2TIMSDKListener,V2TIMSDKListener,LVKeyboardDelegate,UITextFieldDelegate>
@property (nonatomic, strong) UITextField * userNameField; @property (nonatomic, strong) UITextField * userNameField;
@@ -41,7 +43,7 @@
@end @end
@implementation HQLoginViewController @implementation XJLoginViewController
- (NSMutableArray *)dataArray { - (NSMutableArray *)dataArray {
@@ -116,6 +118,7 @@
UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)]; UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)];
self.userNameField.leftView = leftview; self.userNameField.leftView = leftview;
self.userNameField.leftViewMode = UITextFieldViewModeAlways; self.userNameField.leftViewMode = UITextFieldViewModeAlways;
self.userNameField.autocapitalizationType = UITextAutocapitalizationTypeNone;
[loginView addSubview:accountField ]; [loginView addSubview:accountField ];
// //
// //
@@ -240,7 +243,7 @@
[EasyTextView showErrorText:@"暂无用户协议"]; [EasyTextView showErrorText:@"暂无用户协议"];
return; return;
} }
for (MineCenterUserModel * model in self.dataArray) { for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 1) { if ([model.value integerValue] == 1) {
@@ -258,7 +261,7 @@
[EasyTextView showErrorText:@"暂无隐私政策"]; [EasyTextView showErrorText:@"暂无隐私政策"];
return; return;
} }
for (MineCenterUserModel * model in self.dataArray) { for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 2) { if ([model.value integerValue] == 2) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init]; ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
@@ -269,7 +272,7 @@
} }
} }
if ([string containsString:@"相关法律说明"]){ if ([string containsString:@"相关法律说明"]){
for (MineCenterUserModel * model in self.dataArray) { for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 3) { if ([model.value integerValue] == 3) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init]; ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
@@ -284,7 +287,7 @@
} }
- (void)createData { - (void)createData {
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""]; XJPNetAPI * agreeAPI = [[XJPNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
[agreeAPI getUserAgreementPrivacy:nil]; [agreeAPI getUserAgreementPrivacy:nil];
@@ -317,7 +320,7 @@
}]; }];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
LoginFoundPasswordViewController * modifVC = [[LoginFoundPasswordViewController alloc] init]; XJLoginFoundPasswordViewController * modifVC = [[XJLoginFoundPasswordViewController alloc] init];
[self.navigationController pushViewController:modifVC animated:YES]; [self.navigationController pushViewController:modifVC animated:YES];
}]; }];
@@ -359,7 +362,7 @@
[parmDic setObject:encryptStr forKey:@"password"]; [parmDic setObject:encryptStr forKey:@"password"];
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil]; XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil];
[proctocolApi PostLogin:parmDic]; [proctocolApi PostLogin:parmDic];
// //
@@ -402,15 +405,15 @@
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
NSString * avatar = @""; NSString * avatar = @"";
NSString * placeholdImg ; NSString * placeholdImg ;
if (!ValidStr(user.avatar)) { if (!ValidStr(user.avatar) && ![user.avatar isEqualToString:ResourceAddress]) {
avatar = user.avatar; avatar = user.avatar;
}else }else
{ {
if ([user.sex_dictText isEqualToString:@""]) { if ([user.sex_dictText isEqualToString:@""]) {
placeholdImg = @"heard_man"; placeholdImg = @"heard_woman";
}else }else
{ {
placeholdImg = @"heard_woman"; placeholdImg = @"heard_man";
} }
} }
if (ValidStr(user.personType) || [user.personType intValue] != 1 ) { if (ValidStr(user.personType) || [user.personType intValue] != 1 ) {
@@ -423,8 +426,14 @@
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
KPostNotification(KNotificationLoginStateChange, @YES); KPostNotification(KNotificationLoginStateChange, @YES);
//im #if DEBUG
[self loginImAccount]; [self loginImAccount];
#else
[self loginImAccount];
#endif
} }
if ([tag isEqualToString:@"IMAPI"]) { if ([tag isEqualToString:@"IMAPI"]) {
@@ -456,7 +465,7 @@
for (NSDictionary * parmDic in array) { for (NSDictionary * parmDic in array) {
MineCenterUserModel * model = [MineCenterUserModel modelWithDictionary:parmDic]; XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
https://api.cqygjk.com/health-consultation/api/consult/conDoctor/selectDictList?dictKey=qh_jump_url https://api.cqygjk.com/health-consultation/api/consult/conDoctor/selectDictList?dictKey=qh_jump_url
[self.dataArray addObject:model]; [self.dataArray addObject:model];
@@ -495,7 +504,7 @@
- (void)loginImAccount { - (void)loginImAccount {
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
[proctocolApi GetIMLoginAccount:nil]; [proctocolApi GetIMLoginAccount:nil];
@@ -521,7 +530,7 @@
- (void)foundUserPasswordAction { - (void)foundUserPasswordAction {
// GastoremteroscopeViewController * resultAppointVC = [[GastoremteroscopeViewController alloc] init]; // GastoremteroscopeViewController * resultAppointVC = [[GastoremteroscopeViewController alloc] init];
// [self.navigationController pushViewController:resultAppointVC animated:YES]; // [self.navigationController pushViewController:resultAppointVC animated:YES];
LoginFoundPasswordViewController * foundVC = [[LoginFoundPasswordViewController alloc] init]; XJLoginFoundPasswordViewController * foundVC = [[XJLoginFoundPasswordViewController alloc] init];
[self.navigationController pushViewController:foundVC animated:YES]; [self.navigationController pushViewController:foundVC animated:YES];
} }
@@ -529,7 +538,7 @@
- (void)ishiderRegisData { - (void)ishiderRegisData {
JKCQAPI * versionAPI = [[JKCQAPI alloc] init:self tag:@"VERSIONAPI" NeedToken:@""]; XJPNetAPI * versionAPI = [[XJPNetAPI alloc] init:self tag:@"VERSIONAPI" NeedToken:@""];
[versionAPI getVesionHideRegis:@{@"type":@"app_update_user_ios"}.mutableCopy]; [versionAPI getVesionHideRegis:@{@"type":@"app_update_user_ios"}.mutableCopy];
@@ -539,7 +548,7 @@
#pragma mark:注册 #pragma mark:注册
- (void)regisAction { - (void)regisAction {
HQRegisterViewController * forgetVc = [[HQRegisterViewController alloc] init]; XJRegisterViewController * forgetVc = [[XJRegisterViewController alloc] init];
[self presentViewController:forgetVc animated:YES completion:nil]; [self presentViewController:forgetVc animated:YES completion:nil];
} }
@@ -0,0 +1,16 @@
//
// XJTYFoundPassWordViewController.h
// XinjiangProject
//
// Created by Apple on 2025/11/21.
//
#import "XJBaseWebViewVC.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJTYFoundPassWordViewController : XJBaseWebViewVC
@end
NS_ASSUME_NONNULL_END
@@ -1,21 +1,23 @@
// //
// DownPDFFileVC.m // XJTYFoundPassWordViewController.m
// EscortProject // XinjiangProject
// //
// Created by on 2023/12/1. // Created by Apple on 2025/11/21.
// //
#import "DownPDFFileVC.h" #import "XJTYFoundPassWordViewController.h"
@interface DownPDFFileVC () @interface XJTYFoundPassWordViewController ()
@end @end
@implementation DownPDFFileVC @implementation XJTYFoundPassWordViewController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.isHidenNaviBar = false;
} }
/* /*
@@ -1,16 +0,0 @@
//
// HQRegisterViewController.h
// healthQuestion
//
// Created by xulei on 2022/8/17.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface HQRegisterViewController : HQBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,16 @@
//
// XJRegisterViewController.h
// healthQuestion
//
// Created by xulei on 2022/8/17.
//
#import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJRegisterViewController : XJBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -1,15 +1,15 @@
// //
// HQRegisterViewController.m // XJRegisterViewController.m
// healthQuestion // healthQuestion
// //
// Created by xulei on 2022/8/17. // Created by xulei on 2022/8/17.
// //
#import "HQRegisterViewController.h" #import "XJRegisterViewController.h"
#import "ADJumpViewController.h" #import "ADJumpViewController.h"
#import "MineCenterUserModel.h" #import "XJMineCenterUserModel.h"
@interface HQRegisterViewController ()<UITextFieldDelegate> @interface XJRegisterViewController ()<UITextFieldDelegate>
@property (nonatomic, strong)UITextField * phoneTextField; @property (nonatomic, strong)UITextField * phoneTextField;
@property (nonatomic, strong)UITextField * codeTextField; @property (nonatomic, strong)UITextField * codeTextField;
@@ -22,7 +22,7 @@
@end @end
@implementation HQRegisterViewController @implementation XJRegisterViewController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
@@ -116,7 +116,7 @@
#pragma mark - 获取协议 #pragma mark - 获取协议
- (void)getUserProtocol { - (void)getUserProtocol {
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""]; XJPNetAPI * agreeAPI = [[XJPNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
[agreeAPI getUserAgreementPrivacy:nil]; [agreeAPI getUserAgreementPrivacy:nil];
} }
@@ -173,7 +173,7 @@
for (NSDictionary * parmDic in array) { for (NSDictionary * parmDic in array) {
MineCenterUserModel * model = [MineCenterUserModel modelWithDictionary:parmDic]; XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
if ([model.value integerValue] == 1) { if ([model.value integerValue] == 1) {
self.protocolString = model.text; self.protocolString = model.text;
} }
@@ -1,21 +0,0 @@
//
// AddContactViewController.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/27.
//
#import "HQBaseViewController.h"
#import "EmergencyContactModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface AddContactViewController : HQBaseViewController
@property (nonatomic, copy) NSString * contact_id;
@property (nonatomic, strong) EmergencyContactModel * model;
@end
NS_ASSUME_NONNULL_END
@@ -1,16 +0,0 @@
//
// EditSystemViewController.h
// EscortProject
//
// Created by 仁康信息 on 2024/1/10.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface EditSystemViewController : HQBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -1,18 +0,0 @@
//
// MinePictureRecordViewController.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/25.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface MinePictureRecordViewController : HQBaseViewController
@property (nonatomic, assign) NSInteger selectOnes;
@end
NS_ASSUME_NONNULL_END
@@ -1,16 +0,0 @@
//
// MineUserInfoViewController.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/26.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface MineUserInfoViewController : HQBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -1,19 +0,0 @@
//
// MineVideoRecordViewController.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/25.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface MineVideoRecordViewController : HQBaseViewController
@property (nonatomic, assign) NSInteger selectOnes;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
//
// XJAddContactViewController.h
// XinjiangProject
//
// Created by 仁康信息 on 2023/7/27.
//
#import "XJBaseViewController.h"
#import "XJEmergencyContactModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJAddContactViewController : XJBaseViewController
@property (nonatomic, copy) NSString * contact_id;
@property (nonatomic, strong) XJEmergencyContactModel * model;
@end
NS_ASSUME_NONNULL_END
@@ -1,17 +1,16 @@
// //
// AddContactViewController.m // XJAddContactViewController.m
// EscortProject // XinjiangProject
// //
// Created by on 2023/7/27. // Created by on 2023/7/27.
// //
#import "AddContactViewController.h" #import "XJAddContactViewController.h"
#import "LineTextField.h" #import "LineTextField.h"
#import "FamilyMemberRelationModel.h" #import "FamilyMemberRelationModel.h"
#import "BRStringPickerView.h" #import "BRStringPickerView.h"
#import "AddContactViewController.h"
@interface AddContactViewController () @interface XJAddContactViewController ()
@property (nonatomic, strong) LineTextField * nameField; @property (nonatomic, strong) LineTextField * nameField;
@@ -28,7 +27,7 @@
@end @end
@implementation AddContactViewController @implementation XJAddContactViewController
- (NSMutableArray *)memberArray { - (NSMutableArray *)memberArray {
@@ -60,6 +59,7 @@
[self.view addSubview:self.nameField]; [self.view addSubview:self.nameField];
// //
self.phoneField = [self createFieldWithLeftTitle:@"手机号" withRightString:@" " placeholderStr:@"请填写手机号" isShowRight:true]; self.phoneField = [self createFieldWithLeftTitle:@"手机号" withRightString:@" " placeholderStr:@"请填写手机号" isShowRight:true];
self.phoneField.keyboardType = UIKeyboardTypeNumberPad;
self.phoneField.frame = CGRectMake(0, self.nameField.bottom, kScreenWidth, 51); self.phoneField.frame = CGRectMake(0, self.nameField.bottom, kScreenWidth, 51);
[self.view addSubview:self.phoneField]; [self.view addSubview:self.phoneField];
// //
@@ -184,7 +184,7 @@
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
[parmDic setObject:self.model.contact_ID forKey:@"id"]; [parmDic setObject:self.model.contact_ID forKey:@"id"];
JKCQAPI * memberApi = [[JKCQAPI alloc] init:self tag:@"DelectedAPI" NeedToken:@""]; XJPNetAPI * memberApi = [[XJPNetAPI alloc] init:self tag:@"DelectedAPI" NeedToken:@""];
[memberApi getDelectedEmergencyContact:parmDic]; [memberApi getDelectedEmergencyContact:parmDic];
} }
@@ -192,7 +192,7 @@
- (void)getFamilyMembers { - (void)getFamilyMembers {
JKCQAPI * memberApi = [[JKCQAPI alloc] init:self tag:@"Family" NeedToken:@""]; XJPNetAPI * memberApi = [[XJPNetAPI alloc] init:self tag:@"Family" NeedToken:@""];
[memberApi getCheckKeyResult:@{@"dictKey":@"family_member_relation"}]; [memberApi getCheckKeyResult:@{@"dictKey":@"family_member_relation"}];
@@ -216,7 +216,10 @@
FamilyMemberRelationModel * model = [FamilyMemberRelationModel modelWithDictionary:dic] ; FamilyMemberRelationModel * model = [FamilyMemberRelationModel modelWithDictionary:dic] ;
[self.memberArray addObject:model]; if(![model.title isEqualToString:@"本人"]) {
[self.memberArray addObject:model];
}
} }
} }
if ([tag isEqualToString:@"ADDAPI"]) { if ([tag isEqualToString:@"ADDAPI"]) {
@@ -237,6 +240,8 @@
- (void)relastionShipOnclick { - (void)relastionShipOnclick {
[self.view endEditing:YES];
/// 1. /// 1.
BRStringPickerView *stringPickerView = [[BRStringPickerView alloc]init]; BRStringPickerView *stringPickerView = [[BRStringPickerView alloc]init];
stringPickerView.pickerMode = BRStringPickerComponentSingle; stringPickerView.pickerMode = BRStringPickerComponentSingle;
@@ -302,7 +307,7 @@
[parmDic setObject:self.cardNumberField.text forKey:@"idCard"]; [parmDic setObject:self.cardNumberField.text forKey:@"idCard"];
[parmDic setObject:self.familyInt forKey:@"familyRelation"]; [parmDic setObject:self.familyInt forKey:@"familyRelation"];
JKCQAPI * api = [[JKCQAPI alloc] init:self tag:@"ADDAPI" NeedToken:@""]; XJPNetAPI * api = [[XJPNetAPI alloc] init:self tag:@"ADDAPI" NeedToken:@""];
[api postAddEmergencyContact:parmDic]; [api postAddEmergencyContact:parmDic];
@@ -0,0 +1,16 @@
//
// XJEditSystemViewController.h
// XinjiangProject
//
// Created by 仁康信息 on 2024/1/10.
//
#import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJEditSystemViewController : XJBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -1,16 +1,17 @@
// //
// EditSystemViewController.m // XJEditSystemViewController.m
// EscortProject // XinjiangProject
// //
// Created by on 2024/1/10. // Created by on 2024/1/10.
// //
#import "EditSystemViewController.h" #import "XJEditSystemViewController.h"
#import "LoginFoundPasswordViewController.h" #import "XJLoginFoundPasswordViewController.h"
#import "MineCenterUserModel.h" #import "XJMineCenterUserModel.h"
#import "ADJumpViewController.h" #import "ADJumpViewController.h"
#import "XJTYFoundPassWordViewController.h"
@interface EditSystemViewController ()<UITableViewDelegate,UITableViewDataSource> @interface XJEditSystemViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView * homeTableView; @property (nonatomic, strong) UITableView * homeTableView;
@@ -18,7 +19,7 @@
@end @end
@implementation EditSystemViewController @implementation XJEditSystemViewController
- (NSMutableArray *)dataArray { - (NSMutableArray *)dataArray {
@@ -56,7 +57,7 @@
- (void)createData { - (void)createData {
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""]; XJPNetAPI * agreeAPI = [[XJPNetAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
[agreeAPI getUserAgreementPrivacy:nil]; [agreeAPI getUserAgreementPrivacy:nil];
@@ -78,7 +79,7 @@
for (NSDictionary * parmDic in array) { for (NSDictionary * parmDic in array) {
MineCenterUserModel * model = [MineCenterUserModel modelWithDictionary:parmDic]; XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
[self.dataArray addObject:model]; [self.dataArray addObject:model];
@@ -188,12 +189,13 @@
if (indexPath.row == 0) { if (indexPath.row == 0) {
LoginFoundPasswordViewController * loginVC = [[LoginFoundPasswordViewController alloc] init]; XJTYFoundPassWordViewController * xjVC = [[XJTYFoundPassWordViewController alloc] init];
[self.navigationController pushViewController:loginVC animated:YES]; xjVC.webUrl = @"https://sso.iosp.ydpt.tech/SSOManageClient/userController/changePassword";
[self.navigationController pushViewController:xjVC animated:YES];
} }
if (indexPath.row == 1) { if (indexPath.row == 1) {
for (MineCenterUserModel * model in self.dataArray) { for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 1) { if ([model.value integerValue] == 1) {
@@ -207,7 +209,7 @@
} }
if (indexPath.row == 2) { if (indexPath.row == 2) {
for (MineCenterUserModel * model in self.dataArray) { for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 2) { if ([model.value integerValue] == 2) {
@@ -0,0 +1,16 @@
//
// XJEmergencyListViewController.h
// XinjiangProject
//
// Created by Apple on 2025/7/3.
//
#import "XJBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJEmergencyListViewController : XJBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,229 @@
//
// XJEmergencyListViewController.m
// XinjiangProject
//
// Created by Apple on 2025/7/3.
//
#import "XJEmergencyListViewController.h"
#import "XJEmergencyContactModel.h"
#import "XJAddContactViewController.h"
@interface XJEmergencyListViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView * homeTable;
@property (nonatomic, strong) NSMutableArray * dataArray;
@end
@implementation XJEmergencyListViewController
- (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 = UIColorHex(#EFEFEF);
self.isHidenNaviBar = false;
self.navigationItem.title = @"紧急联系人";
[self addNavigationItemWithTitles:@[@"新增"] isLeft:false target:self action:@selector(addEmergencyContact) tags:@[@1]];
[self createUI];
//请求紧急联系人
[self.dataArray removeAllObjects];
[self getEmergencyContact];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.homeTable.mj_header beginRefreshing];
}
- (void)createUI {
self.homeTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight) style:UITableViewStylePlain];
if ([[UIDevice currentDevice].systemVersion floatValue] >= 11) {
self.homeTable.estimatedRowHeight = 0;
self.homeTable.estimatedSectionFooterHeight = 0;
self.homeTable.estimatedSectionHeaderHeight = 0;
if (@available(iOS 15.0, *)) {
self.homeTable.sectionHeaderTopPadding = 0;
} else {
// Fallback on earlier versions
}
self.homeTable.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
self.homeTable.delegate = self;
self.homeTable.dataSource = self;
self.homeTable.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
self.homeTable.showsVerticalScrollIndicator = NO;
self.homeTable.sectionHeaderHeight = 0;
self.homeTable.sectionFooterHeight = 0;
self.homeTable.contentInset = UIEdgeInsetsZero;
self.homeTable.contentOffset = CGPointZero;
self.homeTable.backgroundColor = KClearColor;
[self.view addSubview:self.homeTable];
__weak __typeof(self) weakSelf = self;
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
[weakSelf.dataArray removeAllObjects];
[self getEmergencyContact];
}];
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
//元素竖直方向的间距
emptyView.subViewMargin = 20.f;
//标题颜色
emptyView.titleLabTextColor = [UIColor blackColor];
//描述字体
emptyView.detailLabFont = [UIFont systemFontOfSize:17];
//按钮背景色
emptyView.actionBtnBackGroundColor = KWhiteColor;
emptyView.actionBtnWidth = CGFLOAT_MIN;
emptyView.actionBtnHeight = CGFLOAT_MIN;
//设置空内容占位图
self.homeTable.ly_emptyView = emptyView;
}
#pragma mark:新增联系人
- (void)addEmergencyContact {
XJAddContactViewController * addVC = [[XJAddContactViewController alloc] init];
[self.navigationController pushViewController:addVC animated:YES];
}
//请求紧急联系人
- (void)getEmergencyContact {
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
XJPNetAPI * numbeApi = [[XJPNetAPI alloc] init:self tag:@"ContactAPI" NeedToken:@""];
[numbeApi getEmergencyContact:dic];
}
#pragma mark -网络请求处理
- (void)Failed:(NSString*)message tag:(NSString*)tag
{
[self.homeTable.mj_header endRefreshing];
[self showMBProgressHUDOnlyWithString:message];
[self hiddenAllMBProgressHUD];
}
- (void)Sucess:(id)response tag:(NSString*)tag
{
[self hiddenAllMBProgressHUD];
if ([tag isEqualToString:@"ContactAPI"]) {
[self.homeTable.mj_header endRefreshing];
NSArray * array = response;
[self.dataArray removeAllObjects];
for (NSDictionary * parmDic in array) {
XJEmergencyContactModel * model = [XJEmergencyContactModel modelWithDictionary:parmDic];
[self.dataArray addObject:model];
}
[self.homeTable reloadData];
}
}
#pragma mark - DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.dataArray.count;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
XJEmergencyContactModel * model = self.dataArray[indexPath.row];
static NSString * cellID = @"cellID";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CONNETCELL"];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"CONNETCELL"];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.font = SYSTEMFONT(14);
cell.textLabel.text = [NSString stringWithFormat:@"%@-%@",model.name,model.phone];
cell.detailTextLabel.text = model.familyRelation_dictText;
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 45;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
XJEmergencyContactModel * model = self.dataArray[indexPath.row];
XJAddContactViewController * addVC = [[XJAddContactViewController alloc] init];
addVC.model = model;
[self.navigationController pushViewController:addVC animated:YES];
}
- (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;
}
/*
#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

Some files were not shown because too many files have changed in this diff Show More