diff --git a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj index 4983310..197292b 100644 --- a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj +++ b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj @@ -381,15 +381,15 @@ GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch"; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = "新疆亚克西"; + INFOPLIST_KEY_CFBundleDisplayName = "健康油我"; INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; - INFOPLIST_KEY_NSCameraUsageDescription = "健康咨询员工端需要访问您的相机用来档案功能,是否同意?"; - INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; - INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; - INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; - INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康咨询员工端需要访问您的麦克风用来视频录制,是否同意?"; - INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "新疆员工端需要访问您的相册上传图片,方便您的使用,是否同意?"; - INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康咨询想使用您的相册功能 是否同意?"; + INFOPLIST_KEY_NSCameraUsageDescription = "健康油我需要访问您的相机用来档案功能,是否同意?"; + INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。"; + INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。"; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康油我需要访问您的麦克风用来视频录制,是否同意?"; + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "健康油我需要访问您的相册上传图片,方便您的使用,是否同意?"; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康油我想使用您的相册功能 是否同意?"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; @@ -425,15 +425,15 @@ GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch"; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = "新疆亚克西"; + INFOPLIST_KEY_CFBundleDisplayName = "健康油我"; INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; - INFOPLIST_KEY_NSCameraUsageDescription = "健康咨询员工端需要访问您的相机用来档案功能,是否同意?"; - INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; - INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; - INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。"; - INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康咨询员工端需要访问您的麦克风用来视频录制,是否同意?"; - INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "新疆员工端需要访问您的相册上传图片,方便您的使用,是否同意?"; - INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康咨询想使用您的相册功能 是否同意?"; + INFOPLIST_KEY_NSCameraUsageDescription = "健康油我需要访问您的相机用来档案功能,是否同意?"; + INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。"; + INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。"; + INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康油我需要访问您的麦克风用来视频录制,是否同意?"; + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "健康油我需要访问您的相册上传图片,方便您的使用,是否同意?"; + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康油我想使用您的相册功能 是否同意?"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; diff --git a/XinjiangProject/XinjiangProject/Define/StatusMacros.h b/XinjiangProject/XinjiangProject/Define/StatusMacros.h index f8d7f20..e0e14b4 100755 --- a/XinjiangProject/XinjiangProject/Define/StatusMacros.h +++ b/XinjiangProject/XinjiangProject/Define/StatusMacros.h @@ -86,7 +86,7 @@ #define H5DevHost @"xjgateway.mcrm.vip:8888"// #define IntervenH5 @"https://xjconsole.mcrm.vip:8888" #define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀 -#define SCHEME @"http" // +#define SCHEME @"https" // diff --git a/XinjiangProject/XinjiangProject/Define/ThirdMacros.h b/XinjiangProject/XinjiangProject/Define/ThirdMacros.h index 5323188..2a809fd 100755 --- a/XinjiangProject/XinjiangProject/Define/ThirdMacros.h +++ b/XinjiangProject/XinjiangProject/Define/ThirdMacros.h @@ -25,7 +25,7 @@ //高德key -#define AMAPSDKKEY @"e5e5b1aa469fcf577c829165bae860dd" +#define AMAPSDKKEY @"59c99e428ea0ea0086d1e1bd7ab2ca6b" #define KNotificAgreeProtoocl @"AGREEPMAP" diff --git a/XinjiangProject/XinjiangProject/Define/YYUtilsMacros.h b/XinjiangProject/XinjiangProject/Define/YYUtilsMacros.h index 9156fed..dafc93e 100755 --- a/XinjiangProject/XinjiangProject/Define/YYUtilsMacros.h +++ b/XinjiangProject/XinjiangProject/Define/YYUtilsMacros.h @@ -184,10 +184,12 @@ alpha:1.0]) //数据验证 #define StrValid(f) ([f isKindOfClass:[NSNull class]] || f == nil || [f length] < 1 || [f isEqualToString:@"(null)"] || [f isEqualToString:@""] || [f isEqualToString:@"null"]? YES : NO) + +#define ValidStr(f) StrValid(f) + #define SafeStr(f) (!StrValid(f) ? f:@"-") #define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound) -#define ValidStr(f) StrValid(f) #define ValidDict(f) (f!=nil && [f isKindOfClass:[NSDictionary class]]) #define ValidArray(f) (f!=nil && [f isKindOfClass:[NSArray class]] && [f count]>0) #define ValidNum(f) (f!=nil && [f isKindOfClass:[NSNumber class]]) diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m index 8dba942..ffea220 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m @@ -142,6 +142,15 @@ typedef NS_ENUM(NSInteger, RequestType) { if (![self requestBeforeJudgeConnect]) {//断网 [self showError:@"请检查网络设置"]; 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; } @@ -188,8 +197,18 @@ typedef NS_ENUM(NSInteger, RequestType) { }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:@"网络服务出错"]; } + // } @@ -218,6 +237,17 @@ typedef NS_ENUM(NSInteger, RequestType) { } 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:@"网络服务出错"]; } diff --git a/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m b/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m index 7b5bf97..e87694a 100644 --- a/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m +++ b/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m @@ -52,12 +52,21 @@ object:nil]; if ([HQCommonUtils isLogin]) { //腾讯im - JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; - [proctocolApi GetIMLoginAccount:nil]; +#if DEBUG +// [self loginImAccount]; + +#else + [self loginImAccount]; + +#endif + } } - +- (void)loginImAccount { + JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil]; + [proctocolApi GetIMLoginAccount:nil]; +} #pragma mark ————— 初始化window ————— -(void)initWindow{ @@ -230,7 +239,7 @@ 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, }]; diff --git a/XinjiangProject/XinjiangProject/Project/Base/HQBaseTabBarController.m b/XinjiangProject/XinjiangProject/Project/Base/HQBaseTabBarController.m index 533a057..d16e6f6 100644 --- a/XinjiangProject/XinjiangProject/Project/Base/HQBaseTabBarController.m +++ b/XinjiangProject/XinjiangProject/Project/Base/HQBaseTabBarController.m @@ -74,18 +74,18 @@ _VCS = @[].mutableCopy; 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"]; 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"]; 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"]; 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; diff --git a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginFoundPasswordViewController.m b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginFoundPasswordViewController.m index 2efe4ac..6ea84d9 100644 --- a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginFoundPasswordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginFoundPasswordViewController.m @@ -7,15 +7,13 @@ #import "XJLoginFoundPasswordViewController.h" #import "XJLoginSetPasswordViewController.h" -#import "LVKeyboard.h" -#import "MQTextField.h" -@interface XJLoginFoundPasswordViewController () +#import "JXIDNumTextField.h" +@interface XJLoginFoundPasswordViewController () @property (nonatomic, strong)UITextField * nameTextFild; @property (nonatomic, strong)UITextField * phoneTextFild; -@property (nonatomic, strong)MQTextField * codeTextFild; +@property (nonatomic, strong)JXIDNumTextField * codeTextFild; @property (nonatomic, strong)UIButton * codeButton; -@property (nonatomic, strong) LVKeyboard *keyboard; @end @@ -33,10 +31,6 @@ - (void)createUI { - //初始化键盘 - LVKeyboard *keyboard = [[LVKeyboard alloc] init]; - keyboard.delegate = self; - self.keyboard = keyboard; UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(151))]; topView.backgroundColor = KWhiteColor; @@ -76,12 +70,11 @@ [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.font = [UIFont systemFontOfSize:14]; self.codeTextFild.backgroundColor = KWhiteColor; - self.codeTextFild.inputView = self.keyboard; - self.codeTextFild.delegate = self; +// self.codeTextFild.delegate = self; self.codeTextFild.leftView = codeLeft; self.codeTextFild.leftViewMode = UITextFieldViewModeAlways; [topView addSubview:self.codeTextFild]; @@ -179,24 +172,12 @@ if(textField == self.codeTextFild) { - self.codeTextFild.inputView = self.keyboard; +// self.codeTextFild.inputView = self.keyboard; } return YES; } -- (void)keyboard:(LVKeyboard *)keyboard didClickDeleteButton:(UIButton *)deleteBtn string:(NSMutableString *)string { - self.codeTextFild.text = string; -} - -- (void)keyboard:(LVKeyboard *)keyboard didClickTextButton:(UIButton *)textBtn string:(NSMutableString *)string { - self.codeTextFild.text = string; -} - - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - [self.codeTextFild resignFirstResponder]; -} /* #pragma mark - Navigation diff --git a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginViewController.m b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginViewController.m index 4f3f8df..e039e52 100644 --- a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginViewController.m @@ -116,6 +116,7 @@ UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)]; self.userNameField.leftView = leftview; self.userNameField.leftViewMode = UITextFieldViewModeAlways; + self.userNameField.autocapitalizationType = UITextAutocapitalizationTypeNone; [loginView addSubview:accountField ]; // // @@ -402,15 +403,15 @@ [[NSUserDefaults standardUserDefaults] synchronize]; NSString * avatar = @""; NSString * placeholdImg ; - if (!ValidStr(user.avatar)) { + if (!ValidStr(user.avatar) && ![user.avatar isEqualToString:ResourceAddress]) { avatar = user.avatar; }else { if ([user.sex_dictText isEqualToString:@"女"]) { - placeholdImg = @"heard_man"; + placeholdImg = @"heard_woman"; }else { - placeholdImg = @"heard_woman"; + placeholdImg = @"heard_man"; } } if (ValidStr(user.personType) || [user.personType intValue] != 1 ) { @@ -423,8 +424,14 @@ [[NSUserDefaults standardUserDefaults] synchronize]; KPostNotification(KNotificationLoginStateChange, @YES); - //登录im - [self loginImAccount]; +#if DEBUG + [self loginImAccount]; + + +#else + [self loginImAccount]; + +#endif } if ([tag isEqualToString:@"IMAPI"]) { @@ -435,7 +442,7 @@ IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; iminfoModel.IMInfo = pamrDic; [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; - + // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 // 2. 初始化 config 对象 diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m index 568afaf..abd4e97 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m @@ -59,6 +59,7 @@ [self.view addSubview:self.nameField]; //手机号 self.phoneField = [self createFieldWithLeftTitle:@"手机号" withRightString:@" " placeholderStr:@"请填写手机号" isShowRight:true]; + self.phoneField.keyboardType = UIKeyboardTypeNumberPad; self.phoneField.frame = CGRectMake(0, self.nameField.bottom, kScreenWidth, 51); [self.view addSubview:self.phoneField]; //身份证号码, @@ -215,7 +216,10 @@ FamilyMemberRelationModel * model = [FamilyMemberRelationModel modelWithDictionary:dic] ; - [self.memberArray addObject:model]; + if(![model.title isEqualToString:@"本人"]) { + [self.memberArray addObject:model]; + + } } } if ([tag isEqualToString:@"ADDAPI"]) { @@ -236,6 +240,8 @@ - (void)relastionShipOnclick { + [self.view endEditing:YES]; + /// 1.单列字符串选择器(传字符串数组) BRStringPickerView *stringPickerView = [[BRStringPickerView alloc]init]; stringPickerView.pickerMode = BRStringPickerComponentSingle; diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEmergencyListViewController.h b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEmergencyListViewController.h new file mode 100644 index 0000000..937610d --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEmergencyListViewController.h @@ -0,0 +1,16 @@ +// +// XJEmergencyListViewController.h +// XinjiangProject +// +// Created by Apple on 2025/7/3. +// + +#import "HQBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface XJEmergencyListViewController : HQBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEmergencyListViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEmergencyListViewController.m new file mode 100644 index 0000000..6a391dd --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJEmergencyListViewController.m @@ -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 () + +@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]; + + JKCQAPI * numbeApi = [[JKCQAPI 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 diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMinePictureRecordViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMinePictureRecordViewController.m index 4bd2fa6..9e2c0b8 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMinePictureRecordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMinePictureRecordViewController.m @@ -95,7 +95,6 @@ self.isHidenNaviBar = false; self.pageNo = 0; - [self createUI]; if ([ESCTUIManager TUIUserStatus] == false) { @@ -107,17 +106,17 @@ { [self getChatList]; } - else - { - [self createData]; - } +// else +// { +// [self createData]; +// } } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + [self.dataArray removeAllObjects]; [self.homeTable.mj_header beginRefreshing]; @@ -149,16 +148,8 @@ listBtn.backgroundColor = UIColorHex(#DDDDDD); } } - if (self.selectOnes == 4) { - if (index == 1 ) { - listBtn.selected = YES; - listBtn.backgroundColor = UIColorHex(#21BEBD); - }else{ - listBtn.backgroundColor = UIColorHex(#DDDDDD); - } - } if (self.selectOnes == 5) { - if (index == 2 ) { + if (index == 1 ) { listBtn.selected = YES; listBtn.backgroundColor = UIColorHex(#21BEBD); }else{ @@ -258,7 +249,7 @@ [weakSelf createData]; } }]; - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""]; + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""]; //元素竖直方向的间距 emptyView.subViewMargin = 20.f; //标题颜色 @@ -484,10 +475,11 @@ - (void)setSelectOnes:(NSInteger)selectOnes { _selectOnes = selectOnes; - self.type = [NSString stringWithFormat:@"%ld",_selectOnes]; +// self.type = [NSString stringWithFormat:@"%ld",_selectOnes]; switch (_selectOnes) { case 3://进行中 { + self.type = @"3"; for (UIButton * seleBtn in self.buttonArray) { if (seleBtn.tag == 1000) { seleBtn.selected = YES; @@ -503,6 +495,7 @@ break; case 5://已评价 { + self.type = @"5"; for (UIButton * seleBtn in self.buttonArray) { if (seleBtn.tag == 1001) { seleBtn.selected = YES; @@ -518,6 +511,7 @@ break; case 6: { + self.type = @""; for (UIButton * seleBtn in self.buttonArray) { if (seleBtn.tag == 1002) { seleBtn.selected = YES; diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineQuestionRecordViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineQuestionRecordViewController.m index c455b95..cdd53fd 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineQuestionRecordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineQuestionRecordViewController.m @@ -22,6 +22,9 @@ /** 按钮数组 */ @property (nonatomic, strong) NSMutableArray *titleButtons; +@property (nonatomic, strong) XJMineVideoRecordViewController * videoVC; + + @end @implementation XJMineQuestionRecordViewController @@ -79,7 +82,9 @@ // XJMineVideoRecordViewController * videoVc = [[XJMineVideoRecordViewController alloc] init]; videoVc.navigationItem.title = @"视频咨询"; + videoVc.isSlected = false; videoVc.selectOnes = self.type; + self.videoVC = videoVc; videoVc.view.backgroundColor = CViewBgColor; [self addChildViewController:videoVc]; @@ -105,6 +110,14 @@ //滚动collectionView 修改偏移量 CGFloat offsetX = i * kScreenWidth; + if (i == 1) { + + self.videoVC.isSlected = true; + }else + { + self.videoVC.isSlected = false; + + } _collectionView.contentOffset = CGPointMake(offsetX, 0); } diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.h b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.h index cc40e2d..341bda0 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.h +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.h @@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) NSInteger selectOnes; +@property (nonatomic, assign) bool isSlected; @end diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m index 06c6d62..cad3f4f 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m @@ -84,14 +84,18 @@ self.pageNo = 0; self.type = [NSString stringWithFormat:@"%ld",_selectOnes]; [self createUI]; - [self createData]; + if (self.isSlected == true) { + [self createData]; + } } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - [self.homeTable.mj_header beginRefreshing]; + if (self.isSlected == true) { + [self.homeTable.mj_header beginRefreshing]; + } } @@ -181,7 +185,7 @@ weakSelf.pageNo ++; [weakSelf createData]; }]; - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""]; + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""]; //元素竖直方向的间距 emptyView.subViewMargin = 20.f; //标题颜色 diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m index 2d874e9..34685ee 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m @@ -16,6 +16,7 @@ #import "XJMineCenterUserModel.h" #import "XJEditSystemViewController.h" #import "XJSOSLookDoctoreViewController.h" +#import "XJEmergencyListViewController.h" @interface XJMyCenterViewController () @@ -168,7 +169,7 @@ - (void)completeEvaluation { XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init]; recordVC.titleSelected = 10;//图文视频 - recordVC.type = 4; + recordVC.type = 5; [self.navigationController pushViewController:recordVC animated:YES]; } @@ -201,6 +202,10 @@ case 1: vcToPush = [[XJSOSLookDoctoreViewController alloc] init]; break; + case 2: + vcToPush = [[XJEmergencyListViewController alloc] init]; + break; + default: break; } diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJSOSDetailSmallSumViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJSOSDetailSmallSumViewController.m index d6a04f6..c99ce26 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJSOSDetailSmallSumViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJSOSDetailSmallSumViewController.m @@ -12,6 +12,7 @@ @property (nonatomic, strong) UIScrollView * mainScrollview; @property (nonatomic, strong) YYLabel * jingguoLabel; @property (nonatomic, strong) YYLabel * xiaojieLabel; +@property (nonatomic, strong) UILabel * xiaojieTitle; @end @@ -63,11 +64,12 @@ xiaojieTitle.text = @"事件小结"; xiaojieTitle.textColor = CFontColor1; xiaojieTitle.font = BOLDSYSTEMFONT(14); + self.xiaojieTitle = xiaojieTitle; [self.mainScrollview addSubview:xiaojieTitle]; //小结 - self.xiaojieLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kRealValue(13),kRealValue(55), self.mainScrollview.width, 13)]; + self.xiaojieLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kRealValue(13),xiaojieTitle.bottom + kRealValue(31), self.mainScrollview.width, 13)]; self.xiaojieLabel.textAlignment = NSTextAlignmentLeft; self.xiaojieLabel.font = MEDIUMFONT(13); self.xiaojieLabel.textColor = UIColorHex(#333333); @@ -110,44 +112,53 @@ - (void)Sucess:(id)response tag:(NSString*)tag { - if ([tag isEqualToString:@"DETAILAPI"]) { + if ([tag isEqualToString:@"SMALLAPI"]) { NSDictionary * dic = response; if (ValidDict(dic)) { NSString * jingguoString = [dic objectForKey:@"orderThrough"]; NSString * xiaojieString = [dic objectForKey:@"orderResult"]; if (!ValidStr(jingguoString)) { - - - - NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[jingguoString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil]; - self.jingguoLabel.frame = CGRectMake(kRealValue(13),kRealValue(55), self.mainScrollview.width, 13); - // 查询文本排版结果 - // 计算文本尺寸YYTextLayout - CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT); - - YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:self.jingguoLabel.attributedText]; - self.jingguoLabel.textLayout = layout; - CGFloat introHeight = layout.textBoundingSize.height; - // 记录真正的正确高度 - self.jingguoLabel.height = introHeight; + + NSData *data = [jingguoString dataUsingEncoding:NSUnicodeStringEncoding]; + NSDictionary *options = @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType }; + NSError *error = nil; + NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithData:data + options:options + documentAttributes:nil + error:&error]; + // ✅ 设置字体为13号 + [attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:13] range:NSMakeRange(0, attrStr.length)]; + + self.jingguoLabel.attributedText = attrStr; + + self.jingguoLabel.frame = CGRectMake(kRealValue(13), kRealValue(55), self.mainScrollview.width, 13); + + CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT); + YYTextLayout *layout = [YYTextLayout layoutWithContainerSize:maxSize text:attrStr]; + self.jingguoLabel.textLayout = layout; + self.jingguoLabel.height = layout.textBoundingSize.height; } if (!ValidStr(xiaojieString)) { //小结 - - NSAttributedString * sumAttrStr = [[NSAttributedString alloc] initWithData:[xiaojieString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil]; - self.xiaojieLabel.frame = CGRectMake(kRealValue(13),kRealValue(55), self.mainScrollview.width, 13); - self.xiaojieLabel.attributedText = sumAttrStr; - // 查询文本排版结果 - // 计算文本尺寸YYTextLayout - CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT); - YYTextLayout * sumlayout = [YYTextLayout layoutWithContainerSize:maxSize text:self.xiaojieLabel.attributedText]; - self.xiaojieLabel.textLayout = sumlayout; - CGFloat sumIntroHeight = sumlayout.textBoundingSize.height; - // 记录真正的正确高度 - self.xiaojieLabel.height = sumIntroHeight; - - // 显示文本排版结果 + NSData *data = [xiaojieString dataUsingEncoding:NSUnicodeStringEncoding]; + NSDictionary *options = @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType }; + NSError *error = nil; + NSMutableAttributedString *sumAttrStr = [[NSMutableAttributedString alloc] initWithData:data + options:options + documentAttributes:nil + error:&error]; + // ✅ 设置字体为13号 + [sumAttrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:13] range:NSMakeRange(0, sumAttrStr.length)]; + + self.xiaojieTitle.top = self.jingguoLabel.bottom + kRealValue(24); + self.xiaojieLabel.frame = CGRectMake(kRealValue(13), self.xiaojieTitle.bottom + kRealValue(20), self.mainScrollview.width, 13); + self.xiaojieLabel.attributedText = sumAttrStr; + + CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT); + YYTextLayout *sumLayout = [YYTextLayout layoutWithContainerSize:maxSize text:sumAttrStr]; + self.xiaojieLabel.textLayout = sumLayout; + self.xiaojieLabel.height = sumLayout.textBoundingSize.height; } self.mainScrollview.contentSize = CGSizeMake(self.mainScrollview.width, self.xiaojieLabel.bottom + kRealValue(20)); } diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterHeardView.m b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterHeardView.m index e1e3f9b..fdb98e6 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterHeardView.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterHeardView.m @@ -43,8 +43,9 @@ - (void)createUI { - UIImageView * heardImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(26), - kRealValue(16) , 52, 52)]; + UIImageView * heardImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(26), - kRealValue(16) ,52, 52)]; self.heardImage = heardImg; + self.heardImage.backgroundColor = KClearColor; heardImg.layer.cornerRadius = 26; heardImg.layer.masksToBounds = true; heardImg.userInteractionEnabled = true; @@ -74,27 +75,36 @@ [self addSubview:self.lookMoreLabel]; - NSArray * array = @[@[@"进行中",@"HeardProgress_icon"],@[@"待评价",@"waitEveal_icon"],@[@"已评价",@"alreadyEveal"],@[@"历史",@"HeardHistory_icon"]]; - - CGFloat w = 58 ; - - for (int i = 0 ; i < 4; i++) { - - UIView * heardView = [[UIView alloc] initWithFrame:CGRectMake(i * (kScreenWidth - kRealValue(30))/4, self.heardImage.bottom + kRealValue(18),(kScreenWidth - kRealValue(30))/4, self.height - self.heardImage.bottom - kRealValue(18))]; + NSArray *array = @[@[@"进行中",@"HeardProgress_icon"], + @[@"待评价",@"waitEveal_icon"], + @[@"已评价",@"alreadyEveal"], + @[@"历史",@"HeardHistory_icon"]]; + + CGFloat imageWidth = kRealValue(58); + NSInteger itemCount = array.count; + CGFloat sideMargin = 12.0; + CGFloat spacingCount = itemCount - 1; + + CGFloat availableWidth = self.width - 2 * sideMargin - itemCount * imageWidth; + CGFloat spacing = availableWidth / spacingCount; + + for (int i = 0; i < itemCount; i++) { + CGFloat x = sideMargin + i * (imageWidth + spacing); + + UIView *heardView = [[UIView alloc] initWithFrame:CGRectMake(x, self.heardImage.bottom + 2, imageWidth, self.height - self.heardImage.bottom - 18)]; [self addSubview:heardView]; - - UIImageView * toolsImg = [[UIImageView alloc] initWithFrame:CGRectMake((heardView.width / 2 - 29 ) , kRealValue(18), w, w)]; + + UIImageView *toolsImg = [[UIImageView alloc] initWithFrame:CGRectMake(heardView.width/2 -imageWidth/2, 15, imageWidth, imageWidth)]; toolsImg.image = [UIImage imageNamed:array[i][1]]; - toolsImg.userInteractionEnabled = true; - - if (i == 0) - { - UILabel * numLabel = [[UILabel alloc] initWithFrame:CGRectMake(toolsImg.width - 16, -2, 18, 18)]; + toolsImg.userInteractionEnabled = YES; + + if (i == 0) { + UILabel *numLabel = [[UILabel alloc] initWithFrame:CGRectMake(imageWidth - 16, -2, 18, 18)]; numLabel.text = @"1"; - numLabel.textColor = KWhiteColor; - numLabel.font = SYSTEMFONT(13); + numLabel.textColor = UIColor.whiteColor; + numLabel.font = [UIFont systemFontOfSize:13]; numLabel.textAlignment = NSTextAlignmentCenter; - numLabel.backgroundColor = KRedColor; + numLabel.backgroundColor = UIColor.redColor; numLabel.layer.borderColor = UIColor.whiteColor.CGColor; numLabel.layer.borderWidth = 1.0f; numLabel.layer.cornerRadius = 9.0; @@ -103,22 +113,23 @@ numLabel.hidden = YES; [toolsImg addSubview:numLabel]; } + [heardView addSubview:toolsImg]; - - UILabel * toolsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0 ,toolsImg.bottom + kRealValue(5), heardView.width, 15)]; - toolsLabel.textColor = CFontColor1; - toolsLabel.font = SYSTEMFONT(13); + + UILabel *toolsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(toolsImg.frame) + 5, imageWidth, 15)]; + toolsLabel.textColor = [UIColor blackColor]; + toolsLabel.font = [UIFont systemFontOfSize:13]; toolsLabel.text = array[i][0]; toolsLabel.textAlignment = NSTextAlignmentCenter; [heardView addSubview:toolsLabel]; - - UIButton * heardBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, heardView.width, 80)]; + + UIButton *heardBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, imageWidth, 80)]; [heardBtn addTarget:self action:@selector(heardToolsAction:) forControlEvents:UIControlEventTouchUpInside]; heardBtn.tag = 100 + i; [heardView addSubview:heardBtn]; - - } + + } diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m index f069ab0..0c74645 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m @@ -72,7 +72,7 @@ - (UIView *)createHeardView { - XJMyCenterHeardView * heardV = [[XJMyCenterHeardView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(150))]; + XJMyCenterHeardView * heardV = [[XJMyCenterHeardView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kRealValue(150))]; heardV.layer.cornerRadius = 10; heardV.backgroundColor = KWhiteColor; heardV.heardDelegate = self.heardDelegate; @@ -88,7 +88,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 2; + return 3; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView @@ -102,7 +102,8 @@ //,@[@"我的关注",@"myLove_icon"] NSArray *sectionOne = @[ @[@"咨询人管理", @"relatives_icon"], - @[@"应急就医", @"medicalReson_icon"] + @[@"应急就医", @"medicalReson_icon"], + @[@"紧急联系人", @"emergency_icon"] ]; static NSString * cellID = @"cellID"; @@ -117,18 +118,8 @@ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.textLabel.font = SYSTEMFONT(14); cell.textLabel.text = sectionOne[indexPath.row][0]; -// cell.imageView.image = [UIImage imageNamed: sectionOne[indexPath.row][1]]; - // 安全判断 - if (indexPath.row < sectionOne.count) { - NSArray *item = sectionOne[indexPath.row]; - if (item.count >= 2) { - cell.textLabel.text = item[0]; - cell.imageView.image = [UIImage imageNamed:item[1]]; - } - } else { - cell.textLabel.text = @"--"; - cell.imageView.image = nil; - } + cell.imageView.image = [UIImage imageNamed: sectionOne[indexPath.row][1]]; + return cell; } diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJSOSDoctorTableViewCell.m b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJSOSDoctorTableViewCell.m index 43bdf1e..5c85109 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJSOSDoctorTableViewCell.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJSOSDoctorTableViewCell.m @@ -74,23 +74,24 @@ make.left.mas_offset(15); make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(14); make.height.mas_offset(14); + make.bottom.mas_offset(-20); }]; [self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; - self.hospitalLabel = [[UILabel alloc] init]; - self.hospitalLabel.textColor = UIColorHex(#333333); - self.hospitalLabel.font = MEDIUMFONT(14); - self.hospitalLabel.textAlignment = NSTextAlignmentLeft; - self.hospitalLabel.text = @"应急医院:西京医院-协助检查"; - [self.contentView addSubview:self.hospitalLabel]; - - [self.hospitalLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(15); - make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(14); - make.height.mas_offset(13); - make.bottom.mas_offset(-18); - }]; - [self.hospitalLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; +// self.hospitalLabel = [[UILabel alloc] init]; +// self.hospitalLabel.textColor = UIColorHex(#333333); +// self.hospitalLabel.font = MEDIUMFONT(14); +// self.hospitalLabel.textAlignment = NSTextAlignmentLeft; +// self.hospitalLabel.text = @"应急医院:西京医院-协助检查"; +// [self.contentView addSubview:self.hospitalLabel]; +// +// [self.hospitalLabel mas_makeConstraints:^(MASConstraintMaker *make) { +// make.left.mas_offset(15); +// make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(14); +// make.height.mas_offset(13); +// make.bottom.mas_offset(-18); +// }]; +// [self.hospitalLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; UIImageView * accowImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"garyRight"]]; [self.contentView addSubview:accowImg]; @@ -126,7 +127,7 @@ [self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_offset(-15); - make.top.mas_equalTo(self.lookDetail.mas_bottom).offset(26); + make.top.mas_equalTo(self.lookDetail.mas_bottom).offset(18); make.height.mas_offset(13); }]; @@ -137,12 +138,12 @@ _model = model; self.nameLabel.text = [NSString stringWithFormat:@"求助人:%@",_model.initiatorUserName]; self.timeLabel.text = [NSString stringWithFormat:@"求救时间:%@",_model.createTime]; - if ( ValidStr(_model.sendOrderHospital) ) { - self.hospitalLabel.text = @"应急医院:"; - }else - { - self.hospitalLabel.text =[NSString stringWithFormat:@"应急医院:%@-%@",_model.sendOrderHospital,_model.stationBusiness_dictText]; - } +// if ( ValidStr(_model.sendOrderHospital) ) { +// self.hospitalLabel.text = @"应急医院:"; +// }else +// { +// self.hospitalLabel.text =[NSString stringWithFormat:@"应急医院:%@-%@",_model.sendOrderHospital,_model.stationBusiness_dictText]; +// } self.statusLabel.text = model.orderStatus_dictText; } diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.h b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.h index f6f716a..2d09cb7 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.h +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.h @@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MonitoringDetailViewController : BaseWebViewVC +@property (nonatomic, strong) NSString * navTitle; + @end NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.m b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.m index 8de5af1..5137636 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringDetailViewController.m @@ -18,7 +18,7 @@ // Do any additional setup after loading the view. self.view.backgroundColor = CViewBgColor; self.isHidenNaviBar = false; - self.navigationItem.title = @"详情"; + self.navigationItem.title = self.navTitle; [self addNavigationItemWithImageNames:@[@"whiteBack_icon"] isLeft:YES target:self action:@selector(backOnclick) tags:@[@"1"]]; } @@ -29,7 +29,7 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{ [self hiddenAllMBProgressHUD]; - self.navigationItem.title = @"详情";; + self.navigationItem.title = self.navTitle; } diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringHistoryController.m b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringHistoryController.m index f3562fb..a04d64d 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringHistoryController.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringHistoryController.m @@ -103,7 +103,7 @@ [weakSelf updateHistoryData:self.currentDate]; }]; - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""]; + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""]; //元素竖直方向的间距 emptyView.subViewMargin = 20.f; //标题颜色 @@ -129,6 +129,7 @@ - (void)updateMonthLabel { NSString *currentMonth = [self getMonthFromDate:self.currentDate]; self.weekLabel.text = currentMonth; // 设置标签显示当前月份 + [self.dataArray removeAllObjects]; [self updateHistoryData:currentMonth]; } @@ -246,6 +247,9 @@ [self.tableView.mj_footer endRefreshing]; NSArray * array = response; + if (self.pageNo == 1) { + [self.dataArray removeAllObjects]; + } for (NSDictionary * dic in array) { MonitoringDataModel * model = [MonitoringDataModel modelWithDictionary:dic]; diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m index d3fc18c..b251c39 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m @@ -63,38 +63,39 @@ [self.view addSubview:self.homeTable]; MJWeakSelf - self.homeTable.popBlock = ^(NSString *type) { - if ([type isEqualToString:@"heart_rate"]) { + + self.homeTable.popBlock = ^(MonitoringListDataModel *model) { + if ([model.wdType isEqualToString:@"heart_rate"]) { [weakSelf showPickStringView:BRStringPickerComponentMulti withTitle: @"心率阈值" - withDataArray:@[@[@"40次/分钟", @"45次/分钟", @"50次/分钟"], @[@"100次/分钟",@"110次/分钟",@"120次/分钟",@"130次/分钟",@"140次/分钟",@"150次/分钟"]] withType:type]; + withDataArray:@[@[@"40次/分钟", @"45次/分钟", @"50次/分钟"], @[@"100次/分钟",@"110次/分钟",@"120次/分钟",@"130次/分钟",@"140次/分钟",@"150次/分钟"]] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax]; } - if ([type isEqualToString:@"spo2"]) { + if ([model.wdType isEqualToString:@"spo2"]) { [weakSelf showPickStringView:BRStringPickerComponentSingle - withTitle: @"血氧阈值" - withDataArray:@[@"75%", @"80%", @"85%",@"90%"] withType:type]; + withTitle: @"血氧阈值(下限)" + withDataArray:@[@"75%", @"80%", @"85%",@"90%"] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax]; } - if ([type isEqualToString:@"stress"]) { + if ([model.wdType isEqualToString:@"stress"]) { [weakSelf showPickStringView:BRStringPickerComponentSingle - withTitle: @"压力阈值" - withDataArray:@[@"80", @"81", @"82",@"83",@"84",@"85",@"86",@"87",@"88",@"89",@"90",@"91",@"92",@"93",@"94",@"95",@"96",@"97",@"98",@"99"] withType:type]; + withTitle: @"压力阈值(上限)" + withDataArray:@[@"80", @"81", @"82",@"83",@"84",@"85",@"86",@"87",@"88",@"89",@"90",@"91",@"92",@"93",@"94",@"95",@"96",@"97",@"98",@"99"] withType:model.wdType withLeft:model.warnMin withRight:model.warnMin]; } - if ([type isEqualToString:@"temperature"]) { + if ([model.wdType isEqualToString:@"temperature"]) { [weakSelf showPickStringView:BRStringPickerComponentMulti withTitle: @"体温阈值" withDataArray:@[@[@"34.0℃", @"34.1℃", @"34.2℃",@"34.3℃",@"34.4℃",@"34.5℃",@"34.6℃",@"34.7℃",@"34.8℃",@"34.9℃",@"35.0℃",@"35.1℃",@"35.2℃",@"35.3℃",@"35.4℃",@"35.5℃",@"35.6℃",@"35.7℃",@"35.8℃",@"35.9℃"], - @[@"37.2℃", @"37.3℃", @"37.4℃",@"37.5℃",@"37.6℃",@"37.7℃",@"37.8℃",@"37.9℃",@"38.0℃",@"38.1℃",@"38.2℃",@"38.3℃",@"38.4℃"]] withType:type]; + @[@"37.2℃", @"37.3℃", @"37.4℃",@"37.5℃",@"37.6℃",@"37.7℃",@"37.8℃",@"37.9℃",@"38.0℃",@"38.1℃",@"38.2℃",@"38.3℃",@"38.4℃"]] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax]; } @@ -116,6 +117,12 @@ }; + self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + + [weakSelf createDetail]; + + }]; + // UIView * warnView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.homeTable.bottom + kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(325))]; // warnView.layer.cornerRadius = 10; // warnView.backgroundColor = KWhiteColor; @@ -197,6 +204,7 @@ } - (void)createDetail { + [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false]; NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; [parmDic setObject:User_ID forKey:@"userId"]; @@ -231,6 +239,8 @@ if ([tag isEqualToString:@"DETAILAPI"]) { + [self hiddenAllMBProgressHUD]; + NSDictionary * dic = response; MonitoringDataModel * model = [MonitoringDataModel modelWithDictionary:dic]; @@ -253,7 +263,24 @@ - (void)showPickStringView:(BRStringPickerMode)stringModel withTitle:(NSString *)title withDataArray:(NSArray *)array - withType:(NSString *)type{ + withType:(NSString *)type + withLeft:(NSString *)leftString + withRight:(NSString *)rightString{ + UIView * customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 30)]; + + UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, kScreenWidth/2, 20)]; + leftLabel.text = @"下限"; + leftLabel.font = SYSTEMFONT(15); + leftLabel.textAlignment = NSTextAlignmentCenter; + leftLabel.textColor = CFontColor2; + [customView addSubview:leftLabel]; + + UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth/2, 10, kScreenWidth/2, 20)]; + rightLabel.text = @"上限"; + rightLabel.font = SYSTEMFONT(15); + rightLabel.textAlignment = NSTextAlignmentCenter; + rightLabel.textColor = CFontColor2; + [customView addSubview:rightLabel]; /// 多列文本选择器 BRStringPickerView *textPickerView = [[BRStringPickerView alloc]initWithPickerMode:stringModel]; @@ -263,37 +290,102 @@ textPickerView.pickerStyle.doneTextColor = UIColorHex(#21BEBD); // 设置数据源 textPickerView.dataSourceArr = array; - if (stringModel == 0) { - textPickerView.selectIndex =1; + if (stringModel == 0) { //单列 + + NSInteger selectedOnes = 0; + + if ([type isEqualToString:@"spo2"]) { + + for (NSString * dataString in array) { + + if ( [dataString intValue] == [leftString intValue]) { + textPickerView.selectIndex = selectedOnes; + } + selectedOnes ++; + } + } + + if ([type isEqualToString:@"stress"]) { + + for (NSString * dataString in array) { + + if ( [dataString intValue] == [rightString intValue]) { + textPickerView.selectIndex = selectedOnes; + } + selectedOnes ++; + } + } + textPickerView.resultModelBlock = ^(BRResultModel *resultModel) { - - if ([type isEqualToString:@"spo2"]) { - [self settingWithType:type MaxAndMin:@"0" minValue:resultModel.value]; + NSString *valueStr = [self extractNumberFromString:resultModel.value]; + if ([type isEqualToString:@"spo2"]) { + [self settingWithType:type MaxAndMin:@"0" minValue:valueStr]; } if ([type isEqualToString:@"stress"]) { - [self settingWithType:type MaxAndMin:resultModel.value minValue:@"0"]; - + [self settingWithType:type MaxAndMin:valueStr minValue:@"0"]; } - }; - }else { - textPickerView.selectIndexs = @[@1,@1]; + } else { + + [textPickerView addSubViewToPicker:customView]; + + NSInteger selectedLeft = 0; + + for (NSString * dataString in array[0]) { + + if ( [dataString intValue] == [leftString intValue]) { + break; + } + selectedLeft ++; + } + + NSInteger selectedRight = 0; + + for (NSString * dataString in array[1]) { + + if ( [dataString intValue] == [rightString intValue]) { + break; + } + selectedRight ++; + } + textPickerView.selectIndexs = @[@(selectedLeft),@(selectedRight)]; + textPickerView.resultModelArrayBlock = ^(NSArray * _Nullable resultModelArr) { - BRResultModel * resultModel1 = resultModelArr[0]; - BRResultModel * resultModel2 = resultModelArr[1]; - [self settingWithType:type MaxAndMin:resultModel1.value minValue:resultModel2.value]; + BRResultModel *resultModel1 = resultModelArr[1]; + BRResultModel *resultModel2 = resultModelArr[0]; + + NSString *maxValue = [self extractNumberFromString:resultModel1.value]; + NSString *minValue = [self extractNumberFromString:resultModel2.value]; + + [self settingWithType:type MaxAndMin:maxValue minValue:minValue]; }; } + [textPickerView show]; } + +// 提取字符串中的第一个数字(包括小数),例如从 @"34.1m" 提取 @"34.1" +- (NSString *)extractNumberFromString:(NSString *)input { + NSError *error = nil; + NSString *pattern = @"\\d+\\.?\\d*"; // 支持整数和小数 + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:&error]; + + NSTextCheckingResult *match = [regex firstMatchInString:input options:0 range:NSMakeRange(0, input.length)]; + if (match) { + return [input substringWithRange:match.range]; + } + return @"0"; // 没找到数字时返回默认值 +} + + #pragma mark:设置最大最小值 - (void)settingWithType:(NSString *)type @@ -301,7 +393,8 @@ minValue:(NSString *)min{ NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; - [parmDic setObject:User_ID forKey:@"userId"]; + [parmDic setObject:type forKey:@"eventType"]; + [parmDic setObject:User_ID forKey:@"uerId"]; [parmDic setObject:max forKey:@"warnMax"]; [parmDic setObject:min forKey:@"warnMin"]; @@ -321,6 +414,7 @@ detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", IntervenH5, @"heartRate", H5DevHost, User_Token, User_ID, time, SCHEME, @"heartRate"]; + detailVC.navTitle = @"心率"; } @@ -329,14 +423,16 @@ detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", IntervenH5, @"oxygenSaturation", H5DevHost, User_Token, User_ID, time, SCHEME, @"oxygenSaturation"]; - + detailVC.navTitle = @"血氧饱和度"; + } if ([type isEqualToString:@"stress"]) { detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", IntervenH5, @"pressure", H5DevHost, User_Token, User_ID, time, SCHEME, @"pressure"]; - + detailVC.navTitle = @"压力"; + } if ([type isEqualToString:@"temperature"]) { @@ -344,7 +440,8 @@ detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", IntervenH5, @"temperature", H5DevHost, User_Token, User_ID, time, SCHEME, @"temperature"]; - + detailVC.navTitle = @"体温"; + } if ([type isEqualToString:@"steps"]) { @@ -352,7 +449,8 @@ detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", IntervenH5, @"stepNumber", H5DevHost, User_Token, User_ID, time, SCHEME, @"stepNumber"]; - + detailVC.navTitle = @"步数"; + } if ([type isEqualToString:@"sleep"]) { @@ -360,7 +458,8 @@ detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", IntervenH5, @"sleep", H5DevHost, User_Token, User_ID, time, SCHEME, @"sleep"]; - + detailVC.navTitle = @"睡眠"; + } [self.navigationController pushViewController:detailVC animated:YES]; diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h index 58a4b09..d3ccdec 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.h @@ -8,7 +8,7 @@ #import #import "MonitoringDataModel.h" -typedef void(^showPickStringBlock)(NSString * type); +typedef void(^showPickStringBlock)(MonitoringListDataModel * model); typedef void(^showHistoryListBlock)(NSString * type); diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.m b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.m index c417c59..769e817 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableViewCell.m @@ -105,7 +105,7 @@ } - (void)popStringPick { - self.popBlock(self.listModel.wdType); + self.popBlock(self.listModel); } diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/HospitalMainViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/HospitalMainViewController.m index d615e58..ed207e6 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/HospitalMainViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/HospitalMainViewController.m @@ -14,10 +14,10 @@ #import "FoundExpertModel.h" #import "EvaluatListModel.h" #import "SearchZhuangJiaViewController.h" -#import "EvaluationListViewController.h" +#import "XJEvaluationListViewController.h" #import "HospitalIntroViewController.h" #import "TYMapNavSheet.h" -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" @interface HospitalMainViewController () { @@ -206,7 +206,7 @@ self.collectView.layer.cornerRadius = 10; self.collectView.layer.masksToBounds = true; self.collectView.collSelectBlock = ^(NSString * _Nonnull doctorID, NSString * _Nonnull doctorName) { - ExpertMainViewController * serarchVC = [[ ExpertMainViewController alloc] init]; + XJExpertMainViewController * serarchVC = [[ XJExpertMainViewController alloc] init]; // serarchVC.departmentId = @""; // serarchVC.departmentName = @""; // serarchVC.sickId = @""; @@ -227,7 +227,7 @@ self.homeTable.layer.cornerRadius = 10; self.homeTable.layer.masksToBounds = true; self.homeTable.moreBlock = ^{ - EvaluationListViewController * evalVC = [[EvaluationListViewController alloc] init]; + XJEvaluationListViewController * evalVC = [[XJEvaluationListViewController alloc] init]; evalVC.hospitalID = weakSelf.hospitalID; [weakSelf.navigationController pushViewController:evalVC animated:YES]; }; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionMustKnowViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionMustKnowViewController.m index 9d7f9c7..4e30380 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionMustKnowViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionMustKnowViewController.m @@ -136,38 +136,42 @@ NSDictionary * resDic = response; - if ([resDic.allKeys containsObject:@"id"]) { - self.showID = [NSString stringWithFormat:@"%@",resDic[@"id"]]; - } - if ([resDic.allKeys containsObject:@"content"]) { - NSMutableAttributedString *text = [NSMutableAttributedString new]; - // 添加文本 - NSString *title = resDic[@"content"]; - - // //富文本 - // [NSString stringWithFormat:@"%@ ",title]; - NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[[NSString stringWithFormat:@"%@ ",title] dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil]; - - [text appendAttributedString:attrStr]; - - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; - [paragraphStyle setLineSpacing:6]; - [text addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [text length])]; - - self.conntLabel.attributedText = text; + if (ValidDict(resDic)) { - CGSize maxSize = CGSizeMake(self.conntLabel.width, MAXFLOAT); - - YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:self.conntLabel.attributedText]; - self.conntLabel.textLayout = layout; - CGFloat introHeight = layout.textBoundingSize.height; - self.conntLabel.width = maxSize.width; - // 记录真正的正确高度 - self.conntLabel.height = introHeight; - // 显示文本排版结果 - self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - 30, self.conntLabel.bottom); - + if ([resDic.allKeys containsObject:@"id"]) { + self.showID = [NSString stringWithFormat:@"%@",resDic[@"id"]]; + } + + if ([resDic.allKeys containsObject:@"content"]) { + NSMutableAttributedString *text = [NSMutableAttributedString new]; + // 添加文本 + NSString *title = resDic[@"content"]; + + // //富文本 + // [NSString stringWithFormat:@"%@ ",title]; + NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[[NSString stringWithFormat:@"%@ ",title] dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil]; + + [text appendAttributedString:attrStr]; + + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + [paragraphStyle setLineSpacing:6]; + [text addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [text length])]; + + self.conntLabel.attributedText = text; + + CGSize maxSize = CGSizeMake(self.conntLabel.width, MAXFLOAT); + + YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:self.conntLabel.attributedText]; + self.conntLabel.textLayout = layout; + CGFloat introHeight = layout.textBoundingSize.height; + self.conntLabel.width = maxSize.width; + // 记录真正的正确高度 + self.conntLabel.height = introHeight; + // 显示文本排版结果 + self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - 30, self.conntLabel.bottom); + + } } } if([tag isEqualToString:@"NOTSHOW"]) { diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionPeopleMangerVC.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionPeopleMangerVC.m index 512064b..40ae40c 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionPeopleMangerVC.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionPeopleMangerVC.m @@ -10,7 +10,7 @@ #import "QuestionPeopleModel.h" #import "SelectedQuestionViewController.h" #import "XJAddQuestionViewController.h" - +#import "XJExpertMainViewController.h" @interface QuestionPeopleMangerVC () @@ -51,10 +51,22 @@ self.isHidenNaviBar = false; self.pageNo = 1; self.navigationItem.title = @"咨询人管理"; + [self addNavigationItemWithImageNames:@[@"whiteBack_icon"] isLeft:YES target:self action:@selector(popToExpertMainViewController) tags:@[@"78"]]; [self createUI]; [self getData]; } +- (void)popToExpertMainViewController { + for (UIViewController *vc in self.navigationController.viewControllers) { + if ([vc isKindOfClass:[XJExpertMainViewController class]]) { + [self.navigationController popToViewController:vc animated:YES]; + return; + } + } + // 如果没找到,可以选择 pop 回根控制器,或做其他处理 + [self.navigationController popToRootViewControllerAnimated:YES]; +} + - (void)createUI { self.homeTable = [[QuestionPeopleManagerTable alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight - SafetyAreaHeight - 45) style:UITableViewStylePlain]; @@ -81,6 +93,22 @@ [weakSelf getData]; }]; + + 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; + + UIButton * addBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - kRealValue(140) ,kScreenHeight - kTopHeight - SafetyAreaHeight - 45 , kRealValue(130), 45)]; [addBtn setBackgroundColor:UIColorHex(#21BEBD)]; [addBtn setTitle:@"新增" forState:UIControlStateNormal]; @@ -181,6 +209,14 @@ } DLog(@"%ld",mode.isSelected); } + if(self.dataArray.count == 0) { + [EasyTextView showErrorText:@"暂无联系人"]; + return; + } + if(seleArray.count == 0) { + [EasyTextView showErrorText:@"请选择要删除的联系人"]; + return; + } [self showMBProgressHUDWithString:@"删除中,请稍候..." autoHidden:false]; NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m index acfc768..e87491e 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m @@ -12,7 +12,7 @@ #import "FoundExpertViewController.h" #import "XJDoctorMainViewController.h" #import "DoctorRecommendModel.h" -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" #import "XJQustionRecordViewController.h" #import "ChatViewController.h" #import "QuesstionDetailLookFileViewController.h" @@ -43,6 +43,8 @@ @property (nonatomic, strong) NSMutableArray * dataArray; +@property (nonatomic, strong) HomeQusetionRecordsModel * recomendModel; + @end @implementation QuestionViewController @@ -194,8 +196,8 @@ // var mCheckToken = false // var mCurrentLon = 108.949845 NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; - [user setObject:@(108.949845) forKey:USERDEFAULLONG]; - [user setObject:@(34.327271) forKey:USERDEFAULLATITUDE]; + [user setObject:@(87.627704) forKey:USERDEFAULLONG]; + [user setObject:@(43.793026) forKey:USERDEFAULLATITUDE]; [user synchronize]; return; } @@ -252,7 +254,7 @@ self.homeTable.headDelegate = self; kWeakSelf(self); self.homeTable.tableBlock = ^(HomeQusetionRecordsModel * _Nonnull model) { - + weakself.recomendModel = model; //1图文 2视频 if ([model.contentType intValue] == 2) { @@ -286,7 +288,11 @@ [weakself.navigationController pushViewController:chatVC animated:YES]; }else { - [EasyTextView showErrorText:@"登录过期,请重新登录"]; + if ([HQCommonUtils isLogin]) { + [weakself loginImAccountList]; + + } + } } }; @@ -537,19 +543,14 @@ } if ([tag isEqualToString:@"SMALLHELP"]) { - if ([ESCTUIManager TUIUserStatus] == false) { - - - [self loginImAccount]; - return; - } [self hiddenAllMBProgressHUD]; + SmallHelpIMDataModel * model = [SmallHelpIMDataModel modelWithDictionary:response]; ChatViewController * chatVC = [[ChatViewController alloc] init]; chatVC.isGroupID = YES; chatVC.chatID = model.groupId; chatVC.smallHelp_id = model.small_id; - chatVC.isVideo = YES; + chatVC.isVideo = false; chatVC.eableSendReport = YES; chatVC.eableMapTools = false; chatVC.navTitle = @"全科医生"; @@ -572,6 +573,40 @@ [self smallQuestionAction]; } + if ([tag isEqualToString:@"loginIMList"]) { + [self hiddenAllMBProgressHUD]; + NSDictionary * pamrDic = response; + + IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; + + IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; + iminfoModel.IMInfo = pamrDic; + [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; + [ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig]; + + ChatViewController * chatVC = [[ChatViewController alloc] init]; + chatVC.isGroupID = YES; + chatVC.chatID = self.recomendModel.imId ; + chatVC.eableSendReport = true; + chatVC.eablehaveHelathData = false; + chatVC.navTitle = @"图文咨询"; + chatVC.isVideo = NO; + chatVC.pictureEnd_id = self.recomendModel.records_id; + chatVC.questionType = 2; + chatVC.medicalRecordsId = self.recomendModel.memberId; + if ([self.recomendModel.contentStatus intValue] == 5) { + chatVC.isEveal = true; + }else + { + chatVC.isEveal = false; + } + if ([self.recomendModel.contentStatus intValue] >=4 ) { + chatVC.endRecordType = 100; + } + [self.navigationController pushViewController:chatVC animated:YES]; + + } + if ([tag isEqualToString:@"UPVERSION"]) { @@ -656,19 +691,28 @@ } - +#pragma mark:小助手的回调 - (void)loginImAccount { JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"loginIMAPI" NeedToken:nil]; [proctocolApi GetIMLoginAccount:nil]; } +#pragma mark:列表点击回调 + +- (void)loginImAccountList { + + JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"loginIMList" NeedToken:nil]; + [proctocolApi GetIMLoginAccount:nil]; + +} + #pragma mark:医生列表点击事件 - (void)doctorListClick:(NSString *)doctorID { - ExpertMainViewController * mainVC = [[ExpertMainViewController alloc] init]; + XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init]; mainVC.doctorId = doctorID; [self.navigationController pushViewController:mainVC animated:YES]; } @@ -685,6 +729,13 @@ - (void)smallQuestionAction { + if ([ESCTUIManager TUIUserStatus] == false) { + + + [self loginImAccount]; + return; + } + NSMutableDictionary * dic = [[NSMutableDictionary alloc] init]; [self showMBProgressHUDWithString:@"咨询中,请稍候..." autoHidden:NO]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QusetionRecord(咨询记录)/XJAudioVideoRecordViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QusetionRecord(咨询记录)/XJAudioVideoRecordViewController.m index 18dde8c..e2194d8 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QusetionRecord(咨询记录)/XJAudioVideoRecordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QusetionRecord(咨询记录)/XJAudioVideoRecordViewController.m @@ -118,7 +118,7 @@ [weakSelf createData]; }]; - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""]; + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""]; //元素竖直方向的间距 emptyView.subViewMargin = 20.f; //标题颜色 diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/RoomDoctorRecordsVC.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/RoomDoctorRecordsVC.m index 59c8175..e74709a 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/RoomDoctorRecordsVC.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/RoomDoctorRecordsVC.m @@ -130,7 +130,7 @@ //元素竖直方向的间距 emptyView.titleLabMargin = kRealValue(5); - emptyView.contentViewY = kRealValue(450); + emptyView.contentViewY = kRealValue(250); emptyView.imageSize = CGSizeMake(kRealValue(101), kRealValue(60)); //标题颜色 diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/MainSearchViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/MainSearchViewController.m index 650999e..b58eaaa 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/MainSearchViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/MainSearchViewController.m @@ -15,7 +15,7 @@ #import "SearchZhuangjiaTable.h" #import "SearchZhuangJiaViewController.h" #import "HospitalMainViewController.h" -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" #import "QuestionMustKnowViewController.h" #import "SelectedQuestionViewController.h" #import "SelectedDoctorTimeVC.h" @@ -181,7 +181,7 @@ self.homeTable.mainBlock = ^(NSString * _Nonnull type, NSString * _Nonnull needID) { if ([type isEqualToString:@"医生"]) { - ExpertMainViewController * mainVC = [[ExpertMainViewController alloc] init]; + XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init]; mainVC.doctorId = needID; [weakSelf.navigationController pushViewController:mainVC animated:YES]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/SearchZhuangJiaViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/SearchZhuangJiaViewController.m index 8bb6bd0..3f53be7 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/SearchZhuangJiaViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/Search(搜索页面)/SearchZhuangJiaViewController.m @@ -6,7 +6,7 @@ // #import "SearchZhuangJiaViewController.h" -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" #import "HQSearchView.h" #import "SearchConetShowTable.h" #import "SearchZhuangjiaTable.h" @@ -831,7 +831,7 @@ - (void)zhuangjiaJumpDetail:(NSString *)memberID { - ExpertMainViewController * mainVC = [[ExpertMainViewController alloc] init]; + XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init]; mainVC.doctorId = memberID; [self.navigationController pushViewController:mainVC animated:YES]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedDoctorTimeVC.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedDoctorTimeVC.m index 2c92c2d..82b2ce0 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedDoctorTimeVC.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedDoctorTimeVC.m @@ -127,10 +127,10 @@ self.collLoveBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 60, kRealValue(24), 60, 25)]; - self.collLoveBtn.titleLabel.font = MEDIUMFONT(12); - self.collLoveBtn.layer.cornerRadius = 13.0; - self.collLoveBtn.layer.masksToBounds = true; - [self.collLoveBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside]; +// self.collLoveBtn.titleLabel.font = MEDIUMFONT(12); +// self.collLoveBtn.layer.cornerRadius = 13.0; +// self.collLoveBtn.layer.masksToBounds = true; +// [self.collLoveBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside]; [doctView addSubview:self.collLoveBtn]; self.hospitalLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.heardImage.right + kRealValue(18),self.jobLabel.bottom + kRealValue(15) ,kScreenWidth - self.heardImage.right - kRealValue(30), 13)]; @@ -305,22 +305,22 @@ DoctorDetailModel * model = [DoctorDetailModel modelWithDictionary:parmDic]; - if ([model.tfFollow integerValue] == 1) { - [self.collLoveBtn setTitle:@"已关注" forState:UIControlStateNormal]; - [self.collLoveBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - [self.collLoveBtn setImage:[UIImage imageWithColor:UIColor.grayColor] forState:UIControlStateNormal]; - self.collLoveBtn.backgroundColor = RGBA(221, 221, 221, 1); - self.collLoveBtn.selected = true; - - }else - { - [self.collLoveBtn setTitle:@" 关注" forState:UIControlStateNormal]; - [self.collLoveBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [self.collLoveBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal]; - self.collLoveBtn.backgroundColor = KWhiteColor ; - self.collLoveBtn.selected = false; - - } +// if ([model.tfFollow integerValue] == 1) { +// [self.collLoveBtn setTitle:@"已关注" forState:UIControlStateNormal]; +// [self.collLoveBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; +// [self.collLoveBtn setImage:[UIImage imageWithColor:UIColor.grayColor] forState:UIControlStateNormal]; +// self.collLoveBtn.backgroundColor = RGBA(221, 221, 221, 1); +// self.collLoveBtn.selected = true; +// +// }else +// { +// [self.collLoveBtn setTitle:@" 关注" forState:UIControlStateNormal]; +// [self.collLoveBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; +// [self.collLoveBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal]; +// self.collLoveBtn.backgroundColor = KWhiteColor ; +// self.collLoveBtn.selected = false; +// +// } self.doctorLabel.text = model.doctorName; self.jobLabel.text = model.doctorTitle; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedQuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedQuestionViewController.m index 5c0a4e7..5dccdff 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedQuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/SelectedQuestionViewController.m @@ -215,8 +215,14 @@ } } } + + if(self.dataArray.count == 0) { + [EasyTextView showErrorText:@"请先新增咨询人"]; + return; + } + if (ValidStr(upID) || ValidStr(onID)) { - [EasyTextView showErrorText:@"请选择咨询人"]; + [EasyTextView showErrorText:@"请选择或新增咨询人档案"]; return; } diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m index 95eb020..4ca4abd 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m @@ -195,9 +195,9 @@ [self.view addSubview:saveBtn]; if (self.questionModel) { - self.baseHelathInfoField.hidden = false; - baseBtn.hidden = false; - tishiLabel.top = self.baseHelathInfoField.bottom + kRealValue(10); + self.baseHelathInfoField.hidden = false; + baseBtn.hidden = false; + tishiLabel.top = self.baseHelathInfoField.bottom + kRealValue(10); self.questionNameField.text = self.questionModel.name; self.relationshipTextField.text = self.questionModel.familyRelation; self.weightTextField.text = [NSString stringWithFormat:@"%@",self.questionModel.weight]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m index 2e94e56..18040e3 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m @@ -15,7 +15,7 @@ #import "LookModficalFileViewController.h" #import "QuesstionDetailLookFileViewController.h" #import "QuestionBodyReportModel.h" -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" #import "evaluationPopView.h" #import "FSXBStarRateView.h" #import "SelectedQuestionViewController.h" diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/EvaluationListViewController.h b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJEvaluationListViewController.h similarity index 75% rename from XinjiangProject/XinjiangProject/Project/Qusetion/Controller/EvaluationListViewController.h rename to XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJEvaluationListViewController.h index 2b0e26c..8e1faab 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/EvaluationListViewController.h +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJEvaluationListViewController.h @@ -1,5 +1,5 @@ // -// EvaluationListViewController.h +// XJEvaluationListViewController.h // XinjiangProject // // Created by 仁康信息 on 2023/6/14. @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface EvaluationListViewController : HQBaseViewController +@interface XJEvaluationListViewController : HQBaseViewController @property (nonatomic, copy) NSString * hospitalID; @property (nonatomic, assign) NSInteger type; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/EvaluationListViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJEvaluationListViewController.m similarity index 97% rename from XinjiangProject/XinjiangProject/Project/Qusetion/Controller/EvaluationListViewController.m rename to XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJEvaluationListViewController.m index 14f3538..926ff50 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/EvaluationListViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJEvaluationListViewController.m @@ -1,17 +1,17 @@ // -// EvaluationListViewController.m +// XJEvaluationListViewController.m // XinjiangProject // // Created by 仁康信息 on 2023/6/14. // -#import "EvaluationListViewController.h" +#import "XJEvaluationListViewController.h" #import "EvaluationListTableView.h" #import "FSXBStarRateView.h" #import "EvaluatListModel.h" -@interface EvaluationListViewController () +@interface XJEvaluationListViewController () @property (nonatomic, assign) NSInteger pageNo; @@ -25,7 +25,7 @@ @end -@implementation EvaluationListViewController +@implementation XJEvaluationListViewController - (NSMutableArray *)dataArray { diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/ExpertMainViewController.h b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.h similarity index 69% rename from XinjiangProject/XinjiangProject/Project/Qusetion/Controller/ExpertMainViewController.h rename to XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.h index 2148615..633aacd 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/ExpertMainViewController.h +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.h @@ -1,5 +1,5 @@ // -// ExpertMainViewController.h +// XJExpertMainViewController.h // XinjiangProject // // Created by 仁康信息 on 2023/6/16. @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface ExpertMainViewController : HQBaseViewController +@interface XJExpertMainViewController : HQBaseViewController @property (nonatomic, copy) NSString * doctorId; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/ExpertMainViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m similarity index 94% rename from XinjiangProject/XinjiangProject/Project/Qusetion/Controller/ExpertMainViewController.m rename to XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m index fcbfadc..15a8587 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/ExpertMainViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m @@ -1,24 +1,24 @@ // -// ExpertMainViewController.m +// XJExpertMainViewController.m // XinjiangProject // // Created by 仁康信息 on 2023/6/16. // -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" #import "ZHTagListView.h" #import "HospitalMainTableView.h" -#import "EvaluationListViewController.h" +#import "XJEvaluationListViewController.h" #import "DoctorDetailModel.h" #import "EvaluatListModel.h" #import "DoctorEvaluationTable.h" #import "SelectedDoctorTimeVC.h" -#import "FileDataDetailViewController.h" +#import "XJFileDataDetailViewController.h" #import "SelectFIleDateDetailViewController.h" #import "SelectedQuestionViewController.h" #import "QuestionMustKnowViewController.h" -@interface ExpertMainViewController () +@interface XJExpertMainViewController () @property (nonatomic, strong) UIScrollView * mainScrollView; @@ -60,7 +60,7 @@ @end -@implementation ExpertMainViewController +@implementation XJExpertMainViewController - (void)viewDidLoad { [super viewDidLoad]; @@ -70,8 +70,9 @@ self.view.backgroundColor = UIColorHex(#EEEEEE); [self createUI]; [self createData]; + //1 图文 0 音视频 [self getMustknowWithType:@"1"]; - [self getMustknowWithType:@"2"]; + [self getMustknowWithType:@"0"]; } @@ -147,14 +148,14 @@ [self.topView addSubview:self.hospitalName]; self.collectBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 60, kRealValue(33), 60, 26)]; - self.collectBtn.backgroundColor = KWhiteColor; - [self.collectBtn setTitle:@" 关注" forState:UIControlStateNormal]; - [self.collectBtn setTitle:@"已关注" forState:UIControlStateSelected]; - self.collectBtn.titleLabel.font = SYSTEMFONT(12); - [self.collectBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; - [self.collectBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside]; - self.collectBtn.layer.cornerRadius = 13.0; - self.collectBtn.layer.masksToBounds = true; +// self.collectBtn.backgroundColor = KWhiteColor; +// [self.collectBtn setTitle:@" 关注" forState:UIControlStateNormal]; +// [self.collectBtn setTitle:@"已关注" forState:UIControlStateSelected]; +// self.collectBtn.titleLabel.font = SYSTEMFONT(12); +// [self.collectBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal]; +// [self.collectBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside]; +// self.collectBtn.layer.cornerRadius = 13.0; +// self.collectBtn.layer.masksToBounds = true; [self.topView addSubview:self.collectBtn]; NSMutableArray *_dataSource = @[ @@ -337,7 +338,7 @@ self.homeTable.layer.masksToBounds = true; MJWeakSelf; self.homeTable.moreBlock = ^{ - EvaluationListViewController * evalVC = [[EvaluationListViewController alloc] init]; + XJEvaluationListViewController * evalVC = [[XJEvaluationListViewController alloc] init]; evalVC.doctorId = weakSelf.doctorId; evalVC.type = 2; [weakSelf.navigationController pushViewController:evalVC animated:YES]; @@ -392,18 +393,18 @@ DoctorDetailModel * model = [DoctorDetailModel modelWithDictionary:parmDic]; - if ([model.tfFollow integerValue] == 1) { - - self.collectBtn.selected = YES; - [self.collectBtn setImage:[UIImage imageWithColor:KWhiteColor] forState:UIControlStateNormal]; - - - }else - { - self.collectBtn.selected = NO; - [self.collectBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal]; - - } +// if ([model.tfFollow integerValue] == 1) { +// +// self.collectBtn.selected = YES; +// [self.collectBtn setImage:[UIImage imageWithColor:KWhiteColor] forState:UIControlStateNormal]; +// +// +// }else +// { +// self.collectBtn.selected = NO; +// [self.collectBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal]; +// +// } self.doctorName.text = model.doctorName; self.jobName.text = model.doctorTitle; @@ -577,18 +578,21 @@ self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.homeTable.bottom + kRealValue(30)); } + } + if ([tag isEqualToString:@"xuzhi_0"]) { + [self hiddenAllMBProgressHUD]; + NSDictionary * parmDic = response; + if (ValidDict(parmDic)) { + self.PictureknowDic = parmDic; + } + } if ([tag isEqualToString:@"xuzhi_1"]) { [self hiddenAllMBProgressHUD]; NSDictionary * parmDic = response; - self.PictureknowDic = parmDic; - - } - if ([tag isEqualToString:@"xuzhi_2"]) { - [self hiddenAllMBProgressHUD]; - NSDictionary * parmDic = response; - self.AudioknowDic = parmDic; - + if (ValidDict(parmDic)) { + self.AudioknowDic = parmDic; + } } } @@ -655,7 +659,7 @@ { QuestionMustKnowViewController * questionVC = [[QuestionMustKnowViewController alloc] init]; questionVC.doctorId = self.doctorId; - questionVC.popType = 2; //1 图文 0 音视频 2 用户须知 + questionVC.popType = 0; //1 图文 0 音视频 2 用户须知 [self.navigationController pushViewController:questionVC animated:YES]; }else { diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/FileDataDetailViewController.h b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJFileDataDetailViewController.h similarity index 61% rename from XinjiangProject/XinjiangProject/Project/Qusetion/Controller/FileDataDetailViewController.h rename to XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJFileDataDetailViewController.h index c95fb86..1e65ed7 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/FileDataDetailViewController.h +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJFileDataDetailViewController.h @@ -1,5 +1,5 @@ // -// FileDataDetailViewController.h +// XJFileDataDetailViewController.h // XinjiangProject // // Created by 仁康信息 on 2023/6/19. @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface FileDataDetailViewController : HQBaseViewController +@interface XJFileDataDetailViewController : HQBaseViewController @end diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/FileDataDetailViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJFileDataDetailViewController.m similarity index 93% rename from XinjiangProject/XinjiangProject/Project/Qusetion/Controller/FileDataDetailViewController.m rename to XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJFileDataDetailViewController.m index 33e7850..76def46 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/FileDataDetailViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJFileDataDetailViewController.m @@ -1,21 +1,21 @@ // -// FileDataDetailViewController.m +// XJFileDataDetailViewController.m // XinjiangProject // // Created by 仁康信息 on 2023/6/19. // -#import "FileDataDetailViewController.h" +#import "XJFileDataDetailViewController.h" #import "DetailTitleView.h" #import "DetailUserInfoView.h" #import "FileDataDeatilCenterView.h" #import "BasicHealthInfoView.h" -@interface FileDataDetailViewController () +@interface XJFileDataDetailViewController () @end -@implementation FileDataDetailViewController +@implementation XJFileDataDetailViewController - (void)viewDidLoad { [super viewDidLoad]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/DoctorInfoTopView.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/DoctorInfoTopView.m index 5ca1b7e..19b1a4f 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/DoctorInfoTopView.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/DoctorInfoTopView.m @@ -101,13 +101,13 @@ self.collectBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width - kRealValue(15) - 60, kRealValue(24), 60, 25)]; - self.collectBtn.backgroundColor = UIColorHex(#21BEBD); - [self.collectBtn setTitle:@"关注" forState:UIControlStateNormal]; - self.collectBtn.titleLabel.font = SYSTEMFONT(12); - [self.collectBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; - self.collectBtn.layer.cornerRadius = 13.0; - self.collectBtn.layer.masksToBounds = true; - [self.collectBtn addTarget:self action:@selector(userCollectDoctor) forControlEvents:UIControlEventTouchUpInside]; +// self.collectBtn.backgroundColor = UIColorHex(#21BEBD); +// [self.collectBtn setTitle:@"关注" forState:UIControlStateNormal]; +// self.collectBtn.titleLabel.font = SYSTEMFONT(12); +// [self.collectBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; +// self.collectBtn.layer.cornerRadius = 13.0; +// self.collectBtn.layer.masksToBounds = true; +// [self.collectBtn addTarget:self action:@selector(userCollectDoctor) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:self.collectBtn]; self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.heardImage.right + kRealValue(18),self.jobLabel.bottom + kRealValue(18) ,self.width - self.heardImage.right - kRealValue(30), 13)]; @@ -323,17 +323,17 @@ } - if([doctorModel.tfFollow integerValue] == 1) { - - [self.collectBtn setTitle:@"已关注" forState:UIControlStateNormal]; - [self.collectBtn setTitleColor:CFontColor2 forState:UIControlStateNormal]; - [self.collectBtn setBackgroundColor:CViewBgColor]; - [self.collectBtn setImage:[UIImage imageWithColor:CViewBgColor] forState:UIControlStateNormal]; - - }else - { - [self.collectBtn setImage:IMAGE_NAMED(@"detail_collect") forState:UIControlStateNormal]; - } +// if([doctorModel.tfFollow integerValue] == 1) { +// +// [self.collectBtn setTitle:@"已关注" forState:UIControlStateNormal]; +// [self.collectBtn setTitleColor:CFontColor2 forState:UIControlStateNormal]; +// [self.collectBtn setBackgroundColor:CViewBgColor]; +// [self.collectBtn setImage:[UIImage imageWithColor:CViewBgColor] forState:UIControlStateNormal]; +// +// }else +// { +// [self.collectBtn setImage:IMAGE_NAMED(@"detail_collect") forState:UIControlStateNormal]; +// } //状态数据 NSString * timeString = [HQCommonUtils getTimeFromTimestamp:[sessionModel.sessionDateLong integerValue] andDateFormat:@"YYYY年MM月dd日"]; NSString * weekString; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m index 044e90d..222e56e 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m @@ -37,16 +37,16 @@ - (void)createUI { - UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kStatusBarHeight + kRealValue(18))]; + UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kStatusBarHeight)]; topView.backgroundColor = UIColorHex(#14BEBE); [self addSubview:topView]; - - UILabel * detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(0 ,kStatusBarHeight , kScreenWidth, kRealValue(18))]; - detailLabel.text = @"健康咨询"; - detailLabel.font = MEDIUMFONT(18); - detailLabel.textColor = KWhiteColor; - detailLabel.textAlignment = NSTextAlignmentCenter; - [topView addSubview:detailLabel]; +// +// UILabel * detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(0 ,kStatusBarHeight , kScreenWidth, kRealValue(18))]; +// detailLabel.text = @""; +// detailLabel.font = MEDIUMFONT(18); +// detailLabel.textColor = KWhiteColor; +// detailLabel.textAlignment = NSTextAlignmentCenter; +// [topView addSubview:detailLabel]; UIImageView * backImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, topView.bottom - 1, kScreenWidth, kRealValue(288))]; backImage.image = [UIImage imageNamed:@"topBackImg"]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionDiseaseTableViewCell.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionDiseaseTableViewCell.m index 71162c0..ad5e6d5 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionDiseaseTableViewCell.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionDiseaseTableViewCell.m @@ -73,7 +73,7 @@ }]; self.nameLabel = [[UILabel alloc] init]; - self.nameLabel.text = @"感冒"; + self.nameLabel.text = @"--"; self.nameLabel.font = BOLDSYSTEMFONT(14); self.nameLabel.textColor = CFontColor1; self.nameLabel.textAlignment = NSTextAlignmentLeft; @@ -87,7 +87,7 @@ }]; self.desLabel = [[UILabel alloc] init]; - self.desLabel.text = @"最近总是肚子不舒服,总是半夜肚子疼。感觉肚子有些凉,最近没有去过医院"; + self.desLabel.text = @"--"; self.desLabel.font = MEDIUMFONT(13); self.desLabel.textColor = UIColorHex(#999999); self.desLabel.textAlignment = NSTextAlignmentLeft; @@ -124,9 +124,9 @@ _model = model; - self.nameLabel.text = model.medicalDescribe; + self.nameLabel.text = model.recordsName; - self.desLabel.text = model.recordsName; + self.desLabel.text = model.medicalDescribe ; self.chooseBtn.selected = model.isSelected; diff --git a/XinjiangProject/XinjiangProject/Project/SOS/Controller/XJSosCenterViewController.m b/XinjiangProject/XinjiangProject/Project/SOS/Controller/XJSosCenterViewController.m index 45d722e..02d22a6 100644 --- a/XinjiangProject/XinjiangProject/Project/SOS/Controller/XJSosCenterViewController.m +++ b/XinjiangProject/XinjiangProject/Project/SOS/Controller/XJSosCenterViewController.m @@ -53,44 +53,45 @@ @property (assign, nonatomic) NSInteger selecetIndex; -@property (strong, nonatomic) NSMutableArray * hospitalArray; - -@property (strong, nonatomic) NSMutableArray * AedArray; - -@property (strong, nonatomic) NSMutableArray * carArray; +@property (nonatomic, strong) UIButton *gpsButton; +//@property (strong, nonatomic) NSMutableArray * hospitalArray; +// +//@property (strong, nonatomic) NSMutableArray * AedArray; +// +//@property (strong, nonatomic) NSMutableArray * carArray; @end @implementation XJSosCenterViewController -- (NSMutableArray *)carArray { - - if (!_carArray) { - - _carArray = [[NSMutableArray alloc] init]; - } - return _carArray; -} - -- (NSMutableArray *)hospitalArray { - - if (!_hospitalArray) { - - _hospitalArray = [[NSMutableArray alloc] init]; - } - return _hospitalArray; -} - -- (NSMutableArray *)AedArray { - - if (!_AedArray) { - - _AedArray = [[NSMutableArray alloc] init]; - } - return _AedArray; - - -} +//- (NSMutableArray *)carArray { +// +// if (!_carArray) { +// +// _carArray = [[NSMutableArray alloc] init]; +// } +// return _carArray; +//} +// +//- (NSMutableArray *)hospitalArray { +// +// if (!_hospitalArray) { +// +// _hospitalArray = [[NSMutableArray alloc] init]; +// } +// return _hospitalArray; +//} +// +//- (NSMutableArray *)AedArray { +// +// if (!_AedArray) { +// +// _AedArray = [[NSMutableArray alloc] init]; +// } +// return _AedArray; +// +// +//} - (NSMutableArray *)titlesArray { @@ -114,7 +115,7 @@ if (!_addressView) { - _addressView = [[XJSOSAddressView alloc] initWithFrame:CGRectMake(kRealValue(15), kScreenHeight - kTopHeight - kRealValue(130), kScreenWidth - kRealValue(30), kRealValue(110))]; + _addressView = [[XJSOSAddressView alloc] initWithFrame:CGRectZero]; _addressView.addressDelegate = self; _addressView.backgroundColor = KWhiteColor; @@ -223,9 +224,8 @@ self.Longitude = location.coordinate.longitude; self.latitude = location.coordinate.latitude; [self getResourceDataWithType:@"1" Longitude:self.Longitude withLatitude:self.latitude]; - - XJSosCenterViewController *strongSelf = weakSelf; - [strongSelf addAnnotationToMapView:annotation]; +// XJSosCenterViewController *strongSelf = weakSelf; +// [strongSelf addAnnotationToMapView:annotation]; }; } @@ -246,10 +246,16 @@ self.navigationItem.title = @"应急就医"; self.view.backgroundColor = KWhiteColor; TYNavSheet = [[TYMapNavSheet alloc]init]; + + [self initMapView]; -// [self initCompleteBlock]; -// [self configLocationManager]; -// [self reGeocodeAction]; + + UIButton *locationBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, 80, 40, 40)]; + [locationBtn setImage:[UIImage imageNamed:@"location_icon"] forState:UIControlStateNormal]; + [locationBtn addTarget:self action:@selector(onLocationBtnPressed) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:locationBtn]; + + self.titleView = [[LXSegmentTitleView alloc] initWithFrame:CGRectMake(0 , 0 , kScreenWidth , kRealValue(35))]; self.titleView.itemMinMargin = 15.f; @@ -263,25 +269,14 @@ [self.view addSubview:self.titleView]; UIView * grapView = [[UIView alloc] initWithFrame:CGRectMake(0, kScreenHeight - kTopHeight - kRealValue(170) - kTabBarHeight, kScreenWidth,kRealValue(170))]; - grapView.backgroundColor = RGBA(0, 0, 0, 0.1); + grapView.backgroundColor = RGBA(0, 0, 0, 0.2); // self.grapView = grapView; self.grapView.hidden = false; [self.view addSubview:grapView]; + [self addWhiteToBlackTransparentGradientToView:self.grapView]; - // 添加渐变图层 - CAGradientLayer *gradient = [CAGradientLayer layer]; - gradient.frame = grapView.bounds; - gradient.colors = @[(__bridge id)[UIColor colorWithWhite:1.0 alpha:0.0].CGColor, // 顶部白色透明 - (__bridge id)[UIColor blackColor].CGColor]; // 底部黑色 - gradient.locations = @[@0.0, @1.0]; - gradient.startPoint = CGPointMake(0.5, 0.0); // 从上到下 - gradient.endPoint = CGPointMake(0.5, 1.0); - - [grapView.layer insertSublayer:gradient atIndex:0]; - - - XMButton * callBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - 70 - kRealValue(33), grapView.height - StatusBar_Height - kRealValue(80) , kRealValue(70), kRealValue(70))]; + XMButton * callBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - 70 - kRealValue(33), grapView.height - 17 - 70 , 70, 70)]; callBtn.style = SDButtonStyleTop; callBtn.backgroundColor = KWhiteColor; callBtn.layer.cornerRadius = 35.0f; @@ -298,7 +293,7 @@ callBtn.interval = 5; [grapView addSubview:callBtn]; - XMButton * sosBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(33), callBtn.top , kRealValue(70), kRealValue(70))]; + XMButton * sosBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(33), callBtn.top , 70,70)]; sosBtn.style = SDButtonStyleTop; sosBtn.backgroundColor = KWhiteColor; sosBtn.layer.cornerRadius = 35.0f; @@ -315,11 +310,48 @@ sosBtn.interval = 5; [grapView addSubview:sosBtn]; - self.titles = @[@"油田医院",@"合作医院",@"医疗点",@"AED",@"救护车"]; + self.titles = @[@"油田医院",@"合作医院",@"健康小屋",@"AED",@"救护车"]; self.titleView.segmentTitles = self.titles; [self.titleView reloadData]; + + self.gpsButton = [self makeGPSButtonView]; + self.gpsButton.frame = CGRectMake(kScreenWidth - 40, kRealValue(150), 40, 40); + [self.mapView addSubview:self.gpsButton]; + + UIView *zoomPannelView = [self makeZoomPannelView]; + zoomPannelView.center = CGPointMake(self.grapView.bounds.size.width - CGRectGetMidX(zoomPannelView.bounds) - 10, + self.grapView.bounds.size.height - CGRectGetMidY(zoomPannelView.bounds) - 10); + + zoomPannelView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; + [self.grapView addSubview:zoomPannelView]; } +- (void)addWhiteToBlackTransparentGradientToView:(UIView *)view { + // 让 view 本身透明 + view.backgroundColor = [UIColor clearColor]; + + // 移除已有的渐变层,避免重复叠加 + for (CALayer *layer in view.layer.sublayers.copy) { + if ([layer isKindOfClass:[CAGradientLayer class]]) { + [layer removeFromSuperlayer]; + } + } + + CAGradientLayer *gradient = [CAGradientLayer layer]; + gradient.frame = view.bounds; + + gradient.colors = @[ + (__bridge id)[[UIColor colorWithWhite:1.0 alpha:0.15] CGColor], // 顶部白色半透明 + (__bridge id)[[UIColor colorWithWhite:0.0 alpha:0.25] CGColor] // 底部黑色半透明 + ]; + + gradient.startPoint = CGPointMake(0.5, 0.0); + gradient.endPoint = CGPointMake(0.5, 1.0); + + [view.layer insertSublayer:gradient atIndex:0]; +} + + - (void)initMapView { if (self.mapView == nil) { [AMapServices sharedServices].enableHTTPS = YES; @@ -330,18 +362,14 @@ self.mapView.compassOrigin = CGPointMake(self.mapView.compassOrigin.x, 222); self.mapView.showsScale = YES; //设置成NO表示不显示比例尺;YES表示显示比例尺 self.mapView.delegate = self; - ///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码 - _mapView.scaleOrigin= CGPointMake(_mapView.scaleOrigin.x, kRealValue(45)); //设置比例尺位置 - - +// ///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码 +// _mapView.scaleOrigin= CGPointMake(_mapView.scaleOrigin.x, kRealValue(45)); //设置比例尺位置 [self.view addSubview:self.mapView]; - - +// +// self.mapView.showsUserLocation = YES; - self.mapView.userTrackingMode = MAUserTrackingModeFollow; - +// self.mapView.userTrackingMode = MAUserTrackingModeFollow; //1.2、新增点A - // //将目标经纬度设置为地图中心店 MAUserLocationRepresentation *r = [[MAUserLocationRepresentation alloc] init]; r.showsAccuracyRing = YES;///精度圈是否显示,默认YES @@ -354,6 +382,68 @@ } +- (UIButton *)makeGPSButtonView { + UIButton *ret = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; + ret.backgroundColor = [UIColor whiteColor]; + ret.layer.cornerRadius = 4; + [ret setImage:[UIImage imageNamed:@"gpsStat1"] forState:UIControlStateNormal]; + [ret addTarget:self action:@selector(gpsAction) forControlEvents:UIControlEventTouchUpInside]; + + return ret; +} + +- (void)gpsAction { + + + self.mapView.showsUserLocation = YES; + self.mapView.userTrackingMode = MAUserTrackingModeFollow; + self.mapView.zoomLevel = 13; + [self.mapView setCenterCoordinate:self.mapView.userLocation.location.coordinate animated:YES]; + [self.gpsButton setSelected:YES]; + +} + + +- (UIView *)makeZoomPannelView +{ + UIView *ret = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 53, 98)]; + + UIButton *incBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 53, 49)]; + [incBtn setImage:[UIImage imageNamed:@"increase"] forState:UIControlStateNormal]; + [incBtn sizeToFit]; + [incBtn addTarget:self action:@selector(zoomPlusAction) forControlEvents:UIControlEventTouchUpInside]; + + UIButton *decBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 49, 53, 49)]; + [decBtn setImage:[UIImage imageNamed:@"decrease"] forState:UIControlStateNormal]; + [decBtn sizeToFit]; + [decBtn addTarget:self action:@selector(zoomMinusAction) forControlEvents:UIControlEventTouchUpInside]; + + + [ret addSubview:incBtn]; + [ret addSubview:decBtn]; + + return ret; +} + +- (void)zoomPlusAction +{ + CGFloat oldZoom = self.mapView.zoomLevel; + [self.mapView setZoomLevel:(oldZoom + 1) animated:YES]; + self.mapView.showsScale = YES; +} + +- (void)zoomMinusAction +{ + CGFloat oldZoom = self.mapView.zoomLevel; + [self.mapView setZoomLevel:(oldZoom - 1) animated:YES]; + self.mapView.showsScale = NO; +} + +- (void)onLocationBtnPressed { + self.mapView.zoomLevel = 13; + self.mapView.userTrackingMode = MAUserTrackingModeFollow; +} + - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; @@ -369,8 +459,8 @@ [super viewDidAppear:animated]; // 开启定位 - self.mapView.showsUserLocation = YES; - self.mapView.userTrackingMode = MAUserTrackingModeFollow; +// self.mapView.showsUserLocation = YES; +// self.mapView.userTrackingMode = MAUserTrackingModeFollow; } - (void)viewDidDisappear:(BOOL)animated @@ -457,14 +547,11 @@ self.Longitude = userLocation.location.coordinate.longitude; self.latitude = userLocation.location.coordinate.latitude; NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; -// [self.mapView setCenterCoordinate: userLocation.location.coordinate animated:YES]; [user setObject:@(userLocation.location.coordinate.longitude) forKey:USERDEFAULLONG]; [user setObject:@(userLocation.location.coordinate.latitude) forKey:USERDEFAULLATITUDE]; [user synchronize]; -// [self getResourceDataWithType:@"0" Longitude:self.Longitude withLatitude:self.latitude]; -// [self getResourceDataWithType:self.type Longitude:self.Longitude withLatitude:self.latitude]; } } @@ -477,91 +564,17 @@ - (void)segmentTitleView:(LXSegmentTitleView *)segmentView selectedIndex:(NSInteger)selectedIndex lastSelectedIndex:(NSInteger)lastSelectedIndex { - self.mapView.showsUserLocation = YES; - self.mapView.userTrackingMode = MAUserTrackingModeFollow; - - [self getResourceDataWithType:[NSString stringWithFormat:@"%ld",selectedIndex] Longitude:self.Longitude withLatitude:self.latitude]; +// self.mapView.showsUserLocation = YES; +// self.mapView.userTrackingMode = MAUserTrackingModeFollow; + self.addressView.hidden = true; + self.grapView.hidden = false; + self.selecetIndex = selectedIndex + 1; + [self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude]; [self.addressView removeFromSuperview]; -// self.selecetIndex = selectedIndex + 1; -// if (self.selecetIndex == 1 || self.selecetIndex == 2) -// { -// [self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude]; -// [self.addressView removeFromSuperview]; -// } -// if (self.selecetIndex ==3) { -// [self.hospitalArray removeAllObjects]; -// [self NearbyHospitalData]; -// [self.addressView removeFromSuperview]; -// } -// if (self.selecetIndex ==4) { -// [self.AedArray removeAllObjects]; -// [self NearbyAEDEquipmentData]; -// [self.addressView removeFromSuperview]; -// } -// -// if (self.selecetIndex ==5) { -// [self.AedArray removeAllObjects]; -// [self NearbySoSCarInf0Data]; -// [self.addressView removeFromSuperview]; -// } - } -#pragma mark:请求医疗点数据 -//- (void)NearbyHospitalData { -// -// NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; -// CGFloat longitude = [[user objectForKey:USERDEFAULLONG] floatValue]; -// CGFloat latitude = [[user objectForKey:USERDEFAULLATITUDE] floatValue]; -// -// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; -// [parmDic setObject:[NSString stringWithFormat:@"%f",longitude] forKey:@"longitude"]; -// [parmDic setObject:[NSString stringWithFormat:@"%f",latitude] forKey:@"latitude"]; -// [parmDic setObject:[NSString stringWithFormat:@"%d",100000] forKey:@"radiusRange"]; -// [parmDic setObject:@"" forKey:@"name"]; -// [parmDic setObject:@(5) forKey:@"resourceNum"]; -// -// JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"HOSPITALAPI" NeedToken:@""]; -// [sosApi getNearbyHomePageHospitalPoint:parmDic]; -// -//} -//#pragma mark:请求医疗点数据 -//- (void)NearbyAEDEquipmentData { -// -// NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; -// CGFloat longitude = [[user objectForKey:USERDEFAULLONG] floatValue]; -// CGFloat latitude = [[user objectForKey:USERDEFAULLATITUDE] floatValue]; -// -// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; -// [parmDic setObject:[NSString stringWithFormat:@"%f",longitude] forKey:@"longitude"]; -// [parmDic setObject:[NSString stringWithFormat:@"%f",latitude] forKey:@"latitude"]; -// [parmDic setObject:[NSString stringWithFormat:@"%d",100000] forKey:@"radiusRange"]; -// [parmDic setObject:@"" forKey:@"aedNum"]; -// -// JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"AEDEQAPI" NeedToken:@""]; -// [sosApi getNearbyAEDEquipmentqNumber:parmDic]; -// -//} - -//#pragma mark:请求救护车数据 -//- (void)NearbySoSCarInf0Data { -// -// NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; -// CGFloat longitude = [[user objectForKey:USERDEFAULLONG] floatValue]; -// CGFloat latitude = [[user objectForKey:USERDEFAULLATITUDE] floatValue]; -// -// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; -// [parmDic setObject:[NSString stringWithFormat:@"%f",longitude] forKey:@"longitude"]; -// [parmDic setObject:[NSString stringWithFormat:@"%f",latitude] forKey:@"latitude"]; -// [parmDic setObject:[NSString stringWithFormat:@"%d",100000] forKey:@"radiusRange"]; -// -// JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"SOSCARAPI" NeedToken:@""]; -// [sosApi getSoSCarInfoLocationHome:parmDic]; -// -//} - - (void)getResourceDataWithType:(NSString *)type Longitude:(CGFloat)longitude @@ -600,13 +613,8 @@ NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init]; [self.mapView removeAnnotations:self.mapView.annotations]; [self.ponisArray removeAllObjects]; - // 获取用户位置 - MAUserLocation *userLocation = self.mapView.userLocation; - if (userLocation) { - [self.ponisArray addObject:userLocation]; - } + for (XJSOSResourcesModel * resourceModel in model.resources) { - MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; pointAnnotation.coordinate = CLLocationCoordinate2DMake(resourceModel.latitude, resourceModel.longitude); pointAnnotation.title = resourceModel.name; @@ -615,7 +623,25 @@ [self addAnnotationToMapView:pointAnnotation]; [self.ponisArray addObject:pointAnnotation]; } + + if (self.ponisArray.count == 1) { + self.mapView.zoomLevel = 11; + } + + if (self.ponisArray.count == 0) { + self.mapView.showsUserLocation = YES; + self.mapView.userTrackingMode = MAUserTrackingModeFollow; + self.mapView.zoomLevel = 13; + } else { + + UIEdgeInsets insets = UIEdgeInsetsMake(80, 50, 80, 50); // 增加边距让视野更广 + [self.mapView showAnnotations:self.ponisArray edgePadding:insets animated:YES]; + + } + + } + if ([tag isEqualToString:@"CALLAPI"]) { NSDictionary * dic = response; @@ -623,7 +649,8 @@ } if ([tag isEqualToString:@"GroupAPI"]) { NSDictionary * dic = response; - + [self hiddenAllMBProgressHUD]; + if ([ESCTUIManager TUIUserStatus] == false) { @@ -645,7 +672,6 @@ chatVC.navTitle = @"应急中心"; chatVC.questionType = 1; [self.navigationController pushViewController:chatVC animated:YES]; - [self hiddenAllMBProgressHUD]; } if ([tag isEqualToString:@"loginIMAPI"]) { @@ -661,93 +687,7 @@ [self callSoSAction]; } -// if([tag isEqualToString:@"HOSPITALAPI"]) { -// -// NSArray * responseArray = response; -// -// NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init]; -// [self.mapView removeAnnotations:self.mapView.annotations]; -// [self.ponisArray removeAllObjects]; -// // 获取用户位置 -// MAUserLocation *userLocation = self.mapView.userLocation; -// if (userLocation) { -// [self.ponisArray addObject:userLocation]; -// } -// for (NSDictionary * dic in responseArray) { -// -// XJHealthInterveneHomeModel * hospitalModel = [XJHealthInterveneHomeModel modelWithDictionary:dic]; -// [self.hospitalArray addObject:hospitalModel]; -// -// MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; -// pointAnnotation.coordinate = CLLocationCoordinate2DMake(hospitalModel.latitude, hospitalModel.longitude); -// pointAnnotation.title = hospitalModel.name; -// pointAnnotation.subtitle = hospitalModel.address; -// [poiAnnotations addObject:pointAnnotation]; -// [self addAnnotationToMapView:pointAnnotation]; -// [self.ponisArray addObject:pointAnnotation]; -// } -// -// -// } -// if ([tag isEqualToString:@"AEDEQAPI"]) { -// -// NSArray * responseArray = response; -// -// NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init]; -// [self.mapView removeAnnotations:self.mapView.annotations]; -// [self.ponisArray removeAllObjects]; -// // 获取用户位置 -// MAUserLocation *userLocation = self.mapView.userLocation; -// if (userLocation) { -// [self.ponisArray addObject:userLocation]; -// } -// -// for (NSDictionary * dic in responseArray) { -// -// XJAEDNetWrokModel * aedModel = [XJAEDNetWrokModel modelWithDictionary:dic]; -// [self.AedArray addObject:aedModel]; -// -// MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; -// pointAnnotation.coordinate = CLLocationCoordinate2DMake(aedModel.latitude, aedModel.longitude); -// pointAnnotation.title = aedModel.name; -// pointAnnotation.subtitle = aedModel.installAddress; -// [poiAnnotations addObject:pointAnnotation]; -// [self addAnnotationToMapView:pointAnnotation]; -// [self.ponisArray addObject:pointAnnotation]; -// } -// -// } -// if ([tag isEqualToString:@"SOSCARAPI"]) { -// -// NSArray * responseArray = response; -// -// NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init]; -// [self.mapView removeAnnotations:self.mapView.annotations]; -// [self.ponisArray removeAllObjects]; -// // 获取用户位置 -// MAUserLocation *userLocation = self.mapView.userLocation; -// if (userLocation) { -// [self.ponisArray addObject:userLocation]; -// } -// -// for (NSDictionary * dic in responseArray) { -// -// XJSOSResourcesModel * aedModel = [XJSOSResourcesModel modelWithDictionary:dic]; -// [self.carArray addObject:aedModel]; -// -// MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; -// pointAnnotation.coordinate = CLLocationCoordinate2DMake(aedModel.latitude, aedModel.longitude); -// pointAnnotation.title = aedModel.departCode; -// pointAnnotation.subtitle = aedModel.licensePlateNumber; -// [poiAnnotations addObject:pointAnnotation]; -// [self addAnnotationToMapView:pointAnnotation]; -// [self.ponisArray addObject:pointAnnotation]; -// } -// -// -// } -// - + } @@ -760,7 +700,6 @@ - (MAAnnotationView *)mapView:(MAMapView *)mapView viewForAnnotation:(id)annotation { - [self.mapView showAnnotations:self.ponisArray edgePadding:UIEdgeInsetsMake(100, 100, 100, 100) animated:YES]; //用户当前位置大头针 if ([annotation isKindOfClass:[MAUserLocation class]]) { @@ -789,54 +728,7 @@ annotationView = [[MAAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:reuseIndetifier]; } -// if (self.selecetIndex == 0) { -// -// for (XJHealthInterveneHomeModel * hospitalModel in self.hospitalArray) { -// -// if (annotation.coordinate.longitude == hospitalModel.longitude && annotation.coordinate.latitude == hospitalModel.latitude) { -// annotationView.image = [UIImage imageNamed:@"medicalAnnitation"]; -// } -// } -// -// // 使用动画效果将点显示在屏幕内 -// [annotationView setSelected:false animated:YES]; -// //设置中心点偏移,使得标注底部中间点成为经纬度对应点 -// annotationView.centerOffset = CGPointMake(0, -18); -// return annotationView; -// } -// if (self.selecetIndex == 3) { -// -// for (XJAEDNetWrokModel * aedModel in self.AedArray) { -// -// if (annotation.coordinate.longitude == aedModel.longitude && annotation.coordinate.latitude == aedModel.latitude) { -// annotationView.image = [UIImage imageNamed:@"AEDIcon"]; -// } -// } -// // 使用动画效果将点显示在屏幕内 -// [annotationView setSelected:false animated:YES]; -// //设置中心点偏移,使得标注底部中间点成为经纬度对应点 -// annotationView.centerOffset = CGPointMake(0, -18); -// return annotationView; -// -// } -// //救护车 -// if (self.selecetIndex == 5) { -// -// for (XJSOSResourcesModel * aedModel in self.carArray) { -// -// if (annotation.coordinate.longitude == aedModel.longitude && annotation.coordinate.latitude == aedModel.latitude) { -// annotationView.image = [UIImage imageNamed:@"sosCard"]; -// } -// } -// // 使用动画效果将点显示在屏幕内 -// [annotationView setSelected:false animated:YES]; -// //设置中心点偏移,使得标注底部中间点成为经纬度对应点 -// annotationView.centerOffset = CGPointMake(0, -18); -// return annotationView; -// -// } -// else -// { + for (XJSOSResourcesModel * resourceModel in self.model.resources) { if (annotation.coordinate.longitude == resourceModel.longitude && annotation.coordinate.latitude == resourceModel.latitude) { @@ -864,13 +756,11 @@ // 使用动画效果将点显示在屏幕内 [annotationView setSelected:false animated:YES]; //设置中心点偏移,使得标注底部中间点成为经纬度对应点 - annotationView.centerOffset = CGPointMake(0, -18); - + annotationView.centerOffset = CGPointMake(0, -10); + [self.mapView showAnnotations:self.mapView.annotations edgePadding:UIEdgeInsetsMake(100, 100, 100, 100) animated:YES]; return annotationView; } - -// } return nil; } @@ -879,74 +769,7 @@ self.grapView.hidden = true; - - if (self.selecetIndex == 3) { //医疗点 - - for (XJHealthInterveneHomeModel * hospitalModel in self.hospitalArray) { - - if (view.annotation.coordinate.longitude == hospitalModel.longitude && view.annotation.coordinate.latitude == hospitalModel.latitude) { - - XJSOSResourcesModel * resourceModel = [[XJSOSResourcesModel alloc] init]; - resourceModel.address = hospitalModel.address; - resourceModel.name = hospitalModel.name; - resourceModel.mobile = hospitalModel.mobile; - resourceModel.latitude = hospitalModel.latitude; - resourceModel.longitude = hospitalModel.longitude; - - self.addressView.resourceModel = resourceModel; - self.resourceModel = resourceModel; - [self.mapView addSubview:self.addressView]; - } - } - return; - - } - if (self.selecetIndex == 4) { //aed - - for (XJAEDNetWrokModel * aedModel in self.AedArray) { - - if (view.annotation.coordinate.longitude == aedModel.longitude && view.annotation.coordinate.latitude == aedModel.latitude) { - - XJHealthInterveneAEDModel * subAedModel = [[XJHealthInterveneAEDModel alloc] init]; - - subAedModel.resourceAddress = aedModel.installAddress; - subAedModel.resourceName = aedModel.name; - subAedModel.principalPhone = aedModel.chargeFirstMobile; - self.addressView.aedModel = subAedModel; - - XJSOSResourcesModel * resourceModel = [[XJSOSResourcesModel alloc] init]; - resourceModel.address = aedModel.installAddress; - resourceModel.name = aedModel.name; - resourceModel.mobile = aedModel.chargeFirstMobile; - resourceModel.latitude = aedModel.latitude; - resourceModel.longitude = aedModel.longitude; - self.resourceModel = resourceModel; - [self.mapView addSubview:self.addressView]; - } - } - return; - - } - if (self.selecetIndex == 5) { - - for (XJSOSResourcesModel * aedModel in self.carArray) { - - if (view.annotation.coordinate.longitude == aedModel.longitude && view.annotation.coordinate.latitude == aedModel.latitude) { - - XJSOSResourcesModel * resourceModel = [[XJSOSResourcesModel alloc] init]; - resourceModel.address = aedModel.licensePlateNumber; - resourceModel.name = aedModel.departCode; - resourceModel.latitude = aedModel.latitude; - resourceModel.longitude = aedModel.longitude; - self.resourceModel = resourceModel; - self.addressView.resourceModel = resourceModel; - [self.mapView addSubview:self.addressView]; - } - } - return; - - } for (XJSOSResourcesModel * resourceModel in self.model.resources) { @@ -954,7 +777,14 @@ self.addressView.resourceModel = resourceModel; self.resourceModel = resourceModel; + self.addressView.hidden = false; + [self.mapView addSubview:self.addressView]; + + [ self.addressView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.equalTo(self.view).insets(UIEdgeInsetsMake(0, 20, 0, 20)); + make.bottom.mas_offset(- 20); + }]; } } diff --git a/XinjiangProject/XinjiangProject/Project/SOS/Model/XJSOSCenterModel.h b/XinjiangProject/XinjiangProject/Project/SOS/Model/XJSOSCenterModel.h index c87c18e..233e2be 100644 --- a/XinjiangProject/XinjiangProject/Project/SOS/Model/XJSOSCenterModel.h +++ b/XinjiangProject/XinjiangProject/Project/SOS/Model/XJSOSCenterModel.h @@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString * licensePlateNumber; @property (nonatomic, copy) NSString * departCode; +@property (nonatomic, copy) NSString * level_dictText; @property (nonatomic, copy) NSString * driverName; diff --git a/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m b/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m index 975a927..d17b803 100644 --- a/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m +++ b/XinjiangProject/XinjiangProject/Project/SOS/View/XJSOSAddressView.m @@ -6,14 +6,16 @@ // #import "XJSOSAddressView.h" +#import "PaddingLabel.h" @interface XJSOSAddressView () -@property (nonatomic, strong) UILabel * lvLabel; +@property (nonatomic, strong) PaddingLabel * lvLabel; @property (nonatomic, strong) UILabel * hospitalName; @property (nonatomic, strong) UILabel * phoneLabel; @property (nonatomic, strong) UILabel * addressLabel; +@property (nonatomic, strong) UIButton * samllPhoneBtn; @end @@ -42,8 +44,9 @@ self.layer.cornerRadius = 10; self.layer.masksToBounds = true; - self.lvLabel = [[UILabel alloc] init]; + self.lvLabel = [[PaddingLabel alloc] init]; self.lvLabel.layer.cornerRadius = 3.0f; + self.lvLabel.textInsets = UIEdgeInsetsMake(0, 6, 0, 6); // 上下0,左右6 self.lvLabel.layer.masksToBounds = true; self.lvLabel.text = @"--"; self.lvLabel.textColor = KWhiteColor; @@ -55,11 +58,11 @@ [self.lvLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(kRealValue(18)); - make.width.mas_offset(60); make.top.mas_offset(20); make.height.mas_offset(16); }]; + [self.lvLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; self.hospitalName = [[UILabel alloc] init]; self.hospitalName.text = @"--"; @@ -86,8 +89,8 @@ [self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(kRealValue(15)); make.right.mas_offset(-30); - make.top.mas_equalTo(self.lvLabel.mas_bottom).offset(12); - make.height.mas_offset(15); + make.top.mas_equalTo(self.lvLabel.mas_bottom).offset(11); + make.height.mas_offset(13); }]; @@ -95,14 +98,16 @@ self.addressLabel = [[UILabel alloc] init]; self.addressLabel.text = @"--km | ---"; self.addressLabel.font = MEDIUMFONT(13); + self.addressLabel.numberOfLines = 0; self.addressLabel.textColor = UIColorHex(#999999); + [self addSubview:self.addressLabel]; [self.addressLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(kRealValue(18)); make.right.mas_offset(kRealValue(-15)); - make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(10); - make.bottom.mas_offset(-10); + make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(11); + make.bottom.mas_offset(-26); }]; [self.addressLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; @@ -133,6 +138,7 @@ UIButton * samllPhoneBtn = [[UIButton alloc] init]; [samllPhoneBtn setImage:IMAGE_NAMED(@"address_phone") forState:UIControlStateNormal]; [samllPhoneBtn addTarget:self action:@selector(LocationPhoneView) forControlEvents:UIControlEventTouchUpInside]; + self.samllPhoneBtn = samllPhoneBtn; [self addSubview:samllPhoneBtn]; [samllPhoneBtn mas_makeConstraints:^(MASConstraintMaker *make) { @@ -140,13 +146,15 @@ make.top.mas_equalTo(self.hospitalName.mas_bottom).offset(4); make.width.height.mas_offset(26); }]; + + } - (void)setResourceModel:(XJSOSResourcesModel *)resourceModel { _resourceModel = resourceModel; - if ( !ValidStr(_resourceModel.level) ) { + if ( !ValidStr(_resourceModel.level_dictText) ) { self.lvLabel.hidden = false; - self.lvLabel.text = _resourceModel.level; + self.lvLabel.text = _resourceModel.level_dictText; [self.hospitalName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.lvLabel.mas_right).offset(10); make.right.mas_offset(-30); @@ -164,9 +172,30 @@ }]; } - self.addressLabel.text = _resourceModel.address; + self.addressLabel.text = [NSString stringWithFormat:@"%@",_resourceModel.address]; self.hospitalName.text = _resourceModel.name; - self.phoneLabel.text = _resourceModel.mobile; + if (!ValidStr(_resourceModel.mobile)) { + self.phoneLabel.text = _resourceModel.mobile; + self.samllPhoneBtn.hidden = false; + [self.addressLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(kRealValue(18)); + make.right.mas_offset(kRealValue(-15)); + make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(11); + make.bottom.mas_offset(-25); + }]; + }else + { + self.phoneLabel.text = @""; + self.samllPhoneBtn.hidden = true; + + [self.addressLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(kRealValue(18)); + make.right.mas_offset(kRealValue(-15)); + make.top.mas_equalTo(self.hospitalName.mas_bottom).offset(11); + make.bottom.mas_offset(-25); + }]; + + } } - (void)setAedModel:(XJHealthInterveneAEDModel *)aedModel { @@ -180,8 +209,14 @@ }]; self.addressLabel.text = [NSString stringWithFormat:@"%.2f | %@",_aedModel.distance / 1000.0, _aedModel.resourceAddress] ; self.hospitalName.text = _aedModel.resourceName; - self.phoneLabel.text = _aedModel.principalPhone; - + if (!ValidStr(_aedModel.principalPhone)) { + self.phoneLabel.text = _aedModel.principalPhone; + self.samllPhoneBtn.hidden = false; + }else + { + self.phoneLabel.text = @""; + self.samllPhoneBtn.hidden = true; + } } - (void)navLocationView { diff --git a/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m b/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m index 04236ee..d76bcf1 100644 --- a/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m +++ b/XinjiangProject/XinjiangProject/Project/TUIChat/ChatViewController.m @@ -15,7 +15,7 @@ #import "EndSystemSoSCell.h" #import "DoctorIDCardMessageCell.h" #import "healthDataCustomCell.h" -#import "ExpertMainViewController.h" +#import "XJExpertMainViewController.h" #import "SendHealthDataViewController.h" #import "CurrentLocationViewController.h" #import "TUITextMessageCellData.h" @@ -71,8 +71,8 @@ self.title = self.navTitle; // self 为 id self.view.backgroundColor = CViewBgColor; - - [self addNavigationItemWithImageNames:@[@"sangedian"] isLeft:false target:self action:@selector(foundMoreHistory) tags:@[@"1000"]]; + //聊天记录 +// [self addNavigationItemWithImageNames:@[@"sangedian"] isLeft:false target:self action:@selector(foundMoreHistory) tags:@[@"1000"]]; // 启用侧滑返回手势 // self.navigationController.interactivePopGestureRecognizer.delegate = self; // self.navigationController.interactivePopGestureRecognizer.enabled = YES; @@ -108,7 +108,7 @@ // TUIChatConfig.defaultConfig.enableTextTranslation = YES; //不显示视频和语音 [TUIChatConfig defaultConfig].enableVideoCall = self.isVideo; // YES:开启,NO:关闭 - [TUIChatConfig defaultConfig].enableAudioCall = self.isVideo; // YES:开启,NO:关闭 + [TUIChatConfig defaultConfig].enableAudioCall = NO; // YES:开启,NO:关闭 [TUIChatConfig defaultConfig].backgroudColor = CViewBgColor; //是否显示发送报告 @@ -241,13 +241,13 @@ // self.backgroundView.hidden = NO; // } } -#pragma mark:医生详情 +#pragma mark:医生详情 //头像点击 - (void)chatSelectedHeardImg:(TUIMessageCell *)cell { if (!cell.messageData.innerMessage.isSelf) { - NSString * userID = cell.messageData.innerMessage.sender; - self.userID = userID; - [self getIsSmallHelp:userID]; +// NSString * userID = cell.messageData.innerMessage.sender; +// self.userID = userID; +// [self getIsSmallHelp:userID]; } @@ -296,7 +296,12 @@ ////1 应急 2 图文咨询 3 音视频咨询 小助手 if (self.questionType == 1) { - + + [self showMBProgressHUDWithString:@"正在结束本次应急" autoHidden:false]; + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:self.sosEnd_id forKey:@"id"]; + JKCQAPI * endApi = [[JKCQAPI alloc] init:self tag:@"ENDSOSAPI" NeedToken:@""]; + [endApi PostEndSoSIMQuestion:parmDic]; } if (self.questionType == 2) { [self showMBProgressHUDWithString:@"正在结束本次会话" autoHidden:false]; @@ -428,7 +433,7 @@ if ([cell isKindOfClass:EndSystemSoSCell.class]) { EndSystemSoSCell * endCell = cell; - if (endCell.reviewBtn.hidden == false) { + if (endCell.reviewBtn.hidden == false && [TUIChatConfig defaultConfig].isEvealCell == false ) { evaluationPopView * popView = [[evaluationPopView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)]; self.popView = popView; popView.popBlock = ^(CGFloat starNumber, BOOL isSecrect, NSString * _Nonnull evaluationString) { @@ -510,7 +515,7 @@ NSString * isExpired =[NSString stringWithFormat:@"%@",response] ; if ([isExpired integerValue]== 0) { - ExpertMainViewController * experVC= [[ExpertMainViewController alloc] init]; + XJExpertMainViewController * experVC= [[XJExpertMainViewController alloc] init]; experVC.doctorId = self.doctorCardID; [self.navigationController pushViewController:experVC animated:YES]; }else diff --git a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctiorIDCardCellData.m b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctiorIDCardCellData.m index 1d0f19d..c1e3d37 100644 --- a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctiorIDCardCellData.m +++ b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctiorIDCardCellData.m @@ -35,7 +35,7 @@ // size.width += 20; // return size; - CGFloat textMaxWidth = 245.f; + CGFloat textMaxWidth = 260.f; CGSize size = CGSizeMake(textMaxWidth, 106); return size; diff --git a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m index b55c2d7..142f6cc 100644 --- a/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m +++ b/XinjiangProject/XinjiangProject/Project/TUIChat/CustomChatCell/DoctorCardCell/DoctorIDCardMessageCell.m @@ -35,25 +35,29 @@ self.container.layer.cornerRadius = 10; self.container.backgroundColor = KWhiteColor; self.doctorImg = [[UIImageView alloc] init]; + self.doctorImg.layer.masksToBounds = true; self.doctorImg.layer.cornerRadius = 10; [self.container addSubview:self.doctorImg]; self.doctorNameLabel = [[UILabel alloc] init]; - self.doctorNameLabel.text = @"张医生"; + self.doctorNameLabel.text = @"--"; self.doctorNameLabel.font = SYSTEMFONT(14); self.doctorNameLabel.textAlignment = NSTextAlignmentLeft; + self.doctorNameLabel.textColor = UIColorHex(#333333); [self.container addSubview:self.doctorNameLabel]; self.jobLabel = [[UILabel alloc] init]; - self.jobLabel.text = @"张医生"; - self.jobLabel.font = SYSTEMFONT(14); + self.jobLabel.text = @"--"; + self.jobLabel.font = SYSTEMFONT(13); self.jobLabel.textAlignment = NSTextAlignmentLeft; + self.jobLabel.textColor = UIColorHex(#666666); [self.container addSubview:self.jobLabel]; self.hospatilLabel = [[UILabel alloc] init]; - self.hospatilLabel.text = @"西京医院 - 消化科"; - self.hospatilLabel.font = SYSTEMFONT(14); + self.hospatilLabel.text = @"--"; + self.hospatilLabel.font = SYSTEMFONT(13); self.hospatilLabel.textAlignment = NSTextAlignmentLeft; + self.hospatilLabel.numberOfLines = 2; [self.container addSubview:self.hospatilLabel]; self.bottomLabel = [[UILabel alloc] init]; @@ -69,7 +73,9 @@ [super fillWithData:data]; self.doctorNameLabel.text = data.doctorName; - self.jobLabel.text = data.doctorTitle; + if(!ValidStr(data.doctorTitle)){ + self.jobLabel.text = [NSString stringWithFormat:@"(%@)", data.doctorTitle]; + } // self.messageData = data.timestamp; if (ValidStr(data.departmentName)) { @@ -116,9 +122,9 @@ self.doctorImg.frame = CGRectMake(14, 18, 50, 50); self.doctorNameLabel.frame = CGRectMake(self.doctorImg.right + 14, 18, w, 20); - self.jobLabel.frame = CGRectMake(self.doctorNameLabel.right + 2, 18, self.container.width - 80, 20); + self.jobLabel.frame = CGRectMake(self.doctorNameLabel.right + 2, 18, self.container.width - 2 - w, 20); - self.hospatilLabel.frame = CGRectMake(self.doctorNameLabel.left, self.doctorNameLabel.bottom + 10, self.container.width - 80, 20); + self.hospatilLabel.frame = CGRectMake(self.doctorNameLabel.left, self.doctorNameLabel.bottom, self.container.width - 80, 40); UIView * linv = [[UIView alloc] initWithFrame:CGRectMake(10, self.doctorImg.bottom + 10, self.container.width, 1)]; linv.backgroundColor = UIColorHex(#EFEFEF); diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json index 2305880..9107302 100644 --- a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "健康油我 1.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -12,6 +13,7 @@ "value" : "dark" } ], + "filename" : "健康油我.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -23,6 +25,7 @@ "value" : "tinted" } ], + "filename" : "健康油我 2.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我 1.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我 1.png new file mode 100644 index 0000000..1cf2a68 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我 1.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我 2.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我 2.png new file mode 100644 index 0000000..1cf2a68 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我 2.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我.png new file mode 100644 index 0000000..1cf2a68 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/AppIcon.appiconset/健康油我.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon.png deleted file mode 100644 index e6c7c59..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon@2x.png deleted file mode 100644 index acce67b..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon@2x.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon@3x.png deleted file mode 100644 index e046a37..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/tabbar_homepage_normal_icon@3x.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/emergency_icon.imageset/20250703-134619.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/emergency_icon.imageset/20250703-134619.png new file mode 100644 index 0000000..34fe670 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/emergency_icon.imageset/20250703-134619.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/emergency_icon.imageset/Contents.json similarity index 61% rename from XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/Contents.json rename to XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/emergency_icon.imageset/Contents.json index 95c5831..24a896c 100644 --- a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/Question_normal_icon.imageset/Contents.json +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/emergency_icon.imageset/Contents.json @@ -1,17 +1,15 @@ { "images" : [ { - "filename" : "tabbar_homepage_normal_icon.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "tabbar_homepage_normal_icon@2x.png", + "filename" : "20250703-134619.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "tabbar_homepage_normal_icon@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/decrease.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/decrease.imageset/Contents.json new file mode 100644 index 0000000..44984ec --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/decrease.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "decrease@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/decrease.imageset/decrease@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/decrease.imageset/decrease@2x.png new file mode 100644 index 0000000..9db7432 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/decrease.imageset/decrease@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/gpsStat1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/gpsStat1.imageset/Contents.json new file mode 100644 index 0000000..7c7a0d1 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/gpsStat1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gpsStat1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/gpsStat1.imageset/gpsStat1@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/gpsStat1.imageset/gpsStat1@2x.png new file mode 100644 index 0000000..4aeeb77 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/gpsStat1.imageset/gpsStat1@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/increase.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/increase.imageset/Contents.json new file mode 100644 index 0000000..86ca652 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/increase.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "increase@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/increase.imageset/increase@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/increase.imageset/increase@2x.png new file mode 100644 index 0000000..568bfa0 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/SOS/increase.imageset/increase@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/Contents.json new file mode 100644 index 0000000..20c46c9 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mineTabBar_nomal.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mineTabBar_nomal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mineTabBar_nomal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal.png new file mode 100644 index 0000000..54a8013 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal@2x.png new file mode 100644 index 0000000..b75529f Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal@3x.png new file mode 100644 index 0000000..0b1ad6c Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_nomal.imageset/mineTabBar_nomal@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/Contents.json new file mode 100644 index 0000000..f617187 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "mineTabBar_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mineTabBar_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mineTabBar_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected.png new file mode 100644 index 0000000..06f188a Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected@2x.png new file mode 100644 index 0000000..7c932ab Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected@3x.png new file mode 100644 index 0000000..0f8f656 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/mineTabBar_selected.imageset/mineTabBar_selected@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/Contents.json new file mode 100644 index 0000000..fa157bb --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "monitoringTabbar_nomal.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "monitoringTabbar_nomal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "monitoringTabbar_nomal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal.png new file mode 100644 index 0000000..8ee7847 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal@2x.png new file mode 100644 index 0000000..aa102ff Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal@3x.png new file mode 100644 index 0000000..5169b68 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_nomal.imageset/monitoringTabbar_nomal@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/Contents.json new file mode 100644 index 0000000..7ffcdfc --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "monitoringTabbar_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "monitoringTabbar_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "monitoringTabbar_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected.png new file mode 100644 index 0000000..3e6b7a9 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected@2x.png new file mode 100644 index 0000000..2d27a23 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected@3x.png new file mode 100644 index 0000000..8826f33 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/monitoringTabbar_selected.imageset/monitoringTabbar_selected@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/Contents.json new file mode 100644 index 0000000..f7e3b84 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "questionTabBar_nomal.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "questionTabBar_nomal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "questionTabBar_nomal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal.png new file mode 100644 index 0000000..464a139 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal@2x.png new file mode 100644 index 0000000..ccad643 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal@3x.png new file mode 100644 index 0000000..ef199a9 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_nomal.imageset/questionTabBar_nomal@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/Contents.json new file mode 100644 index 0000000..2e7f40c --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "questionTabBar_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "questionTabBar_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "questionTabBar_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected.png new file mode 100644 index 0000000..afdbd90 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected@2x.png new file mode 100644 index 0000000..350fcab Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected@3x.png new file mode 100644 index 0000000..a035b32 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/questionTabBar_selected.imageset/questionTabBar_selected@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/Contents.json new file mode 100644 index 0000000..7bdd886 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sosCenterTabar_nomal.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sosCenterTabar_nomal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sosCenterTabar_nomal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal.png new file mode 100644 index 0000000..e1f7cfc Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal@2x.png new file mode 100644 index 0000000..cebd146 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal@3x.png new file mode 100644 index 0000000..571d211 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_nomal.imageset/sosCenterTabar_nomal@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/Contents.json new file mode 100644 index 0000000..405e24c --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "sosCenterTabar_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sosCenterTabar_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "sosCenterTabar_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected.png new file mode 100644 index 0000000..533b716 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected@2x.png new file mode 100644 index 0000000..f40234a Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected@3x.png new file mode 100644 index 0000000..e533c62 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/sosCenterTabBar_selected.imageset/sosCenterTabar_selected@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/Contents.json new file mode 100644 index 0000000..420320f --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "close_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "close_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "close_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon.png new file mode 100644 index 0000000..d660f84 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon@2x.png new file mode 100644 index 0000000..f3bb89c Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon@3x.png new file mode 100644 index 0000000..c11094e Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/close_icon.imageset/close_icon@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/gpsStat1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/gpsStat1.imageset/Contents.json new file mode 100644 index 0000000..7c7a0d1 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/gpsStat1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gpsStat1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/gpsStat1.imageset/gpsStat1@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/gpsStat1.imageset/gpsStat1@2x.png new file mode 100644 index 0000000..4aeeb77 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/gpsStat1.imageset/gpsStat1@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Utils/JXIDNumTextField.h b/XinjiangProject/XinjiangProject/Utils/JXIDNumTextField.h new file mode 100755 index 0000000..315892b --- /dev/null +++ b/XinjiangProject/XinjiangProject/Utils/JXIDNumTextField.h @@ -0,0 +1,13 @@ +// +// JXIDNumTextField.h +// Snwdai +// +// Created by 张明辉 on 16/5/9. +// Copyright © 2016年 张明辉. All rights reserved. +// + +#import + +@interface JXIDNumTextField : UITextField +@property (nonatomic) int largeIndex; +@end diff --git a/XinjiangProject/XinjiangProject/Utils/JXIDNumTextField.m b/XinjiangProject/XinjiangProject/Utils/JXIDNumTextField.m new file mode 100755 index 0000000..303eb74 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Utils/JXIDNumTextField.m @@ -0,0 +1,53 @@ +// +// JXIDNumTextField.m +// Snwdai +// +// Created by 张明辉 on 16/5/9. +// Copyright © 2016年 张明辉. All rights reserved. +// + +#import "JXIDNumTextField.h" + +@implementation JXIDNumTextField + +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + self.delegate = self; + self.keyboardType = UIKeyboardTypeASCIICapable; + self.largeIndex = 18; + } + return self; +} + +-(instancetype)initWithCoder:(NSCoder *)aDecoder +{ + if (self = [super initWithCoder:aDecoder]) { + self.delegate = self; + self.keyboardType = UIKeyboardTypeASCIICapable; + self.largeIndex = 18; + } + return self; +} + +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { + // 计算最终字符串长度 + NSString *newText = [textField.text stringByReplacingCharactersInRange:range withString:string]; + if (newText.length > 18) return NO; // 限制最大长度 + + // 允许的字符集:数字和 X/x + NSCharacterSet *allowedSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789Xx"]; + if ([string rangeOfCharacterFromSet:[allowedSet invertedSet]].location != NSNotFound) { + return NO; + } + + // 只允许最后一位输入 X/x + if (([string.lowercaseString isEqualToString:@"x"] || [string isEqualToString:@"X"]) && newText.length != 18) { + return NO; + } + + return YES; +} + + +@end diff --git a/XinjiangProject/XinjiangProject/Utils/PaddingLabel.h b/XinjiangProject/XinjiangProject/Utils/PaddingLabel.h new file mode 100644 index 0000000..b58d835 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Utils/PaddingLabel.h @@ -0,0 +1,18 @@ +// +// PaddingLabel.h +// XinjiangProject +// +// Created by Apple on 2025/7/9. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PaddingLabel : UILabel + +@property (nonatomic, assign) UIEdgeInsets textInsets; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Utils/PaddingLabel.m b/XinjiangProject/XinjiangProject/Utils/PaddingLabel.m new file mode 100644 index 0000000..4d8c133 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Utils/PaddingLabel.m @@ -0,0 +1,30 @@ +// +// PaddingLabel.m +// XinjiangProject +// +// Created by Apple on 2025/7/9. +// + +#import "PaddingLabel.h" + +@implementation PaddingLabel + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + self.textInsets = UIEdgeInsetsMake(0, 6, 0, 6); // 左右 padding + } + return self; +} + +- (void)drawTextInRect:(CGRect)rect { + [super drawTextInRect:UIEdgeInsetsInsetRect(rect, self.textInsets)]; +} + +- (CGSize)intrinsicContentSize { + CGSize size = [super intrinsicContentSize]; + size.width += self.textInsets.left + self.textInsets.right; + size.height += self.textInsets.top + self.textInsets.bottom; + return size; +} + +@end