diff --git a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj index 7e4ae32..332dbe9 100644 --- a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj +++ b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj @@ -400,7 +400,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.8; + MARKETING_VERSION = 1.0.9; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -444,7 +444,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.8; + MARKETING_VERSION = 1.0.9; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/XinjiangProject/XinjiangProject/Define/StatusMacros.h b/XinjiangProject/XinjiangProject/Define/StatusMacros.h index dbb568a..9b2917f 100755 --- a/XinjiangProject/XinjiangProject/Define/StatusMacros.h +++ b/XinjiangProject/XinjiangProject/Define/StatusMacros.h @@ -63,20 +63,17 @@ #pragma mark: 网络前缀 #define ResourceAddress [NSString stringWithFormat:@"%@/file/show/",Http] -//开发环境地址 彭杰 http://192.168.1.37 - -//#define Http @"http://192.168.1.37"// -//#define H5DevHost @"xjgateway.mcrm.vip:8888"// -//#define IntervenH5 @"https://xjconsole.mcrm.vip:8888" -//#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀 +////开发环境地址 彭杰 http://192.168.1.37 +//#define Http @"http://192.168.1.47"//昊 +//#define H5DevHost @"xj-admin.mcrm.vip:8888"// +//#define IntervenH5 @"https://console-xj-admin.mcrm.vip:8888" //#define SCHEME @"https" // -//#define Http @"http://192.168.1.23"//昊 //正式地址 -//#define Http @"https://api-jkglpt.iosp.ydpt.tech"// -//#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"// -//#define IntervenH5 @"https://console-jkglpt.iosp.ydpt.tech" -//#define SCHEME @"https" // +#define Http @"https://api-jkglpt.iosp.ydpt.tech"// +#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"// +#define IntervenH5 @"https://console-jkglpt.iosp.ydpt.tech" +#define SCHEME @"https" // //卫鑫本地 //#define Http @"https://api-jkglpt.iosp.ydpt.tech"// @@ -85,11 +82,16 @@ //#define SCHEME @"https" // //测试 -#define Http @"https://api-xj.tri.icdat.cn"// -#define H5DevHost @"api-xj.tri.icdat.cn"// -#define IntervenH5 @"https://console-xj.tri.icdat.cn" -#define SCHEME @"https" // +//#define Http @"https://api-xj.tri.icdat.cn"// +//#define H5DevHost @"api-xj.tri.icdat.cn"// +//#define IntervenH5 @"https://console-xj.tri.icdat.cn" +//#define SCHEME @"https" // +//最新新疆测试地址 +//#define Http @"https://xj-api.mcrm.vip:8888"// +//#define H5DevHost @"xj-admin.mcrm.vip:8888"// +//#define IntervenH5 @"https://console-xj-admin.mcrm.vip:8888" +//#define SCHEME @"https" // //新疆项目后期的调试环境由阿里云迁移至公司内部主机服务器,功能联调和测试可用以下的环境地址 //https://api-xj.tri.icdat.cn diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m index 65047ae..b55af9d 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/JKCQNetworkingWithCache.m @@ -248,6 +248,7 @@ typedef NS_ENUM(NSInteger, RequestType) { { NSLog(@"%@",url); + [MBProgressHUD hideHUDForView:[HQCommonUtils getCurrentVC].view animated:YES]; UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject; for (UIWindow *window in UIApplication.sharedApplication.windows) { if (window.isKeyWindow) { @@ -257,7 +258,7 @@ typedef NS_ENUM(NSInteger, RequestType) { } [MBProgressHUD hideHUDForView:keyWindow animated:YES]; - [self showError:@"网络服务出错"]; + [EasyTextView showErrorText:@"请求超时"]; } }]; @@ -360,6 +361,15 @@ typedef NS_ENUM(NSInteger, RequestType) { } else { [MBProgressHUD hideHUDForView:[HQCommonUtils getCurrentVC].view animated:YES]; + UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject; + for (UIWindow *window in UIApplication.sharedApplication.windows) { + if (window.isKeyWindow) { + keyWindow = window; + break; + } + } + + [MBProgressHUD hideHUDForView:keyWindow animated:YES]; [EasyTextView showErrorText:@"请求超时"]; } }]; diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h index b51a0d2..d5d1dfb 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h @@ -151,4 +151,7 @@ //恢复用户状态 - (void)postRecoverySimulationUser:(NSMutableDictionary *)parmDic; +//消息 +- (void)getUserMessageList:(NSMutableDictionary *)parmDic; + @end diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m index bed43ee..220078b 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m @@ -828,4 +828,12 @@ [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/test/restore",Http] params:parmDic]; } + +- (void)getUserMessageList:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system//app/sys/message/notice/list",Http] params:parmDic]; + +} + + @end diff --git a/XinjiangProject/XinjiangProject/Project/Homepage/MessageListViewController.h b/XinjiangProject/XinjiangProject/Project/Homepage/MessageListViewController.h new file mode 100644 index 0000000..dd56221 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/Homepage/MessageListViewController.h @@ -0,0 +1,16 @@ +// +// MessageListViewController.h +// XinjiangProject +// +// Created by Apple on 2026/2/5. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MessageListViewController : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/Homepage/MessageListViewController.m b/XinjiangProject/XinjiangProject/Project/Homepage/MessageListViewController.m new file mode 100644 index 0000000..66441dc --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/Homepage/MessageListViewController.m @@ -0,0 +1,31 @@ +// +// MessageListViewController.m +// XinjiangProject +// +// Created by Apple on 2026/2/5. +// + +#import "MessageListViewController.h" + +@interface MessageListViewController () + +@end + +@implementation MessageListViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#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 6495087..ab6702a 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMinePictureRecordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMinePictureRecordViewController.m @@ -117,6 +117,11 @@ [super viewWillAppear:animated]; [self.dataArray removeAllObjects]; + if (self.selectOnes == 6) { + self.type = @""; + }else { + self.type = [NSString stringWithFormat:@"%ld",self.selectOnes]; + } [self.homeTable.mj_header beginRefreshing]; @@ -310,7 +315,6 @@ NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; [parmDic setObject:array forKey:@"imIds"]; - [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO]; XJPNetAPI * recordApi = [[XJPNetAPI alloc] init:self tag:@"GROUPID" NeedToken:@""]; [recordApi PostGroupIDArray:parmDic]; } diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m index cac295e..2344bb1 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/Controller/MonitoringWarchViewController.m @@ -535,8 +535,7 @@ XJMonitoringDetailViewController *detailVC = [[XJMonitoringDetailViewController alloc] init]; - - + if ([type isEqualToString:@"heart_rate"]) { detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@", @@ -588,7 +587,8 @@ detailVC.navTitle = @"睡眠"; } - + + [self.navigationController pushViewController:detailVC animated:YES]; } diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m index bf6b428..d42e7fd 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWarchTableHeardView.m @@ -96,10 +96,10 @@ [StepView addSubview:self.allNumberLabel]; self.numberLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), self.allNumberLabel.top - 28 - kRealValue(12), StepView.width - kRealValue(30), 28)]; - self.numberLabel.text = @"--步"; self.numberLabel.textColor = UIColorHex(#77849E); self.numberLabel.font = BOLDSYSTEMFONT(28); self.numberLabel.textAlignment = NSTextAlignmentLeft; + self.numberLabel.attributedText = [self attributedStringWithText:@"-步" numberColor:UIColorHex(#42ADF2)]; [StepView addSubview:self.numberLabel]; @@ -216,6 +216,7 @@ self.subTimeLabel.textColor = UIColorHex(#77849E); self.subTimeLabel.font = BOLDSYSTEMFONT(28); self.subTimeLabel.textAlignment = NSTextAlignmentLeft; + self.subTimeLabel.attributedText = [self convertMinutes:0 withFont:[UIFont systemFontOfSize:24 weight:UIFontWeightBold] withColor:UIColorHex(#9B46E1)]; [sleepView addSubview:self.subTimeLabel]; } @@ -243,7 +244,7 @@ timeString = [NSString stringWithFormat:@"%d小时%d分钟", wholeHours, remainingMinutes]; } - self.avgTimeLabel.text = [NSString stringWithFormat:@"平均睡眠%@",timeString]; + self.avgTimeLabel.text = [NSString stringWithFormat:@"平均睡眠:%@",timeString]; for (MonitoringListDataModel * listModel in _heardModel.indexItemVos) { @@ -272,7 +273,7 @@ NSString *timeString; if (minutes == 0) { - timeString = @"--"; + timeString = @"--小时--分钟"; } else if (minutes < 1) { int seconds = (int)roundf(minutes * 60); timeString = [NSString stringWithFormat:@"%d秒", seconds]; @@ -294,9 +295,10 @@ // 匹配数字并加粗放大 NSError *error = nil; - NSRegularExpression *numberRegex = [NSRegularExpression regularExpressionWithPattern:@"\\d+(\\.\\d+)?" - options:0 - error:&error]; + NSRegularExpression *numberRegex = + [NSRegularExpression regularExpressionWithPattern:@"(--|\\d+(\\.\\d+)?)" + options:0 + error:&error]; if (!error) { NSArray *matches = [numberRegex matchesInString:timeString options:0 range:NSMakeRange(0, timeString.length)]; for (NSTextCheckingResult *match in matches) { diff --git a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m index 4bb63c1..b471589 100644 --- a/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m +++ b/XinjiangProject/XinjiangProject/Project/Monitoring/View/MonitoringWatchTableView.m @@ -132,99 +132,46 @@ // } //} +- (UITableViewCell *)tableView:(UITableView *)tableView + cellForRowAtIndexPath:(NSIndexPath *)indexPath { -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - -// MonitoringListDataModel * listModel = self.customArray[indexPath.section]; + MonitoringWatchTableViewCell *cell = + [tableView dequeueReusableCellWithIdentifier:@"CELLID"]; - MonitoringWatchTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"CELLID"]; - if (!cell) { - - cell = [[MonitoringWatchTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CELLID"]; + cell = [[MonitoringWatchTableViewCell alloc] + initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:@"CELLID"]; } + cell.backgroundColor = CViewBgColor; - if (indexPath.section == 0) { - MonitoringListDataModel * currentListModel; - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"心率"]) { - currentListModel = listModel; - cell.listModel = listModel; - } - - } - if (!currentListModel) { - MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc]; - lismodel.wdTypeName = @"心率"; - cell.listModel = lismodel; - } - - } - if (indexPath.section == 1) { - MonitoringListDataModel * currentListModel; - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) { - currentListModel = listModel; - cell.listModel = listModel; - } - - } - if (!currentListModel) { - MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc]; - lismodel.wdTypeName = @"血氧饱和度"; - cell.listModel = lismodel; - - } - - } - if (indexPath.section == 2) { - MonitoringListDataModel * currentListModel; - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"压力"]) { - currentListModel = listModel; - cell.listModel = listModel; - } - - } - if (!currentListModel) { - MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc]; - lismodel.wdTypeName = @"压力"; - cell.listModel = lismodel; - - } - - } - if (indexPath.section == 3) { - - MonitoringListDataModel * currentListModel; - - for (MonitoringListDataModel * listModel in self.model.indexItemVos) { - - if ([listModel.wdTypeName isEqualToString:@"体温"]) { - currentListModel = listModel; - cell.listModel = listModel; - } - - } - if (!currentListModel) { - MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc]; - lismodel.wdTypeName = @"体温"; - cell.listModel = lismodel; - - } - - } -// cell.listModel = listModel; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.popBlock = self.popBlock; cell.historyBlock = self.historyBlock; + + // section 对应的类型名 + NSArray *typeNames = @[@"心率", @"血氧饱和度", @"压力", @"体温"]; + NSString *typeName = typeNames[indexPath.section]; + + MonitoringListDataModel *targetModel = nil; + + for (MonitoringListDataModel *model in self.model.indexItemVos) { + if ([model.wdTypeName isEqualToString:typeName]) { + targetModel = model; + break; + } + } + + // 没找到就创建占位 model + if (!targetModel) { + targetModel = [[MonitoringListDataModel alloc] init]; + targetModel.wdTypeName = typeName; + } + + cell.listModel = targetModel; + return cell; + } @@ -238,61 +185,83 @@ // self.detailBlock(listModel.wdType, listModel.dataDate); // } if (indexPath.section == 0) { - + BOOL found = NO; for (MonitoringListDataModel * listModel in self.model.indexItemVos) { if ([listModel.wdTypeName isEqualToString:@"心率"]) { - + found = YES; if (self.detailBlock) { self.detailBlock(listModel.wdType, listModel.dataDate); } + break; } } - + if (!found) { + [EasyTextView showErrorText:@"暂无数据"]; + } } if (indexPath.section == 1) { - + BOOL found = NO; for (MonitoringListDataModel * listModel in self.model.indexItemVos) { if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) { if (self.detailBlock) { + found = YES; + self.detailBlock(listModel.wdType, listModel.dataDate); } + break; + } } - + if (!found) { + [EasyTextView showErrorText:@"暂无数据"]; + } } if (indexPath.section == 2) { - + BOOL found = NO; + for (MonitoringListDataModel * listModel in self.model.indexItemVos) { if ([listModel.wdTypeName isEqualToString:@"压力"]) { + found = YES; + if (self.detailBlock) { + self.detailBlock(listModel.wdType, listModel.dataDate); } + break; } } - + if (!found) { + [EasyTextView showErrorText:@"暂无数据"]; + } } if (indexPath.section == 3) { - + BOOL found = NO; + for (MonitoringListDataModel * listModel in self.model.indexItemVos) { if ([listModel.wdTypeName isEqualToString:@"体温"]) { + found = YES; if (self.detailBlock) { self.detailBlock(listModel.wdType, listModel.dataDate); } + break; + } } - + if (!found) { + [EasyTextView showErrorText:@"暂无数据"]; + } } - + } - (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.h b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.h new file mode 100644 index 0000000..133f5be --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.h @@ -0,0 +1,16 @@ +// +// BannarDetailViewController.h +// XinjiangProject +// +// Created by Apple on 2026/2/5. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BannarDetailViewController : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m new file mode 100644 index 0000000..516fb58 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m @@ -0,0 +1,83 @@ +// +// BannarDetailViewController.m +// XinjiangProject +// +// Created by Apple on 2026/2/5. +// + +#import "BannarDetailViewController.h" + +@interface BannarDetailViewController () + +@property (nonatomic, strong) UIScrollView * mainScrollView; + +@property (nonatomic, strong) UIView * contentView; + +@end + +@implementation BannarDetailViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + //3389 + self.isHidenNaviBar = false; + self.view.backgroundColor = KWhiteColor; + self.navigationItem.title = @"员工心理帮助计划"; + + self.mainScrollView = [[UIScrollView alloc] init]; + self.mainScrollView.backgroundColor = KWhiteColor; + self.mainScrollView.showsVerticalScrollIndicator = false; + self.mainScrollView.showsHorizontalScrollIndicator = false; + self.mainScrollView.contentInset = UIEdgeInsetsZero; // 让 scrollView 从顶部开始 + self.mainScrollView.scrollIndicatorInsets = UIEdgeInsetsZero; // 滚动指示器也不受影响 + + self.mainScrollView.contentSize = CGSizeMake(kScreenWidth, kScreenHeight - kTabBarHeight); + // 如果使用自动调整 + if (@available(iOS 11.0, *)) { + self.mainScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [self.view addSubview:self.mainScrollView]; + + // 创建一个 contentView(所有内容都加在这个 view 上) + UIView *contentView = [[UIView alloc] init]; + contentView.backgroundColor = [UIColor whiteColor]; + self.contentView = contentView; + [self.mainScrollView addSubview:contentView]; + + // 约束 UIScrollView + [self.mainScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.right.bottom.mas_offset(0); + }]; + + // 约束 contentView + [contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.mainScrollView); // contentView 贴合 UIScrollView 的四边 + make.width.equalTo(self.mainScrollView); // **宽度等于 UIScrollView**,防止横向滚动 + }]; + + UIImageView * detailImg = [[UIImageView alloc] init]; + detailImg.image = [UIImage imageNamed:@"ADDetail"]; + [contentView addSubview:detailImg]; + + [detailImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_offset(0); + make.height.mas_offset(kRealValue(1360)); + }]; + + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(detailImg); + }]; +} + +/* +#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/Qusetion/Controller/QuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m index d1b42b2..7bdeb55 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m @@ -26,8 +26,11 @@ #import "HomeQusetionRecordsModel.h" #import "XJDoctorMainViewController.h" #import "UPAppVesionModel.h" +#import "BannarDetailViewController.h" +static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 + @interface QuestionViewController () @property (nonatomic, strong) HealthyQuestionTable * homeTable; @@ -48,6 +51,15 @@ @property (nonatomic, strong) HomeQusetionRecordsModel * recomendModel; +//更新一版用scrollview处理 + +@property (nonatomic, strong) UIScrollView * mainScrollView; + +@property (nonatomic, strong) UIView * contentView; + +@property (nonatomic, strong) MASConstraint *tableHeightConstraint; + + @end @implementation QuestionViewController @@ -73,7 +85,7 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. - self.view.backgroundColor = KWhiteColor; + self.view.backgroundColor = CViewBgColor; self.userlocationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; @@ -85,7 +97,8 @@ selector:@selector(updateHomeDate) name:KNotificAgreeProtoocl object:nil]; - [self createUI]; +// [self createUI]; + [self updateV2UI]; [self getUpDateinfo]; self.page = 1; [self verifyTokenData]; @@ -250,98 +263,6 @@ [self.navigationController popToRootViewControllerAnimated:YES]; } -- (void)createUI { - - self.homeTable = [[HealthyQuestionTable alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; - self.homeTable.backgroundColor = CViewBgColor; - [self.view addSubview:self.homeTable]; - - [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_offset(0); - }]; - - self.homeTable.headDelegate = self; - kWeakSelf(self); - self.homeTable.tableBlock = ^(HomeQusetionRecordsModel * _Nonnull model) { - weakself.recomendModel = model; - //1图文 2视频 - if ([model.contentType intValue] == 2) { - - XJDoctorMainViewController * doctorVC = [[XJDoctorMainViewController alloc] init]; - doctorVC.yuyue_id = model.records_id; - doctorVC.popType = 1; - [weakself.navigationController pushViewController:doctorVC animated:YES]; - } - if ([model.contentType intValue] == 1) { - - if ([TUILogin isUserLogined]) { - ChatViewController * chatVC = [[ChatViewController alloc] init]; - chatVC.isGroupID = YES; - chatVC.chatID = model.imId ; - chatVC.eableSendReport = true; - chatVC.eablehaveHelathData = false; - chatVC.navTitle = @"图文咨询"; - chatVC.isVideo = NO; - chatVC.pictureEnd_id = model.records_id; - chatVC.questionType = 2; - chatVC.medicalRecordsId = model.memberId; - if ([model.contentStatus intValue] == 5) { - chatVC.isEveal = true; - }else - { - chatVC.isEveal = false; - } - if ([model.contentStatus intValue] >=4 ) { - chatVC.endRecordType = 100; - } - [weakself.navigationController pushViewController:chatVC animated:YES]; - }else - { - if ([HQCommonUtils isLogin]) { - [weakself loginImAccountList]; - - } - - } - } - }; - - self.homeTable.lookMoreBlock = ^{ - - [weakself myQuestionAction]; - - }; - - - - - __weak __typeof(self) weakSelf = self; - self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ - self.page = 1; - [self verifyTokenData]; - }]; - self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ - self.page = 1; - [self verifyTokenData]; - }]; - - //初始化一个emptyView - LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"noQuetionList"] - titleStr:@"暂无咨询记录" detailStr:@""]; - - //元素竖直方向的间距 - emptyView.titleLabMargin = kRealValue(5); - emptyView.contentViewY = kRealValue(450); - - emptyView.imageSize = CGSizeMake(kRealValue(101), kRealValue(60)); - //标题颜色 - emptyView.titleLabTextColor =UIColorHex(#14BEBE); - //描述字体 - emptyView.titleLabFont = [UIFont systemFontOfSize:15]; - //按钮背景色 - //设置空内容占位图 - self.homeTable.ly_emptyView = emptyView; -} - (void)updateHomeDate { @@ -371,8 +292,8 @@ - (void)Failed:(NSString*)message tag:(NSString*)tag { - [self.homeTable.mj_footer endRefreshing]; - [self.homeTable.mj_header endRefreshing]; + [self.mainScrollView.mj_footer endRefreshing]; + [self.mainScrollView.mj_header endRefreshing]; [self showMBProgressHUDOnlyWithString:message]; [self hiddenAllMBProgressHUD]; @@ -382,13 +303,11 @@ - (void)Sucess:(id)response tag:(NSString*)tag { - [self.homeTable.mj_footer endRefreshing]; - [self.homeTable.mj_header endRefreshing]; - + [self.mainScrollView.mj_footer endRefreshing]; + [self.mainScrollView.mj_header endRefreshing]; + [self hiddenAllMBProgressHUD]; if ([tag isEqualToString:@"RECOMMEND"]) { - [self hiddenAllMBProgressHUD]; NSArray * array = response ; - if (self.page == 1) { [self.dataArray removeAllObjects]; } @@ -736,5 +655,166 @@ [[NSNotificationCenter defaultCenter] removeObserver:self]; } + +//更新一版scrollview + +- (void)updateV2UI { + self.mainScrollView = [[UIScrollView alloc] init]; + self.mainScrollView.backgroundColor = CViewBgColor; + self.mainScrollView.showsVerticalScrollIndicator = false; + self.mainScrollView.showsHorizontalScrollIndicator = false; + self.mainScrollView.contentInset = UIEdgeInsetsZero; // 让 scrollView 从顶部开始 + self.mainScrollView.scrollIndicatorInsets = UIEdgeInsetsZero; // 滚动指示器也不受影响 + + self.mainScrollView.contentSize = CGSizeMake(kScreenWidth, kScreenHeight - kTabBarHeight); + // 如果使用自动调整 + if (@available(iOS 11.0, *)) { + self.mainScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [self.view addSubview:self.mainScrollView]; + // 创建一个 contentView(所有内容都加在这个 view 上) + UIView *contentView = [[UIView alloc] init]; + contentView.backgroundColor = [UIColor whiteColor]; + self.contentView = contentView; + [self.mainScrollView addSubview:contentView]; + + // 约束 UIScrollView + [self.mainScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.right.bottom.mas_offset(0); + }]; + + // 约束 contentView + [contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.mainScrollView); // contentView 贴合 UIScrollView 的四边 + make.width.equalTo(self.mainScrollView); // **宽度等于 UIScrollView**,防止横向滚动 + }]; + MJWeakSelf + self.mainScrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + self.page = 1; + [self verifyTokenData]; + }]; + + HealthyQuestionHeardView * topView = [[HealthyQuestionHeardView alloc] initWithFrame:CGRectZero]; + topView.headDelegate = self; + [self.contentView addSubview:topView]; +// + [topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_offset(0); + }]; + + self.homeTable = [[HealthyQuestionTable alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; + self.homeTable.backgroundColor = CViewBgColor; + self.homeTable.scrollEnabled = NO; + [self.contentView addSubview:self.homeTable]; + MASConstraint *tableHeightConstraint; + + [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(topView.mas_bottom); + make.left.right.equalTo(self.contentView); + self.tableHeightConstraint = make.height.mas_equalTo(kEmptyTableMinHeight); + make.bottom.equalTo(self.contentView.mas_bottom); + }]; + + //监听 + [self.homeTable addObserver:self + forKeyPath:@"contentSize" + options:NSKeyValueObservingOptionNew + context:nil]; + kWeakSelf(self); + self.homeTable.tableBlock = ^(HomeQusetionRecordsModel * _Nonnull model) { + weakself.recomendModel = model; + //1图文 2视频 + if ([model.contentType intValue] == 2) { + + XJDoctorMainViewController * doctorVC = [[XJDoctorMainViewController alloc] init]; + doctorVC.yuyue_id = model.records_id; + doctorVC.popType = 1; + [weakself.navigationController pushViewController:doctorVC animated:YES]; + } + if ([model.contentType intValue] == 1) { + + if ([TUILogin isUserLogined]) { + ChatViewController * chatVC = [[ChatViewController alloc] init]; + chatVC.isGroupID = YES; + chatVC.chatID = model.imId ; + chatVC.eableSendReport = true; + chatVC.eablehaveHelathData = false; + chatVC.navTitle = @"图文咨询"; + chatVC.isVideo = NO; + chatVC.pictureEnd_id = model.records_id; + chatVC.questionType = 2; + chatVC.medicalRecordsId = model.memberId; + if ([model.contentStatus intValue] == 5) { + chatVC.isEveal = true; + }else + { + chatVC.isEveal = false; + } + if ([model.contentStatus intValue] >=4 ) { + chatVC.endRecordType = 100; + } + [weakself.navigationController pushViewController:chatVC animated:YES]; + }else + { + if ([HQCommonUtils isLogin]) { + [weakself loginImAccountList]; + + } + + } + } + }; + + self.homeTable.lookMoreBlock = ^{ + + [weakself myQuestionAction]; + + }; + //初始化一个emptyView + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"noQuetionList"] + titleStr:@"暂无咨询记录" detailStr:@""]; + //元素竖直方向的间距 + emptyView.titleLabMargin = kRealValue(5); + emptyView.contentViewY = kRealValue(80); + emptyView.imageSize = CGSizeMake(kRealValue(101), kRealValue(60)); + //标题颜色 + emptyView.titleLabTextColor =UIColorHex(#14BEBE); + //描述字体 + emptyView.titleLabFont = [UIFont systemFontOfSize:15]; + //按钮背景色 + //设置空内容占位图 + self.homeTable.ly_emptyView = emptyView; +} + +// 计算table的高度 +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context { + + if (object == self.homeTable && + [keyPath isEqualToString:@"contentSize"]) { + + CGFloat height = self.homeTable.contentSize.height; + + // 空数据 + if (self.dataArray.count <= 0) { + height = kEmptyTableMinHeight; + } + + [self.tableHeightConstraint uninstall]; + [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { + self.tableHeightConstraint = make.height.mas_equalTo(height); + }]; + } +} + +-(void)SDCycleScrollViewItemClick { + + BannarDetailViewController * detailVC = [[BannarDetailViewController alloc] init]; + + [self.navigationController pushViewController:detailVC animated:YES]; + +} @end diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h index fa4881c..c5425dd 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)myQuestionAction; - +- (void)SDCycleScrollViewItemClick; @end @interface HealthyQuestionHeardView : UIView diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m index 222e56e..94bdd2e 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m @@ -9,7 +9,7 @@ #import "SDCycleScrollView.h" #import "HealthyToolsView.h" -@interface HealthyQuestionHeardView () +@interface HealthyQuestionHeardView () @property (nonatomic, strong) SDCycleScrollView * adTitleView; @property (nonatomic, strong) UIView * redRadioView; @@ -27,6 +27,7 @@ - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { + self.backgroundColor = CViewBgColor; [self createUI]; } @@ -37,89 +38,95 @@ - (void)createUI { - UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kStatusBarHeight)]; + UIView * topView = [[UIView alloc] init]; 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]; - UIImageView * backImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, topView.bottom - 1, kScreenWidth, kRealValue(288))]; + [topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.right.mas_offset(0); + make.height.mas_offset(kStatusBarHeight); + }]; + + UIImageView * backImage = [[UIImageView alloc] init]; + backImage.userInteractionEnabled = true; backImage.image = [UIImage imageNamed:@"topBackImg"]; [self addSubview:backImage]; -// -// UILabel * questionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(39), kRealValue(100), MAXFLOAT, 17)]; -// -// questionLabel.text = @"油田健康咨询"; -// -// questionLabel.font = BOLDSYSTEMFONT(17); -// -// questionLabel.textColor = KWhiteColor; -// -// questionLabel.textAlignment = NSTextAlignmentLeft; -//// -// CGSize labeSize = [questionLabel.text boundingRectWithSize:CGSizeMake(MAXFLOAT, 30) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesFontLeading attributes: @{NSFontAttributeName:BOLDSYSTEMFONT(17)} context:nil].size; -// -// -// questionLabel.frame = CGRectMake(kRealValue(39), kRealValue(90), labeSize.width, 17); -// -// [backImage addSubview:questionLabel]; -// -// - + [backImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_offset(0); + make.height.mas_offset(kRealValue(288)); + make.top.mas_equalTo(topView.mas_bottom).offset(-1); + }]; -// -// UIImageView * titleImage = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(17) - kRealValue(201), backImage.bottom - 115, kRealValue(201), 115)]; -// titleImage.image = [UIImage imageNamed:@"questionTitleImg"]; -// [self addSubview:titleImage]; - -// UIView * adBackView = [[UIView alloc] initWithFrame:CGRectMake(0, backImage.bottom, kScreenWidth, 35)]; -// adBackView.backgroundColor = RGBA(84, 236, 203, 0.1); -// [self addSubview:adBackView]; -// -// self.adTitleView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(kRealValue(17.5), 0, kScreenWidth - kRealValue(27), 35) delegate:self placeholderImage:nil]; -// self.adTitleView .scrollDirection = UICollectionViewScrollDirectionVertical; -// self.adTitleView .onlyDisplayText = YES; -// self.adTitleView.titleLabelBackgroundColor = KClearColor; -// self.adTitleView.titleLabelTextFont = MEDIUMFONT(13); -// self.adTitleView.titleLabelTextColor = RGBA(33, 190, 189, 1); -// NSMutableArray *titlesArray = [NSMutableArray new]; -// [titlesArray addObject:@"体检通知📢:您预约了明天的体检别忘了哟!"]; -// self.adTitleView .titlesGroup = [titlesArray copy]; -// [self.adTitleView disableScrollGesture]; -// [adBackView addSubview:self.adTitleView ]; - - // - NSArray * toolsArray = @[@"allRoomDoctor",@"myQuestionHome"]; -// NSArray * colorArray = @[UIColorHex(#E7FFF6),UIColorHex(#E7FBFF),UIColorHex(#EAEFFF)]; -// NSArray * detailArray = @[@"全科医生咨询",@"专科医生咨询",@"您进行中的咨询"]; - - CGFloat toolsW = ( kScreenWidth - kRealValue(40) ) / 2; - - for (int i = 0; i < toolsArray.count; i ++) { - - HealthyToolsView * healthyView = [[HealthyToolsView alloc] initWithFrame:CGRectMake(kRealValue(15) + (toolsW + kRealValue(8)) * i , backImage.bottom - kRealValue(13) - kRealValue(126), toolsW, kRealValue(126))]; + + NSArray *toolsArray = @[@"allRoomDoctor", @"myQuestionHome"]; + + UIView *lastView = nil; + + for (int i = 0; i < toolsArray.count; i++) { + + HealthyToolsView *healthyView = [[HealthyToolsView alloc] init]; healthyView.layer.cornerRadius = 10.0f; - healthyView.layer.masksToBounds = true; + healthyView.layer.masksToBounds = YES; healthyView.imageString = toolsArray[i]; [self addSubview:healthyView]; - - - UIButton * btn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + (toolsW + kRealValue(8)) * i , backImage.bottom - kRealValue(13) - kRealValue(126), toolsW, kRealValue(126))]; - [btn addTarget:self action:@selector(toolsAction:) forControlEvents:UIControlEventTouchUpInside]; - btn.tag = 100 + i ; + + UIButton *btn = [[UIButton alloc] init]; + btn.tag = 100 + i; + [btn addTarget:self action:@selector(toolsAction:) + forControlEvents:UIControlEventTouchUpInside]; [self addSubview:btn]; - + + [healthyView mas_makeConstraints:^(MASConstraintMaker *make) { + + make.top.equalTo(backImage.mas_bottom).offset(-kRealValue(13) - kRealValue(126)); + make.height.mas_equalTo(kRealValue(126)); + + if (i == 0) { + make.left.mas_equalTo(kRealValue(15)); + } else { + make.left.equalTo(lastView.mas_right).offset(kRealValue(8)); + make.width.equalTo(lastView); + } + + if (i == toolsArray.count - 1) { + make.right.mas_equalTo(-kRealValue(15)); + } + }]; + + [btn mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(healthyView); + }]; + + lastView = healthyView; } + + //加个轮播图 + NSArray *originImages = @[@"h1"]; - self.h = backImage.bottom; - - self.height = self.h; + SDCycleScrollView *cycleView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero shouldInfiniteLoop:YES imageNamesGroup:originImages]; + cycleView.backgroundColor = KClearColor; + cycleView.layer.cornerRadius = 8; + cycleView.layer.masksToBounds = true; + cycleView.showPageControl = YES; + cycleView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated; + + cycleView.delegate = self; +// if (originImages.count <= 1) { +// cycleView.autoScroll = NO; +//// cycleView.scrollEnabled = NO; +// } + [self addSubview:cycleView]; + cycleView.scrollDirection = UICollectionViewScrollDirectionHorizontal; + + [cycleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(15); + make.right.mas_offset(-15); + make.top.mas_equalTo(lastView.mas_bottom).offset(15); + make.height.mas_offset(120); + make.bottom.mas_equalTo(self.mas_bottom).offset(-15); + }]; + } - (void)toolsAction:(UIButton *)btn { @@ -137,9 +144,8 @@ { //新增全科咨询记录 if ([self.headDelegate respondsToSelector:@selector(foundQuestionAction)]) { - [self.headDelegate foundQuestionAction]; - } + } } break; case 102: @@ -165,7 +171,15 @@ self.redRadioView.hidden = YES; } - - + } + +- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { + + DLog(@"++%ld",index); + if ([self.headDelegate respondsToSelector:@selector(SDCycleScrollViewItemClick)]) { + [self.headDelegate SDCycleScrollViewItemClick]; + } +} + @end diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m index 8848a73..8d97f24 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m @@ -7,13 +7,10 @@ #import "HealthyQuestionTable.h" #import "HealthyDoctorTableViewCell.h" -#import "HealthyQuestionHeardView.h" #import "QustionHomeRecordsCell.h" @interface HealthyQuestionTable () -@property (nonatomic, strong) HealthyQuestionHeardView * heardView; - @end @implementation HealthyQuestionTable @@ -39,40 +36,11 @@ self.delegate = self; self.dataSource = self; self.separatorStyle = UITableViewCellSeparatorStyleNone; - self.tableHeaderView = [self createHeardView]; self.showsVerticalScrollIndicator = NO; self.estimatedRowHeight = 60; self.rowHeight = UITableViewAutomaticDimension; } -- (void)setHeadDelegate:(id)headDelegate { - - _headDelegate = headDelegate; - - self.heardView.headDelegate = _headDelegate; - -} - -- (UIView *)createHeardView { - - HealthyQuestionHeardView * heardView = [[HealthyQuestionHeardView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(332))]; - - self.heardView = heardView; - - heardView.headDelegate = self.headDelegate; - - heardView.height = heardView.h; - - return heardView; - - -} - -- (void)setHaveSessioning:(NSString *)haveSessioning { - _haveSessioning = haveSessioning; - self.heardView.haveSessioning = _haveSessioning; - -} - (void)setDataArray:(NSArray *)dataArray { _dataArray = dataArray; @@ -129,7 +97,7 @@ - (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - return kRealValue(48); + return kRealValue(45); } - (CGFloat )tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyToolsView.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyToolsView.m index 5b31dba..dfdc7fb 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyToolsView.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyToolsView.m @@ -34,22 +34,12 @@ - (void)createUI { -// self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(8), kRealValue(17), 90, 13)]; -// self.nameLabel.text = @""; -// self.nameLabel.textColor = CFontColor1; -// self.nameLabel.font = BOLDSYSTEMFONT(14); -// self.nameLabel.textAlignment = NSTextAlignmentLeft; -// [self addSubview:self.nameLabel]; -// -// self.detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(8), self.nameLabel.bottom + kRealValue(9), self.width - kRealValue(16), 13)]; -// self.detailLabel.text = @""; -// self.detailLabel.textColor = UIColorHex(#666666); -// self.detailLabel.font = MEDIUMFONT(13); -// self.detailLabel.textAlignment = NSTextAlignmentLeft; -// [self addSubview:self.detailLabel]; - - self.toolsImage = [[UIImageView alloc] initWithFrame:CGRectMake(0 , 0, self.width, self.height)]; + self.toolsImage = [[UIImageView alloc] init]; [self addSubview:self.toolsImage]; + + [self.toolsImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.offset(0); + }]; } diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/ADDetail.imageset/12、新疆油田EAP_看图王.jpg b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/ADDetail.imageset/12、新疆油田EAP_看图王.jpg new file mode 100644 index 0000000..de475dc Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/ADDetail.imageset/12、新疆油田EAP_看图王.jpg differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/ADDetail.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/ADDetail.imageset/Contents.json new file mode 100644 index 0000000..62ff6e4 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/ADDetail.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "12、新疆油田EAP_看图王.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/Contents.json new file mode 100644 index 0000000..7ca2e19 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "h1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "h1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "h1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1.png new file mode 100644 index 0000000..1acfacd Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1@2x.png new file mode 100644 index 0000000..f3c1d16 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1@3x.png new file mode 100644 index 0000000..76d6e8b Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/h1.imageset/h1@3x.png differ