diff --git a/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj b/XinjiangProject/XinjiangProject.xcodeproj/project.pbxproj index 332dbe9..a7e9d50 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.9; + MARKETING_VERSION = 1.0.10; 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.9; + MARKETING_VERSION = 1.0.10; PRODUCT_BUNDLE_IDENTIFIER = com.questionTools.XinjiangProject; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/XinjiangProject/XinjiangProject/Categorys/UIButton/UIButton+NYS.m b/XinjiangProject/XinjiangProject/Categorys/UIButton/UIButton+NYS.m index 51b8e48..6da4d60 100644 --- a/XinjiangProject/XinjiangProject/Categorys/UIButton/UIButton+NYS.m +++ b/XinjiangProject/XinjiangProject/Categorys/UIButton/UIButton+NYS.m @@ -91,7 +91,7 @@ static char edgeKey; break; case DIYStyleImgBottom: - NSLog(@"%f",titleX); + DLog(@"%f",titleX); self.titleEdgeInsets = UIEdgeInsetsMake(((selfH - totalH)/2.0 - titleY), -(titleX + titleW/2.0 - selfW/2.0), -((selfH - totalH)/2.0 - titleY), @@ -156,7 +156,7 @@ static char edgeKey; break; case DIYStyleImgBottom: - NSLog(@"%f",titleX); + DLog(@"%f",titleX); self.titleEdgeInsets = UIEdgeInsetsMake(((selfH - totalH)/2.0 - titleY), -(titleX + titleW/2.0 - selfW/2.0), -((selfH - totalH)/2.0 - titleY), @@ -220,7 +220,7 @@ static char edgeKey; break; case DIYStyleImgBottom: - NSLog(@"%f",titleX); + DLog(@"%f",titleX); self.titleEdgeInsets = UIEdgeInsetsMake(((selfH - totalH)/2.0 - titleY), -(titleX + titleW/2.0 - selfW/2.0), -((selfH - totalH)/2.0 - titleY), @@ -288,7 +288,7 @@ static char edgeKey; break; case DIYStyleImgBottom: - NSLog(@"%f",titleX); + DLog(@"%f",titleX); self.titleEdgeInsets = UIEdgeInsetsMake(((selfH - totalH)/2.0 - titleY), -(titleX + titleW/2.0 - selfW/2.0), -((selfH - totalH)/2.0 - titleY), diff --git a/XinjiangProject/XinjiangProject/Define/StatusMacros.h b/XinjiangProject/XinjiangProject/Define/StatusMacros.h index 9b2917f..51de2c2 100755 --- a/XinjiangProject/XinjiangProject/Define/StatusMacros.h +++ b/XinjiangProject/XinjiangProject/Define/StatusMacros.h @@ -15,13 +15,11 @@ #define KNotificationLoginIMResult @"loginIMResult" //切换tabar -#define KNotificSelectHomePageTabbar @"SlectHomePageTabBar" -#define KNotificSelectSoSTabbar @"SlectSoSTabBar" +#define KNotificSelectQuestionTabbar @"SlectQuestionTabBar" +#define KNotificSelectSOSCenterTabbar @"SlectSoSTabBar" +#define KNotificSelectWatchTabbar @"SlectMonitoringTabBar" -#define KNotificSelectPhysicalTabbar @"SlectPhysicalTabBar" - -#define KNotificSelectFileTabbar @"SlectFileTabBar" //同意协议 @@ -63,17 +61,17 @@ #pragma mark: 网络前缀 #define ResourceAddress [NSString stringWithFormat:@"%@/file/show/",Http] -////开发环境地址 彭杰 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 @"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"// @@ -81,17 +79,16 @@ //#define IntervenH5 @"http://192.168.1.26:9876" //#define SCHEME @"https" // -//测试 -//#define Http @"https://api-xj.tri.icdat.cn"// -//#define H5DevHost @"api-xj.tri.icdat.cn"// -//#define IntervenH5 @"https://console-xj.tri.icdat.cn" -//#define SCHEME @"https" // - //最新新疆测试地址 +//#define Http @"http://192.168.1.223"//彭杰 +// 最新地址 +//#define Http @"http://192.168.1.47"//王昊 + //#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" // +#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" // //新疆项目后期的调试环境由阿里云迁移至公司内部主机服务器,功能联调和测试可用以下的环境地址 //https://api-xj.tri.icdat.cn diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/DownToolsManager.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/DownToolsManager.m index 1401575..27616f7 100644 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/DownToolsManager.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/DownToolsManager.m @@ -26,7 +26,7 @@ NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) { //下载进度 progress ? progress(downloadProgress) : nil; - NSLog(@"下载进度:%.2f%%",100.0*downloadProgress.completedUnitCount/downloadProgress.totalUnitCount); + DLog(@"下载进度:%.2f%%",100.0*downloadProgress.completedUnitCount/downloadProgress.totalUnitCount); } destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) { //拼接缓存目录 @@ -35,11 +35,11 @@ //拼接文件路径 NSString *filePath = [downloadStr stringByAppendingPathComponent:fileDir]; - NSLog(@"downloadStr = %@",downloadStr); + DLog(@"downloadStr = %@",downloadStr); return [NSURL fileURLWithPath:filePath]; } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) { - NSLog(@"%@---%@", filePath, filePath.absoluteString); + DLog(@"%@---%@", filePath, filePath.absoluteString); success ? success(filePath.absoluteString /** NSURL->NSString*/) : nil; failure && error ? failure(error) : nil; }]; @@ -57,7 +57,7 @@ //获取路径 NSString *documentsPath = [ReaderDocument documentsPath]; //可根据路径command + shift + G查看该路径下的所有的pdf文件 - NSLog(@"%@", documentsPath); + DLog(@"%@", documentsPath); NSString *filePath = [documentsPath stringByAppendingPathComponent:fileName]; ReaderDocument *document = [ReaderDocument withDocumentFilePath:filePath password:nil]; if (document != nil) @@ -72,7 +72,7 @@ [self downloadWithURL:url fileDir:fileName progress:^(NSProgress *progress) { } success:^(NSString *filePath) { - NSLog(@"%@", filePath); + DLog(@"%@", filePath); //下载完成直接打开 [self downLoadPdfFileByUrl:url fileName:fileName]; } failure:^(NSError *error) { @@ -93,7 +93,7 @@ NSString *filePath = [path stringByAppendingPathComponent:fileName]; NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL result = [fileManager fileExistsAtPath:filePath]; - NSLog(@"这个文件已经存在:%@",result?@"是的":@"不存在"); + DLog(@"这个文件已经存在:%@",result?@"是的":@"不存在"); return result; } diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h index d5d1dfb..2b792a3 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.h @@ -154,4 +154,28 @@ //消息 - (void)getUserMessageList:(NSMutableDictionary *)parmDic; +- (void)getUserMessageDetailConnet:(NSMutableDictionary *)parmDic; + +- (void)getHomepageBannerList:(NSMutableDictionary *)parmDic; + +//我的积分 +- (void)getPointsBankHeard:(NSMutableDictionary *)parmDic; + +- (void)postPointsBankRankData:(NSMutableDictionary *)parmDic; + +- (void)postPointsBankSourceDetail:(NSMutableDictionary *)parmDic; +- (void)postPointsCheckInCard:(NSMutableDictionary *)parmDic; + +//积分任务 +- (void)postPointsTaskList:(NSMutableDictionary *)parmDic; + +//图片地址 +- (void)getDetailImageAddress:(NSMutableDictionary *)parmDic; +//轮播图一次性全请求 +- (void)getHomeBannerAllData:(NSMutableDictionary *)parmDic; + +//手表接口 +- (void)getHomeWatchWearBool:(NSMutableDictionary *)parmDic; + +- (void)getHomeWatchData:(NSMutableDictionary *)parmDic; @end diff --git a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m index 220078b..fefc567 100755 --- a/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m +++ b/XinjiangProject/XinjiangProject/Manager/NetworkHelpManager/XJPNetAPI.m @@ -831,9 +831,80 @@ - (void)getUserMessageList:(NSMutableDictionary *)parmDic { - [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system//app/sys/message/notice/list",Http] params:parmDic]; + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/app/sys/message/notice/list",Http] params:parmDic]; + +} + +- (void)getUserMessageDetailConnet:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/app/sys/message/notice/queryById",Http] params:parmDic]; + +} + +//轮播图 +- (void)getHomepageBannerList:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/sys/api/banner/selectBannerList",Http] params:parmDic]; + +} + +//积分银行 +- (void)getPointsBankHeard:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/bank/userPoints/app/myPoints",Http] params:parmDic]; + +} + +//积分榜单 +- (void)postPointsBankRankData:(NSMutableDictionary *)parmDic { + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/bank/userPoints/app/pointRanking",Http] params:parmDic]; + +} + +//积分明细 +- (void)postPointsBankSourceDetail:(NSMutableDictionary *)parmDic { + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/bank/userPoints/app/pointRecord",Http] params:parmDic]; + +} + +//积分任务 +- (void)postPointsCheckInCard:(NSMutableDictionary *)parmDic { + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/bank/userPoints/app/pointCheckIn",Http] params:parmDic]; } +//积分任务 +- (void)postPointsTaskList:(NSMutableDictionary *)parmDic { + + [httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/bank/userPoints/app/pointsTaskList",Http] params:parmDic]; + +} + +//图片地址 +- (void)getDetailImageAddress:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/consultation/conSession/getPicUrl",Http] params:parmDic]; +} + +- (void)getHomeBannerAllData:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/sys/api/banner/selectAllBannerList",Http] params:parmDic]; +} + +#pragma mark:手表相关 +//是否佩戴手表 +- (void)getHomeWatchWearBool:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/api/watchData/findWatchInfo",Http] params:parmDic]; +} + +//手表数据 +- (void)getHomeWatchData:(NSMutableDictionary *)parmDic { + + [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/api/watchData/userWatchDataAll",Http] params:parmDic]; +} @end diff --git a/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m b/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m index bc2345f..2229a96 100644 --- a/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m +++ b/XinjiangProject/XinjiangProject/Project/AppDelegate/AppDelegate+AppService.m @@ -34,23 +34,24 @@ object:nil]; - //切换SOStabbar + //切换咨询tabbar [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(tabBarSoSChange:) - name:KNotificSelectSoSTabbar + selector:@selector(tabBarQuestionChange:) + name:KNotificSelectQuestionTabbar + object:nil]; + //切换应急tabbar + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(tabBarSOSChange:) + name:KNotificSelectSOSCenterTabbar object:nil]; - //切换体检tabbar + //切换监测tabbar [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(tabBarPhyChange:) - name:KNotificSelectPhysicalTabbar + selector:@selector(tabBarMonitoringChange:) + name:KNotificSelectWatchTabbar object:nil]; - //切换档案tabbar - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(tabBarFileChange:) - name:KNotificSelectFileTabbar - object:nil]; + if ([HQCommonUtils isLogin]) { //腾讯im #if DEBUG @@ -159,6 +160,8 @@ [[NSUserDefaults standardUserDefaults] synchronize]; //更新用户授权高德SDK隐私协议状态. since 8.1.0 [MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree]; + KPostNotification(KNotificAgreeProtoocl, nil); + }]; @@ -167,6 +170,8 @@ [[NSUserDefaults standardUserDefaults] synchronize]; //更新用户授权高德SDK隐私协议状态. since 8.1.0 [MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusNotAgree]; + KPostNotification(KNotificAgreeProtoocl, nil); + }]; [alert addAction:conform]; @@ -244,27 +249,24 @@ #pragma mark: 切换tabbar -- (void)tabBarSoSChange:(NSNotification *)notification { +- (void)tabBarQuestionChange:(NSNotification *)notification { + + self.mainTabBar.selectedIndex = 1; + +} + +- (void)tabBarSOSChange:(NSNotification *)notification { self.mainTabBar.selectedIndex = 2; } -- (void)tabBarPhyChange:(NSNotification *)notification { +- (void)tabBarMonitoringChange:(NSNotification *)notification { self.mainTabBar.selectedIndex = 3; } -- (void)tabBarFileChange:(NSNotification *)notification { - - self.mainTabBar.selectedIndex = 4; - -} - - - - + (AppDelegate *)shareAppDelegate{ return (AppDelegate *)[[UIApplication sharedApplication] delegate]; diff --git a/XinjiangProject/XinjiangProject/Project/BANK/Model/PointsBankHModel.h b/XinjiangProject/XinjiangProject/Project/BANK/Model/PointsBankHModel.h new file mode 100644 index 0000000..9b9ad9f --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/Model/PointsBankHModel.h @@ -0,0 +1,33 @@ +// +// PointsBankHModel.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PointsBankHModel : NSObject + +@property (nonatomic, assign) double points; +@property (nonatomic, assign) double addPointsSum; +@property (nonatomic, assign) double exchangePointsSum; + +//RANK +@property (nonatomic, assign) double frequency; +@property (nonatomic, assign) double ruleCategory; +@property (nonatomic, copy) NSString * ruleDesc; +@property (nonatomic, copy) NSString * icon; +@property (nonatomic, assign) double status; +@property (nonatomic, assign) double delFlag; +@property (nonatomic, copy) NSString * createUser; +@property (nonatomic, copy) NSString * createTime; +@property (nonatomic, copy) NSString * lastModifyDate; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/BANK/Model/PointsBankHModel.m b/XinjiangProject/XinjiangProject/Project/BANK/Model/PointsBankHModel.m new file mode 100644 index 0000000..89c5929 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/Model/PointsBankHModel.m @@ -0,0 +1,12 @@ +// +// PointsBankHModel.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "PointsBankHModel.h" + +@implementation PointsBankHModel + +@end diff --git a/XinjiangProject/XinjiangProject/Project/BANK/PointsBankDetailViewController.h b/XinjiangProject/XinjiangProject/Project/BANK/PointsBankDetailViewController.h new file mode 100644 index 0000000..5564ec8 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/PointsBankDetailViewController.h @@ -0,0 +1,16 @@ +// +// PointsBankDetailViewController.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface PointsBankDetailViewController : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/BANK/PointsBankDetailViewController.m b/XinjiangProject/XinjiangProject/Project/BANK/PointsBankDetailViewController.m new file mode 100644 index 0000000..84e3bea --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/PointsBankDetailViewController.m @@ -0,0 +1,263 @@ +// +// PointsBankDetailViewController.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "PointsBankDetailViewController.h" +#import "PointsBankHModel.h" +#import "PointsBankHomeTopView.h" + +@interface PointsBankDetailViewController () + +@property (nonatomic, strong) UITableView * homeTable; + +@property (nonatomic, assign) NSInteger pageNo; + +@property (nonatomic, strong) PointsBankHomeTopView * topView; + +@property (nonatomic, strong) NSMutableArray * dataArray; + +@end + +@implementation PointsBankDetailViewController + +- (NSMutableArray *)dataArray { + if (!_dataArray) { + _dataArray = [[NSMutableArray alloc] init]; + } + return _dataArray; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = KWhiteColor; + self.pageNo = 1; + [self createData]; + [self createUI]; + // Do any additional setup after loading the view. +} + +- (void)createUI { + + self.topView= [[PointsBankHomeTopView alloc] init]; + + [self.view addSubview:self.topView]; + + [self.topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.right.mas_offset(0); + + }]; + + + self.homeTable = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + if ([[UIDevice currentDevice].systemVersion floatValue] >= 11) { + self.homeTable.estimatedRowHeight = 60; + 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.backgroundColor = KClearColor; + self.homeTable.rowHeight = UITableViewAutomaticDimension; + self.homeTable.estimatedRowHeight = 80; + + + [self.view addSubview:self.homeTable]; + + [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(_topView.mas_bottom); + make.left.bottom.right.mas_offset(0); + + }]; + + __weak __typeof(self) weakSelf = self; + self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + + weakSelf.pageNo = 1; + [weakSelf.dataArray removeAllObjects]; + [weakSelf createData]; + + }]; + + self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + + weakSelf.pageNo++; + [weakSelf createData]; + + }]; + + + 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; + + +} + +- (void)createData { + + [self showMBProgressHUDWithString:@"加载中,请稍候..." autoHidden:false]; + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; + [parmDic setObject:@"10" forKey:@"pageSize"]; + + XJPNetAPI * listApi = [[XJPNetAPI alloc] init:self tag:@"LIST" NeedToken:@""]; + [listApi getUserMessageList:parmDic]; + +} + + + +#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 { + + + return UITableViewCell.new; + + +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + + +} + +- (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; +} + + +- (void)chageDataType:(UIButton *)typeBtn { + + //请求接口 + if (typeBtn.tag == 0) { + [self creeateRankDataWithTyep:@"1"]; + } + if (typeBtn.tag == 1) { + [self creeateRankDataWithTyep:@"2"]; + } + if (typeBtn.tag == 2) { + [self creeateRankDataWithTyep:@"0"]; + } + +} + +- (void)creeateRankDataWithTyep:(NSString *)type { + + //rankType(榜单类型,0总榜,1周榜,2月榜) + [self showMBProgressHUDWithString:@"加载中,请稍候..." autoHidden:false]; + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; + [parmDic setObject:@"10" forKey:@"pageSize"]; + [parmDic setObject:type forKey:@"rankType"]; + + + XJPNetAPI * listApi = [[XJPNetAPI alloc] init:self tag:@"DETAIL" NeedToken:@""]; + [listApi postPointsBankSourceDetail:parmDic]; + +} + + +- (void)Failed:(NSString*)message tag:(NSString*)tag +{ + + [self.homeTable.mj_header endRefreshing]; + [self.homeTable.mj_footer endRefreshing]; + + [self hiddenAllMBProgressHUD]; + +} + + +- (void)Sucess:(id)response tag:(NSString*)tag +{ + [self.homeTable.mj_header endRefreshing]; + [self.homeTable.mj_footer endRefreshing]; + if ([tag isEqualToString:@"DETAIL"]) { + + [self hiddenAllMBProgressHUD]; + NSDictionary * responseDic = response; + + PointsBankHModel * model = [PointsBankHModel modelWithDictionary:responseDic]; + //points 可用积分 addPointsSum 累计积分 exchangePointsSum 累计兑换 + self.topView.model = model; + + } + if ([tag isEqualToString:@"RANK"]) { + NSDictionary * dic = response; + if ([dic.allKeys containsObject:@"page"]) { + NSDictionary * pageDic = [dic objectForKey:@"page"]; + //取到排名 + if ([pageDic.allKeys containsObject:@"records"]) { + NSArray * array = [pageDic objectForKey:@"records"]; + for (NSDictionary * rankDic in array) { + PointsBankHModel * mdoel = [PointsBankHModel modelWithDictionary:rankDic]; + [self.dataArray addObject:mdoel]; + + } + //处理结束 给数据 + [self.homeTable reloadData]; + + } + + } + } + // + +} + + +/* +#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/BANK/View/PointsBankHomeTopView.h b/XinjiangProject/XinjiangProject/Project/BANK/View/PointsBankHomeTopView.h new file mode 100644 index 0000000..08a8e0c --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/View/PointsBankHomeTopView.h @@ -0,0 +1,19 @@ +// +// PointsBankHomeTopView.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import +#import "PointsBankHModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface PointsBankHomeTopView : UIView + +@property (nonatomic, strong) PointsBankHModel * model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/BANK/View/PointsBankHomeTopView.m b/XinjiangProject/XinjiangProject/Project/BANK/View/PointsBankHomeTopView.m new file mode 100644 index 0000000..4e528ab --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/View/PointsBankHomeTopView.m @@ -0,0 +1,144 @@ +// +// PointsBankHomeTopView.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "PointsBankHomeTopView.h" + +@interface PointsBankHomeTopView () + +@property (nonatomic, strong) UILabel * pointsDataLabel; +@property (nonatomic, strong) UILabel * pointsAddLabel; +@property (nonatomic, strong) UILabel * exchangeLabel; + +@end + +@implementation PointsBankHomeTopView + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ +- (instancetype)initWithFrame:(CGRect)frame { + + if (self = [super initWithFrame:frame]) { + + [self createUI]; + } + return self; +} + +- (void)createUI { + + UILabel * haveLab = [[UILabel alloc] init]; + haveLab.text = @"可用积分"; + haveLab.textColor = CFontColor1; + haveLab.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular]; + [self addSubview:haveLab]; + + [haveLab mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(15); + make.top.mas_offset(15); + }]; + + self.pointsDataLabel = [[UILabel alloc] init]; + self.pointsDataLabel.text = @"--"; + self.pointsDataLabel.textColor = CFontColor1; + self.pointsDataLabel.font = [UIFont systemFontOfSize:28 weight:UIFontWeightBold]; + [self addSubview:self.pointsDataLabel]; + + [self.pointsDataLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(haveLab); + make.top.mas_equalTo(haveLab.mas_bottom).offset(12); + }]; + + + UIButton * sourceBtn = [[UIButton alloc] init]; + [sourceBtn setTitle:@"获取积分" forState:UIControlStateNormal]; + [sourceBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; + sourceBtn.titleLabel.font = SYSTEMFONT(15); + sourceBtn.layer.cornerRadius = 4; + sourceBtn.layer.masksToBounds = true; + sourceBtn.backgroundColor = UIColorHex(#21BEBE); + [self addSubview:sourceBtn]; + + [sourceBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_offset(-15); + make.width.mas_offset(80); + make.height.mas_offset(32); + make.top.mas_offset(53); + }]; + + UILabel * addLab = [[UILabel alloc] init]; + addLab.text = @"累计积分:"; + addLab.textColor = CFontColor1; + addLab.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular]; + self.pointsAddLabel = addLab; + [self addSubview:addLab]; + + [addLab mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(haveLab.mas_right).offset(81); + make.top.mas_equalTo(haveLab.mas_bottom).offset(11); + }]; + + self.exchangeLabel = [[UILabel alloc] init]; + self.exchangeLabel.text = @"累计兑换:"; + self.exchangeLabel.textColor = CFontColor1; + self.exchangeLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular]; + [self addSubview:self.exchangeLabel]; + + [self.exchangeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(haveLab.mas_right).offset(81); + make.top.mas_equalTo(addLab.mas_bottom).offset(11); + }]; + + UIView *dashedView = [[UIView alloc] init]; + [self addSubview:dashedView]; + + // Masonry 布局 + [dashedView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(20); + make.right.mas_equalTo(-20); + make.top.mas_equalTo(self.pointsDataLabel.mas_bottom).offset(10); + make.height.mas_equalTo(1); // 高度可以随意 + make.bottom.mas_equalTo(-10); + }]; + //虚线 + CAShapeLayer *shapeLayer = [CAShapeLayer layer]; + shapeLayer.strokeColor = [UIColor lightGrayColor].CGColor; // 线颜色 + shapeLayer.lineWidth = 1; // 线宽 + shapeLayer.lineDashPattern = @[@4, @2]; // 虚线:4pt 实线,2pt 空白 + + // 创建路径 + CGMutablePathRef path = CGPathCreateMutable(); + CGPathMoveToPoint(path, NULL, 0, 0); // 起点 + CGPathAddLineToPoint(path, NULL, [UIScreen mainScreen].bounds.size.width - 40, 0); // 终点 + shapeLayer.path = path; + CGPathRelease(path); + + // 添加到 view + [dashedView.layer addSublayer:shapeLayer]; + +} + + + +-(void)setModel:(PointsBankHModel *)model { + + _model = model; + + self.pointsDataLabel.text = [NSString stringWithFormat:@"%.0f",_model.points]; + + self.pointsAddLabel.text = [NSString stringWithFormat:@"累计积分:%.0f",_model.addPointsSum]; + + self.exchangeLabel.text = [NSString stringWithFormat:@"累计兑换%.0f",_model.exchangePointsSum]; + + + +} +@end diff --git a/XinjiangProject/XinjiangProject/Project/BANK/myPointsBankHomeViewController.h b/XinjiangProject/XinjiangProject/Project/BANK/myPointsBankHomeViewController.h new file mode 100644 index 0000000..1c0d391 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/myPointsBankHomeViewController.h @@ -0,0 +1,16 @@ +// +// myPointsBankHomeViewController.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface myPointsBankHomeViewController : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/BANK/myPointsBankHomeViewController.m b/XinjiangProject/XinjiangProject/Project/BANK/myPointsBankHomeViewController.m new file mode 100644 index 0000000..73dab85 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/BANK/myPointsBankHomeViewController.m @@ -0,0 +1,439 @@ +// +// myPointsBankHomeViewController.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "myPointsBankHomeViewController.h" +#import "PointsBankHModel.h" +#import "PointsBankHomeTopView.h" + +@interface myPointsBankHomeViewController () + +@property (nonatomic, strong) UITableView * homeTable; +@property (nonatomic, assign) NSInteger pageNo; +@property (nonatomic, strong) NSMutableArray * dataArray; +@property (nonatomic, strong) NSMutableArray * buttonArray; + +@property (nonatomic, strong) PointsBankHomeTopView * topView; +@property (nonatomic, strong) UIView * lineView; + + +@end + +@implementation myPointsBankHomeViewController + +- (NSMutableArray *)dataArray { + + if (!_dataArray ) { + _dataArray = [[NSMutableArray alloc] init]; + } + return _dataArray; +} + +- (NSMutableArray *)buttonArray { + + if (!_buttonArray ) { + _buttonArray = [[NSMutableArray alloc] init]; + } + return _buttonArray; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + self.isHidenNaviBar = false; + self.navigationItem.title = @"我的积分银行"; + + [self createData]; + //默认总榜单 + [self creeateRankDataWithTyep:@"0"]; + [self createUI]; +} + +- (void)createUI { + + //首页 + self.topView = [[PointsBankHomeTopView alloc] init]; + [self.view addSubview:self.topView]; + + [self.topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_offset(0); +// make.height.mas_offset(185); + }]; + + //功能栏 + NSArray * toolsArray = @[@[@"积分兑换",@"img1"],@[@"积分明细",@"img2"],@[@"兑换记录",@"img3"]]; + + CGFloat itemWidth = 60; + CGFloat itemHeight = 110; + NSInteger count = toolsArray.count; + + for (int i = 0; i < count; i++) { + + NSArray *item = toolsArray[i]; + + // 1️⃣ 容器 view + UIView *itemView = [[UIView alloc] init]; + itemView.tag = i; + itemView.userInteractionEnabled = YES; + [self.view addSubview:itemView]; + + // 2️⃣ 点击手势 + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(itemTap:)]; + [itemView addGestureRecognizer:tap]; + + // 3️⃣ 布局 container(每个 item 占 1/3 屏幕宽) + CGFloat thirdWidth = UIScreen.mainScreen.bounds.size.width / count; + + [itemView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.topView.mas_bottom).offset(20); + make.width.mas_equalTo(itemWidth); + make.height.mas_equalTo(itemHeight); + make.centerX.mas_equalTo(self.view.mas_left).offset(thirdWidth * i + thirdWidth / 2); + }]; + + // 4️⃣ 图片 + UIImageView *icon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:item[1]]]; + icon.contentMode = UIViewContentModeScaleAspectFit; + [itemView addSubview:icon]; + + [icon mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.centerX.equalTo(itemView); + make.width.height.mas_equalTo(40); + }]; + + // 5️⃣ 文字 + UILabel *label = [[UILabel alloc] init]; + label.text = item[0]; + label.font = [UIFont systemFontOfSize:14]; + label.textAlignment = NSTextAlignmentCenter; + [itemView addSubview:label]; + + [label mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(icon.mas_bottom).offset(8); + make.left.right.equalTo(itemView); + make.height.mas_equalTo(20); + }]; + } + + //排行 + UIView * rankView = [[UIView alloc] init]; + rankView.backgroundColor = KWhiteColor; + [self.view addSubview:rankView]; + + + UILabel * rankTitleLab = [[UILabel alloc] init]; + rankTitleLab.text = @"积分排行(单位)"; + rankTitleLab.textColor = CFontColor1; + [rankView addSubview:rankTitleLab]; + + [rankTitleLab mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(15); + make.top.mas_offset(15); + }]; + + UILabel * detailLab = [[UILabel alloc] init]; + detailLab.text = @"以员工累计获得积分进行排名"; + detailLab.textColor = CFontColor1; + [rankView addSubview:detailLab]; + + [detailLab mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(15); + make.top.mas_equalTo(rankTitleLab.mas_bottom).offset(8); + }]; + + //周排名 月排名 年排名 + UIView * lineView = [[UIView alloc] init]; + lineView.backgroundColor = UIColor.blueColor; + self.lineView = lineView; + [rankView addSubview:lineView]; + + [lineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_offset(80); + make.height.mas_offset(2); + }]; + + NSArray * array = @[@"周排名",@"月排名",@"年排名"]; + UIButton * lastBtn = nil; + for (int i= 0; i < 3; i ++) { + + UIButton * btn = [[UIButton alloc] init]; + [btn setTitle:array[i] forState:UIControlStateNormal]; + [btn setTitleColor:UIColor.blueColor forState:UIControlStateSelected]; + [btn setTitleColor:UIColor.blackColor forState:UIControlStateNormal]; + btn.titleLabel.font = MEDIUMFONT(13); + btn.tag = i; + [btn addTarget:self action:@selector(chageDataType:) forControlEvents:UIControlEventTouchUpInside]; + btn.selected = false; + if (i == 2) { + btn.selected = true; + lastBtn = btn; + + } + [rankView addSubview:btn]; + + [btn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_offset(80); + make.height.mas_offset(32); + make.top.mas_equalTo(detailLab.mas_bottom).offset(10); + if (i == 0) { + make.left.mas_offset(82); + } + if (i == 1) { + make.centerX.mas_equalTo(rankView); + + } + if (i == 2) { + make.right.mas_offset(-82); + } + }]; + [self.buttonArray addObject:btn]; + + } + if (lastBtn) { + [lineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(lastBtn); + make.top.mas_equalTo(lastBtn.mas_bottom).offset(5); + }]; + } + + [rankView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_offset(0); + make.top.mas_equalTo(self.topView.mas_bottom).offset(15); + make.bottom.mas_equalTo(lastBtn.mas_bottom).offset(20); + }]; + + self.homeTable = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + if ([[UIDevice currentDevice].systemVersion floatValue] >= 11) { + self.homeTable.estimatedRowHeight = 60; + 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.backgroundColor = KClearColor; + self.homeTable.rowHeight = UITableViewAutomaticDimension; + self.homeTable.estimatedRowHeight = 80; + + + [self.view addSubview:self.homeTable]; + + [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(rankView.mas_bottom); + make.left.bottom.right.mas_offset(0); + + }]; + + __weak __typeof(self) weakSelf = self; + self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + + weakSelf.pageNo = 1; + [weakSelf.dataArray removeAllObjects]; + [weakSelf createData]; + + }]; + + self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + + weakSelf.pageNo++; + [weakSelf createData]; + + }]; + + + 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; + +} + + +- (void)createData { + + [self showMBProgressHUDWithString:@"加载中,请稍候..." autoHidden:false]; + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + XJPNetAPI * listApi = [[XJPNetAPI alloc] init:self tag:@"HEARD" NeedToken:@""]; + [listApi getPointsBankHeard:parmDic]; + +} + + + +#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 { + + + return UITableViewCell.new; + + +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + + +} + +- (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; +} + + +- (void)chageDataType:(UIButton *)typeBtn { + + for (UIButton * seleBtn in self.buttonArray) { + if (seleBtn == typeBtn) { + seleBtn.selected = true; + + [self.lineView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(typeBtn); + make.bottom.mas_equalTo(typeBtn.mas_bottom).offset(8); + make.height.mas_offset(1); + make.centerX.mas_equalTo(typeBtn); + }]; + }else + { + seleBtn.selected = false; + } + } + //请求接口 + if (typeBtn.tag == 0) { + [self creeateRankDataWithTyep:@"1"]; + } + if (typeBtn.tag == 1) { + [self creeateRankDataWithTyep:@"2"]; + } + if (typeBtn.tag == 2) { + [self creeateRankDataWithTyep:@"0"]; + } + +} + +- (void)creeateRankDataWithTyep:(NSString *)type { + + //rankType(榜单类型,0总榜,1周榜,2月榜) + [self showMBProgressHUDWithString:@"加载中,请稍候..." autoHidden:false]; + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; + [parmDic setObject:@"10" forKey:@"pageSize"]; + [parmDic setObject:type forKey:@"rankType"]; + + + XJPNetAPI * listApi = [[XJPNetAPI alloc] init:self tag:@"RANK" NeedToken:@""]; + [listApi postPointsBankRankData:parmDic]; + +} + + +- (void)Failed:(NSString*)message tag:(NSString*)tag +{ + + [self.homeTable.mj_header endRefreshing]; + [self.homeTable.mj_footer endRefreshing]; + + [self hiddenAllMBProgressHUD]; + +} + + +- (void)Sucess:(id)response tag:(NSString*)tag +{ + [self.homeTable.mj_header endRefreshing]; + [self.homeTable.mj_footer endRefreshing]; + if ([tag isEqualToString:@"HEARD"]) { + + [self hiddenAllMBProgressHUD]; + NSDictionary * responseDic = response; + + PointsBankHModel * model = [PointsBankHModel modelWithDictionary:responseDic]; + //points 可用积分 addPointsSum 累计积分 exchangePointsSum 累计兑换 + self.topView.model = model; + + } + if ([tag isEqualToString:@"RANK"]) { + NSDictionary * dic = response; + if ([dic.allKeys containsObject:@"page"]) { + NSDictionary * pageDic = [dic objectForKey:@"page"]; + //取到排名 + if ([pageDic.allKeys containsObject:@"records"]) { + NSArray * array = [pageDic objectForKey:@"records"]; + for (NSDictionary * rankDic in array) { + PointsBankHModel * mdoel = [PointsBankHModel modelWithDictionary:rankDic]; + [self.dataArray addObject:mdoel]; + + } + //处理结束 给数据 + [self.homeTable reloadData]; + + } + + } + } + // + +} + +- (void)itemTap:(UITapGestureRecognizer *)tap { + NSInteger index = tap.view.tag; + NSLog(@"点击了第 %ld 个", index); + + if(index == 1 || index == 2) { + [EasyTextView showInfoText:@"开发者,敬请期待!"]; + return; + } +} +/* +#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/Base/XJBaseTabBarController.m b/XinjiangProject/XinjiangProject/Project/Base/XJBaseTabBarController.m index 9f2da5c..310bdd4 100644 --- a/XinjiangProject/XinjiangProject/Project/Base/XJBaseTabBarController.m +++ b/XinjiangProject/XinjiangProject/Project/Base/XJBaseTabBarController.m @@ -14,7 +14,9 @@ #import "XJSosCenterViewController.h" #import "MonitoringWarchViewController.h" -//干预二期 +//新版首页 +#import "XJHomePageV2ViewController.h" + @interface XJBaseTabBarController () @@ -39,8 +41,6 @@ - (void)viewDidLoad { [super viewDidLoad]; self.delegate = self; - - //初始化tabbar [self setUpTabBar]; //添加子控制器 @@ -73,6 +73,11 @@ -(void)setUpAllChildViewController{ _VCS = @[].mutableCopy; + //新增首页 + + XJHomePageV2ViewController * homeVC = [[XJHomePageV2ViewController alloc]init]; + [self setupChildViewController:homeVC title:@"首页" imageName:@"xjHomeTabBar_nomal" seleceImageName:@"xjHomeTabBar_selected"]; + QuestionViewController * questionVC = [[QuestionViewController alloc]init]; [self setupChildViewController:questionVC title:@"咨询" imageName:@"questionTabBar_nomal" seleceImageName:@"questionTabBar_selected"]; @@ -141,6 +146,10 @@ return [self.selectedViewController supportedInterfaceOrientations]; } +- (void)selectedQuestion { + + self.selectedIndex = 1; +} /* #pragma mark - Navigation diff --git a/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m b/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m index efc1f69..6054aeb 100644 --- a/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m +++ b/XinjiangProject/XinjiangProject/Project/Base/XJBaseWebViewVC.m @@ -213,7 +213,7 @@ NSSet *websiteDataTypes = [WKWebsiteDataStore allWebsiteDataTypes]; NSDate *dateFrom = [NSDate dateWithTimeIntervalSince1970:0]; [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:websiteDataTypes modifiedSince:dateFrom completionHandler:^{ - NSLog(@"-----clear webView cache success------"); + DLog(@"-----clear webView cache success------"); }]; } else { NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; @@ -221,7 +221,7 @@ NSError *errors; [[NSFileManager defaultManager] removeItemAtPath:cookiesFolderPath error:&errors]; if (!errors) { - NSLog(@"-----clear wkWebView cache success------"); + DLog(@"-----clear wkWebView cache success------"); } } } diff --git a/XinjiangProject/XinjiangProject/Project/CustomTUIChat/VC/CustomTUIBaseMessageController.m b/XinjiangProject/XinjiangProject/Project/CustomTUIChat/VC/CustomTUIBaseMessageController.m index b9c94ce..07a00ad 100644 --- a/XinjiangProject/XinjiangProject/Project/CustomTUIChat/VC/CustomTUIBaseMessageController.m +++ b/XinjiangProject/XinjiangProject/Project/CustomTUIChat/VC/CustomTUIBaseMessageController.m @@ -134,8 +134,8 @@ } for (MsgBody *msgBody in model.MsgBody) { - NSLog(@"MsgType: %@", msgBody.MsgType); - NSLog(@"MsgContent Data - title: %@", msgBody.MsgContent.Text); + DLog(@"MsgType: %@", msgBody.MsgType); + DLog(@"MsgContent Data - title: %@", msgBody.MsgContent.Text); if([msgBody.MsgType isEqualToString:@"TIMTextElem"]) //文本消息 { diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/EmptyFunctionDevelopmentVC.h b/XinjiangProject/XinjiangProject/Project/HomeV2/EmptyFunctionDevelopmentVC.h new file mode 100644 index 0000000..f6173a2 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/EmptyFunctionDevelopmentVC.h @@ -0,0 +1,16 @@ +// +// EmptyFunctionDevelopmentVC.h +// XinjiangProject +// +// Created by Apple on 2026/2/10. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface EmptyFunctionDevelopmentVC : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/EmptyFunctionDevelopmentVC.m b/XinjiangProject/XinjiangProject/Project/HomeV2/EmptyFunctionDevelopmentVC.m new file mode 100644 index 0000000..d88c027 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/EmptyFunctionDevelopmentVC.m @@ -0,0 +1,58 @@ +// +// EmptyFunctionDevelopmentVC.m +// XinjiangProject +// +// Created by Apple on 2026/2/10. +// + +#import "EmptyFunctionDevelopmentVC.h" + +@interface EmptyFunctionDevelopmentVC () + +@end + +@implementation EmptyFunctionDevelopmentVC + +- (void)viewDidLoad { + [super viewDidLoad]; + self.isHidenNaviBar = false; + self.view.backgroundColor = KWhiteColor; + + UIImageView * deveImg = [[UIImageView alloc] init]; + deveImg.image = [UIImage imageNamed:@"deveEmptyImg"]; + [self.view addSubview:deveImg]; + + [deveImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_offset(90); + make.height.mas_offset(76); + make.centerX.mas_equalTo(self.view); + make.centerY.mas_equalTo(self.view).offset(-70) ; + }]; + + UILabel * dataLabel = [[UILabel alloc] init]; + dataLabel.text = @"~ 正在研发中,敬请期待 ~"; + dataLabel.font = SYSTEMFONT(14); + dataLabel.textColor = UIColorHex(#B6B6B6); + dataLabel.textAlignment = NSTextAlignmentCenter; + [self.view addSubview:dataLabel]; + + [dataLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(deveImg.mas_bottom).offset(12); + make.left.right.mas_offset(0); + }]; + + + // 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/HomeV2/Model/HomeBannerModel.h b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/HomeBannerModel.h new file mode 100644 index 0000000..6ea01d9 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/HomeBannerModel.h @@ -0,0 +1,25 @@ +// +// HomeBannerModel.h +// XinjiangProject +// +// Created by Apple on 2026/2/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface HomeBannerModel : NSObject + +@property (nonatomic, strong) NSString * banner_id; +@property (nonatomic, strong) NSString * tfJump; +@property (nonatomic, strong) NSString * photoUrl; +@property (nonatomic, strong) NSString * jumpUrl; +@property (nonatomic, assign) NSInteger sort; +@property (nonatomic, strong) NSString * showLocation; +@property (nonatomic, strong) NSString * showLocation_dicText; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/Model/HomeBannerModel.m b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/HomeBannerModel.m new file mode 100644 index 0000000..0414035 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/HomeBannerModel.m @@ -0,0 +1,18 @@ +// +// HomeBannerModel.m +// XinjiangProject +// +// Created by Apple on 2026/2/10. +// + +#import "HomeBannerModel.h" + +@implementation HomeBannerModel + ++ (NSDictionary *)modelCustomPropertyMapper +{ + NSDictionary * dic =@{@"banner_id" :@"id"}; + return dic; +} + +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/Model/XJHomeWatchModel.h b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/XJHomeWatchModel.h new file mode 100644 index 0000000..1e52a80 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/XJHomeWatchModel.h @@ -0,0 +1,34 @@ +// +// XJHomeWatchModel.h +// XinjiangProject +// +// Created by Apple on 2026/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XJHomeWatchModel : NSObject + +@property (nonatomic, assign) CGFloat latest; +@property (nonatomic, assign) CGFloat max; +@property (nonatomic, assign) CGFloat min; +@property (nonatomic, assign) CGFloat avg; + +@property (nonatomic, copy) NSString * latestTime; +@property (nonatomic, copy) NSString * watchNo; +@property (nonatomic, copy) NSString * lastUploadDate; +@property (nonatomic, copy) NSString * watchModel; +@property (nonatomic, copy) NSString * bindDate; + +@property (nonatomic, assign) BOOL hasWatch; + +//手表详情 +@property (nonatomic, copy) NSString * type; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/Model/XJHomeWatchModel.m b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/XJHomeWatchModel.m new file mode 100644 index 0000000..8834835 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/Model/XJHomeWatchModel.m @@ -0,0 +1,12 @@ +// +// XJHomeWatchModel.m +// XinjiangProject +// +// Created by Apple on 2026/3/2. +// + +#import "XJHomeWatchModel.h" + +@implementation XJHomeWatchModel + +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2BottomTools.h b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2BottomTools.h new file mode 100644 index 0000000..4baa0d8 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2BottomTools.h @@ -0,0 +1,19 @@ +// +// XJHomePageV2BottomTools.h +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import + +typedef void(^bottomToolsImgClick)(NSInteger imgIndex); +NS_ASSUME_NONNULL_BEGIN + +@interface XJHomePageV2BottomTools : UIView + +@property (nonatomic, strong)bottomToolsImgClick imgeBlock; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2BottomTools.m b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2BottomTools.m new file mode 100644 index 0000000..94fae80 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2BottomTools.m @@ -0,0 +1,124 @@ +// +// XJHomePageV2BottomTools.m +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import "XJHomePageV2BottomTools.h" + +@implementation XJHomePageV2BottomTools + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ + +- (instancetype)initWithFrame:(CGRect)frame { + + if (self = [super initWithFrame:frame]) { + [self createUI]; + } + return self; +} + +- (void)createUI { + + UIImageView * leftImage = [[UIImageView alloc] init]; + leftImage.image = [UIImage imageNamed:@"bottomLeftImg"]; + leftImage.userInteractionEnabled = true; + [self addSubview:leftImage]; + + [leftImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(0); + make.top.bottom.mas_offset(0); + make.width.mas_equalTo(self.mas_width).multipliedBy(0.5).offset(10); + }]; + + UILabel * leftTitle = [[UILabel alloc] init]; + leftTitle.text = @"智慧体重"; + leftTitle.textColor = UIColorHex(#252535); + leftTitle.font = MEDIUMFONT(15); + [leftImage addSubview:leftTitle]; + + [leftTitle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(27); + make.top.mas_offset(25); + }]; + + UILabel * leftDetailTitle = [[UILabel alloc] init]; + leftDetailTitle.text = @"智追体重 科学控重"; + leftDetailTitle.textColor = UIColorHex(#808080); + leftDetailTitle.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]; + [leftImage addSubview:leftDetailTitle]; + + [leftDetailTitle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(27); + make.top.mas_equalTo(leftTitle.mas_bottom).offset(8); + }]; + + + UIImageView * rightImage = [[UIImageView alloc] init]; + rightImage.image = [UIImage imageNamed:@"bottomRightImg"]; + rightImage.userInteractionEnabled = true; + [self addSubview:rightImage]; + + [rightImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_offset(0); + make.top.bottom.mas_offset(0); + make.width.mas_equalTo(self.mas_width).multipliedBy(0.5).offset(10); + }]; + + UILabel * rightTitle = [[UILabel alloc] init]; + rightTitle.text = @"一人一案"; + rightTitle.textColor = UIColorHex(#252535); + rightTitle.font = MEDIUMFONT(15); + [rightImage addSubview:rightTitle]; + + [rightTitle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(27); + make.top.mas_offset(25); + }]; + + UILabel * rightDetailTitle = [[UILabel alloc] init]; + rightDetailTitle.text = @"定制专属健康方案"; + rightDetailTitle.textColor = UIColorHex(#808080); + rightDetailTitle.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]; + [rightImage addSubview:rightDetailTitle]; + + [rightDetailTitle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(27); + make.top.mas_equalTo(rightTitle.mas_bottom).offset(8); + }]; + + UITapGestureRecognizer *tap1 = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(leftImageTap:)]; + + [leftImage addGestureRecognizer:tap1]; + + UITapGestureRecognizer *tap2 = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(rightImageTap:)]; + + [rightImage addGestureRecognizer:tap2]; + +} + +- (void)leftImageTap:(UITapGestureRecognizer *)tap { + if (self.imgeBlock) { + self.imgeBlock(1); + } + +} + +- (void)rightImageTap:(UITapGestureRecognizer *)tap { + + if (self.imgeBlock) { + self.imgeBlock(2); + } +} +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2HeardView.h b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2HeardView.h new file mode 100644 index 0000000..e2f97e2 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2HeardView.h @@ -0,0 +1,42 @@ +// +// XJHomePageV2HeardView.h +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import + +#import "XJHomeWatchModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@protocol homePageHeardDelegate + +- (void)SDTitleItemClick; + +- (void)heardTopToolsClick:(NSInteger)type; + +- (void)heardImageClick:(NSInteger)imageIndex; + +- (void)watchDetailClick; + +@end + +@interface XJHomePageV2HeardView : UIView + +@property (nonatomic, strong) NSArray * dataArray; + +@property (nonatomic, weak) id homeTopDelegate; + + +@property (nonatomic, strong) NSArray * bannerArray; + +@property (nonatomic, strong) XJHomeWatchModel * model; + +@property (nonatomic, strong) NSArray * watchArray; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2HeardView.m b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2HeardView.m new file mode 100644 index 0000000..943f315 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2HeardView.m @@ -0,0 +1,489 @@ +// +// XJHomePageV2HeardView.m +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import "XJHomePageV2HeardView.h" +#import "SDCycleScrollView.h" +#import "HealthyToolsView.h" +#import "MyMessageModel.h" +#import "HomeBannerModel.h" +#import "XJHomeWatchDataView.h" + + +@interface XJHomePageV2HeardView () + +@property (nonatomic, strong) UIView * messageview; + + +@property (nonatomic, strong) SDCycleScrollView * adTitleView; + +@property (nonatomic, strong) UILabel * nameLabel; + +@property (nonatomic, strong) XJHomeWatchDataView * watchDataView; + + + +@end + +@implementation XJHomePageV2HeardView + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ +- (instancetype)initWithFrame:(CGRect)frame { + + if (self = [super initWithFrame:frame]) { + self.backgroundColor = CViewBgColor; + [self createUI]; + } + + return self; + +} + +- (void)createUI { + + UIImageView * backImage = [[UIImageView alloc] init]; + backImage.userInteractionEnabled = true; + backImage.image = [UIImage imageNamed:@"homePageHeardTop"]; + [self addSubview:backImage]; + + [backImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_offset(0); + make.height.mas_offset(kRealValue(405)); + make.top.mas_offset(0); + + }]; + + UIView * messageView = [[UIView alloc] init]; + messageView.layer.cornerRadius = 8; + messageView.layer.masksToBounds = true; + messageView.userInteractionEnabled = true; + self.messageview = messageView; + [backImage addSubview:messageView]; + + [messageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(12); + make.right.mas_offset(-12); + make.height.mas_offset(40); + make.top.mas_offset(kRealValue(145)); + }]; + + + + UIImageView * messageImg = [[UIImageView alloc] init]; + messageImg.image = [UIImage imageNamed:@"messageBackImg"]; + messageImg.userInteractionEnabled = true; + [messageView addSubview:messageImg]; + + [messageImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.offset(0); + }]; + + UIImageView * labaImg = [[UIImageView alloc] init]; + labaImg.image = [UIImage imageNamed:@"homeLaba"]; + [messageView addSubview:labaImg]; + [labaImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(10); + make.width.height.mas_offset(17); + make.centerY.mas_equalTo(messageView); + }]; + + + self.adTitleView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil]; + self.adTitleView.titleLabelTextColor = UIColorHex(#77849E); + self.adTitleView.titleLabelBackgroundColor = KClearColor; + self.adTitleView.scrollDirection = UICollectionViewScrollDirectionVertical; + self.adTitleView.onlyDisplayText = YES; + NSArray *titles = @[]; + + self.adTitleView.titlesGroup = [titles copy]; + [self.adTitleView disableScrollGesture]; + [messageView addSubview:self.adTitleView]; + [self.adTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(labaImg.mas_right).offset(9); + make.right.equalTo(messageView).offset(-12); + make.top.bottom.equalTo(messageView); + }]; + DLog(@"%@", self.adTitleView); + + if ([HQCommonUtils isLogin]) { + messageView.hidden = false; + }else + { + messageView.hidden = true; + + } + + self.nameLabel = [[UILabel alloc] init]; + self.nameLabel.textColor = KWhiteColor; + self.nameLabel.font = BOLDSYSTEMFONT(12); + self.nameLabel.text = @"Hi~"; + self.nameLabel.textAlignment = NSTextAlignmentLeft; + [backImage addSubview:self.nameLabel]; + [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(24); + make.right.mas_offset(-12); + if (messageView.hidden == false) { + make.top.mas_equalTo(messageView.mas_bottom).offset(10); + }else + { + make.top.mas_offset(kRealValue(145)); + } + }]; + //姓名 + if ([HQCommonUtils isLogin]) { + HQUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; + self.nameLabel.text = [NSString stringWithFormat:@"Hi~%@",user.realname]; + } + + // + UIView * toolsView = [[UIView alloc] init]; + toolsView.layer.cornerRadius = 12; + toolsView.layer.masksToBounds = true; + toolsView.alpha = 0.5; + toolsView.backgroundColor = UIColorHex(#EBFFFD); + [backImage addSubview:toolsView]; + + [toolsView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(6); + make.right.mas_offset(-6); + make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(8); + make.height.mas_offset(126); + + }]; + + UILabel * toolTitleLab = [[UILabel alloc] init]; + toolTitleLab.text = @"今日健康积分 0 | 累计积分 0"; + toolTitleLab.textColor = UIColorHex(#116F6B); + toolTitleLab.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]; + [toolsView addSubview:toolTitleLab]; + + [toolTitleLab mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(18); + make.top.mas_offset(8); + make.right.mas_offset(0); + }]; + + NSArray * toolsArray = @[@[@"健康档案",@"homeTools_1"],@[@"健康体检",@"homeTools_2"],@[@"应急就医",@"homeTools_3"],@[@"健康银行",@"homeTools_4"]]; + + UIView * customView = [[UIView alloc] init]; + customView.layer.cornerRadius = 6; + customView.layer.masksToBounds = true; + customView.backgroundColor = KWhiteColor; + [backImage addSubview:customView]; + + [customView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(12); + make.right.mas_offset(-12); + make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(35); + make.height.mas_offset(93); + }]; + + NSInteger count = toolsArray.count; + NSMutableArray *itemViews = [NSMutableArray array]; + + for (int i = 0; i < count; i++) { + + NSArray *item = toolsArray[i]; + + UIView *itemView = [[UIView alloc] init]; + itemView.tag = i; + itemView.userInteractionEnabled = YES; + [customView addSubview:itemView]; + [itemViews addObject:itemView]; + + /// 点击手势 + UITapGestureRecognizer *tap = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(cenetrFunctionItemTap:)]; + + [itemView addGestureRecognizer:tap]; + + /// 上图 + UIImageView *icon = [[UIImageView alloc] init]; + icon.image = [UIImage imageNamed:item[1]]; + icon.contentMode = UIViewContentModeScaleAspectFit; + [itemView addSubview:icon]; + + /// 下文 + UILabel *title = [[UILabel alloc] init]; + title.text = item[0]; + title.font = MEDIUMFONT(14); + title.textColor = [UIColor blackColor]; + title.textAlignment = NSTextAlignmentCenter; + [itemView addSubview:title]; + + /// icon 布局 + [icon mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(10); + make.centerX.equalTo(itemView); + make.width.height.mas_equalTo(40); + }]; + + /// label 布局 + [title mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(icon.mas_bottom).offset(6); + make.left.right.equalTo(itemView); + }]; + } + [itemViews mas_distributeViewsAlongAxis:MASAxisTypeHorizontal + withFixedSpacing:0 + leadSpacing:0 + tailSpacing:0]; + + [itemViews mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.bottom.equalTo(customView); + }]; +// 先用图片实现 + + NSArray *imageConfigs = @[ + @{@"img": @"heardTopImg_1", @"height": @65}, + @{@"img": @"heardTopImg_2", @"height": @60}, + ]; + SDCycleScrollView *lastImageView = nil; + + for (int i = 0; i < imageConfigs.count; i++) { + + NSDictionary *config = imageConfigs[i]; + + SDCycleScrollView * SDCycles = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage: [UIImage imageNamed:@"placeholder"]]; + SDCycles.layer.cornerRadius = 12; + SDCycles.layer.masksToBounds = true; + SDCycles.backgroundColor = KClearColor; + // UIViewContentModeScaleToFill, +// UIViewContentModeScaleAspectFit, // contents scaled to fit with fixed aspect. remainder is transparent +// UIViewContentModeScaleAspectFill, + SDCycles.bannerImageViewContentMode = UIViewContentModeScaleToFill; + SDCycles.currentPageDotImage = [UIImage imageNamed:@"pageControlDot"]; + SDCycles.pageDotImage = [UIImage imageNamed:@"pageControlNomalDot"]; SDCycles.pageDotColor = KWhiteColor; + SDCycles.tag = 50 + i; // + SDCycles.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; + SDCycles.pageControlDotSize = CGSizeMake(6, 4); + [self addSubview:SDCycles]; + +// UIImageView *imageView = [[UIImageView alloc] init]; +// imageView.image = [UIImage imageNamed:config[@"img"]]; +// imageView.userInteractionEnabled = YES; +// imageView.tag = 50 + i; // 用于区分点击的是哪一个 +// imageView.contentMode = UIViewContentModeScaleAspectFill; +// imageView.layer.cornerRadius = 8; +// imageView.layer.masksToBounds = true; +// imageView.clipsToBounds = YES; +// +// [self addSubview:imageView]; + + /// 点击手势 +// UITapGestureRecognizer *tap = +// [[UITapGestureRecognizer alloc] initWithTarget:self +// action:@selector(topImageTap:)]; +// +// [SDCycles addGestureRecognizer:tap]; + + /// 布局 + [SDCycles mas_makeConstraints:^(MASConstraintMaker *make) { + + if (lastImageView) { + make.top.equalTo(lastImageView.mas_bottom).offset(12); + } else { + make.top.equalTo(toolsView.mas_bottom).offset(12); + } + + make.left.mas_equalTo(12); + make.right.mas_equalTo(-12); + make.height.mas_equalTo([config[@"height"] floatValue]); + + }]; + lastImageView = SDCycles; + } + [self layoutIfNeeded]; + + // @{@"img": @"heardTopImg_3", @"height": @120} + + //手表数据 + self.watchDataView = [[XJHomeWatchDataView alloc] initWithFrame:CGRectZero]; + self.watchDataView.tabTitles = @[@"心脑血管", @"癌症", @"慢呼", @"糖尿病", @"亚健康",@"心脑血管", @"癌症", @"慢呼", @"糖尿病", @"亚健康"]; + self.watchDataView.tabSelectBlock = ^(NSInteger index, NSString *title) { + DLog(@"选中 %ld - %@", index, title); + // 切换 collectionView 到对应 page + + }; + self.watchDataView.watchMoreBlock = ^{ + if ([self.homeTopDelegate respondsToSelector:@selector(watchDetailClick)]) { + [self.homeTopDelegate watchDetailClick]; + } + }; + + [self addSubview:self.watchDataView]; + + [self.watchDataView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(12); + make.right.mas_offset(-12); + make.height.mas_offset(300); + make.top.mas_equalTo(lastImageView.mas_bottom).offset(12); + }]; + + + SDCycleScrollView * questionSDCycles = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage imageNamed:@"placeholder"]]; + questionSDCycles.backgroundColor = KClearColor; + questionSDCycles.layer.cornerRadius = 12; + questionSDCycles.layer.masksToBounds = true; + questionSDCycles.bannerImageViewContentMode = UIViewContentModeScaleToFill; + questionSDCycles.currentPageDotImage = [UIImage imageNamed:@"pageControlDot"]; + questionSDCycles.pageDotImage = [UIImage imageNamed:@"pageControlNomalDot"]; questionSDCycles.pageDotColor = KWhiteColor; + questionSDCycles.tag = 52; // + questionSDCycles.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; + questionSDCycles.pageControlDotSize = CGSizeMake(6, 4); + [self addSubview:questionSDCycles]; + /// 布局 + [questionSDCycles mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.watchDataView.mas_bottom).offset(12); + make.left.mas_equalTo(12); + make.right.mas_equalTo(-12); + make.height.mas_equalTo(@120); + make.bottom.mas_offset(-12); + + }]; + +} + + +- (void)setModel:(XJHomeWatchModel *)model { + + _model = model; + + self.watchDataView.watchModel = _model; + +} + +- (void)setWatchArray:(NSArray *)watchArray { + + _watchArray = watchArray; + + self.watchDataView.dataList = _watchArray; + +} +- (void)setDataArray:(NSArray *)dataArray { + + _dataArray = dataArray; + + + NSMutableArray * titlesArray = [[NSMutableArray alloc] init]; + + for (MyMessageModel * model in _dataArray) { + + //直接处理图片吧 + [titlesArray addObject:model.title]; + + } + + + + if(titlesArray.count == 0) { + + + self.messageview.hidden = true; + + [self.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(24); + make.right.mas_offset(-12); + make.top.mas_offset(kRealValue(145)); + }]; + [self layoutIfNeeded]; + }else + { + self.messageview.hidden = false; + + [self.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(24); + make.right.mas_offset(-12); + make.top.mas_equalTo(self.messageview.mas_bottom).offset(10); + }]; + [self layoutIfNeeded]; + } + self.adTitleView.titlesGroup = titlesArray; + +} + +- (void)setBannerArray:(NSArray *)bannerArray { + + // 1 首页体检模块。2 首页心理模块 3 健康咨询模块。4 ai随访 + //处理数据 + + _bannerArray = bannerArray; + + SDCycleScrollView * oneSDView = [self viewWithTag:50]; //体检 + SDCycleScrollView * twoSDView = [self viewWithTag:51]; //EAP + SDCycleScrollView * threeSDView = [self viewWithTag:52]; //健康咨询 + + NSMutableArray * tijianArray = [[NSMutableArray alloc] init]; + NSMutableArray * eapArray = [[NSMutableArray alloc] init]; + NSMutableArray * questionArray = [[NSMutableArray alloc] init]; + + for (HomeBannerModel * model in _bannerArray) { + + //直接处理图片吧 + NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photoUrl]; + + NSString * str1 = @"\\"; + + photo = [ photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; + + NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef) photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); + + if ([model.showLocation intValue] == 1) { + [tijianArray addObject:encodedString3]; + } + if ([model.showLocation intValue] == 2) { + [eapArray addObject:encodedString3]; + } + if ([model.showLocation intValue] == 3) { + [questionArray addObject:encodedString3]; + } + + } + + oneSDView.imageURLStringsGroup = tijianArray; + twoSDView.imageURLStringsGroup = eapArray; + threeSDView.imageURLStringsGroup = questionArray; + + +} + +- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { + + DLog(@"++%ld",index); + if (cycleScrollView == self.adTitleView) { + if ([self.homeTopDelegate respondsToSelector:@selector(SDTitleItemClick)]) { + [self.homeTopDelegate SDTitleItemClick]; + } + }else + { + CGFloat currentBanner = cycleScrollView.tag; + + if([self.homeTopDelegate respondsToSelector:@selector(heardImageClick:)]) { + + [self.homeTopDelegate heardImageClick:currentBanner]; + } + } +} + +- (void)cenetrFunctionItemTap:(UITapGestureRecognizer *)tap { + UIView *view = tap.view; + NSInteger index = view.tag; + + if([self.homeTopDelegate respondsToSelector:@selector(heardTopToolsClick:)]) { + [self.homeTopDelegate heardTopToolsClick:index]; + } + +} + + +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2QuestionTableView.h b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2QuestionTableView.h new file mode 100644 index 0000000..bf24ee3 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2QuestionTableView.h @@ -0,0 +1,32 @@ +// +// XJHomePageV2QuestionTableView.h +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import +#import "HealthyQuestionHeardView.h" +#import "HomeQusetionRecordsModel.h" + +NS_ASSUME_NONNULL_BEGIN + + +typedef void(^doctorBlock)(HomeQusetionRecordsModel * model); +typedef void(^lookMoreDoctorBlock)(); + +@interface XJHomePageV2QuestionTableView : UITableView + +@property (nonatomic, strong) NSArray * dataArray; + +@property (nonatomic, copy) doctorBlock tableBlock; +@property (nonatomic, copy) lookMoreDoctorBlock lookMoreBlock; + +@property (nonatomic, weak)id headDelegate; + +@property (nonatomic, copy) NSString * haveSessioning; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2QuestionTableView.m b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2QuestionTableView.m new file mode 100644 index 0000000..3127def --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomePageV2QuestionTableView.m @@ -0,0 +1,170 @@ +// +// XJHomePageV2QuestionTableView.m +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import "XJHomePageV2QuestionTableView.h" +#import "HealthyQuestionTable.h" +#import "HealthyDoctorTableViewCell.h" +#import "QustionHomeRecordsCell.h" + +@interface XJHomePageV2QuestionTableView () + +@end + +@implementation XJHomePageV2QuestionTableView + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style +{ + if (self = [super initWithFrame:frame style:style]) + { + [self createUI]; + } + return self; +} + + +- (void)createUI +{ + if (@available(iOS 11.0, *)) { + self.estimatedRowHeight = 0; + self.estimatedSectionFooterHeight = 0; + self.estimatedSectionHeaderHeight = 0; + self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + self.delegate = self; + self.dataSource = self; + self.separatorStyle = UITableViewCellSeparatorStyleNone; + self.showsVerticalScrollIndicator = NO; + self.estimatedRowHeight = 60; + self.rowHeight = UITableViewAutomaticDimension; +} + +- (void)setDataArray:(NSArray *)dataArray +{ + _dataArray = dataArray; + [self 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 { + + + + static NSString * cellID = @"cellID"; + + + QustionHomeRecordsCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; + + if (!cell) { + + cell = [[QustionHomeRecordsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID]; + } + cell.model = self.dataArray[indexPath.row]; + cell.backgroundColor = CViewBgColor; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; + +} + + + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + HomeQusetionRecordsModel * model = self.dataArray[indexPath.row]; + + if (self.tableBlock) { + + self.tableBlock(model); + } + +} + +- (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return kRealValue(40); +} + +- (CGFloat )tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + + UIView * sectionHeardView = [[UIView alloc] initWithFrame:CGRectMake(12, 0, kScreenWidth -24, kRealValue(40))]; + sectionHeardView.backgroundColor = CViewBgColor; + + UIImageView * heaedImg = [[UIImageView alloc] init]; + heaedImg.image = [UIImage imageNamed:@"heaedTitleBackImg"]; + [sectionHeardView addSubview:heaedImg]; + + [heaedImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_offset(0); + }]; + + + UILabel * todayLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(16), 190, 16)]; + + todayLabel.text = @"专家咨询记录"; + + todayLabel.textAlignment = NSTextAlignmentLeft; + + todayLabel.textColor = CFontColor1; + + todayLabel.font = BOLDSYSTEMFONT(16); + + [sectionHeardView addSubview:todayLabel]; + + [todayLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(13); + make.top.bottom.mas_offset(0); + }]; + + + YYLabel * morelabel = [[YYLabel alloc] init]; + + morelabel.text = @">"; + morelabel.textAlignment = NSTextAlignmentRight; + morelabel.textColor = UIColorHex(#999999); + morelabel.font = SYSTEMFONT(14); + MJWeakSelf + [morelabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { + if (self.lookMoreBlock) { + self.lookMoreBlock(); + } + }]; + [sectionHeardView addSubview:morelabel]; + + [morelabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_offset(-13); + make.centerY.mas_equalTo(sectionHeardView); + make.width.height.mas_offset(20); + }]; + + return sectionHeardView; + +} + +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { + + return [[UIView alloc] init]; +} +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchCollectionViewCell.h b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchCollectionViewCell.h new file mode 100644 index 0000000..1b5f957 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchCollectionViewCell.h @@ -0,0 +1,23 @@ +// +// XJHomeWatchCollectionViewCell.h +// XinjiangProject +// +// Created by Apple on 2026/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XJHomeWatchCollectionViewCell : UICollectionViewCell + +/// 设置数据模型(id 兼容 HomePageV2WATACHModel) +- (void)configureWithData:(nullable id)data; + +/// 父 View Tab 切换时调用,更新展示类型 +/// 0=心率 1=血氧 2=压力 3=体温 4=睡眠 +- (void)updateTabIndex:(NSInteger)tabIndex; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchCollectionViewCell.m b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchCollectionViewCell.m new file mode 100644 index 0000000..6078f48 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchCollectionViewCell.m @@ -0,0 +1,440 @@ +// +// XJHomeWatchCollectionViewCell.m +// XinjiangProject +// +// Created by Apple on 2026/3/2. +// + +#import "XJHomeWatchCollectionViewCell.h" +#import "XJHomeWatchModel.h" +#import + +// tabIndex 对应关系(由父 View XJHomeWatchDataView 的 Tab 传入) +// 0=心率 1=血氧 2=压力 3=体温 4=睡眠 + +@interface XJHomeWatchCollectionViewCell () + +@property (nonatomic, strong) UIImageView *heartImg; // 类型图标 +@property (nonatomic, strong) UILabel *updateLabel; // "最新心率" +@property (nonatomic, strong) UILabel *updateTimeLabel; // 最后更新时间(图标旁) +@property (nonatomic, strong) UILabel *dataLabel; // 右侧大数值 +@property (nonatomic, strong) UILabel *backLeftLabel; // 左卡标题 "心率范围" +@property (nonatomic, strong) UILabel *leftDataLabel; // 左卡数据 +@property (nonatomic, strong) UILabel *backRightLabel; // 右卡标题 "平均心率" +@property (nonatomic, strong) UILabel *rightDataLabel; // 右卡数据 +@property (nonatomic, strong) UILabel *timeLabel; // 底部更新时间 +@property (nonatomic, strong) UIView *emptyView; +@property (nonatomic, strong) XJHomeWatchModel *model; +@property (nonatomic, assign) NSInteger currentTabIndex; + +@end + +@implementation XJHomeWatchCollectionViewCell + +#pragma mark - Init + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + self.layer.cornerRadius = 8.0f; + self.layer.masksToBounds = YES; + self.backgroundColor = KWhiteColor; + [self createUI]; + } + return self; +} + +#pragma mark - UI + +- (void)createUI { + + // ── 类型图标 ────────────────────────────────────────── + self.heartImg = [[UIImageView alloc] init]; + self.heartImg.image = [UIImage imageNamed:@"homePageXinlv"]; + [self.contentView addSubview:self.heartImg]; + + [self.heartImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.contentView).offset(15); + make.top.equalTo(self.contentView).offset(kRealValue(24)); + make.size.mas_equalTo(CGSizeMake(32, 32)); + }]; + + // ── 类型标题 "最新心率" ─────────────────────────────── + self.updateLabel = [[UILabel alloc] init]; + self.updateLabel.font = BOLDSYSTEMFONT(14); + self.updateLabel.textColor = UIColorHex(#252535); + self.updateLabel.text = @"最新心率"; + [self.contentView addSubview:self.updateLabel]; + + [self.updateLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.heartImg.mas_right).offset(12); + make.top.equalTo(self.heartImg); + make.height.mas_equalTo(15); + }]; + + // ── 图标旁更新时间 ─────────────────────────────────── + self.updateTimeLabel = [[UILabel alloc] init]; + self.updateTimeLabel.font = MEDIUMFONT(12); + self.updateTimeLabel.textColor = UIColorHex(#77849E); + self.updateTimeLabel.text = @"--"; + [self.contentView addSubview:self.updateTimeLabel]; + + [self.updateTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.updateLabel); + make.top.equalTo(self.updateLabel.mas_bottom).offset(11); + make.height.mas_equalTo(11); + }]; + + // ── 右侧大数值 ─────────────────────────────────────── + self.dataLabel = [[UILabel alloc] init]; + self.dataLabel.textColor = UIColorHex(#252535); + self.dataLabel.text = @"--次/分钟"; + self.dataLabel.textAlignment = NSTextAlignmentRight; + self.dataLabel.adjustsFontSizeToFitWidth = YES; + [self.contentView addSubview:self.dataLabel]; + + [self.dataLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(self.contentView).offset(-15); + make.centerY.equalTo(self.heartImg); + make.width.mas_equalTo(180); + make.height.mas_equalTo(30); + }]; + + // ── 左卡片 ─────────────────────────────────────────── + UIView *backLeft = [[UIView alloc] init]; + backLeft.layer.cornerRadius = 8; + backLeft.layer.masksToBounds = YES; + backLeft.backgroundColor = UIColorHex(#F6F6F6); + [self.contentView addSubview:backLeft]; + + [backLeft mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.contentView).offset(15); + make.top.equalTo(self.heartImg.mas_bottom).offset(21); + make.right.equalTo(self.contentView.mas_centerX).offset(-7.5); + make.height.mas_equalTo(72); + }]; + + UIView *redLine = [[UIView alloc] init]; + redLine.layer.cornerRadius = 2; + redLine.layer.masksToBounds = YES; + redLine.backgroundColor = CNavBgColor; + [backLeft addSubview:redLine]; + + [redLine mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(backLeft).offset(15); + make.top.equalTo(backLeft).offset(16); + make.size.mas_equalTo(CGSizeMake(4, 11)); + }]; + + self.backLeftLabel = [[UILabel alloc] init]; + self.backLeftLabel.font = BOLDSYSTEMFONT(14); + self.backLeftLabel.textColor = UIColorHex(#252535); + self.backLeftLabel.text = @"心率范围"; + [backLeft addSubview:self.backLeftLabel]; + + [self.backLeftLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(redLine.mas_right).offset(8); + make.top.equalTo(backLeft).offset(13); + make.height.mas_equalTo(15); + }]; + + self.leftDataLabel = [[UILabel alloc] init]; + self.leftDataLabel.font = BOLDSYSTEMFONT(16); + self.leftDataLabel.textColor = UIColorHex(#252535); + self.leftDataLabel.text = @"--"; + self.leftDataLabel.adjustsFontSizeToFitWidth = YES; + [backLeft addSubview:self.leftDataLabel]; + + [self.leftDataLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(backLeft).offset(14); + make.right.equalTo(backLeft).offset(-5); + make.top.equalTo(self.backLeftLabel.mas_bottom).offset(13); + make.height.mas_equalTo(17); + }]; + + // ── 右卡片 ─────────────────────────────────────────── + UIView *backRight = [[UIView alloc] init]; + backRight.layer.cornerRadius = 8; + backRight.layer.masksToBounds = YES; + backRight.backgroundColor = UIColorHex(#F6F6F6); + [self.contentView addSubview:backRight]; + + [backRight mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(self.contentView).offset(-15); + make.left.equalTo(self.contentView.mas_centerX).offset(7.5); + make.top.equalTo(backLeft); + make.height.mas_equalTo(72); + }]; + + UIView *blueLine = [[UIView alloc] init]; + blueLine.layer.cornerRadius = 2; + blueLine.layer.masksToBounds = YES; + blueLine.backgroundColor = UIColorHex(#30A9FF); + [backRight addSubview:blueLine]; + + [blueLine mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(backRight).offset(15); + make.top.equalTo(backRight).offset(16); + make.size.mas_equalTo(CGSizeMake(4, 11)); + }]; + + self.backRightLabel = [[UILabel alloc] init]; + self.backRightLabel.font = BOLDSYSTEMFONT(14); + self.backRightLabel.textColor = UIColorHex(#252535); + self.backRightLabel.text = @"平均心率"; + [backRight addSubview:self.backRightLabel]; + + [self.backRightLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(blueLine.mas_right).offset(8); + make.top.equalTo(backRight).offset(13); + make.height.mas_equalTo(15); + }]; + + self.rightDataLabel = [[UILabel alloc] init]; + self.rightDataLabel.font = BOLDSYSTEMFONT(16); + self.rightDataLabel.textColor = UIColorHex(#252535); + self.rightDataLabel.text = @"--"; + self.rightDataLabel.adjustsFontSizeToFitWidth = YES; + [backRight addSubview:self.rightDataLabel]; + + [self.rightDataLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(backRight).offset(14); + make.right.equalTo(backRight).offset(-5); + make.top.equalTo(self.backRightLabel.mas_bottom).offset(13); + make.height.mas_equalTo(17); + }]; + + // ── 底部更新时间 ───────────────────────────────────── + self.timeLabel = [[UILabel alloc] init]; + self.timeLabel.textColor = UIColorHex(#77849E); + self.timeLabel.textAlignment = NSTextAlignmentLeft; + self.timeLabel.text = @"更新时间:--:--"; + self.timeLabel.font = MEDIUMFONT(12); + [self.contentView addSubview:self.timeLabel]; + + [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(backLeft.mas_bottom).offset(8); + make.left.equalTo(self.contentView).offset(15); + make.right.equalTo(self.contentView).offset(-15); + make.height.mas_equalTo(32); + }]; + + // ── 无数据占位 ─────────────────────────────────────── + self.emptyView = [[UIView alloc] init]; + self.emptyView.backgroundColor = KWhiteColor; + self.emptyView.hidden = YES; + [self.contentView addSubview:self.emptyView]; + + [self.emptyView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.contentView); + }]; + + UILabel *emptyLabel = [[UILabel alloc] init]; + emptyLabel.text = @"~ 无智能监测数据 ~"; + emptyLabel.textColor = UIColorHex(#77849E); + emptyLabel.font = MEDIUMFONT(13); + emptyLabel.textAlignment = NSTextAlignmentCenter; + [self.emptyView addSubview:emptyLabel]; + + [emptyLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.equalTo(self.emptyView); + }]; +} + +#pragma mark - Public + +- (void)configureWithData:(id)data { + if ([data isKindOfClass:[XJHomeWatchModel class]]) { + self.model = (XJHomeWatchModel *)data; + } else { + self.model = nil; + } +} + + +#pragma mark - Model Setter + +- (void)setModel:(XJHomeWatchModel *)model { + _model = model; + + if (!model) { + self.emptyView.hidden = NO; + return; + } + + self.emptyView.hidden = YES; + [self p_updateLabelsForTabIndex:[_model.type intValue]]; + [self changeDataShow:[_model.type intValue] withModel:_model]; + + if (!ValidStr(_model.latestTime)) { + self.updateTimeLabel.text = _model.latestTime; + self.timeLabel.text = [NSString stringWithFormat:@"更新时间:%@", _model.latestTime]; + } else { + self.updateTimeLabel.text = @"--:--"; + self.timeLabel.text = @"更新时间:--:--"; + } +} + +#pragma mark - Tab UI Update + +/// 根据 tabIndex 切换图标和文字标题(不涉及数据) +- (void)p_updateLabelsForTabIndex:(NSInteger)tabIndex { + + + NSArray *icons = @[@"homePageXinlv", @"homePageXueyang", @"homePageYali", @"homePageTiwen", @"homePageShuimian"]; + NSArray *latest = @[@"最新心率", @"最新血氧", @"最新压力", @"最新体温", @"睡眠总时长"]; + NSArray *left = @[@"心率范围", @"血氧范围", @"压力范围", @"体温范围", @"深睡时长"]; + NSArray *right = @[@"平均心率", @"平均血氧", @"平均压力", @"平均体温", @"浅睡时长"]; + NSArray *units = @[@"--次/分钟", @"--%", @"--", @"--℃", @"--"]; + /** 数据类型:0=心率 1=血氧 2=压力 3=体温 4=睡眠 */ + if (tabIndex < 0 || tabIndex >= (NSInteger)icons.count) return; + + self.heartImg.image = [UIImage imageNamed:icons[tabIndex]]; + self.updateLabel.text = latest[tabIndex]; + self.backLeftLabel.text = left[tabIndex]; + self.backRightLabel.text = right[tabIndex]; + + // 无数据时显示占位 + if (!_model) { + self.dataLabel.text = units[tabIndex]; + self.leftDataLabel.text = @"--"; + self.rightDataLabel.text = @"--"; + } +} + +#pragma mark - Data Display + +- (void)changeDataShow:(NSInteger)isOne withModel:(XJHomeWatchModel *)model { + + if (isOne == 0) { // 心率 + + NSString *s = [NSString stringWithFormat:@"%.0f次/分钟", model.latest]; + self.dataLabel.attributedText = [self p_bigAttr:s unitLen:4]; + + NSString *range = [NSString stringWithFormat:@"%.0f-%.0f次/分钟", model.max, model.min]; + self.leftDataLabel.attributedText = [self p_mediumAttr:range unitLen:4]; + + NSString *avg = [NSString stringWithFormat:@"%.0f次/分钟", model.avg]; + self.rightDataLabel.attributedText = [self p_mediumAttr:avg unitLen:4]; + + } else if (isOne == 1) { // 血氧 + + NSString *s = [NSString stringWithFormat:@"%.0f%%", model.latest]; + self.dataLabel.attributedText = [self p_bigAttr:s unitLen:1]; + + NSString *range = [NSString stringWithFormat:@"%.0f-%.0f%%", model.min, model.max]; + self.leftDataLabel.attributedText = [self p_mediumAttr:range unitLen:1]; + + NSString *avg = [NSString stringWithFormat:@"%.0f%%", model.avg]; + self.rightDataLabel.attributedText = [self p_mediumAttr:avg unitLen:1]; + + } else if (isOne == 2) { // 压力 + + NSString *s = [NSString stringWithFormat:@"%.0f", model.latest]; + self.dataLabel.attributedText = [self p_plainAttr:s size:25]; + + NSString *range = [NSString stringWithFormat:@"%.0f-%.0f", model.min, model.max]; + self.leftDataLabel.attributedText = [self p_plainAttr:range size:20]; + + NSString *avg = [NSString stringWithFormat:@"%.0f", model.avg]; + self.rightDataLabel.attributedText = [self p_plainAttr:avg size:20]; + + } else if (isOne == 3) { // 体温 + + NSString *s = [NSString stringWithFormat:@"%.1f℃", model.latest]; + self.dataLabel.attributedText = [self p_bigAttr:s unitLen:1]; + + NSString *range = [NSString stringWithFormat:@"%.1f-%.1f℃", model.min, model.max]; + self.leftDataLabel.attributedText = [self p_mediumAttr:range unitLen:1]; + + NSString *avg = [NSString stringWithFormat:@"%.1f℃", model.avg]; + self.rightDataLabel.attributedText = [self p_mediumAttr:avg unitLen:1]; + + } else if (isOne == 4) { // 睡眠 + + UIFont *bigFont = [UIFont systemFontOfSize:25 weight:UIFontWeightBold]; + UIFont *mediumFont = [UIFont systemFontOfSize:20 weight:UIFontWeightMedium]; + self.dataLabel.attributedText = [self convertMinutes:model.latest withFont:bigFont]; + self.leftDataLabel.attributedText = [self convertMinutes:model.max withFont:mediumFont]; + self.rightDataLabel.attributedText = [self convertMinutes:model.min withFont:mediumFont]; + } +} + +#pragma mark - Attributed String Helpers + +/// 大数值:主体 25pt bold #252535,末尾 unitLen 个字符 14pt #77849E +- (NSMutableAttributedString *)p_bigAttr:(NSString *)str unitLen:(NSInteger)unitLen { + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:str]; + NSInteger bodyLen = MAX((NSInteger)str.length - unitLen, 0); + NSInteger tail = (NSInteger)str.length - bodyLen; + + [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:25 weight:UIFontWeightBold] + range:NSMakeRange(0, bodyLen)]; + [attr addAttribute:NSForegroundColorAttributeName value:UIColorHex(#252535) + range:NSMakeRange(0, bodyLen)]; + if (tail > 0) { + [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] + range:NSMakeRange(bodyLen, tail)]; + [attr addAttribute:NSForegroundColorAttributeName value:UIColorHex(#77849E) + range:NSMakeRange(bodyLen, tail)]; + } + return attr; +} + +/// 卡片数值:主体 20pt bold #252535,末尾 unitLen 个字符 12pt #77849E +- (NSMutableAttributedString *)p_mediumAttr:(NSString *)str unitLen:(NSInteger)unitLen { + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:str]; + NSInteger bodyLen = MAX((NSInteger)str.length - unitLen, 0); + NSInteger tail = (NSInteger)str.length - bodyLen; + + [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:20 weight:UIFontWeightBold] + range:NSMakeRange(0, bodyLen)]; + [attr addAttribute:NSForegroundColorAttributeName value:UIColorHex(#252535) + range:NSMakeRange(0, bodyLen)]; + if (tail > 0) { + [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] + range:NSMakeRange(bodyLen, tail)]; + [attr addAttribute:NSForegroundColorAttributeName value:UIColorHex(#77849E) + range:NSMakeRange(bodyLen, tail)]; + } + return attr; +} + +/// 纯数字(压力),无单位,整体 size pt bold #252535 +- (NSMutableAttributedString *)p_plainAttr:(NSString *)str size:(CGFloat)size { + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:str]; + [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:size weight:UIFontWeightBold] + range:NSMakeRange(0, str.length)]; + [attr addAttribute:NSForegroundColorAttributeName value:UIColorHex(#252535) + range:NSMakeRange(0, str.length)]; + return attr; +} + +- (NSMutableAttributedString *)convertMinutes:(float)minutes withFont:(UIFont *)font { + NSString *timeString; + if (minutes == 0) { + timeString = @"0分钟"; + } else if (minutes < 60) { + timeString = [NSString stringWithFormat:@"%.0f分钟", minutes]; + } else { + int h = (int)(minutes / 60); + int m = (int)(minutes) % 60; + timeString = [NSString stringWithFormat:@"%d小时%d分钟", h, m]; + } + + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:timeString]; + [attr addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, timeString.length)]; + [attr addAttribute:NSForegroundColorAttributeName value:UIColorHex(#252535) + range:NSMakeRange(0, timeString.length)]; + + for (NSString *unit in @[@"小时", @"分钟"]) { + NSRange r = [timeString rangeOfString:unit]; + if (r.location != NSNotFound) { + [attr addAttribute:NSFontAttributeName + value:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] + range:r]; + } + } + return attr; +} + +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchDataView.h b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchDataView.h new file mode 100644 index 0000000..ddfe557 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchDataView.h @@ -0,0 +1,47 @@ +// +// XJHomeWatchDataView.h +// XinjiangProject +// +// Created by Apple on 2026/3/2. +// + +#import +#import "XJHomeWatchModel.h" + + +NS_ASSUME_NONNULL_BEGIN + +/// Tab 点击回调:index 选中下标,title 选中标题 +typedef void(^XJHomeWatchTabSelectBlock)(NSInteger index, NSString *title); + +typedef void(^watchDataDetailBlick)(); + + +@interface XJHomeWatchDataView : UIView + +/// 设置 Tab 标题数组,赋值后自动刷新按钮 +@property (nonatomic, copy) NSArray *tabTitles; + +/// Tab 点击回调 +@property (nonatomic, copy, nullable) XJHomeWatchTabSelectBlock tabSelectBlock; + +@property (nonatomic, copy, nullable) watchDataDetailBlick watchMoreBlock; + + +/// 数据源,赋值后自动刷新 CollectionView,空数组时显示占位图 +@property (nonatomic, copy) NSArray *dataList; + +/// 底部 CollectionView(可用于外部调用 scrollToItem 等) +@property (nonatomic, strong, readonly) UICollectionView *collectionView; + +/// 当前选中的 Tab 下标 +@property (nonatomic, assign, readonly) NSInteger selectedIndex; + +/// 手动切换 Tab(不触发 block) +- (void)selectTabAtIndex:(NSInteger)index; + +@property (nonatomic, strong) XJHomeWatchModel * watchModel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchDataView.m b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchDataView.m new file mode 100644 index 0000000..dde814f --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/View/XJHomeWatchDataView.m @@ -0,0 +1,385 @@ +// +// XJHomeWatchDataView.m +// XinjiangProject +// +// Created by Apple on 2026/3/2. +// + +#import "XJHomeWatchDataView.h" +#import "XJHomeWatchCollectionViewCell.h" +#import + +// ── 布局常量 ────────────────────────────────────────────── +static CGFloat const kHeaderHeight = 92.0; // 头部保留高度(外部自行填充) +static CGFloat const kTabScrollH = 52.0; // Tab ScrollView 高度 +static CGFloat const kButtonH = 30.0; // 按钮高度 +static CGFloat const kButtonPadX = 10.0; // 按钮左右内边距 +static CGFloat const kButtonGap = 10.0; // 按钮间距 + + +// ── Private ─────────────────────────────────────────────── +@interface XJHomeWatchDataView () + +@property (nonatomic, strong) UILabel *watchNumberLabel; // + + +@property (nonatomic, strong) UIScrollView *tabScrollView; +@property (nonatomic, strong) UIView *tabContentView; +@property (nonatomic, strong) NSMutableArray *tabButtons; +@property (nonatomic, strong) UICollectionView *collectionView; +@property (nonatomic, strong) UILabel *emptyLabel; // 无数据占位 +@property (nonatomic, strong) UIView *devView; // 紧急开发中占位 +@property (nonatomic, assign) NSInteger selectedIndex; + +@end + +// ───────────────────────────────────────────────────────── +@implementation XJHomeWatchDataView + +#pragma mark - Init + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + self.backgroundColor = KWhiteColor; + self.layer.cornerRadius = 12; + self.layer.masksToBounds = true; + if (self) [self p_setupUI]; + return self; +} + +#pragma mark - UI Setup + +- (void)p_setupUI { + _selectedIndex = 0; + _tabButtons = [NSMutableArray array]; + + + UIImageView * heaedImg = [[UIImageView alloc] init]; + heaedImg.image = [UIImage imageNamed:@"heaedTitleBackImg"]; + heaedImg.userInteractionEnabled = true; + [self addSubview:heaedImg]; + + [heaedImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_offset(0); + make.height.mas_offset(40); + }]; + + + UILabel * todayLabel = [[UILabel alloc] init]; + + todayLabel.text = @"健康监测"; + + todayLabel.textAlignment = NSTextAlignmentLeft; + + todayLabel.textColor = CFontColor1; + + todayLabel.font = BOLDSYSTEMFONT(16); + + [heaedImg addSubview:todayLabel]; + + [todayLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(13); + make.top.bottom.mas_offset(0); + }]; + + + + YYLabel * morelabel = [[YYLabel alloc] init]; + morelabel.text = @">"; + morelabel.textAlignment = NSTextAlignmentRight; + morelabel.textColor = UIColorHex(#999999); + morelabel.font = SYSTEMFONT(14); + MJWeakSelf + [morelabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { + if (self.watchMoreBlock) { + self.watchMoreBlock(); + } + }]; + [heaedImg addSubview:morelabel]; + + [morelabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_offset(-13); + make.centerY.mas_equalTo(heaedImg); + make.width.height.mas_offset(20); + }]; + + self.watchNumberLabel = [[UILabel alloc] init]; + + self.watchNumberLabel.text = @"监测工具编码:--"; + + self.watchNumberLabel.textAlignment = NSTextAlignmentLeft; + + self.watchNumberLabel.textColor = UIColorHex(#14BEBE); + + self.watchNumberLabel.font = MEDIUMFONT(13); + + [heaedImg addSubview:self.watchNumberLabel]; + + [self.watchNumberLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(morelabel.mas_left).offset(6); + make.top.mas_offset(0); + make.height.mas_offset(40); + }]; + + + // ── Tab ScrollView ─────────────────────────────────── + _tabScrollView = [[UIScrollView alloc] init]; + _tabScrollView.showsHorizontalScrollIndicator = NO; + _tabScrollView.showsVerticalScrollIndicator = NO; + [self addSubview:_tabScrollView]; + + [_tabScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(heaedImg.mas_bottom).offset(10); + make.left.right.equalTo(self); + make.height.mas_equalTo(kTabScrollH); + }]; + + // scrollView 内的容器 view(Masonry 驱动 contentSize) + _tabContentView = [[UIView alloc] init]; + [_tabScrollView addSubview:_tabContentView]; + + [_tabContentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(_tabScrollView); // 四边贴 scrollView + make.height.equalTo(_tabScrollView); // 固定高度 = scrollView,只横向滚动 + }]; + + // ── 底部 CollectionView ────────────────────────────── + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + layout.minimumLineSpacing = 0; + layout.minimumInteritemSpacing = 0; + + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero + collectionViewLayout:layout]; + _collectionView.backgroundColor = UIColor.clearColor; + _collectionView.showsHorizontalScrollIndicator = NO; + _collectionView.pagingEnabled = YES; + _collectionView.delegate = self; + _collectionView.dataSource = self; + [_collectionView registerClass:[XJHomeWatchCollectionViewCell class] + forCellWithReuseIdentifier:NSStringFromClass([XJHomeWatchCollectionViewCell class])]; + [self addSubview:_collectionView]; + + [_collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(_tabScrollView.mas_bottom); + make.left.right.bottom.equalTo(self); + }]; + + // ── 紧急开发中占位(tab 非第一个时显示)──────────────── + _devView = [[UIView alloc] init]; + _devView.backgroundColor = KWhiteColor; + _devView.hidden = YES; + [self addSubview:_devView]; + + [_devView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(_tabScrollView.mas_bottom); + make.left.right.bottom.equalTo(self); + }]; + + UILabel *devLabel = [[UILabel alloc] init]; + devLabel.text = @"紧急开发中"; + devLabel.textColor = [UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1.0]; + devLabel.font = [UIFont systemFontOfSize:15.0]; + devLabel.textAlignment = NSTextAlignmentCenter; + [_devView addSubview:devLabel]; + + [devLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.equalTo(_devView); + }]; + + // ── 无数据占位 ──────────────────────────────────────── + _emptyLabel = [[UILabel alloc] init]; + _emptyLabel.text = @"暂无穿戴设备"; + _emptyLabel.textAlignment = NSTextAlignmentCenter; + _emptyLabel.textColor = [UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1.0]; + _emptyLabel.font = [UIFont systemFontOfSize:15.0]; + _emptyLabel.hidden = YES; + [_collectionView addSubview:_emptyLabel]; + + [_emptyLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(_collectionView); + make.centerY.equalTo(_collectionView); + }]; +} + + +- (void)setWatchModel:(XJHomeWatchModel *)watchModel { + + _watchModel = watchModel; + + if (_watchModel.hasWatch == true) { + //有手表 + self.watchNumberLabel.text = [NSString stringWithFormat:@"%@:%@",_watchModel.watchModel,_watchModel.watchNo]; + + + }else + { + self.dataList = @[]; + } + +} + +#pragma mark - Tab Titles Setter + +- (void)setTabTitles:(NSArray *)tabTitles { + _tabTitles = [tabTitles copy]; + _selectedIndex = 0; + + // 清除旧按钮 + for (UIButton *btn in _tabButtons) [btn removeFromSuperview]; + [_tabButtons removeAllObjects]; + + UIFont *font = [UIFont systemFontOfSize:14.0]; + UIButton *prevBtn = nil; + + for (NSInteger i = 0; i < (NSInteger)tabTitles.count; i++) { + NSString *title = tabTitles[i]; + BOOL isSelected = (i == 0); + + // 计算文字宽度,得到按钮宽度 + CGFloat textW = ceil([title boundingRectWithSize:CGSizeMake(MAXFLOAT, kButtonH) + options:NSStringDrawingUsesLineFragmentOrigin + attributes:@{NSFontAttributeName: font} + context:nil].size.width); + CGFloat btnW = textW + kButtonPadX * 2; + + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; + btn.tag = i; + btn.titleLabel.font = font; + btn.layer.cornerRadius = kButtonH / 2.0; + btn.clipsToBounds = YES; + btn.backgroundColor = isSelected ? UIColorHex(#14BEBE) : UIColorHex(#F6F7FB); + [btn setTitle:title forState:UIControlStateNormal]; + btn.titleLabel.font = isSelected ? BOLDSYSTEMFONT(15) : [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + [btn setTitleColor:isSelected ? KWhiteColor : UIColorHex(#808080) + forState:UIControlStateNormal]; + [btn addTarget:self + action:@selector(p_tabButtonTapped:) + forControlEvents:UIControlEventTouchUpInside]; + + [_tabContentView addSubview:btn]; + + [btn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.equalTo(_tabContentView); + make.height.mas_equalTo(kButtonH); + make.width.mas_equalTo(btnW); + + if (prevBtn) { + make.left.equalTo(prevBtn.mas_right).offset(kButtonGap); + } else { + make.left.equalTo(_tabContentView).offset(kButtonGap); + } + + // 最后一个按钮右边贴 contentView(撑开 scrollView contentSize) + if (i == (NSInteger)tabTitles.count - 1) { + make.right.equalTo(_tabContentView).offset(-kButtonGap); + } + }]; + + [_tabButtons addObject:btn]; + prevBtn = btn; + } +} + +#pragma mark - Button Tap + +- (void)p_tabButtonTapped:(UIButton *)sender { + NSInteger index = sender.tag; + [self selectTabAtIndex:index]; + if (self.tabSelectBlock) { + self.tabSelectBlock(index, _tabTitles[index]); + } +} + +#pragma mark - Public: Select Tab + +- (void)selectTabAtIndex:(NSInteger)index { + if (index < 0 || index >= (NSInteger)_tabButtons.count) return; + + // 恢复旧选中样式 + UIButton *oldBtn = _tabButtons[_selectedIndex]; + oldBtn.backgroundColor = UIColorHex(#F6F7FB); + oldBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + [oldBtn setTitleColor:UIColorHex(#808080) forState:UIControlStateNormal]; + + // 设置新选中样式 + _selectedIndex = index; + UIButton *newBtn = _tabButtons[index]; + newBtn.backgroundColor = UIColorHex(#14BEBE); + newBtn.titleLabel.font = BOLDSYSTEMFONT(14); + [newBtn setTitleColor:KWhiteColor forState:UIControlStateNormal]; + + // 滚动让选中按钮可见/居中 + [self p_scrollToButton:newBtn]; + + // tab 0:显示 CollectionView;其他:显示"紧急开发中" + BOOL isFirst = (index == 0); + _collectionView.hidden = !isFirst; + _devView.hidden = isFirst; +} + +/// 若按钮中心超过可视区一半,则滚动将其居中 +- (void)p_scrollToButton:(UIButton *)btn { + // layoutIfNeeded 保证 frame 已计算 + [_tabScrollView layoutIfNeeded]; + + CGFloat scrollW = _tabScrollView.bounds.size.width; + CGFloat contentW = _tabScrollView.contentSize.width; + CGFloat btnCenterX = CGRectGetMidX(btn.frame); + + CGFloat offsetX = 0; + if (btnCenterX > scrollW / 2.0) { + offsetX = btnCenterX - scrollW / 2.0; + offsetX = MIN(offsetX, MAX(contentW - scrollW, 0)); + } + + [_tabScrollView setContentOffset:CGPointMake(offsetX, 0) animated:YES]; +} + +#pragma mark - DataList Setter + +- (void)setDataList:(NSArray *)dataList { + _dataList = [dataList copy]; + + BOOL isEmpty = (_dataList.count == 0); + _emptyLabel.hidden = !isEmpty; + + [_collectionView reloadData]; +} + +#pragma mark - UICollectionViewDataSource + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.dataList.count; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView + cellForItemAtIndexPath:(NSIndexPath *)indexPath { + XJHomeWatchCollectionViewCell *cell = + [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XJHomeWatchCollectionViewCell class]) + forIndexPath:indexPath]; + // 用 dataList 里对应位置的 model 填充 + if (indexPath.item < (NSInteger)_dataList.count) { + [cell configureWithData:_dataList[indexPath.item]]; + } +// // item 下标即数据类型:0=心率 1=血氧 2=压力 3=体温 +// [cell updateTabIndex:indexPath.item]; + return cell; +} + +#pragma mark - UICollectionViewDelegateFlowLayout + +- (CGSize)collectionView:(UICollectionView *)collectionView + layout:(UICollectionViewLayout *)collectionViewLayout + sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + // cell 宽 = 整个 view 宽;cell 高 = collectionView 自身高度 + return CGSizeMake(self.bounds.size.width, collectionView.bounds.size.height); +} + +#pragma mark - UICollectionViewDelegate + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + // 预留:外部如需监听 cell 点击可在此通过 block 回调 +} + +@end diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/XJHomePageV2ViewController.h b/XinjiangProject/XinjiangProject/Project/HomeV2/XJHomePageV2ViewController.h new file mode 100644 index 0000000..b6d6ae2 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/XJHomePageV2ViewController.h @@ -0,0 +1,16 @@ +// +// XJHomePageV2ViewController.h +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface XJHomePageV2ViewController : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/HomeV2/XJHomePageV2ViewController.m b/XinjiangProject/XinjiangProject/Project/HomeV2/XJHomePageV2ViewController.m new file mode 100644 index 0000000..b614ed2 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/HomeV2/XJHomePageV2ViewController.m @@ -0,0 +1,1168 @@ +// +// XJHomePageV2ViewController.m +// XinjiangProject +// +// Created by Apple on 2026/2/9. +// + +#import "XJHomePageV2ViewController.h" +#import "QuestionViewController.h" +#import "HealthyQuestionTable.h" +#import "HealthyQuestionHeardView.h" +#import "XJDoctorMainViewController.h" +#import "XJExpertMainViewController.h" +#import "XJQustionRecordViewController.h" +#import "ChatViewController.h" +#import "SmallHelpIMDataModel.h" +#import +#import +#import +#import "PSAppInfo.h" +#import "PSCheckVersionView.h" +#import "RoomDoctorRecordsVC.h" +#import "HomeQusetionRecordsModel.h" +#import "XJDoctorMainViewController.h" +#import "UPAppVesionModel.h" +#import "BannarDetailViewController.h" +#import "HomeBannerModel.h" +//新版首页 +#import "XJHomePageV2HeardView.h" +#import "MyMessageModel.h" +#import "XJHomePageV2BottomTools.h" +#import "XJHomePageV2QuestionTableView.h" +#import "MyMessageListViewController.h" +#import "EmptyFunctionDevelopmentVC.h" +#import "XJSOSLookDoctoreViewController.h" +#import "HomeBannerModel.h" +#import "SDCycleScrollView.h" +#import "BRPickerView.h" + +static CGFloat const kEmptyTableMinHeight = 250; // 或屏幕高度的一半 + +@interface XJHomePageV2ViewController () + +@property (nonatomic, strong) XJHomePageV2QuestionTableView * homeTable; + +@property (nonatomic, assign) NSInteger page; + +@property (nonatomic, strong) PSCheckVersionView * checkVersionView; + +@property (nonatomic, strong) UIView * coverView; +//定位相关 +@property (nonatomic, strong) AMapSearchAPI *search; +@property (nonatomic, strong) AMapLocationManager *locationManager; +@property (nonatomic, copy) AMapLocatingCompletionBlock completionBlock; +//定位相关 +@property (nonatomic, strong) CLLocationManager * userlocationManager; + +@property (nonatomic, strong) NSMutableArray * dataArray; + +@property (nonatomic, strong) HomeQusetionRecordsModel * recomendModel; + +//更新一版用scrollview处理 + +@property (nonatomic, strong) UIScrollView * mainScrollView; + +@property (nonatomic, strong) UIView * contentView; + +@property (nonatomic, strong) MASConstraint *tableHeightConstraint; + +@property (nonatomic, strong) XJHomePageV2HeardView * topView; + +//用gcd做轮询 +//@property (nonatomic, strong) dispatch_source_t timer; + +@property (nonatomic, assign) BOOL polling; //失败了也轮询?先不管 有需要回调处理去 + +@property (nonatomic, strong) SDCycleScrollView * AIBannerImage; + + +@end + +@implementation XJHomePageV2ViewController + +- (NSMutableArray *)dataArray { + + if(!_dataArray) { + + _dataArray = [[NSMutableArray alloc] init]; + } + return _dataArray; +} + +- (UIView *)coverView { + + if (!_coverView) { + _coverView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; + _coverView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5f]; + } + return _coverView; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + self.view.backgroundColor = CViewBgColor; + self.userlocationManager = [[CLLocationManager alloc] init]; + self.locationManager.delegate = self; + + // Request the desired authorization + [self.userlocationManager requestWhenInUseAuthorization]; + self.isHidenNaviBar = true; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateHomeDate) + name:KNotificAgreeProtoocl + object:nil]; +// [self createUI]; + [self updateV2UI]; + [self getUpDateinfo]; + //请求banner图 + [self getBannerListData]; + self.page = 1; + [self verifyTokenData]; + [self initCompleteBlock]; + [self configLocationManager]; + [self reGeocodeAction]; + //请求手表数据 + // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 + [[V2TIMManager sharedInstance] addIMSDKListener:self]; + // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 + [[V2TIMManager sharedInstance] addSimpleMsgListener:self]; + [[TUICallEngine createInstance] addObserver:self]; + + +} + +#pragma mark:校验token +- (void)verifyTokenData { + + + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + // 获取应用的版本号 + HQUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; + + + if (ValidStr(user.token)) { + + [parmDic setObject:@"" forKey:@"token"]; + } + else + { + [parmDic setObject:user.token forKey:@"token"]; + } + XJPNetAPI * homeRemakerApi = [[XJPNetAPI alloc] init:self tag:@"verifyToken" NeedToken:@""]; + + [homeRemakerApi GetverifyToken:parmDic]; + + +} + +- (void)viewWillAppear:(BOOL)animated { + + [super viewWillAppear:animated]; + + self.polling = YES; //轮询开始 + + //请求token获取数据 + [self verifyTokenData]; + + //登录了那就走轮询 + if ([HQCommonUtils isLogin]) { + //请求消息列表 + [self getMessageListData]; + [self getUserWatchData]; + } + + + +} + + +- (void)reGeocodeAction +{ + //进行单次带逆地理定位请求 + [self.locationManager requestLocationWithReGeocode:YES completionBlock:self.completionBlock]; +} + + +- (void)configLocationManager +{ + self.locationManager = [[AMapLocationManager alloc] init]; + + [self.locationManager setDelegate:self]; + + //设置期望定位精度 + [self.locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters]; + + //设置不允许系统暂停定位 + [self.locationManager setPausesLocationUpdatesAutomatically:NO]; + + //设置允许在后台定位 + [self.locationManager setAllowsBackgroundLocationUpdates:NO]; + + //设置定位超时时间 + [self.locationManager setLocationTimeout:10]; + + //设置逆地理超时时间 + [self.locationManager setReGeocodeTimeout:3]; + + //设置开启虚拟定位风险监测,可以根据需要开启 + [self.locationManager setDetectRiskOfFakeLocation:NO]; +} + +- (void)cleanUpAction +{ + //停止定位 + [self.locationManager stopUpdatingLocation]; + + [self.locationManager setDelegate:nil]; + +} + + +#pragma mark:更新 +- (void)getUpDateinfo { + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + // 获取应用的版本号 + [parmDic setObject:@"com.questionTools.XinjiangProject" forKey:@"packageName"]; + [parmDic setObject:@"2" forKey:@"androidOrIos"]; + + XJPNetAPI * homeRemakerApi = [[XJPNetAPI alloc] init:self tag:@"UPVERSION" NeedToken:@""]; + [homeRemakerApi GetAppVesionUpdata:parmDic]; + +} + +- (void)initCompleteBlock +{ + self.completionBlock = ^(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error) + { + if (error != nil && error.code == AMapLocationErrorLocateFailed) + { + //定位错误 +// var mCurrentLat = 34.327271 +// var mCheckToken = false +// var mCurrentLon = 108.949845 + NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; + [user setObject:@(87.627704) forKey:USERDEFAULLONG]; + [user setObject:@(43.793026) forKey:USERDEFAULLATITUDE]; + [user synchronize]; + return; + } + else if (error != nil + && (error.code == AMapLocationErrorReGeocodeFailed + || error.code == AMapLocationErrorTimeOut + || error.code == AMapLocationErrorCannotFindHost + || error.code == AMapLocationErrorBadURL + || error.code == AMapLocationErrorNotConnectedToInternet + || error.code == AMapLocationErrorCannotConnectToHost)) + { + //逆地理错误:在带逆地理的单次定位中,逆地理过程可能发生错误,此时location有返回值,regeocode无返回值,进行annotation的添加 + } + else if (error != nil && error.code == AMapLocationErrorRiskOfFakeLocation) + { + //存在虚拟定位的风险:此时location和regeocode没有返回值,不进行annotation的添加 + + //存在虚拟定位的风险的定位结果 + __unused CLLocation *riskyLocateResult = [error.userInfo objectForKey:@"AMapLocationRiskyLocateResult"]; + //存在外接的辅助定位设备 + __unused NSDictionary *externalAccressory = [error.userInfo objectForKey:@"AMapLocationAccessoryInfo"]; + + return; + } + else + { + //没有错误:location有返回值,regeocode是否有返回值取决于是否进行逆地理操作,进行annotation的添加 + } + //有无逆地理信息,annotationView的标题显示的字段不一样 + NSUserDefaults * user = [NSUserDefaults standardUserDefaults]; + [user setObject:@(location.coordinate.longitude) forKey:USERDEFAULLONG]; + [user setObject:@(location.coordinate.latitude) forKey:USERDEFAULLATITUDE]; + [user synchronize]; + + + }; +} + +- (void)backUp { + + [self.navigationController popToRootViewControllerAnimated:YES]; + +} + +- (void)updateHomeDate { + + + if (self.homeTable) { + [self verifyTokenData]; //token + [self getBannerListData]; //banner + }else + { + + + } +} + + +- (void)getData { + + [self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false]; + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:@(1) forKey:@"pageNo"]; + [parmDic setObject:@(3) forKey:@"pageSize"]; + + XJPNetAPI * searchApi = [[XJPNetAPI alloc] init:self tag:@"RECOMMEND" NeedToken:@""]; + + [searchApi GetQuetsionRecordsList:parmDic]; +} + +#pragma mark:手表 +- (void)getUserWatchData { + + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:User_ID forKey:@"userId"]; + + XJPNetAPI * searchApi = [[XJPNetAPI alloc] init:self tag:@"WEARWATCH" NeedToken:@""]; + + [searchApi getHomeWatchWearBool:parmDic]; + +} + +#pragma mark:请求手表详情 +- (void)getWatchDetailData { + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + NSDate * localDate = [NSDate date]; + NSString * str = [NSDate br_stringFromDate:localDate dateFormat:@"yyyy-MM-dd"]; + [parmDic setObject:str forKey:@"date"]; + + XJPNetAPI * searchApi = [[XJPNetAPI alloc] init:self tag:@"WATCHDETAIL" NeedToken:@""]; + + [searchApi getHomeWatchData:parmDic]; +} + +- (void)Failed:(NSString*)message tag:(NSString*)tag +{ + + [self.mainScrollView.mj_footer endRefreshing]; + [self.mainScrollView.mj_header endRefreshing]; + MJWeakSelf + if ([tag isEqualToString:@"LIST"]) { + //请求失败 轮询? 看需求 +// self.polling = YES; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, + (int64_t)(120 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + if ([HQCommonUtils isLogin]) { + //请求消息列表 + [weakSelf getMessageListData]; + } + + + }); + } + [self showMBProgressHUDOnlyWithString:message]; + [self hiddenAllMBProgressHUD]; + +} + + +#pragma mark:请求结果 +- (void)Sucess:(id)response tag:(NSString*)tag +{ + [self.mainScrollView.mj_footer endRefreshing]; + [self.mainScrollView.mj_header endRefreshing]; + + if ([tag isEqualToString:@"RECOMMEND"]) { + + NSArray * array = response ; + if (self.page == 1) { + [self.dataArray removeAllObjects]; + } + + for (NSDictionary * dic in array) { + + HomeQusetionRecordsModel * model = [HomeQusetionRecordsModel modelWithDictionary:dic]; + + [self.dataArray addObject:model]; + + } + dispatch_async(dispatch_get_main_queue(), ^{ + if (!self.view.window) return; + self.homeTable.dataArray = self.dataArray; + }); + [self hiddenAllMBProgressHUD]; + } + if ([tag isEqualToString:@"verifyToken"]) { + + BOOL isLogin = [response boolValue]; + + if (isLogin == true) { + + [self getData]; + + } + + + + } + + if ([tag isEqualToString:@"IMAPI"]) { + [self hiddenAllMBProgressHUD]; + + NSDictionary * pamrDic = response; + IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic]; + IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init]; + iminfoModel.IMInfo = pamrDic; + [HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo]; + // 1. 从即时通信 IM 控制台获取应用 SDKAppID。 + // 2. 初始化 config 对象 + V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init]; + // 3. 指定 log 输出级别。 + config.logLevel = V2TIM_LOG_INFO; + // 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。 + [[V2TIMManager sharedInstance] addIMSDKListener:self]; + // 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。 + [[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config]; + config.logLevel = V2TIM_LOG_INFO; + + [TUILogin login:[model.sdkAppId intValue] userID:model.userId userSig:model.userSig succ:^{ + + + } fail:^(int code, NSString *msg) { + + [EasyTextView showErrorText:msg]; + + }]; + + + + + } + if ([tag isEqualToString:@"SMALLHELP"]) { + + [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 = false; + chatVC.eableSendReport = YES; + chatVC.eableMapTools = false; + chatVC.navTitle = @"全科医生"; + chatVC.eablehaveHelathData = YES; + chatVC.tfNew = model.tfNew; + [self.navigationController pushViewController:chatVC animated:YES]; + + } + + if ([tag isEqualToString:@"loginIMAPI"]) { + [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]; + [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"]) { + + NSDictionary * dic = response; + + UPAppVesionModel * model = [UPAppVesionModel modelWithDictionary:dic]; + // 避免1.0.10 跟 1.0.1 出错 + + NSString *version = + [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; + + NSString *versionCode = + [version stringByReplacingOccurrencesOfString:@"." withString:@""]; + + NSInteger loctaionVesion = [versionCode integerValue]; + + NSDictionary * infoDic = @{ + @"version":[NSString stringWithFormat:@"%@",model.versionName] , + @"releaseNotes":model.updateContent, + @"currentVersionReleaseDate":model.updateTime}; + + PSAppInfo * info = [[PSAppInfo alloc] initWithDict:infoDic]; + //是否需要强制更新 + + BOOL isNeed = [model.forced integerValue] == 1 ? YES : NO; + + if ( model.versionNo > loctaionVesion) { + [self show:info isNeedUpdate:isNeed]; + }else + { + DLog(@"不需要更新"); + } + } + if ([tag isEqualToString:@"BANNER"]) { + + NSArray * array = response; + + //自己处理数据 + [self customBannerData:array]; + + + } + //banner图 + if ([tag isEqualToString:@"LIST"]) { + //请求成功 yes 继续轮询 + DLog(@"轮询111---%@",response); + [self hiddenAllMBProgressHUD]; + + NSArray * array = response; + + NSMutableArray * dataArray = [[NSMutableArray alloc] init]; + + for (NSDictionary * dic in array) { + + MyMessageModel * model = [MyMessageModel modelWithDictionary:dic]; + + [dataArray addObject:model]; + + } + MJWeakSelf + + dispatch_async(dispatch_get_main_queue(), ^{ + if (!self.view.window) return; + self.topView.dataArray = dataArray; + }); + + // ⭐️ 成功后 2 分钟再轮询 + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, + (int64_t)(120 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [weakSelf getMessageListData]; + }); + } + if ([tag isEqualToString:@"WEARWATCH"]) { + + NSDictionary * responseDic = response; + + XJHomeWatchModel * model = [XJHomeWatchModel modelWithDictionary:responseDic]; + + //有手表再去调数据 + if (model.hasWatch == true) { + + self.topView.model = model; + //请求手表数据 + [self getWatchDetailData]; + }else + { + + self.topView.watchArray = @[]; + //没手表直接显示没佩戴 + } + + + } + if ([tag isEqualToString:@"WATCHDETAIL"]) { + ///** 数据类型:0=心率 1=血氧 2=压力 3=体温 4=睡眠 */ + NSArray * array = response; + + NSMutableArray * dataArray = [[NSMutableArray alloc] init]; + + for (NSDictionary * dic in array) { + if (ValidDict(dic)) { + XJHomeWatchModel * model = [XJHomeWatchModel modelWithDictionary:dic]; + + [dataArray addObject:model]; + } + } + self.topView.watchArray = dataArray; + } +} + +//是否需要更新 +- (void)show:(PSAppInfo *)info isNeedUpdate:(BOOL)isNeed { + + + __weak typeof(self)weakSelf = self; + + if(isNeed == true) { //强制更新 + self.checkVersionView = [[PSCheckVersionView alloc] + initWithAppInfo:info + confirm:^{ + [weakSelf jumpAppStoreUpdate]; + }]; + + }else { + self.checkVersionView = [[PSCheckVersionView alloc] initWithAppInfo:info confirm:^{ + + [weakSelf jumpAppStoreUpdate]; + + } cancel:^{ + + [self.coverView removeFromSuperview]; + }]; + } + [self.coverView addSubview:self.checkVersionView]; + [self.checkVersionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.equalTo(self.coverView).multipliedBy(0.75); + make.height.equalTo(self.coverView).multipliedBy(0.33); + make.center.equalTo(self.coverView); + }]; + + [[UIApplication sharedApplication].keyWindow.rootViewController.view addSubview:self.coverView]; +} +#pragma mark: 强制退出 +- (void)jumpAppStoreUpdate { + + //强制退出 + exit(0); + +} + + +#pragma mark:小助手的回调 +- (void)loginImAccount { + + XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"loginIMAPI" NeedToken:nil]; + [proctocolApi GetIMLoginAccount:nil]; + +} +#pragma mark:列表点击回调 + +- (void)loginImAccountList { + + XJPNetAPI * proctocolApi = [[XJPNetAPI alloc] init:self tag:@"loginIMList" NeedToken:nil]; + [proctocolApi GetIMLoginAccount:nil]; + +} + + +#pragma mark:医生列表点击事件 + +- (void)doctorListClick:(NSString *)doctorID { + + XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init]; + mainVC.doctorId = doctorID; + [self.navigationController pushViewController:mainVC animated:YES]; +} + +#pragma mark:找专家 小助手 我的咨询 + +- (void)foundQuestionAction { + + + RoomDoctorRecordsVC * foundVC = [[RoomDoctorRecordsVC alloc] init]; + + [self.navigationController pushViewController:foundVC animated:true]; +} + +- (void)smallQuestionAction { + + if ([ESCTUIManager TUIUserStatus] == false) { + + + [self loginImAccount]; + return; + } + + NSMutableDictionary * dic = [[NSMutableDictionary alloc] init]; + + [self showMBProgressHUDWithString:@"咨询中,请稍候..." autoHidden:NO]; + XJPNetAPI * searchApi = [[XJPNetAPI alloc] init:self tag:@"SMALLHELP" NeedToken:@""]; + + [searchApi postSmallHelpGroup:dic]; + + + +} + +- (void)myQuestionAction { + + + XJQustionRecordViewController * myVC = [[XJQustionRecordViewController alloc] init]; + + [self.navigationController pushViewController:myVC animated:true]; + + +} + +//在线时票据过期:此时您需要生成新的 userSig,并再次重新调用初始化。 +- (void)onKickedOffline { + + [HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo]; + [ESCTUIManager outLoginTUISDK]; + KPostNotification(KNotificationLoginStateChange, @NO); + +} + +- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status { + switch (status) { + case kCLAuthorizationStatusNotDetermined: + // 用户还未决定是否授权 + break; + case kCLAuthorizationStatusRestricted: + // 位置服务被限制(例如家长控制) + [self handleLocationServicesRestricted]; + break; + case kCLAuthorizationStatusDenied: + // 用户拒绝了位置权限 + [self showAlertToOpenSettings]; + break; + case kCLAuthorizationStatusAuthorizedAlways: + case kCLAuthorizationStatusAuthorizedWhenInUse: + // 用户授权了位置权限 +// [self startLocationUpdates]; + break; + default: + break; + } +} + +- (void)handleLocationServicesRestricted { + // 处理位置服务受限的情况 + DLog(@"位置服务被限制"); + [self showAlertToOpenSettings]; +} + +- (void)handleLocationServicesDenied { + // 处理位置服务被拒绝的情况 + DLog(@"位置服务被拒绝"); + [self showAlertToOpenSettings]; +} + + + +- (void)handleLocationServicesDisabled { + // 处理设备的定位服务被禁用的情况 + DLog(@"设备的定位服务被禁用"); + [self showAlertToOpenSettings]; +} + +- (void)showAlertToOpenSettings { + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"定位服务已关闭" + message:@"请在设置中启用定位服务" + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:@"去设置" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + NSURL *settingsURL = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; + if ([[UIApplication sharedApplication] canOpenURL:settingsURL]) { + [[UIApplication sharedApplication] openURL:settingsURL options:@{} completionHandler:nil]; + } + }]; + + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]; + + [alertController addAction:settingsAction]; + [alertController addAction:cancelAction]; + + [self presentViewController:alertController animated:YES completion:nil]; +} + +- (void)dealloc { + + [[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 = CViewBgColor; + 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 getBannerListData]; + if ([HQCommonUtils isLogin]) { + //请求消息列表 + [self getUserWatchData]; + + } + + [self verifyTokenData]; + }]; + + XJHomePageV2HeardView * topView = [[XJHomePageV2HeardView alloc] initWithFrame:CGRectZero]; + self.topView = topView; + topView.homeTopDelegate = self; + [self.contentView addSubview:topView]; +// + [topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_offset(0); + }]; + + self.homeTable = [[XJHomePageV2QuestionTableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; + if (@available(iOS 15.0, *)) { + self.homeTable.sectionHeaderTopPadding = 0; + } + self.homeTable.backgroundColor = KWhiteColor; + self.homeTable.scrollEnabled = NO; + self.homeTable.sectionFooterHeight = CGFLOAT_MIN; + [self.contentView addSubview:self.homeTable]; + MASConstraint *tableHeightConstraint; + + [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(topView.mas_bottom); + make.left.mas_offset(12); + make.right.mas_offset(-12); + self.tableHeightConstraint = make.height.mas_equalTo(kEmptyTableMinHeight); + }]; + //代理 + self.homeTable.headDelegate = self; + + //监听 + [self.homeTable addObserver:self + forKeyPath:@"contentSize" + options:NSKeyValueObservingOptionNew + context:nil]; + kWeakSelf(self); + + self.homeTable.lookMoreBlock = ^{ + if(![HQCommonUtils isLogin]) { + KPostNotification(KNotificationLoginStateChange, @NO); + return; + } + [weakself myQuestionAction]; + + }; + //初始化一个emptyView + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"noQuetionList"] + titleStr:@"暂无咨询记录" detailStr:@""]; + //元素竖直方向的间距 + emptyView.titleLabMargin = kRealValue(5); + emptyView.contentViewY = kRealValue(80); + emptyView.backgroundColor = KWhiteColor; + emptyView.imageSize = CGSizeMake(kRealValue(101), kRealValue(60)); + //标题颜色 + emptyView.titleLabTextColor =UIColorHex(#14BEBE); + //描述字体 + emptyView.titleLabFont = [UIFont systemFontOfSize:15]; + //按钮背景色 + //设置空内容占位图 + self.homeTable.ly_emptyView = emptyView; + + XJHomePageV2BottomTools * bottomTools = [[XJHomePageV2BottomTools alloc] init]; + bottomTools.backgroundColor = CViewBgColor; + [self.contentView addSubview:bottomTools]; + + [bottomTools mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.homeTable.mas_bottom).offset(-1); + make.left.right.mas_offset(0); + make.height.mas_offset(124); + + }]; + + bottomTools.imgeBlock = ^(NSInteger imgIndex) { + + EmptyFunctionDevelopmentVC * vc = [[EmptyFunctionDevelopmentVC alloc] init]; + if (imgIndex == 1) { + vc.navigationItem.title = @"智慧体重"; + } + if (imgIndex == 2) { + vc.navigationItem.title = @"一人一案"; + } + [self.navigationController pushViewController:vc animated:YES]; + }; + + //最下面的一张图 +// self.aiImage = [[UIImageView alloc] init]; +//// self.aiImage.image = [UIImage imageNamed:@"bottomAIImg"]; +// self.aiImage.userInteractionEnabled = true; +// [self.contentView addSubview:self.aiImage]; + + self.AIBannerImage = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage imageNamed:@"placeholder"]]; + self.AIBannerImage.backgroundColor = KClearColor; + self.AIBannerImage.delegate = self; + self.AIBannerImage.currentPageDotImage = [UIImage imageNamed:@"pageControlDot"]; + self.AIBannerImage.pageDotImage = [UIImage imageNamed:@"pageControlNomalDot"]; + self.AIBannerImage.pageDotColor = KWhiteColor; + self.AIBannerImage.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; + self.AIBannerImage.pageControlDotSize = CGSizeMake(6, 4); + [self.contentView addSubview:self.AIBannerImage]; + + + + [self.AIBannerImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(12); + make.right.mas_offset(-12); + make.top.mas_equalTo(bottomTools.mas_bottom).offset(2); + make.height.mas_offset(120); + make.bottom.equalTo(self.contentView.mas_bottom).offset(-18); + }]; + + +} + +// 计算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]; + +} + +#pragma mark: 请求banner图 +- (void)getBannerListData { + + NSMutableDictionary * dic = [[NSMutableDictionary alloc] init]; + //2 首页Banner + XJPNetAPI * searchApi = [[XJPNetAPI alloc] init:self tag:@"BANNER" NeedToken:@""]; + + [searchApi getHomeBannerAllData:dic]; + +} + +#pragma mark: 请求消息列表 +- (void)getMessageListData { + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:@(1) forKey:@"pageNo"]; + [parmDic setObject:@"10" forKey:@"pageSize"]; + + XJPNetAPI * listApi = [[XJPNetAPI alloc] init:self tag:@"LIST" NeedToken:@""]; + [listApi getUserMessageList:parmDic]; + +} + +#pragma mark:消息轮播点击 +- (void)SDTitleItemClick { + + + MyMessageListViewController * messageVC = [[MyMessageListViewController alloc] init]; + [self.navigationController pushViewController:messageVC animated:YES]; +} + +#pragma mark:工具类 +-(void)heardTopToolsClick:(NSInteger)type { + + if (type == 0) { + + EmptyFunctionDevelopmentVC * vc = [[EmptyFunctionDevelopmentVC alloc] init]; + vc.navigationItem.title = @"健康档案"; + [self.navigationController pushViewController:vc animated:YES]; + + } + if (type == 1) { + + EmptyFunctionDevelopmentVC * vc = [[EmptyFunctionDevelopmentVC alloc] init]; + vc.navigationItem.title = @"健康体检"; + [self.navigationController pushViewController:vc animated:YES]; + + } + if (type == 2) { + if(![HQCommonUtils isLogin]) { + KPostNotification(KNotificationLoginStateChange, @NO); + return; + } + KPostNotification(KNotificSelectSOSCenterTabbar,nil); + +// XJSOSLookDoctoreViewController * vc = [[XJSOSLookDoctoreViewController alloc] init]; +// [self.navigationController pushViewController:vc animated:YES]; + + } + if (type == 3) { + + EmptyFunctionDevelopmentVC * vc = [[EmptyFunctionDevelopmentVC alloc] init]; + vc.navigationItem.title = @"健康银行"; + [self.navigationController pushViewController:vc animated:YES]; + + } +} + +#pragma mark:图片点击 +- (void)heardImageClick:(NSInteger)imageIndex { + + if (imageIndex == 50) { + + EmptyFunctionDevelopmentVC * vc = [[EmptyFunctionDevelopmentVC alloc] init]; + vc.navigationItem.title = @"体检套餐"; + [self.navigationController pushViewController:vc animated:YES]; + + } + if (imageIndex == 51) { + + BannarDetailViewController * detailVC = [[BannarDetailViewController alloc] init]; + + [self.navigationController pushViewController:detailVC animated:YES]; + + } + if (imageIndex == 52) { + + KPostNotification(KNotificSelectQuestionTabbar,nil); + + } +} +#pragma mark:点击 +- (void)aiImageTap { + + EmptyFunctionDevelopmentVC * vc = [[EmptyFunctionDevelopmentVC alloc] init]; + vc.navigationItem.title = @"AI随访"; + [self.navigationController pushViewController:vc animated:YES]; +} + +#pragma mark:处理数据 +- (void)customBannerData:(NSArray *)dataArray { + + NSMutableArray * bannerArray = [[NSMutableArray alloc] init]; + NSMutableArray * AIArray = [[NSMutableArray alloc] init]; + + for (NSDictionary * dic in dataArray) { + + HomeBannerModel * model = [HomeBannerModel modelWithDictionary:dic]; + + //直接处理图片吧 + NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photoUrl]; + + NSString * str1 = @"\\"; + + photo = [ photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; + + NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef) photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); + + if ([model.showLocation intValue] == 4) { + [AIArray addObject:encodedString3]; + } + + [bannerArray addObject:model]; + } + self.topView.bannerArray = bannerArray; + + self.AIBannerImage.imageURLStringsGroup = AIArray; + +} + +- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { + + [self aiImageTap]; + +} + +- (void)watchDetailClick { + KPostNotification(KNotificSelectWatchTabbar,nil); + +} + +#pragma mark:退出页面停止轮询 +//- (void)viewWillDisappear:(BOOL)animated { +// [super viewWillDisappear:animated]; +// [self stopPolling]; +//} +// +//- (void)stopPolling { +// if (self.timer) { +// dispatch_source_cancel(self.timer); +// self.timer = nil; +// } +//} +// +//- (void)startPolling { +// if (self.timer) return; // 防止重复创建 +// +// dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); +// self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); +// +// dispatch_source_set_timer(self.timer, +// dispatch_time(DISPATCH_TIME_NOW, 0), +// 120 * NSEC_PER_SEC, +// 1 * NSEC_PER_SEC); +// +// __weak typeof(self) weakSelf = self; +// dispatch_source_set_event_handler(self.timer, ^{ +// [weakSelf getMessageListData]; +// }); +// +// dispatch_resume(self.timer); +//} + + +@end diff --git a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m index 55ed306..6c7da6b 100644 --- a/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Login_Register/Login/XJLoginTopChangeViewController.m @@ -176,17 +176,21 @@ //1月21日新需求 - self.topLoginTitleLab = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(40), kScreenWidth, 20)];; + self.topLoginTitleLab = [[UILabel alloc] init];; self.topLoginTitleLab.text = @"平台统一认证"; self.topLoginTitleLab.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold]; self.topLoginTitleLab.textColor = UIColorHex(#2EB8B2); self.topLoginTitleLab.textAlignment = NSTextAlignmentCenter; [self.loginView addSubview:self.topLoginTitleLab]; + [self.topLoginTitleLab mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_offset(0); + make.top.mas_offset(40); + make.height.mas_offset(kRealValue(40)); + }]; UITextField *accountField = [[UITextField alloc]init]; - accountField.frame = CGRectMake(kRealValue(25),self.topLoginTitleLab.bottom + kRealValue(24), loginView.width - kRealValue(50), 48); accountField.placeholder = @"请输入员工编号或用户名"; accountField.font = BOLDSYSTEMFONT(14); accountField.textColor = CFontColor1; @@ -203,9 +207,17 @@ self.userNameField.autocapitalizationType = UITextAutocapitalizationTypeNone; [loginView addSubview:accountField ]; // + + [self.userNameField mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(25); + make.right.mas_offset(-25); + make.height.mas_offset(48); + make.top.mas_equalTo(self.topLoginTitleLab.mas_bottom).offset(kRealValue(24)); + }]; + // MQTextField * passwordField = [[MQTextField alloc]init]; - passwordField.frame = CGRectMake(kRealValue(25), accountField.bottom + kRealValue(19), accountField.width, accountField.height); +// passwordField.frame = CGRectMake(kRealValue(25), accountField.bottom + kRealValue(19), accountField.width, accountField.height); passwordField.placeholder = @"请输入密码"; passwordField.font = BOLDSYSTEMFONT(14); passwordField.textColor = CFontColor1; @@ -223,7 +235,7 @@ self.passwordField.layer.masksToBounds = true; self.passwordField.delegate = self; self.passwordField.inputView = self.keyboard; - + self.toggleButton = [UIButton buttonWithType:UIButtonTypeCustom]; [self.toggleButton setImage:[UIImage imageNamed:@"eye"] forState:UIControlStateNormal]; [self.toggleButton setImage:[UIImage imageNamed:@"eye.slash"] forState:UIControlStateSelected]; @@ -239,10 +251,16 @@ [loginView addSubview:passwordField]; + [self.passwordField mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(25); + make.right.mas_offset(-25); + make.height.mas_offset(48); + make.top.mas_equalTo(self.userNameField.mas_bottom).offset(kRealValue(19)); + }]; UIButton *loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - loginBtn.frame = CGRectMake(kRealValue(25), self.passwordField.bottom + kRealValue(20), WIDTH - kRealValue(50), 48); +// loginBtn.frame = CGRectMake(kRealValue(25), self.passwordField.bottom + kRealValue(20), WIDTH - kRealValue(50), 48); [loginBtn setTitle:@"登录" forState:UIControlStateNormal]; [loginBtn.titleLabel setFont:BOLDSYSTEMFONT(16)]; loginBtn.backgroundColor = UIColorHex(#2EB8B2); @@ -252,8 +270,18 @@ [loginBtn addTarget:self action:@selector(toClickFootBtn:) forControlEvents:UIControlEventTouchUpInside]; [loginView addSubview:loginBtn]; + [loginBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(kRealValue(25)); + make.right.mas_offset(-kRealValue(25)); + make.height.mas_offset(48); + make.top.mas_equalTo(self.passwordField.mas_bottom).offset(kRealValue(20)); + }]; + + + + UIButton * foundPasswordBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - foundPasswordBtn.frame = CGRectMake(loginBtn.right - 52, loginBtn.bottom + kRealValue(22), 52, 12); +// foundPasswordBtn.frame = CGRectMake(loginBtn.right - 60, loginBtn.bottom + kRealValue(22), 60, 12); [foundPasswordBtn setTitle:@"找回密码" forState:UIControlStateNormal]; foundPasswordBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular]; [foundPasswordBtn setTitleColor:UIColorHex(#B6B6B6) forState:UIControlStateNormal]; @@ -262,6 +290,12 @@ [loginView addSubview:foundPasswordBtn]; + [foundPasswordBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(loginBtn.mas_right); + make.height.mas_offset(kRealValue(20)); + make.top.mas_equalTo(loginBtn.mas_bottom).offset(18); + }]; + [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"]; [[NSUserDefaults standardUserDefaults] synchronize]; @@ -283,7 +317,7 @@ { self.agreenBtn.selected = false; } - [self.view addSubview:self.agreenBtn]; + [self.loginView addSubview:self.agreenBtn]; [self.agreenBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_offset(25); diff --git a/XinjiangProject/XinjiangProject/Project/Login_Register/register/XJRegisterViewController.m b/XinjiangProject/XinjiangProject/Project/Login_Register/register/XJRegisterViewController.m index 6ddc912..b03e488 100644 --- a/XinjiangProject/XinjiangProject/Project/Login_Register/register/XJRegisterViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Login_Register/register/XJRegisterViewController.m @@ -189,7 +189,7 @@ { [EasyTextView showErrorText:message]; - NSLog(@"apiError=%@",message); + DLog(@"apiError=%@",message); // [self showMessage:message]; } diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageDetailConnetController.h b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageDetailConnetController.h new file mode 100644 index 0000000..802eed4 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageDetailConnetController.h @@ -0,0 +1,18 @@ +// +// MyMessageDetailConnetController.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MyMessageDetailConnetController : XJBaseViewController + +@property (nonatomic, strong) NSString * messageID; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageDetailConnetController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageDetailConnetController.m new file mode 100644 index 0000000..a97a1ef --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageDetailConnetController.m @@ -0,0 +1,285 @@ +// +// MyMessageDetailConnetController.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "MyMessageDetailConnetController.h" +#import +#import "MyMessageModel.h" + +@interface MyMessageDetailConnetController () + +@property (nonatomic, strong) UIScrollView *scrollView; +@property (nonatomic, strong) UIView *contentView; +@property (nonatomic, strong) UIView *cardView; +@property (nonatomic, strong) WKWebView *webView; + +@property (nonatomic, strong) UILabel * titleLabel; +@property (nonatomic, strong) UILabel * timeLabel; + +@end + +@implementation MyMessageDetailConnetController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.view.backgroundColor = KWhiteColor; + self.isHidenNaviBar = false; + self.navigationItem.title = @"消息详情"; + + [self setupUI]; + [self createData]; +} + +#pragma mark - UI + +- (void)setupUI { + + /// 1️⃣ ScrollView + self.scrollView = [[UIScrollView alloc] init]; + self.scrollView.alwaysBounceVertical = YES; + self.scrollView.backgroundColor = KWhiteColor; + [self.view addSubview:self.scrollView]; + + [self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.view); + }]; + + /// 2️⃣ contentView(撑 scrollView) + self.contentView = [[UIView alloc] init]; + [self.scrollView addSubview:self.contentView]; + + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.scrollView); + make.width.mas_equalTo(self.scrollView); // ⭐ 必须 + }]; + + /// 3️⃣ 白色卡片 + self.cardView = [[UIView alloc] init]; + self.cardView.backgroundColor = UIColor.whiteColor; + self.cardView.layer.cornerRadius = 12; + self.cardView.layer.masksToBounds = YES; + [self.contentView addSubview:self.cardView]; + + [self.cardView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_offset(15); + make.left.right.mas_offset(0); + make.bottom.mas_offset(-15); // ⭐ 最小高度铺满屏幕 + }]; + + //加个标题 + self.titleLabel = [[UILabel alloc] init]; + self.titleLabel.numberOfLines = 0; + self.titleLabel.font = BOLDSYSTEMFONT(16); + self.titleLabel.textColor = CFontColor1; + self.titleLabel.textAlignment = NSTextAlignmentCenter; + [self.cardView addSubview:self.titleLabel]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_offset(15); + make.right.mas_offset(-15); + make.top.mas_offset(12); + }]; + + self.timeLabel = [[UILabel alloc] init]; + self.timeLabel.font = SYSTEMFONT(12); + self.timeLabel.textColor = CFontColor2; + self.timeLabel.textAlignment = NSTextAlignmentRight; + [self.cardView addSubview:self.timeLabel]; + + [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_offset(-15); + make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(12); + }]; + + + UIView *dashedView = [[UIView alloc] init]; + [self.cardView addSubview:dashedView]; + + // Masonry 布局 + [dashedView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(20); + make.right.mas_equalTo(-20); + make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(10); + make.height.mas_equalTo(1); // 高度可以随意 + }]; + //虚线 + CAShapeLayer *shapeLayer = [CAShapeLayer layer]; + shapeLayer.strokeColor = [UIColor lightGrayColor].CGColor; // 线颜色 + shapeLayer.lineWidth = 1; // 线宽 + shapeLayer.lineDashPattern = @[@4, @2]; // 虚线:4pt 实线,2pt 空白 + + // 创建路径 + CGMutablePathRef path = CGPathCreateMutable(); + CGPathMoveToPoint(path, NULL, 0, 0); // 起点 + CGPathAddLineToPoint(path, NULL, [UIScreen mainScreen].bounds.size.width - 40, 0); // 终点 + shapeLayer.path = path; + CGPathRelease(path); + + // 添加到 view + [dashedView.layer addSublayer:shapeLayer]; + + /// 4️⃣ WKWebView + WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init]; + config.preferences.javaScriptEnabled = YES; + + self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:config]; + self.webView.navigationDelegate = self; + self.webView.scrollView.scrollEnabled = NO; // ⭐ 关键 + self.webView.backgroundColor = UIColor.clearColor; + + [self.cardView addSubview:self.webView]; + + [self.webView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(20); + make.left.mas_offset(15); + make.right.mas_offset(-15); + make.height.mas_equalTo(1); // ⭐ 动态更新 + make.bottom.mas_equalTo(self.cardView.mas_bottom).offset(-15); + }]; +} + +#pragma mark - Data + +- (void)createData { + + [self showMBProgressHUDWithString:@"加载中,请稍候..." autoHidden:false]; + + NSMutableDictionary *parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:self.messageID forKey:@"id"]; + + XJPNetAPI *listApi = [[XJPNetAPI alloc] init:self tag:@"DETAIL" NeedToken:@""]; + [listApi getUserMessageDetailConnet:parmDic]; +} + +#pragma mark - Net Callback + +- (void)Failed:(NSString *)message tag:(NSString *)tag { + [self hiddenAllMBProgressHUD]; +} + +- (void)Sucess:(id)response tag:(NSString *)tag { + + if ([tag isEqualToString:@"DETAIL"]) { + + [self hiddenAllMBProgressHUD]; + + NSDictionary *dic = response; + MyMessageModel *model = [MyMessageModel modelWithDictionary:dic]; + + self.titleLabel.text = model.title; + + NSString *timeStr = [NSString stringWithFormat:@"%@",model.createTime]; + + if ([timeStr isKindOfClass:[NSString class]] && timeStr.length >= 16) { + // 取到 yyyy-MM-dd HH:mm + self.timeLabel.text = [timeStr substringToIndex:16]; + } else { + // 融错 + self.timeLabel.text = @""; + } + [self loadHTML:model.content]; + + + } +} + + + +#pragma mark - Load HTML + +- (void)loadHTML:(NSString *)content { + + if (content.length == 0) return; + + // 处理转义 + content = [content stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"]; + + NSString *html = + [NSString stringWithFormat: + @"" + "" + "" + "" + "" + "%@" + "", content]; + + BOOL needBaseURL = NO; + + // 正则匹配所有 img 的 src + NSError *error = nil; + NSRegularExpression *regex = + [NSRegularExpression regularExpressionWithPattern:@"]+src=[\"']([^\"']+)[\"']" + options:NSRegularExpressionCaseInsensitive + error:&error]; + + NSArray *matches = [regex matchesInString:content + options:0 + range:NSMakeRange(0, content.length)]; + + for (NSTextCheckingResult *match in matches) { + + NSString *imgURL = [content substringWithRange:[match rangeAtIndex:1]]; + + if (![imgURL hasPrefix:@"http://"] && + ![imgURL hasPrefix:@"https://"]) { + + needBaseURL = YES; + break; + } + } + + NSURL *baseURL = needBaseURL ? [NSURL URLWithString:ResourceAddress] : nil; + + [self.webView loadHTMLString:html baseURL:baseURL]; +} + + +#pragma mark - WKNavigationDelegate + +- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { + + __weak typeof(self) weakSelf = self; + + // 第一次算高度 + [webView evaluateJavaScript:@"document.body.scrollHeight" + completionHandler:^(id result, NSError *error) { + + if (!error) { + CGFloat height = [result doubleValue]; + [weakSelf updateWebViewHeight:height]; + } + }]; + + // 如果有网络图片,延迟再算一次(更稳) + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [webView evaluateJavaScript:@"document.body.scrollHeight" + completionHandler:^(id result, NSError *error) { + if (!error) { + CGFloat height = [result doubleValue]; + [weakSelf updateWebViewHeight:height]; + } + }]; + }); +} + +- (void)updateWebViewHeight:(CGFloat)height { + + [self.webView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(height); + }]; + + [self.view layoutIfNeeded]; +} + + + +@end diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageListViewController.h b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageListViewController.h new file mode 100644 index 0000000..deee850 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageListViewController.h @@ -0,0 +1,16 @@ +// +// MyMessageListViewController.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "XJBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MyMessageListViewController : XJBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageListViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageListViewController.m new file mode 100644 index 0000000..a69246d --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/MyMessageListViewController.m @@ -0,0 +1,226 @@ +// +// MyMessageListViewController.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "MyMessageListViewController.h" +#import "MyMessageListTableViewCell.h" +#import "MyMessageModel.h" +#import "MyMessageDetailConnetController.h" + + +@interface MyMessageListViewController () + +@property (nonatomic, assign) NSInteger pageNo; + +@property (nonatomic, strong) UITableView * homeTable; + +@property (nonatomic, strong) NSMutableArray * dataArray; + +@end + +@implementation MyMessageListViewController + +- (NSMutableArray *)dataArray { + + if (!_dataArray) { + _dataArray = [[NSMutableArray alloc] init]; + } + return _dataArray; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = KWhiteColor; + self.isHidenNaviBar = false; + self.navigationItem.title = @"我的消息"; + [self createUI]; + // Do any additional setup after loading the view. +} + +- (void)viewWillAppear:(BOOL)animated { + + [super viewWillAppear:animated]; + [self.homeTable.mj_header beginRefreshing]; + +} + +- (void)createUI { + + self.homeTable = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + if ([[UIDevice currentDevice].systemVersion floatValue] >= 11) { + self.homeTable.estimatedRowHeight = 60; + 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.backgroundColor = KClearColor; + self.homeTable.rowHeight = UITableViewAutomaticDimension; + self.homeTable.estimatedRowHeight = 80; + + + [self.view addSubview:self.homeTable]; + + [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_offset(0); + }]; + + __weak __typeof(self) weakSelf = self; + self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + + weakSelf.pageNo = 1; + [weakSelf.dataArray removeAllObjects]; + [weakSelf createData]; + + }]; + + self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + + weakSelf.pageNo++; + [weakSelf createData]; + + }]; + + + 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; + +} + + +- (void)createData { + + NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init]; + [parmDic setObject:@(self.pageNo) forKey:@"pageNo"]; + [parmDic setObject:@"10" forKey:@"pageSize"]; + + XJPNetAPI * listApi = [[XJPNetAPI alloc] init:self tag:@"LIST" NeedToken:@""]; + [listApi getUserMessageList:parmDic]; + +} + +- (void)Failed:(NSString*)message tag:(NSString*)tag +{ + + [self.homeTable.mj_header endRefreshing]; + [self.homeTable.mj_footer endRefreshing]; + + [self hiddenAllMBProgressHUD]; + +} + + +- (void)Sucess:(id)response tag:(NSString*)tag +{ + [self.homeTable.mj_header endRefreshing]; + [self.homeTable.mj_footer endRefreshing]; + if ([tag isEqualToString:@"LIST"]) { + + [self hiddenAllMBProgressHUD]; + NSArray * array = response; + + for (NSDictionary * dic in array) { + + MyMessageModel * model = [MyMessageModel modelWithDictionary:dic]; + + [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 { + + + MyMessageModel * model = self.dataArray[indexPath.row]; + + + MyMessageListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MESSAGECELL"]; + + if (!cell) { + + cell = [[MyMessageListTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"MESSAGECELL"]; + } + cell.selectionStyle = UITableViewCellSelectionStyleNone; + cell.model = model; + return cell; + + +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + MyMessageModel * model = self.dataArray[indexPath.row]; + MyMessageDetailConnetController * addVC = [[MyMessageDetailConnetController alloc] init]; + addVC.messageID = model.message_id; + [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/XJAddContactViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m index 8a5f6f6..011442e 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJAddContactViewController.m @@ -255,7 +255,7 @@ stringPickerView.dataSourceArr = array; stringPickerView.selectIndex = 2; stringPickerView.resultModelBlock = ^(BRResultModel *resultModel) { - NSLog(@"选择的值:%@", resultModel.value); + DLog(@"选择的值:%@", resultModel.value); for (FamilyMemberRelationModel * model in self.memberArray) { diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m index 0cffa87..ad9dd5b 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMineVideoRecordViewController.m @@ -82,7 +82,11 @@ // Do any additional setup after loading the view. self.isHidenNaviBar = false; self.pageNo = 0; - self.type = [NSString stringWithFormat:@"%ld",_selectOnes]; + if (self.selectOnes == 6) { + self.type = @""; + }else { + self.type = [NSString stringWithFormat:@"%ld",self.selectOnes]; + } [self createUI]; if (self.isSlected == true) { [self createData]; @@ -272,7 +276,7 @@ self.type = @"5"; } if (statusBtn.tag == 1003) { //全部 - self.type = @"6"; + self.type = @""; } for (UIButton * titBtn in self.buttonArray) { diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m index 75bc16b..259d387 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Controller/XJMyCenterViewController.m @@ -18,6 +18,8 @@ #import "XJSOSLookDoctoreViewController.h" #import "XJEmergencyListViewController.h" #import "SimulationViewController.h" +#import "MyMessageListViewController.h" +#import "myPointsBankHomeViewController.h" @interface XJMyCenterViewController () @@ -197,7 +199,10 @@ } - (void)cellListClick:(NSInteger)cellIndex { - + if(![HQCommonUtils isLogin]) { + KPostNotification(KNotificationLoginStateChange, @NO); + return; + } HQUserInfo *infoModel = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo]; UIViewController *vcToPush = nil; @@ -211,6 +216,10 @@ case 2: vcToPush = [[XJEmergencyListViewController alloc] init]; break; + case 3: + vcToPush = [[MyMessageListViewController alloc] init]; +// vcToPush = [[myPointsBankHomeViewController alloc] init]; + break; default: break; diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Model/MyMessageModel.h b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/MyMessageModel.h new file mode 100644 index 0000000..9d0aab7 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/MyMessageModel.h @@ -0,0 +1,25 @@ +// +// MyMessageModel.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MyMessageModel : NSObject + +@property (nonatomic, copy) NSString * message_id; +@property (nonatomic, copy) NSString * delFlag; +@property (nonatomic, copy) NSString * updateBy; +@property (nonatomic, copy) NSString * content; +@property (nonatomic, copy) NSString * scopeType; +@property (nonatomic, copy) NSString * title; +@property (nonatomic, copy) NSString * createTime; +@property (nonatomic, copy) NSString * noticeStatus; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/Model/MyMessageModel.m b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/MyMessageModel.m new file mode 100644 index 0000000..058ae9a --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/Model/MyMessageModel.m @@ -0,0 +1,18 @@ +// +// MyMessageModel.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "MyMessageModel.h" + +@implementation MyMessageModel + ++ (NSDictionary *)modelCustomPropertyMapper +{ + NSDictionary * dic =@{@"message_id" :@"id"}; + return dic; +} + +@end diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/View/MyMessageListTableViewCell.h b/XinjiangProject/XinjiangProject/Project/MainCenter/View/MyMessageListTableViewCell.h new file mode 100644 index 0000000..bb5f27a --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/View/MyMessageListTableViewCell.h @@ -0,0 +1,19 @@ +// +// MyMessageListTableViewCell.h +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import +#import "MyMessageModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MyMessageListTableViewCell : UITableViewCell + +@property (nonatomic, strong) MyMessageModel * model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/View/MyMessageListTableViewCell.m b/XinjiangProject/XinjiangProject/Project/MainCenter/View/MyMessageListTableViewCell.m new file mode 100644 index 0000000..90cb6e7 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/View/MyMessageListTableViewCell.m @@ -0,0 +1,101 @@ +// +// MyMessageListTableViewCell.m +// XinjiangProject +// +// Created by Apple on 2026/2/6. +// + +#import "MyMessageListTableViewCell.h" + +@interface MyMessageListTableViewCell () + +@property (nonatomic, strong) UILabel * messageLabel; + +@property (nonatomic, strong) UILabel * timeLabel; + +@end + +@implementation MyMessageListTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + + if (self =[super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + + [self createUI]; + } + return self; +} + +- (void)createUI { + + UIImageView * iconImg = [[UIImageView alloc] init]; + iconImg.image = [UIImage imageNamed:@"xiaolaba"]; + [self.contentView addSubview:iconImg]; + + [iconImg mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.mas_offset(15); + make.width.height.mas_offset(20); + }]; + + self.messageLabel = [[UILabel alloc] init]; + self.messageLabel.textColor = CFontColor1; + self.messageLabel.textAlignment = NSTextAlignmentLeft; + self.messageLabel.numberOfLines = 2; + self.messageLabel.font = BOLDSYSTEMFONT(16); + [self.contentView addSubview:self.messageLabel]; + + [self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(iconImg.mas_right).offset(5); + make.right.mas_offset(-15); + make.top.mas_offset(15); + + }]; + + self.timeLabel = [[UILabel alloc] init]; + self.timeLabel.textColor = CFontColor2; + self.timeLabel.font = MEDIUMFONT(12); + self.timeLabel.textAlignment = NSTextAlignmentRight; + [self.contentView addSubview:self.timeLabel]; + + [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_offset(-15); + make.top.mas_equalTo(self.messageLabel.mas_bottom).offset(15); + make.bottom.mas_offset(-10); + }]; + + + +} + +- (void)setModel:(MyMessageModel *)model { + + _model = model; + + self.messageLabel.text = [NSString stringWithFormat:@"%@",_model.title]; + + NSString *timeStr = [NSString stringWithFormat:@"%@",_model.createTime]; + + NSString *result = @""; + if ([timeStr isKindOfClass:[NSString class]] && timeStr.length >= 16) { + // 取到 yyyy-MM-dd HH:mm + self.timeLabel.text = [timeStr substringToIndex:16]; + } else { + // 融错 + self.timeLabel.text = @""; + } + + +} + +@end diff --git a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m index 0c74645..73bb477 100644 --- a/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m +++ b/XinjiangProject/XinjiangProject/Project/MainCenter/View/XJMyCenterTableView.m @@ -88,7 +88,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 3; + return 4; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView @@ -103,7 +103,8 @@ NSArray *sectionOne = @[ @[@"咨询人管理", @"relatives_icon"], @[@"应急就医", @"medicalReson_icon"], - @[@"紧急联系人", @"emergency_icon"] + @[@"紧急联系人", @"emergency_icon"], + @[@"我的消息", @"myMessage_icon"] ]; static NSString * cellID = @"cellID"; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m index 516fb58..bcf1e71 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/BannarDetailViewController.m @@ -13,6 +13,7 @@ @property (nonatomic, strong) UIView * contentView; +@property (nonatomic, strong) UIImageView * detailImg ; @end @implementation BannarDetailViewController @@ -25,6 +26,8 @@ self.view.backgroundColor = KWhiteColor; self.navigationItem.title = @"员工心理帮助计划"; + + self.mainScrollView = [[UIScrollView alloc] init]; self.mainScrollView.backgroundColor = KWhiteColor; self.mainScrollView.showsVerticalScrollIndicator = false; @@ -57,7 +60,10 @@ }]; UIImageView * detailImg = [[UIImageView alloc] init]; - detailImg.image = [UIImage imageNamed:@"ADDetail"]; +// detailImg.image = [UIImage imageNamed:@"ADDetail"]; + self.detailImg = detailImg; + self.detailImg.sd_imageIndicator = [SDWebImageActivityIndicator grayIndicator]; + [contentView addSubview:detailImg]; [detailImg mas_makeConstraints:^(MASConstraintMaker *make) { @@ -68,8 +74,59 @@ [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.mas_equalTo(detailImg); }]; + + //请求图片 + [self getDetailImageAddress]; } +- (void)getDetailImageAddress { + + + XJPNetAPI * homeRemakerApi = [[XJPNetAPI alloc] init:self tag:@"IMGURL" NeedToken:@""]; + + [homeRemakerApi getDetailImageAddress:nil]; + +} + +- (void)Failed:(NSString*)message tag:(NSString*)tag +{ + + [self showMBProgressHUDOnlyWithString:message]; + [self hiddenAllMBProgressHUD]; + +} + +- (void)Sucess:(id)response tag:(NSString*)tag +{ + if ([tag isEqualToString:@"IMGURL"]) { + + NSString * urlString = response; + + NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,urlString]; + + NSString * str1 = @"\\"; + + photo = [ photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; + + NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef) photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); + + [self.detailImg sd_setImageWithURL:[NSURL URLWithString:encodedString3] + placeholderImage:nil + options:SDWebImageRetryFailed + completed:^(UIImage * _Nullable image, + NSError * _Nullable error, + SDImageCacheType cacheType, + NSURL * _Nullable imageURL) { + + if (error) { + self.detailImg.image = [UIImage imageNamed:@"image_load_fail"]; // 失败图 + } + }]; + + + } + +} /* #pragma mark - Navigation diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m index 7bdeb55..80291f7 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/QuestionViewController.m @@ -20,13 +20,14 @@ #import #import #import -#import "PSAppInfo.h" -#import "PSCheckVersionView.h" +//#import "PSAppInfo.h" +//#import "PSCheckVersionView.h" #import "RoomDoctorRecordsVC.h" #import "HomeQusetionRecordsModel.h" #import "XJDoctorMainViewController.h" -#import "UPAppVesionModel.h" +//#import "UPAppVesionModel.h" #import "BannarDetailViewController.h" +#import "HomeBannerModel.h" static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 @@ -36,8 +37,8 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 @property (nonatomic, strong) HealthyQuestionTable * homeTable; @property (nonatomic, assign) NSInteger page; - -@property (nonatomic, strong) PSCheckVersionView * checkVersionView; +// +//@property (nonatomic, strong) PSCheckVersionView * checkVersionView; @property (nonatomic, strong) UIView * coverView; //定位相关 @@ -59,6 +60,14 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 @property (nonatomic, strong) MASConstraint *tableHeightConstraint; +@property (nonatomic, strong) HealthyQuestionHeardView * topView; + +//用gcd做轮询 +@property (nonatomic, strong) dispatch_source_t timer; + +@property (nonatomic, assign) BOOL polling; //失败了也轮询?先不管 有需要回调处理去 + + @end @@ -99,7 +108,9 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 object:nil]; // [self createUI]; [self updateV2UI]; - [self getUpDateinfo]; +// [self getUpDateinfo]; + //请求banner图 +// [self getBannerListData]; self.page = 1; [self verifyTokenData]; [self initCompleteBlock]; @@ -144,9 +155,7 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 [super viewWillAppear:animated]; - if (!ValidStr(UserDefaultObjectForKey(@"HTTPS"))) { - [self verifyTokenData]; - } + [self verifyTokenData]; } @@ -300,13 +309,14 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 } - +#pragma mark:请求结果 - (void)Sucess:(id)response tag:(NSString*)tag { [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]; @@ -434,84 +444,8 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 [self.navigationController pushViewController:chatVC animated:YES]; } - - - if ([tag isEqualToString:@"UPVERSION"]) { - - NSDictionary * dic = response; - - UPAppVesionModel * model = [UPAppVesionModel modelWithDictionary:dic]; - // 避免1.0.10 跟 1.0.1 出错 - - NSString *version = - [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; - - NSString *versionCode = - [version stringByReplacingOccurrencesOfString:@"." withString:@""]; - - NSInteger loctaionVesion = [versionCode integerValue]; - - NSDictionary * infoDic = @{ - @"version":[NSString stringWithFormat:@"%@",model.versionName] , - @"releaseNotes":model.updateContent, - @"currentVersionReleaseDate":model.updateTime}; - - PSAppInfo * info = [[PSAppInfo alloc] initWithDict:infoDic]; - //是否需要强制更新 - - BOOL isNeed = [model.forced integerValue] == 1 ? YES : NO; - - if ( model.versionNo > loctaionVesion) { - [self show:info isNeedUpdate:isNeed]; - }else - { - DLog(@"不需要更新"); - } - } } -//是否需要更新 -- (void)show:(PSAppInfo *)info isNeedUpdate:(BOOL)isNeed { - - - __weak typeof(self)weakSelf = self; - - if(isNeed == true) { //强制更新 - self.checkVersionView = [[PSCheckVersionView alloc] - initWithAppInfo:info - confirm:^{ - [weakSelf jumpAppStoreUpdate]; - }]; - - }else { - self.checkVersionView = [[PSCheckVersionView alloc] initWithAppInfo:info confirm:^{ - - [weakSelf jumpAppStoreUpdate]; - - } cancel:^{ - - [self.coverView removeFromSuperview]; - }]; - } - [self.coverView addSubview:self.checkVersionView]; - [self.checkVersionView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.equalTo(self.coverView).multipliedBy(0.75); - make.height.equalTo(self.coverView).multipliedBy(0.33); - make.center.equalTo(self.coverView); - }]; - - [[UIApplication sharedApplication].keyWindow.rootViewController.view addSubview:self.coverView]; -} - -- (void)jumpAppStoreUpdate { - - //强制退出 - exit(0); - - -} - - #pragma mark:小助手的回调 - (void)loginImAccount { @@ -551,8 +485,7 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 - (void)smallQuestionAction { if ([ESCTUIManager TUIUserStatus] == false) { - - + [self loginImAccount]; return; } @@ -612,13 +545,13 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 - (void)handleLocationServicesRestricted { // 处理位置服务受限的情况 - NSLog(@"位置服务被限制"); + DLog(@"位置服务被限制"); [self showAlertToOpenSettings]; } - (void)handleLocationServicesDenied { // 处理位置服务被拒绝的情况 - NSLog(@"位置服务被拒绝"); + DLog(@"位置服务被拒绝"); [self showAlertToOpenSettings]; } @@ -626,7 +559,7 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 - (void)handleLocationServicesDisabled { // 处理设备的定位服务被禁用的情况 - NSLog(@"设备的定位服务被禁用"); + DLog(@"设备的定位服务被禁用"); [self showAlertToOpenSettings]; } @@ -663,9 +596,8 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 self.mainScrollView.backgroundColor = CViewBgColor; self.mainScrollView.showsVerticalScrollIndicator = false; self.mainScrollView.showsHorizontalScrollIndicator = false; - self.mainScrollView.contentInset = UIEdgeInsetsZero; // 让 scrollView 从顶部开始 - self.mainScrollView.scrollIndicatorInsets = UIEdgeInsetsZero; // 滚动指示器也不受影响 - + self.mainScrollView.contentInset = UIEdgeInsetsZero; // 让 scrollView 从顶部开始 + self.mainScrollView.scrollIndicatorInsets = UIEdgeInsetsZero; // 滚动指示器也不受影响 self.mainScrollView.contentSize = CGSizeMake(kScreenWidth, kScreenHeight - kTabBarHeight); // 如果使用自动调整 if (@available(iOS 11.0, *)) { @@ -675,7 +607,7 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 // 创建一个 contentView(所有内容都加在这个 view 上) UIView *contentView = [[UIView alloc] init]; - contentView.backgroundColor = [UIColor whiteColor]; + contentView.backgroundColor = CViewBgColor; self.contentView = contentView; [self.mainScrollView addSubview:contentView]; @@ -696,6 +628,7 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 }]; HealthyQuestionHeardView * topView = [[HealthyQuestionHeardView alloc] initWithFrame:CGRectZero]; + self.topView = topView; topView.headDelegate = self; [self.contentView addSubview:topView]; // @@ -711,7 +644,8 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(topView.mas_bottom); - make.left.right.equalTo(self.contentView); + make.left.mas_offset(15); + make.right.mas_offset(-15); self.tableHeightConstraint = make.height.mas_equalTo(kEmptyTableMinHeight); make.bottom.equalTo(self.contentView.mas_bottom); }]; @@ -724,6 +658,12 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 kWeakSelf(self); self.homeTable.tableBlock = ^(HomeQusetionRecordsModel * _Nonnull model) { weakself.recomendModel = model; + + if(![HQCommonUtils isLogin]) { + KPostNotification(KNotificationLoginStateChange, @NO); + return; + } + //1图文 2视频 if ([model.contentType intValue] == 2) { @@ -767,16 +707,22 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 }; self.homeTable.lookMoreBlock = ^{ - + if(![HQCommonUtils isLogin]) { + KPostNotification(KNotificationLoginStateChange, @NO); + return; + } [weakself myQuestionAction]; }; //初始化一个emptyView + + LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"noQuetionList"] titleStr:@"暂无咨询记录" detailStr:@""]; //元素竖直方向的间距 emptyView.titleLabMargin = kRealValue(5); - emptyView.contentViewY = kRealValue(80); + emptyView.contentViewY = kRealValue(45); + emptyView.emptyViewIsCompleteCoverSuperView = YES; emptyView.imageSize = CGSizeMake(kRealValue(101), kRealValue(60)); //标题颜色 emptyView.titleLabTextColor =UIColorHex(#14BEBE); @@ -810,11 +756,6 @@ static CGFloat const kEmptyTableMinHeight = 300; // 或屏幕高度的一半 } } --(void)SDCycleScrollViewItemClick { - - BannarDetailViewController * detailVC = [[BannarDetailViewController alloc] init]; - - [self.navigationController pushViewController:detailVC animated:YES]; - -} + + @end diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m index a11f4d8..b9974e2 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJAddQuestionViewController.m @@ -352,7 +352,7 @@ datePickerView.isAutoSelect = YES; datePickerView.showUnitType = BRShowUnitTypeOnlyCenter; datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) { - NSLog(@"选择的值:%@", selectValue); + DLog(@"选择的值:%@", selectValue); self.birthdayTextField.text = selectValue; }; @@ -376,7 +376,7 @@ stringPickerView.dataSourceArr = array; stringPickerView.selectIndex = 2; stringPickerView.resultModelBlock = ^(BRResultModel *resultModel) { - NSLog(@"选择的值:%@", resultModel.value); + DLog(@"选择的值:%@", resultModel.value); for (FamilyMemberRelationModel * model in self.memberArray) { diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJBasicHealthInfoViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJBasicHealthInfoViewController.m index 618960b..d9a8d46 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJBasicHealthInfoViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJBasicHealthInfoViewController.m @@ -150,9 +150,9 @@ NSRange range = [mainString rangeOfString:subString]; if (range.location != NSNotFound) { - NSLog(@"Substring '%@' found at location %lu, length %lu", subString, (unsigned long)range.location, (unsigned long)range.length); + DLog(@"Substring '%@' found at location %lu, length %lu", subString, (unsigned long)range.location, (unsigned long)range.length); } else { - NSLog(@"Substring '%@' not found", subString); + DLog(@"Substring '%@' not found", subString); } QuestionOptionCustomModel * model = [[QuestionOptionCustomModel alloc] init]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m index 194216a..24eed1b 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJDoctorMainViewController.m @@ -501,6 +501,7 @@ else { topView.isSelected = false; } + topView.lastType = i ; i ++; } } diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m index 3cbf12a..7179ab6 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/Controller/XJExpertMainViewController.m @@ -564,7 +564,7 @@ [frameArray enumerateObjectsUsingBlock:^(NSNumber *number, NSUInteger idx, BOOL *stop) { sum += [number floatValue]; }]; - NSLog(@"Sum: %f", sum); + DLog(@"Sum: %f", sum); self.homeTable.dataArray = dataArray; self.homeTable.frame = CGRectMake(kRealValue(15), self.doctorView.bottom + kRealValue(10), kScreenWidth - kRealValue(30), sum +kRealValue(50) ); diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/LookReportImageViewController.m b/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/LookReportImageViewController.m index a241c7a..a40d579 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/LookReportImageViewController.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/LookReportImageViewController.m @@ -140,7 +140,7 @@ NSSet *websiteDataTypes = [WKWebsiteDataStore allWebsiteDataTypes]; NSDate *dateFrom = [NSDate dateWithTimeIntervalSince1970:0]; [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:websiteDataTypes modifiedSince:dateFrom completionHandler:^{ - NSLog(@"-----clear webView cache success------"); + DLog(@"-----clear webView cache success------"); }]; } else { NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; @@ -148,7 +148,7 @@ NSError *errors; [[NSFileManager defaultManager] removeItemAtPath:cookiesFolderPath error:&errors]; if (!errors) { - NSLog(@"-----clear wkWebView cache success------"); + DLog(@"-----clear wkWebView cache success------"); } } } diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/imageReportTableViewCell.m b/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/imageReportTableViewCell.m index 9f58378..5939e93 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/imageReportTableViewCell.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/OtherFile/imageReportTableViewCell.m @@ -211,7 +211,7 @@ - (void)lookImageReport:(UIButton *)lookBtn { - NSLog(@"%d",lookBtn.tag); + DLog(@"%d",lookBtn.tag); //影片原像 if (lookBtn.tag < 2000) { diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h index c5425dd..7bff373 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.h @@ -25,7 +25,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) CGFloat h; @property (nonatomic, weak)id headDelegate; -@property (nonatomic, copy) NSString * haveSessioning; + +@property (nonatomic, strong) NSArray * picArray; @end diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m index 94bdd2e..fcb963c 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionHeardView.m @@ -8,11 +8,14 @@ #import "HealthyQuestionHeardView.h" #import "SDCycleScrollView.h" #import "HealthyToolsView.h" +#import "HomeBannerModel.h" @interface HealthyQuestionHeardView () @property (nonatomic, strong) SDCycleScrollView * adTitleView; -@property (nonatomic, strong) UIView * redRadioView; + +@property (nonatomic, strong) SDCycleScrollView * cycleView; + @end @implementation HealthyQuestionHeardView @@ -45,6 +48,7 @@ [topView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.top.right.mas_offset(0); make.height.mas_offset(kStatusBarHeight); + }]; UIImageView * backImage = [[UIImageView alloc] init]; @@ -56,6 +60,7 @@ make.left.right.mas_offset(0); make.height.mas_offset(kRealValue(288)); make.top.mas_equalTo(topView.mas_bottom).offset(-1); + make.bottom.mas_equalTo(self.mas_bottom).offset(-15); }]; @@ -102,30 +107,32 @@ } //加个轮播图 - NSArray *originImages = @[@"h1"]; - - 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); - }]; +// NSArray *originImages = @[@"h1"]; +// +// SDCycleScrollView *cycleView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero shouldInfiniteLoop:YES imageNamesGroup:originImages]; +// self.cycleView = cycleView; +// cycleView.backgroundColor = KClearColor; +// cycleView.layer.cornerRadius = 8; +// cycleView.layer.masksToBounds = true; +// cycleView.showPageControl = YES; +// cycleView.placeholderImage = PLACEHOLD_IMG; +// 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); +// }]; } @@ -162,16 +169,32 @@ } } -- (void)setHaveSessioning:(NSString *)haveSessioning { - _haveSessioning = haveSessioning; - if ([_haveSessioning integerValue] != 0) { - self.redRadioView.hidden = false; - }else - { - self.redRadioView.hidden = YES; +- (void)setPicArray:(NSArray *)picArray { + + _picArray = picArray; + + NSMutableArray * dataArray = [[NSMutableArray alloc] init]; + + for (HomeBannerModel * model in _picArray) { + + //直接处理图片吧 + NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photoUrl]; + + NSString * str1 = @"\\"; + + photo = [ photo stringByReplacingOccurrencesOfString:str1 withString:@"/"]; + NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef) photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8)); + + [dataArray addObject:encodedString3]; + } + + + self.cycleView.imageURLStringsGroup = dataArray; + + } - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m index 8d97f24..6dff19e 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/HealthyQuestionTable.m @@ -108,7 +108,7 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - UIView * sectionHeardView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(45))]; + UIView * sectionHeardView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth - 30, kRealValue(45))]; sectionHeardView.backgroundColor = CViewBgColor; UILabel * todayLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(16), 190, 16)]; @@ -123,7 +123,7 @@ [sectionHeardView addSubview:todayLabel]; - YYLabel * morelabel = [[YYLabel alloc] initWithFrame:CGRectMake(kScreenWidth - 165 , kRealValue(17), 150, 15)]; + YYLabel * morelabel = [[YYLabel alloc] initWithFrame:CGRectMake(sectionHeardView.width - 165 , kRealValue(17), 150, 15)]; morelabel.text = @"更多 >"; morelabel.textAlignment = NSTextAlignmentRight; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionChange/QustionHomeRecordsCell.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionChange/QustionHomeRecordsCell.m index 2e343c3..d85e51a 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionChange/QustionHomeRecordsCell.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/QuestionChange/QustionHomeRecordsCell.m @@ -68,10 +68,10 @@ [self.contentView addSubview:self.backView]; // [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(18); - make.right.mas_offset(-18); + make.left.mas_offset(0); + make.right.mas_offset(0); make.top.mas_offset(0); - make.bottom.mas_offset(15); + make.bottom.mas_offset(0); }]; // @@ -234,8 +234,8 @@ [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_offset(18); - make.right.mas_offset(-18); + make.left.mas_offset(0); + make.right.mas_offset(0); make.top.mas_offset(15); make.bottom.mas_equalTo(self.questionTime.mas_bottom).offset(16); }]; diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeOneTableViewCell.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeOneTableViewCell.m index 9058353..8cc9ae1 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeOneTableViewCell.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeOneTableViewCell.m @@ -98,7 +98,7 @@ // 输出排序后的模型数组 for (QuestionOptionCustomModel * customModel in _model.answerList) { - NSLog(@"Value: %ld", customModel.loctaionThin); + DLog(@"Value: %ld", customModel.loctaionThin); } diff --git a/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeTwoTableViewCell.m b/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeTwoTableViewCell.m index 46d2703..9cc6045 100644 --- a/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeTwoTableViewCell.m +++ b/XinjiangProject/XinjiangProject/Project/Qusetion/View/healethOptionsView(健康选项)/HealthTypeTwoTableViewCell.m @@ -205,7 +205,7 @@ CGRect textRect = [text boundingRectWithSize:constraintSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil]; CGFloat textHeight = CGRectGetHeight(textRect); - NSLog(@"Text Height: %f", textHeight); + DLog(@"Text Height: %f", textHeight); if (textHeight < kRealValue(30)) { self.optionField.height = kRealValue(30); @@ -313,7 +313,7 @@ CGRect textRect = [text boundingRectWithSize:constraintSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil]; CGFloat textHeight = CGRectGetHeight(textRect) + kRealValue(8); - NSLog(@"Text Height: %f", textHeight); + DLog(@"Text Height: %f", textHeight); if (textHeight <= kRealValue(30)) { self.optionField.height = kRealValue(30); diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/Contents.json similarity index 67% rename from XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/Contents.json rename to XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/Contents.json index 8393396..f4211e7 100644 --- a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/Contents.json +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "roomPlaceholder.png", + "filename" : "bottomAIImg.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "roomPlaceholder@2x.png", + "filename" : "bottomAIImg@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "roomPlaceholder@3x.png", + "filename" : "bottomAIImg@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg.png new file mode 100644 index 0000000..e6d7bd6 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg@2x.png new file mode 100644 index 0000000..d6c9730 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg@3x.png new file mode 100644 index 0000000..35a2d22 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomAIImg.imageset/bottomAIImg@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/Contents.json similarity index 66% rename from XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/Contents.json rename to XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/Contents.json index 28461f0..be22dd1 100644 --- a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/Contents.json +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "videQuestion_Left.png", + "filename" : "bottomLeftImg.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "videQuestion_Left@2x.png", + "filename" : "bottomLeftImg@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "videQuestion_Left@3x.png", + "filename" : "bottomLeftImg@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg.png new file mode 100644 index 0000000..287fa90 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg@2x.png new file mode 100644 index 0000000..eb57b22 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg@3x.png new file mode 100644 index 0000000..8f6e9f6 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomLeftImg.imageset/bottomLeftImg@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/Contents.json new file mode 100644 index 0000000..01910b0 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "bottomRightImg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "bottomRightImg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "bottomRightImg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg.png new file mode 100644 index 0000000..72b4e3d Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg@2x.png new file mode 100644 index 0000000..bbed3d5 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg@3x.png new file mode 100644 index 0000000..9978dba Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/bottomRightImg.imageset/bottomRightImg@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/Contents.json new file mode 100644 index 0000000..dc517ad --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "deveEmptyImg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "deveEmptyImg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "deveEmptyImg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg.png new file mode 100644 index 0000000..408e6f5 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg@2x.png new file mode 100644 index 0000000..89f2355 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg@3x.png new file mode 100644 index 0000000..33daf5e Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/deveEmptyImg.imageset/deveEmptyImg@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/Contents.json new file mode 100644 index 0000000..e024395 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "heaedTitleBackImg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "heaedTitleBackImg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "heaedTitleBackImg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg.png new file mode 100644 index 0000000..f80d18c Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg@2x.png new file mode 100644 index 0000000..f5342db Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg@3x.png new file mode 100644 index 0000000..bbaa1f4 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heaedTitleBackImg.imageset/heaedTitleBackImg@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/Contents.json new file mode 100644 index 0000000..44d3701 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "heardTopImg_1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "heardTopImg_1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "heardTopImg_1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1.png new file mode 100644 index 0000000..6809261 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1@2x.png new file mode 100644 index 0000000..c77f6a5 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1@3x.png new file mode 100644 index 0000000..940e040 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_1.imageset/heardTopImg_1@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/Contents.json new file mode 100644 index 0000000..7db0535 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "heardTopImg_2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "heardTopImg_2@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "heardTopImg_2@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2.png new file mode 100644 index 0000000..6fb85d2 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2@2x.png new file mode 100644 index 0000000..8455543 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2@3x.png new file mode 100644 index 0000000..3983200 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_2.imageset/heardTopImg_2@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/Contents.json new file mode 100644 index 0000000..006034a --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "heardTopImg_3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "heardTopImg_3@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "heardTopImg_3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3.png new file mode 100644 index 0000000..cda1435 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3@2x.png new file mode 100644 index 0000000..379d2fc Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3@3x.png new file mode 100644 index 0000000..e634d53 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/heardTopImg_3.imageset/heardTopImg_3@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/Contents.json new file mode 100644 index 0000000..ac32116 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homeLaba.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homeLaba@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homeLaba@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba.png new file mode 100644 index 0000000..fdb8070 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba@2x.png new file mode 100644 index 0000000..dd55310 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba@3x.png new file mode 100644 index 0000000..22dce6d Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeLaba.imageset/homeLaba@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/Contents.json new file mode 100644 index 0000000..541c844 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homePageHeardTop.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homePageHeardTop@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homePageHeardTop@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop.png new file mode 100644 index 0000000..81a6d47 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop@2x.png new file mode 100644 index 0000000..133ff59 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop@3x.png new file mode 100644 index 0000000..8ef0ed4 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageHeardTop.imageset/homePageHeardTop@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/Contents.json new file mode 100644 index 0000000..b6912c5 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homePageShuimian.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homePageShuimian@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homePageShuimian@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian.png new file mode 100644 index 0000000..3b673d7 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian@2x.png new file mode 100644 index 0000000..c9c4859 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian@3x.png new file mode 100644 index 0000000..15c6764 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homePageShuimian.imageset/homePageShuimian@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/Contents.json new file mode 100644 index 0000000..98e4373 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homeTools_1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homeTools_1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homeTools_1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1.png new file mode 100644 index 0000000..4a64a16 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1@2x.png new file mode 100644 index 0000000..2f93ee5 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1@3x.png new file mode 100644 index 0000000..ab71dd3 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_1.imageset/homeTools_1@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/Contents.json new file mode 100644 index 0000000..fff9907 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homeTools_2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homeTools_2@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homeTools_2@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2.png new file mode 100644 index 0000000..0676e68 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2@2x.png new file mode 100644 index 0000000..5dd5d1b Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2@3x.png new file mode 100644 index 0000000..0585921 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_2.imageset/homeTools_2@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/Contents.json new file mode 100644 index 0000000..8739483 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homeTools_3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homeTools_3@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homeTools_3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3.png new file mode 100644 index 0000000..4d019bd Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3@2x.png new file mode 100644 index 0000000..94fe6c6 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3@3x.png new file mode 100644 index 0000000..3020095 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_3.imageset/homeTools_3@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/Contents.json new file mode 100644 index 0000000..5fdeae7 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "homeTools_4.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "homeTools_4@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "homeTools_4@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4.png new file mode 100644 index 0000000..8ceffdd Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4@2x.png new file mode 100644 index 0000000..78ea713 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4@3x.png new file mode 100644 index 0000000..6380528 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/homeTools_4.imageset/homeTools_4@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/Contents.json new file mode 100644 index 0000000..5574ccb --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "messageBackImg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "messageBackImg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "messageBackImg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg.png new file mode 100644 index 0000000..5676832 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg@2x.png new file mode 100644 index 0000000..48f91ad Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg@3x.png new file mode 100644 index 0000000..5ebce5f Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/messageBackImg.imageset/messageBackImg@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlDot.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlDot.imageset/Contents.json new file mode 100644 index 0000000..8789a4a --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlDot.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "pageControlDot.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlDot.imageset/pageControlDot.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlDot.imageset/pageControlDot.png new file mode 100644 index 0000000..10d63b0 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlDot.imageset/pageControlDot.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlNomalDot.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlNomalDot.imageset/Contents.json new file mode 100644 index 0000000..7c976db --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlNomalDot.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "pageControlNomalDot.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlNomalDot.imageset/pageControlNomalDot.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlNomalDot.imageset/pageControlNomalDot.png new file mode 100644 index 0000000..013be75 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/HOMEV2/pageControlNomalDot.imageset/pageControlNomalDot.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/placeholder.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/placeholder.imageset/Contents.json new file mode 100644 index 0000000..328728c --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/placeholder.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "placeholder@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/placeholder.imageset/placeholder@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/placeholder.imageset/placeholder@2x.png new file mode 100644 index 0000000..e3097ed Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/placeholder.imageset/placeholder@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder.png deleted file mode 100644 index a72ba58..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder@2x.png deleted file mode 100644 index bf9750f..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder@2x.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder@3x.png deleted file mode 100644 index 4a91b05..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/roomPlaceholder 1.imageset/roomPlaceholder@3x.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left.png deleted file mode 100644 index 56bdd70..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left@2x.png deleted file mode 100644 index 96224e2..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left@2x.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left@3x.png deleted file mode 100644 index badd7e7..0000000 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Image/videQuestion_Left 1.imageset/videQuestion_Left@3x.png and /dev/null differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/myMessage_icon.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/myMessage_icon.imageset/Contents.json new file mode 100644 index 0000000..0900bbc --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/myMessage_icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "未标题-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/myMessage_icon.imageset/未标题-1.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/myMessage_icon.imageset/未标题-1.png new file mode 100644 index 0000000..c72888d Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/myMessage_icon.imageset/未标题-1.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/xiaolaba.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/xiaolaba.imageset/Contents.json new file mode 100644 index 0000000..6f9ae58 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/xiaolaba.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "xiaolaba.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/xiaolaba.imageset/xiaolaba.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/xiaolaba.imageset/xiaolaba.png new file mode 100644 index 0000000..4b22e41 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/MyCenetr/xiaolaba.imageset/xiaolaba.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/Contents.json new file mode 100644 index 0000000..1b2a910 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "xjHomeTabBar_nomal.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "xjHomeTabBar_nomal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "xjHomeTabBar_nomal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal.png new file mode 100644 index 0000000..b1b7d3c Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal@2x.png new file mode 100644 index 0000000..b476e27 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal@3x.png new file mode 100644 index 0000000..f226873 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_nomal.imageset/xjHomeTabBar_nomal@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/Contents.json b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/Contents.json new file mode 100644 index 0000000..69e1630 --- /dev/null +++ b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "xjHomeTabBar_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "xjHomeTabBar_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "xjHomeTabBar_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected.png new file mode 100644 index 0000000..bbc8f6c Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected@2x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected@2x.png new file mode 100644 index 0000000..6510fc0 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected@2x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected@3x.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected@3x.png new file mode 100644 index 0000000..44d8594 Binary files /dev/null and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/Tabbar/xjHomeTabBar_selected.imageset/xjHomeTabBar_selected@3x.png differ diff --git a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/placeholdIMG.imageset/placeholdIMG.png b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/placeholdIMG.imageset/placeholdIMG.png index 641a563..5f4641c 100644 Binary files a/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/placeholdIMG.imageset/placeholdIMG.png and b/XinjiangProject/XinjiangProject/Supporting Files/Assets.xcassets/other/placeholdIMG.imageset/placeholdIMG.png differ