修改组织关系!删除无用代码
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSArray+Sudoku.h
|
// NSArray+Sudoku.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/3/4.
|
// Created by Apple on 2024/3/4.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSArray+Sudoku.m
|
// NSArray+Sudoku.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/3/4.
|
// Created by Apple on 2024/3/4.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSAttributedString+Extension.h
|
// NSAttributedString+Extension.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/3/14.
|
// Created by 仁康信息 on 2023/3/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSAttributedString+Extension.m
|
// NSAttributedString+Extension.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/3/14.
|
// Created by 仁康信息 on 2023/3/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// UIDevice+model.h
|
// UIDevice+model.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/3/29.
|
// Created by Apple on 2024/3/29.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// UIDevice+model.m
|
// UIDevice+model.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/3/29.
|
// Created by Apple on 2024/3/29.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// UIImage+RoundedCorner.h
|
// UIImage+RoundedCorner.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/4/24.
|
// Created by Apple on 2024/4/24.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// UIImage+RoundedCorner.m
|
// UIImage+RoundedCorner.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/4/24.
|
// Created by Apple on 2024/4/24.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -82,9 +82,9 @@
|
|||||||
//#define IntervenH5 @"https://starry.out.icdat.cn"
|
//#define IntervenH5 @"https://starry.out.icdat.cn"
|
||||||
|
|
||||||
//开发环境地址
|
//开发环境地址
|
||||||
#define Http @"http://cqyt.dev.yg.dt.io"//
|
#define Http @"https://xjgateway.mcrm.vip:8888"//
|
||||||
#define H5DevHost @"cqyt.dev.yg.dt.io"//
|
#define H5DevHost @"xjgateway.mcrm.vip:8888"//
|
||||||
#define IntervenH5 @"http://cms.dev.yg.dt.io"
|
#define IntervenH5 @"https://xjconsole.mcrm.vip:8888"
|
||||||
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
|
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
|
||||||
#define SCHEME @"http" //
|
#define SCHEME @"http" //
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ alpha:1.0])
|
|||||||
|
|
||||||
//数据验证
|
//数据验证
|
||||||
#define StrValid(f) ([f isKindOfClass:[NSNull class]] || f == nil || [f length] < 1 || [f isEqualToString:@"(null)"] || [f isEqualToString:@"<null>"] || [f isEqualToString:@"null"]? YES : NO)
|
#define StrValid(f) ([f isKindOfClass:[NSNull class]] || f == nil || [f length] < 1 || [f isEqualToString:@"(null)"] || [f isEqualToString:@"<null>"] || [f isEqualToString:@"null"]? YES : NO)
|
||||||
#define SafeStr(f) (StrValid(f) ? f:@"")
|
#define SafeStr(f) (!StrValid(f) ? f:@"-")
|
||||||
#define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound)
|
#define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound)
|
||||||
|
|
||||||
#define ValidStr(f) StrValid(f)
|
#define ValidStr(f) StrValid(f)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CQAudioPlayManager.h
|
// CQAudioPlayManager.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/12/5.
|
// Created by 仁康信息 on 2023/12/5.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CQAudioPlayManager.m
|
// CQAudioPlayManager.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/12/5.
|
// Created by 仁康信息 on 2023/12/5.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// DownToolsManager.h
|
// DownToolsManager.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/12/1.
|
// Created by 仁康信息 on 2023/12/1.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// DownToolsManager.m
|
// DownToolsManager.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/12/1.
|
// Created by 仁康信息 on 2023/12/1.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -123,4 +123,14 @@
|
|||||||
|
|
||||||
- (void)getMinitringWatchData:(NSMutableDictionary *)parmDic;
|
- (void)getMinitringWatchData:(NSMutableDictionary *)parmDic;
|
||||||
|
|
||||||
|
- (void)getInterMonitoringMaxMinData:(NSMutableDictionary *)parmDic;
|
||||||
|
|
||||||
|
- (void)getWranHistoryList:(NSMutableDictionary *)parmDic;
|
||||||
|
|
||||||
|
- (void)getSOSDoctorRecordList:(NSMutableDictionary *)parmDic;
|
||||||
|
|
||||||
|
- (void)getSOSDoctorDetailInfo:(NSMutableDictionary *)parmDic;
|
||||||
|
|
||||||
|
- (void)getSOSSmallSumData:(NSMutableDictionary *)parmDic;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -550,7 +550,7 @@
|
|||||||
- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic {
|
- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic {
|
||||||
|
|
||||||
//GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url HTTP/1.1
|
//GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url HTTP/1.1
|
||||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList?dictKey=qh_ios_jump_url",Http] params:parmDic];
|
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url",Http] params:parmDic];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -748,4 +748,35 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)getInterMonitoringMaxMinData:(NSMutableDictionary *)parmDic {
|
||||||
|
|
||||||
|
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/thresholdSetting",Http] params:parmDic];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)getWranHistoryList:(NSMutableDictionary *)parmDic {
|
||||||
|
// https://health-api.tzgl.shuziweidao.com/health-watch/watchH5Api/historicalWarn?eventType=spo2&queryDate=2025-07-01&userId=1898914204455915521&pageNo=1&pageSize=100
|
||||||
|
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-watch/watchH5Api/historicalWarn",Http] params:parmDic];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//应急就医
|
||||||
|
- (void)getSOSDoctorRecordList:(NSMutableDictionary *)parmDic {
|
||||||
|
|
||||||
|
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/initUserOrderPage",Http] params:parmDic];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)getSOSDoctorDetailInfo:(NSMutableDictionary *)parmDic {
|
||||||
|
|
||||||
|
//GET https://cqyt.test.yg.icdat.cn/health-emergency/api/emergency/order/orderThrough?id=1744265549623332865 HTTP/1.1
|
||||||
|
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/getOrderById",Http] params:parmDic];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//应急小结
|
||||||
|
- (void)getSOSSmallSumData:(NSMutableDictionary *)parmDic {
|
||||||
|
//
|
||||||
|
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/orderThrough",Http] params:parmDic];
|
||||||
|
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// SDGETHealthTokenManager.h
|
// SDGETHealthTokenManager.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2024/1/4.
|
// Created by 仁康信息 on 2024/1/4.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// SDGETHealthTokenManager.m
|
// SDGETHealthTokenManager.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2024/1/4.
|
// Created by 仁康信息 on 2024/1/4.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ESCTUIManager.h
|
// ESCTUIManager.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/2/16.
|
// Created by 仁康信息 on 2023/2/16.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ESCTUIManager.m
|
// ESCTUIManager.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/2/16.
|
// Created by 仁康信息 on 2023/2/16.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#import "AppDelegate+AppService.h"
|
#import "AppDelegate+AppService.h"
|
||||||
#import "HQBaseTabBarController.h"
|
#import "HQBaseTabBarController.h"
|
||||||
#import "HQLoginViewController.h"
|
#import "XJLoginViewController.h"
|
||||||
#import <IQKeyboardManager/IQKeyboardManager.h>
|
#import <IQKeyboardManager/IQKeyboardManager.h>
|
||||||
#import <AMapFoundationKit/AMapFoundationKit.h>
|
#import <AMapFoundationKit/AMapFoundationKit.h>
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
|
|
||||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||||
self.window.backgroundColor = KWhiteColor;
|
self.window.backgroundColor = KWhiteColor;
|
||||||
HQLoginViewController * loginvc = [[HQLoginViewController alloc] init];
|
XJLoginViewController * loginvc = [[XJLoginViewController alloc] init];
|
||||||
HQBaseNavigationController * nav = [[HQBaseNavigationController alloc] initWithRootViewController:loginvc];
|
HQBaseNavigationController * nav = [[HQBaseNavigationController alloc] initWithRootViewController:loginvc];
|
||||||
self.window.rootViewController = nav;
|
self.window.rootViewController = nav;
|
||||||
[self.window makeKeyAndVisible];
|
[self.window makeKeyAndVisible];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// DownPDFFileVC.h
|
// DownPDFFileVC.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/12/1.
|
// Created by 仁康信息 on 2023/12/1.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// DownPDFFileVC.m
|
// DownPDFFileVC.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/12/1.
|
// Created by 仁康信息 on 2023/12/1.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -7,13 +7,12 @@
|
|||||||
|
|
||||||
#import "HQBaseTabBarController.h"
|
#import "HQBaseTabBarController.h"
|
||||||
#import "HQTabBar.h"
|
#import "HQTabBar.h"
|
||||||
#import "MyCenterViewController.h"
|
#import "XJMyCenterViewController.h"
|
||||||
#import "ChatListViewController.h"
|
#import "ChatListViewController.h"
|
||||||
//主控制器
|
//主控制器
|
||||||
#import "QuestionViewController.h"
|
#import "QuestionViewController.h"
|
||||||
#import "MyCenterViewController.h"
|
#import "XJSosCenterViewController.h"
|
||||||
#import "SosCenterViewController.h"
|
#import "MonitoringWarchViewController.h"
|
||||||
#import "HeartBadViewController.h"
|
|
||||||
|
|
||||||
//干预二期
|
//干预二期
|
||||||
|
|
||||||
@@ -78,14 +77,14 @@
|
|||||||
[self setupChildViewController:questionVC title:@"咨询" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
[self setupChildViewController:questionVC title:@"咨询" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
||||||
|
|
||||||
|
|
||||||
SosCenterViewController * sosVC = [[SosCenterViewController alloc]init];
|
XJSosCenterViewController * sosVC = [[XJSosCenterViewController alloc]init];
|
||||||
[self setupChildViewController:sosVC title:@"就医" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
[self setupChildViewController:sosVC title:@"就医" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
||||||
|
|
||||||
HeartBadViewController * jianceVC = [[HeartBadViewController alloc]init];
|
MonitoringWarchViewController * jianceVC = [[MonitoringWarchViewController alloc]init];
|
||||||
[self setupChildViewController:jianceVC title:@"监测" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
[self setupChildViewController:jianceVC title:@"监测" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
||||||
|
|
||||||
|
|
||||||
MyCenterViewController * centerVC = [[MyCenterViewController alloc] init];
|
XJMyCenterViewController * centerVC = [[XJMyCenterViewController alloc] init];
|
||||||
[self setupChildViewController:centerVC title:@"我的" imageName:@"mine_normal" seleceImageName:@"mine_selected"];
|
[self setupChildViewController:centerVC title:@"我的" imageName:@"mine_normal" seleceImageName:@"mine_selected"];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "HQBaseViewController.h"
|
#import "HQBaseViewController.h"
|
||||||
#import "HQLoginViewController.h"
|
#import "XJLoginViewController.h"
|
||||||
|
|
||||||
@interface HQBaseViewController ()<MBProgressHUDDelegate>
|
@interface HQBaseViewController ()<MBProgressHUDDelegate>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemEvaluateModel.h
|
// CustomSystemEvaluateModel.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/19.
|
// Created by Apple on 2024/6/19.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemEvaluateModel.m
|
// CustomSystemEvaluateModel.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/19.
|
// Created by Apple on 2024/6/19.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIHistoryModel.h
|
// CustomTUIHistoryModel.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/21.
|
// Created by Apple on 2024/6/21.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIHistoryModel.m
|
// CustomTUIHistoryModel.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/21.
|
// Created by Apple on 2024/6/21.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTextModel.h
|
// CustomTextModel.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/19.
|
// Created by Apple on 2024/6/19.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTextModel.m
|
// CustomTextModel.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/19.
|
// Created by Apple on 2024/6/19.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIModel.h
|
// CustomTUIModel.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/17.
|
// Created by Apple on 2024/6/17.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIModel.m
|
// CustomTUIModel.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/17.
|
// Created by Apple on 2024/6/17.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIBaseMessageController.h
|
// CustomTUIBaseMessageController.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/12.
|
// Created by Apple on 2024/6/12.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIBaseMessageController.m
|
// CustomTUIBaseMessageController.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/12.
|
// Created by Apple on 2024/6/12.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIHistoryTable.h
|
// CustomTUIHistoryTable.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomTUIHistoryTable.m
|
// CustomTUIHistoryTable.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomAudioCell.h
|
// CustomAudioCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomAudioCell.m
|
// CustomAudioCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomDoctorIDTableViewCell.h
|
// CustomDoctorIDTableViewCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/7/5.
|
// Created by Apple on 2024/7/5.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomDoctorIDTableViewCell.m
|
// CustomDoctorIDTableViewCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/7/5.
|
// Created by Apple on 2024/7/5.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomHealthFileVideoCell.h
|
// CustomHealthFileVideoCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomHealthFileVideoCell.m
|
// CustomHealthFileVideoCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomHealthReportVideoCell.h
|
// CustomHealthReportVideoCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomHealthReportVideoCell.m
|
// CustomHealthReportVideoCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomMapMessageCell.h
|
// CustomMapMessageCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/12.
|
// Created by Apple on 2024/6/12.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomMapMessageCell.m
|
// CustomMapMessageCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/12.
|
// Created by Apple on 2024/6/12.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomReviceTableViewCell.h
|
// CustomReviceTableViewCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/7/5.
|
// Created by Apple on 2024/7/5.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomReviceTableViewCell.m
|
// CustomReviceTableViewCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/7/5.
|
// Created by Apple on 2024/7/5.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemImageCell.h
|
// CustomSystemImageCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemImageCell.m
|
// CustomSystemImageCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemTextCell.h
|
// CustomSystemTextCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemTextCell.m
|
// CustomSystemTextCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemVideoCell.h
|
// CustomSystemVideoCell.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomSystemVideoCell.m
|
// CustomSystemVideoCell.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/14.
|
// Created by Apple on 2024/6/14.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomMapMessageCellData.h
|
// CustomMapMessageCellData.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/12.
|
// Created by Apple on 2024/6/12.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// CustomMapMessageCellData.m
|
// CustomMapMessageCellData.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by Apple on 2024/6/12.
|
// Created by Apple on 2024/6/12.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// IMUserInfoModel.h
|
// IMUserInfoModel.h
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/6/29.
|
// Created by 仁康信息 on 2023/6/29.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// IMUserInfoModel.m
|
// IMUserInfoModel.m
|
||||||
// EscortProject
|
// XinjiangProject
|
||||||
//
|
//
|
||||||
// Created by 仁康信息 on 2023/6/29.
|
// Created by 仁康信息 on 2023/6/29.
|
||||||
//
|
//
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// XJLoginFoundPasswordViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/5/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJLoginFoundPasswordViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+211
@@ -0,0 +1,211 @@
|
|||||||
|
//
|
||||||
|
// XJLoginFoundPasswordViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/5/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJLoginFoundPasswordViewController.h"
|
||||||
|
#import "XJLoginSetPasswordViewController.h"
|
||||||
|
#import "LVKeyboard.h"
|
||||||
|
#import "MQTextField.h"
|
||||||
|
@interface XJLoginFoundPasswordViewController ()<LVKeyboardDelegate,UITextFieldDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong)UITextField * nameTextFild;
|
||||||
|
@property (nonatomic, strong)UITextField * phoneTextFild;
|
||||||
|
@property (nonatomic, strong)MQTextField * codeTextFild;
|
||||||
|
@property (nonatomic, strong)UIButton * codeButton;
|
||||||
|
@property (nonatomic, strong) LVKeyboard *keyboard;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJLoginFoundPasswordViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
self.isHidenNaviBar = false;
|
||||||
|
self.navigationItem.title = @"修改密码";
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.view.backgroundColor = UIColorHex(#E0E0E0);
|
||||||
|
[self createUI];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
|
||||||
|
//初始化键盘
|
||||||
|
LVKeyboard *keyboard = [[LVKeyboard alloc] init];
|
||||||
|
keyboard.delegate = self;
|
||||||
|
self.keyboard = keyboard;
|
||||||
|
|
||||||
|
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(151))];
|
||||||
|
topView.backgroundColor = KWhiteColor;
|
||||||
|
[self.view addSubview:topView];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UIView * nameLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))];
|
||||||
|
UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 80, kRealValue(50))];
|
||||||
|
nameLabel.text = @"用户姓名";
|
||||||
|
nameLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
nameLabel.font = SYSTEMFONT(13);
|
||||||
|
nameLabel.textColor = UIColorHex(#666666);
|
||||||
|
[nameLeft addSubview:nameLabel];
|
||||||
|
|
||||||
|
|
||||||
|
self.nameTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(50))];
|
||||||
|
self.nameTextFild.placeholder = @"请输入用户姓名";
|
||||||
|
self.nameTextFild.returnKeyType = UIReturnKeyDone;
|
||||||
|
self.nameTextFild.font = [UIFont systemFontOfSize:14];
|
||||||
|
self.nameTextFild.backgroundColor = KWhiteColor;
|
||||||
|
self.nameTextFild.leftView = nameLeft;
|
||||||
|
self.nameTextFild.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
self.nameTextFild.font = SYSTEMFONT(14);
|
||||||
|
[topView addSubview:self.nameTextFild];
|
||||||
|
|
||||||
|
UIView * linv = [[UIView alloc] initWithFrame:CGRectMake(16, self.nameTextFild.bottom, kScreenWidth - 32, 1)];
|
||||||
|
linv.backgroundColor = UIColorHex(#E0E0E0);
|
||||||
|
[topView addSubview:linv];
|
||||||
|
|
||||||
|
UIView * codeLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))];
|
||||||
|
UILabel * codeLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 90, kRealValue(50))];
|
||||||
|
codeLabel.text = @"身份证号";
|
||||||
|
codeLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
codeLabel.font = SYSTEMFONT(13);
|
||||||
|
codeLabel.textColor = UIColorHex(#666666);
|
||||||
|
|
||||||
|
[codeLeft addSubview:codeLabel];
|
||||||
|
|
||||||
|
self.codeTextFild = [[MQTextField alloc] initWithFrame:CGRectMake(0, self.nameTextFild.bottom+1, kScreenWidth, kRealValue(50))];
|
||||||
|
self.codeTextFild.placeholder = @"请输入用户身份证号";
|
||||||
|
self.codeTextFild.font = [UIFont systemFontOfSize:14];
|
||||||
|
self.codeTextFild.backgroundColor = KWhiteColor;
|
||||||
|
self.codeTextFild.inputView = self.keyboard;
|
||||||
|
self.codeTextFild.delegate = self;
|
||||||
|
self.codeTextFild.leftView = codeLeft;
|
||||||
|
self.codeTextFild.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
[topView addSubview:self.codeTextFild];
|
||||||
|
|
||||||
|
UIView * linvCard = [[UIView alloc] initWithFrame:CGRectMake(16, self.codeTextFild.bottom, kScreenWidth - 32, 1)];
|
||||||
|
linvCard.backgroundColor = UIColorHex(#E0E0E0);
|
||||||
|
[topView addSubview:linvCard];
|
||||||
|
|
||||||
|
|
||||||
|
UIView * phoneLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))];
|
||||||
|
UILabel * phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 90, kRealValue(50))];
|
||||||
|
phoneLabel.text = @"手机号";
|
||||||
|
phoneLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
phoneLabel.font = SYSTEMFONT(13);
|
||||||
|
phoneLabel.textColor = UIColorHex(#666666);
|
||||||
|
[phoneLeft addSubview:phoneLabel];
|
||||||
|
|
||||||
|
self.phoneTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, self.codeTextFild.bottom+1, kScreenWidth, kRealValue(50))];
|
||||||
|
self.phoneTextFild.placeholder = @"请输入用户手机号";
|
||||||
|
self.phoneTextFild.font = [UIFont systemFontOfSize:14];
|
||||||
|
self.phoneTextFild.backgroundColor = KWhiteColor;
|
||||||
|
self.phoneTextFild.leftView = phoneLeft;
|
||||||
|
self.phoneTextFild.keyboardType = UIKeyboardTypeNumberPad;
|
||||||
|
self.phoneTextFild.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
[topView addSubview:self.phoneTextFild];
|
||||||
|
|
||||||
|
UIView * phoneLinv = [[UIView alloc] initWithFrame:CGRectMake(16, self.phoneTextFild.bottom, kScreenWidth - 32, 1)];
|
||||||
|
phoneLinv.backgroundColor = UIColorHex(#E0E0E0);
|
||||||
|
[topView addSubview:phoneLinv];
|
||||||
|
|
||||||
|
|
||||||
|
UIButton * loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(48,self.phoneTextFild.bottom+58, kScreenWidth-96, 48)];
|
||||||
|
[loginBtn setTitle:@"确定" forState:UIControlStateNormal ];
|
||||||
|
loginBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
|
||||||
|
[loginBtn setBackgroundColor:UIColorHex(#21BEBD)];
|
||||||
|
loginBtn.layer.cornerRadius = 20;
|
||||||
|
loginBtn.layer.masksToBounds = true;
|
||||||
|
[loginBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||||
|
[loginBtn addTarget:self action:@selector(sureFoundAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.view addSubview:loginBtn];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 确定点击
|
||||||
|
- (void)sureFoundAction {
|
||||||
|
|
||||||
|
|
||||||
|
if (ValidStr(self.nameTextFild.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入用户姓名"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ValidStr(self.codeTextFild.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入用户身份证号"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ValidStr(self.phoneTextFild.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入用户手机号"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[self showMBProgressHUDWithString:@"信息验证中,请稍候..." autoHidden:false];
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
[parmDic setObject:self.nameTextFild.text forKey:@"realname"];
|
||||||
|
[parmDic setObject:self.codeTextFild.text forKey:@"idCard"];
|
||||||
|
[parmDic setObject:self.phoneTextFild.text forKey:@"phone"];
|
||||||
|
|
||||||
|
JKCQAPI * chageApi = [[JKCQAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[chageApi postSetUserPassword:parmDic];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark -网络请求处理
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
if ([tag isEqualToString:@"CHANGEAPI"]) {
|
||||||
|
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
NSString * result = response;
|
||||||
|
|
||||||
|
XJLoginSetPasswordViewController * password = [[XJLoginSetPasswordViewController alloc] init];
|
||||||
|
password.result = result;
|
||||||
|
[self.navigationController pushViewController:password animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
|
||||||
|
|
||||||
|
if(textField == self.codeTextFild) {
|
||||||
|
|
||||||
|
self.codeTextFild.inputView = self.keyboard;
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)keyboard:(LVKeyboard *)keyboard didClickDeleteButton:(UIButton *)deleteBtn string:(NSMutableString *)string {
|
||||||
|
self.codeTextFild.text = string;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)keyboard:(LVKeyboard *)keyboard didClickTextButton:(UIButton *)textBtn string:(NSMutableString *)string {
|
||||||
|
self.codeTextFild.text = string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||||
|
[self.codeTextFild resignFirstResponder];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#pragma mark - Navigation
|
||||||
|
|
||||||
|
// 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
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XJLoginSetPasswordViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/5/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJLoginSetPasswordViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * result;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+229
@@ -0,0 +1,229 @@
|
|||||||
|
//
|
||||||
|
// XJLoginSetPasswordViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/5/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJLoginSetPasswordViewController.h"
|
||||||
|
#import "RSAObjC.h"
|
||||||
|
#import "XJLoginViewController.h"
|
||||||
|
|
||||||
|
@interface XJLoginSetPasswordViewController ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UITextField * phoneTextFild;
|
||||||
|
@property (nonatomic, strong) UITextField * codeTextFild;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIButton * toggleButton;
|
||||||
|
@property (nonatomic, strong) UIButton * suretoggleButton;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJLoginSetPasswordViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.isHidenNaviBar = false;
|
||||||
|
self.navigationItem.title = @"设置密码";
|
||||||
|
self.view.backgroundColor = UIColorHex(#EFEFEF);
|
||||||
|
[self createUI];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(100))];
|
||||||
|
topView.backgroundColor = KWhiteColor;
|
||||||
|
[self.view addSubview:topView];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UIView * phoneLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))];
|
||||||
|
UILabel * phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 80, kRealValue(50))];
|
||||||
|
phoneLabel.text = @"新密码";
|
||||||
|
phoneLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
phoneLabel.font = SYSTEMFONT(13);
|
||||||
|
phoneLabel.textColor = UIColorHex(#666666);
|
||||||
|
[phoneLeft addSubview:phoneLabel];
|
||||||
|
|
||||||
|
|
||||||
|
self.phoneTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(50))];
|
||||||
|
self.phoneTextFild.placeholder = @"请输入新密码";
|
||||||
|
self.phoneTextFild.returnKeyType = UIReturnKeyDone;
|
||||||
|
self.phoneTextFild.font = [UIFont systemFontOfSize:14];
|
||||||
|
self.phoneTextFild.backgroundColor = KWhiteColor;
|
||||||
|
self.phoneTextFild.leftView = phoneLeft;
|
||||||
|
self.phoneTextFild.secureTextEntry = YES;
|
||||||
|
self.phoneTextFild.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
self.phoneTextFild.font = SYSTEMFONT(14);
|
||||||
|
[self.view addSubview:self.phoneTextFild];
|
||||||
|
|
||||||
|
|
||||||
|
self.toggleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
[self.toggleButton setImage:[UIImage imageNamed:@"eye"] forState:UIControlStateNormal];
|
||||||
|
[self.toggleButton setImage:[UIImage imageNamed:@"eye.slash"] forState:UIControlStateSelected];
|
||||||
|
self.toggleButton.frame = CGRectMake(0, 5, 30,30);
|
||||||
|
[self.toggleButton addTarget:self action:@selector(togglePasswordVisibility) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
// 创建一个容器视图来包含按钮,并增加边距
|
||||||
|
UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||||
|
[rightView addSubview:self.toggleButton];
|
||||||
|
|
||||||
|
// 调整按钮在容器视图中的位置,增加边距
|
||||||
|
self.toggleButton.centerX = rightView.centerX;
|
||||||
|
|
||||||
|
self.toggleButton.center = CGPointMake(rightView.frame.size.width - self.toggleButton.frame.size.width / 2, rightView.frame.size.height / 2);
|
||||||
|
self.phoneTextFild.rightView = rightView;
|
||||||
|
self.phoneTextFild.rightViewMode = UITextFieldViewModeAlways;
|
||||||
|
|
||||||
|
UIView * linv = [[UIView alloc] initWithFrame:CGRectMake(16, self.phoneTextFild.bottom, kScreenWidth - 32, 1)];
|
||||||
|
linv.backgroundColor = UIColorHex(#E0E0E0);
|
||||||
|
[self.view addSubview:linv];
|
||||||
|
|
||||||
|
UIView * codeLeft = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 112, kRealValue(50))];
|
||||||
|
UILabel * codeLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, 90, kRealValue(50))];
|
||||||
|
codeLabel.text = @"确认密码";
|
||||||
|
codeLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
codeLabel.font = SYSTEMFONT(13);
|
||||||
|
codeLabel.textColor = UIColorHex(#666666);
|
||||||
|
[codeLeft addSubview:codeLabel];
|
||||||
|
|
||||||
|
self.codeTextFild = [[UITextField alloc] initWithFrame:CGRectMake(0, self.phoneTextFild.bottom+1, kScreenWidth, kRealValue(50))];
|
||||||
|
self.codeTextFild.placeholder = @"请输入新密码";
|
||||||
|
self.codeTextFild.font = [UIFont systemFontOfSize:14];
|
||||||
|
self.codeTextFild.backgroundColor = KWhiteColor;
|
||||||
|
self.codeTextFild.leftView = codeLeft;
|
||||||
|
self.codeTextFild.secureTextEntry = YES;
|
||||||
|
self.codeTextFild.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
[self.view addSubview:self.codeTextFild];
|
||||||
|
|
||||||
|
|
||||||
|
self.suretoggleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
[self.suretoggleButton setImage:[UIImage imageNamed:@"eye"] forState:UIControlStateNormal];
|
||||||
|
[self.suretoggleButton setImage:[UIImage imageNamed:@"eye.slash"] forState:UIControlStateSelected];
|
||||||
|
self.suretoggleButton.frame = CGRectMake(0, 5, 30,30);
|
||||||
|
[self.suretoggleButton addTarget:self action:@selector(sureTogglePasswordVisibility) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
// 创建一个容器视图来包含按钮,并增加边距
|
||||||
|
UIView *coderightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||||
|
[coderightView addSubview:self.suretoggleButton];
|
||||||
|
|
||||||
|
// 调整按钮在容器视图中的位置,增加边距
|
||||||
|
self.suretoggleButton.centerX = coderightView.centerX;
|
||||||
|
self.codeTextFild.rightView = coderightView;
|
||||||
|
self.codeTextFild.rightViewMode = UITextFieldViewModeAlways;
|
||||||
|
|
||||||
|
UILabel * passwordLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), topView.bottom + kRealValue(8) , kScreenWidth - kRealValue(30), 42)];
|
||||||
|
passwordLabel.textColor = UIColorHex(#666666);
|
||||||
|
passwordLabel.text = @"温馨提示:密码需要为12-32位(包含数字、大写、小写字母、特殊字符)";
|
||||||
|
passwordLabel.numberOfLines = 2;
|
||||||
|
passwordLabel.font =MEDIUMFONT(14);
|
||||||
|
[passwordLabel sizeToFit];
|
||||||
|
// NSMutableAttributedString * attString = [HQCommonUtils firstString:@"请为您的账号" firstColor:UIColorHex(#666666) firstSize:14 secondString:@"zhangsan" secondColor:UIColorHex(#333333) secondSize:14 thirdString:@"设置一个新密码" thirdColor:UIColorHex(#666666) thirdSize:14];
|
||||||
|
// passwordLabel.attributedText = attString ;
|
||||||
|
// passwordLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
|
// [topView addSubview:passwordLabel];
|
||||||
|
[self.view addSubview:passwordLabel];
|
||||||
|
|
||||||
|
UIButton * loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(48,passwordLabel.bottom+58, kScreenWidth-96, 48)];
|
||||||
|
[loginBtn setTitle:@"确定" forState:UIControlStateNormal ];
|
||||||
|
loginBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
|
||||||
|
[loginBtn setBackgroundColor:UIColorHex(#21BEBD)];
|
||||||
|
loginBtn.layer.cornerRadius = 20;
|
||||||
|
loginBtn.layer.masksToBounds = true;
|
||||||
|
[loginBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||||
|
[loginBtn addTarget:self action:@selector(sureFoundAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.view addSubview:loginBtn];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark:重新设置密码
|
||||||
|
- (void)sureFoundAction {
|
||||||
|
|
||||||
|
[self.phoneTextFild resignFirstResponder];
|
||||||
|
[self.codeTextFild resignFirstResponder];
|
||||||
|
|
||||||
|
if (ValidStr(self.phoneTextFild.text) || ValidStr(self.codeTextFild.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入新密码"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isValidPassword(self.phoneTextFild.text)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
[EasyTextView showErrorText:@"请按照密码规则,请重新输入"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( ![self.phoneTextFild.text isEqualToString:self.codeTextFild.text]) {
|
||||||
|
[EasyTextView showErrorText:@"两次输入密码不一致,请重新输入"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString * publish_key = @" MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB";
|
||||||
|
|
||||||
|
// 原始数据,要加密的字符串
|
||||||
|
NSString *originalString = self.phoneTextFild.text;
|
||||||
|
|
||||||
|
// RSA 加密,使用字符串格式的公钥私钥加密解密, RSAPublickKey 为公钥字符串(NSString 格式)
|
||||||
|
NSString *encryptStr = [RSAObjC encrypt:originalString PublicKey:publish_key];
|
||||||
|
|
||||||
|
[self showMBProgressHUDWithString:@"密码重置中,请稍候..." autoHidden:false];
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
[parmDic setObject:encryptStr forKey:@"newPassword"];
|
||||||
|
[parmDic setObject:encryptStr forKey:@"newPasswordConfirm"];
|
||||||
|
[parmDic setObject:self.result forKey:@"resetCode"];
|
||||||
|
|
||||||
|
JKCQAPI * chageApi = [[JKCQAPI alloc] init:self tag:@"CHANGEAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[chageApi postResetUserNewPassword:parmDic];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL isValidPassword(NSString *password) {
|
||||||
|
// 定义正则表达式
|
||||||
|
NSString *pattern = @"^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*(),.?\":{}|<>]).{12,32}$";
|
||||||
|
|
||||||
|
// 创建NSPredicate对象
|
||||||
|
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", pattern];
|
||||||
|
|
||||||
|
// 使用NSPredicate对象进行判断
|
||||||
|
return [predicate evaluateWithObject:password];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark -网络请求处理
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
if ([tag isEqualToString:@"CHANGEAPI"]) {
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||||
|
[self showMBProgressHUDOnlyWithString:response];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)togglePasswordVisibility {
|
||||||
|
self.phoneTextFild.secureTextEntry = !self.phoneTextFild.secureTextEntry;
|
||||||
|
self.toggleButton.selected = !self.toggleButton.selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sureTogglePasswordVisibility {
|
||||||
|
self.codeTextFild.secureTextEntry = !self.codeTextFild.secureTextEntry;
|
||||||
|
self.suretoggleButton.selected = !self.suretoggleButton.selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// XJLoginViewController.h
|
||||||
|
// healthQuestion
|
||||||
|
//
|
||||||
|
// Created by xulei on 2022/8/16.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJLoginViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,576 @@
|
|||||||
|
//
|
||||||
|
// HQLoginViewController.m
|
||||||
|
// healthQuestion
|
||||||
|
//
|
||||||
|
// Created by xulei on 2022/8/16.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJLoginViewController.h"
|
||||||
|
#import "TUIC2CChatViewController.h"
|
||||||
|
#import "XJLoginFoundPasswordViewController.h"
|
||||||
|
#import "IMUserInfoModel.h"
|
||||||
|
#import "RSAObjC.h"
|
||||||
|
#import "XJMineCenterUserModel.h"
|
||||||
|
#import "ADJumpViewController.h"
|
||||||
|
#import "XJRegisterViewController.h"
|
||||||
|
#import "LVKeyboard.h"
|
||||||
|
#import "MQTextField.h"
|
||||||
|
@interface XJLoginViewController ()<V2TIMSDKListener,V2TIMSDKListener,LVKeyboardDelegate,UITextFieldDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UITextField * userNameField;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) MQTextField * passwordField;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIButton * logoBtn;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIView * loginView;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIButton * privacyPolicyBtn;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIButton * agreenBtn;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) IMUserInfoModel * model ;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIButton * regisBtn;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) LVKeyboard *keyboard;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIButton *toggleButton;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJLoginViewController
|
||||||
|
|
||||||
|
- (NSMutableArray *)dataArray {
|
||||||
|
|
||||||
|
if (!_dataArray) {
|
||||||
|
_dataArray = [[NSMutableArray alloc] init];
|
||||||
|
}
|
||||||
|
return _dataArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.isHidenNaviBar = YES;
|
||||||
|
self.view.backgroundColor = KWhiteColor;
|
||||||
|
[self createUI];
|
||||||
|
[self createData];
|
||||||
|
// [self ishiderRegisData];
|
||||||
|
//初始化键盘
|
||||||
|
LVKeyboard *keyboard = [[LVKeyboard alloc] init];
|
||||||
|
keyboard.delegate = self;
|
||||||
|
self.keyboard = keyboard;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
UIImageView * topBackImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(243))];
|
||||||
|
topBackImg.image = IMAGE_NAMED(@"loginTopBimg");
|
||||||
|
topBackImg.userInteractionEnabled = true;
|
||||||
|
[self.view addSubview:topBackImg];
|
||||||
|
|
||||||
|
UIImageView * cenetrImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, kRealValue(70), kRealValue(68), kRealValue(68))];
|
||||||
|
cenetrImg.centerX = self.view.centerX;
|
||||||
|
cenetrImg.image = IMAGE_NAMED(@"login_icon");
|
||||||
|
cenetrImg.userInteractionEnabled = true;
|
||||||
|
[self.view addSubview:cenetrImg];
|
||||||
|
|
||||||
|
UIButton * homeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
homeBtn.frame = CGRectMake(kRealValue(15), kRealValue(40),kRealValue(100), 41);
|
||||||
|
[homeBtn setTitle:@"< 去首页" forState:UIControlStateNormal];
|
||||||
|
[homeBtn.titleLabel setFont:BOLDSYSTEMFONT(14)];
|
||||||
|
[homeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
[homeBtn addTarget:self action:@selector(backHomeAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[topBackImg addSubview:homeBtn];
|
||||||
|
|
||||||
|
UIImageView *titleImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, cenetrImg.bottom + kRealValue(20), kRealValue(109), kRealValue(24))];
|
||||||
|
titleImg.centerX = self.view.centerX;
|
||||||
|
titleImg.image = IMAGE_NAMED(@"loginTitle_Img");
|
||||||
|
[self.view addSubview:titleImg];
|
||||||
|
//
|
||||||
|
UIView *loginView = [[UIView alloc]init];
|
||||||
|
loginView.frame = CGRectMake(0, titleImg.bottom + kRealValue(41), kScreenWidth, kScreenHeight - titleImg.bottom - kRealValue(41));
|
||||||
|
[self.view addSubview:loginView];
|
||||||
|
loginView.backgroundColor = KWhiteColor;
|
||||||
|
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:loginView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(20, 20)];
|
||||||
|
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
|
||||||
|
maskLayer.path = maskPath.CGPath;
|
||||||
|
loginView.layer.mask = maskLayer;
|
||||||
|
self.loginView = loginView;
|
||||||
|
//
|
||||||
|
UITextField *accountField = [[UITextField alloc]init];
|
||||||
|
accountField.frame = CGRectMake(kRealValue(35), kRealValue(36), loginView.width - kRealValue(70), 40);
|
||||||
|
accountField.placeholder = @"请输入用户名";
|
||||||
|
accountField.font = BOLDSYSTEMFONT(14);
|
||||||
|
accountField.textColor = CFontColor1;
|
||||||
|
self.userNameField = accountField;
|
||||||
|
self.userNameField.backgroundColor = UIColorHex(#EEEEEE);
|
||||||
|
self.userNameField.layer.cornerRadius = 20;
|
||||||
|
self.userNameField.layer.masksToBounds = true;
|
||||||
|
UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)];
|
||||||
|
self.userNameField.leftView = leftview;
|
||||||
|
self.userNameField.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
[loginView addSubview:accountField ];
|
||||||
|
//
|
||||||
|
//
|
||||||
|
MQTextField * passwordField = [[MQTextField alloc]init];
|
||||||
|
passwordField.frame = CGRectMake(kRealValue(35), accountField.bottom + kRealValue(19), accountField.width, accountField.height);
|
||||||
|
passwordField.placeholder = @"请输入密码";
|
||||||
|
passwordField.font = BOLDSYSTEMFONT(14);
|
||||||
|
passwordField.textColor = CFontColor1;
|
||||||
|
passwordField.backgroundColor = UIColorHex(#EEEEEE);
|
||||||
|
passwordField.secureTextEntry = YES;
|
||||||
|
self.passwordField = passwordField;
|
||||||
|
self.passwordField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)];
|
||||||
|
self.passwordField.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
self.passwordField.layer.cornerRadius = 20;
|
||||||
|
self.passwordField.layer.masksToBounds = true;
|
||||||
|
self.passwordField.delegate = self;
|
||||||
|
self.passwordField.inputView = self.keyboard;
|
||||||
|
|
||||||
|
self.toggleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
[self.toggleButton setImage:[UIImage imageNamed:@"eye"] forState:UIControlStateNormal];
|
||||||
|
[self.toggleButton setImage:[UIImage imageNamed:@"eye.slash"] forState:UIControlStateSelected];
|
||||||
|
self.toggleButton.frame = CGRectMake(0, 5, 30,30);
|
||||||
|
[self.toggleButton addTarget:self action:@selector(togglePasswordVisibility) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
// 创建一个容器视图来包含按钮,并增加边距
|
||||||
|
UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||||
|
[rightView addSubview:self.toggleButton];
|
||||||
|
|
||||||
|
// 调整按钮在容器视图中的位置,增加边距
|
||||||
|
self.toggleButton.center = CGPointMake(rightView.frame.size.width - self.toggleButton.frame.size.width / 2, rightView.frame.size.height / 2);
|
||||||
|
self.passwordField.rightView = rightView;
|
||||||
|
self.passwordField.rightViewMode = UITextFieldViewModeAlways;
|
||||||
|
|
||||||
|
[loginView addSubview:passwordField];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UIButton *loginBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
loginBtn.frame = CGRectMake(kRealValue(35), self.passwordField.bottom + kRealValue(19), WIDTH - kRealValue(70), 41);
|
||||||
|
[loginBtn setTitle:@"登录" forState:UIControlStateNormal];
|
||||||
|
[loginBtn.titleLabel setFont:BOLDSYSTEMFONT(14)];
|
||||||
|
[loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
[loginBtn setBackgroundImage:[UIImage imageNamed:@"loginBtn_img"] forState:UIControlStateNormal];
|
||||||
|
[loginBtn addTarget:self action:@selector(toClickFootBtn:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[loginView addSubview:loginBtn];
|
||||||
|
|
||||||
|
UIButton * foundPasswordBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
foundPasswordBtn.frame = CGRectMake(kRealValue(35), loginBtn.bottom + kRealValue(10), WIDTH - kRealValue(70), 20);
|
||||||
|
[foundPasswordBtn setTitle:@"找回密码" forState:UIControlStateNormal];
|
||||||
|
foundPasswordBtn.titleLabel.font = MEDIUMFONT(14);
|
||||||
|
[foundPasswordBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal];
|
||||||
|
[foundPasswordBtn addTarget:self action:@selector(foundUserPasswordAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[loginView addSubview:foundPasswordBtn];
|
||||||
|
|
||||||
|
|
||||||
|
UIButton * regisBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
regisBtn.frame = CGRectMake(kRealValue(35), foundPasswordBtn.bottom + kRealValue(20), kScreenWidth - kRealValue(70), 20);
|
||||||
|
[regisBtn setTitle:@"注册" forState:UIControlStateNormal];
|
||||||
|
self.regisBtn = regisBtn;
|
||||||
|
regisBtn.titleLabel.font = MEDIUMFONT(14);
|
||||||
|
self.regisBtn.hidden = true;
|
||||||
|
[regisBtn setTitleColor:UIColorHex(#999999) forState:UIControlStateNormal];
|
||||||
|
[regisBtn addTarget:self action:@selector(regisAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[loginView addSubview:regisBtn];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
|
||||||
|
NSUserDefaults * agreeDefaul = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
NSString * agree = [agreeDefaul objectForKey:@"LOGINAgree"];
|
||||||
|
|
||||||
|
self.agreenBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
self.agreenBtn.frame = CGRectMake(kRealValue(28), self.view.bottom - kRealValue(45) - SafetyAreaHeight, kRealValue(20), kRealValue(20));
|
||||||
|
[self.agreenBtn addTarget:self action:@selector(agreeProtocolAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.agreenBtn setImage:IMAGE_NAMED(@"login_nomalProtocol") forState:UIControlStateNormal];
|
||||||
|
[self.agreenBtn setImage:IMAGE_NAMED(@"login_selectProtocol") forState:UIControlStateSelected];
|
||||||
|
if ([agree intValue] == 1) {
|
||||||
|
self.agreenBtn.selected = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
self.agreenBtn.selected = false;
|
||||||
|
}
|
||||||
|
[self.view addSubview:self.agreenBtn];
|
||||||
|
|
||||||
|
|
||||||
|
//隐私
|
||||||
|
YYLabel * yslabel = [[YYLabel alloc] initWithFrame:CGRectMake(self.agreenBtn.right + kRealValue(5) ,self.agreenBtn.top , kScreenWidth - self.agreenBtn.right - kRealValue(47), 20)];
|
||||||
|
[self.view addSubview:yslabel];
|
||||||
|
yslabel.numberOfLines = 0;
|
||||||
|
|
||||||
|
NSString *string = @"已阅读并同意《用户协议》、《隐私政策》";
|
||||||
|
NSMutableAttributedString *attributed = [[NSMutableAttributedString alloc] initWithString:string];
|
||||||
|
[attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#3390FF) range:[string rangeOfString:@"《用户协议》"]];
|
||||||
|
[attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#3390FF) range:[string rangeOfString:@"《隐私政策》"]];
|
||||||
|
// [attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#3390FF) range:[string rangeOfString:@"《相关法律说明》"]];
|
||||||
|
|
||||||
|
YYTextHighlight * protocolHightlight = [[YYTextHighlight alloc] init];
|
||||||
|
protocolHightlight.userInfo = @{@"协议":@"《用户协议》"};
|
||||||
|
[protocolHightlight setColor:UIColorHex(#3390FF)];
|
||||||
|
[attributed setTextHighlight:protocolHightlight range:[string rangeOfString:@"《用户协议》"]];
|
||||||
|
|
||||||
|
YYTextHighlight * layHightlight = [[YYTextHighlight alloc] init];
|
||||||
|
layHightlight.userInfo = @{@"隐私":@"《隐私政策》"};
|
||||||
|
[layHightlight setColor:UIColorHex(#3390FF)];
|
||||||
|
[attributed setTextHighlight:layHightlight range:[string rangeOfString:@"《隐私政策》"]];
|
||||||
|
|
||||||
|
//
|
||||||
|
// YYTextHighlight * shuoHightlight = [[YYTextHighlight alloc] init];
|
||||||
|
// shuoHightlight.userInfo = @{@"说明":@"《相关法律说明》"};
|
||||||
|
// [shuoHightlight setColor:UIColorHex(#3390FF)];
|
||||||
|
// [attributed setTextHighlight:shuoHightlight range:[string rangeOfString:@"《相关法律说明》"]];
|
||||||
|
|
||||||
|
attributed.lineSpacing = 3;
|
||||||
|
attributed.paragraphSpacing = 5;
|
||||||
|
yslabel.attributedText = attributed;
|
||||||
|
|
||||||
|
yslabel.highlightTapAction = ^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||||
|
NSString *string = [text.string substringWithRange:range];
|
||||||
|
if ([string containsString:@"用户协议"]){
|
||||||
|
if (self.dataArray.count <= 0) {
|
||||||
|
[EasyTextView showErrorText:@"暂无用户协议"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (XJMineCenterUserModel * model in self.dataArray) {
|
||||||
|
|
||||||
|
if ([model.value integerValue] == 1) {
|
||||||
|
|
||||||
|
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
|
||||||
|
webVC.webTitle = @"用户协议";
|
||||||
|
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
|
||||||
|
[self.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if ([string containsString:@"隐私政策"]){
|
||||||
|
if (self.dataArray.count <= 0) {
|
||||||
|
[EasyTextView showErrorText:@"暂无隐私政策"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (XJMineCenterUserModel * model in self.dataArray) {
|
||||||
|
if ([model.value integerValue] == 2) {
|
||||||
|
|
||||||
|
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
|
||||||
|
webVC.webTitle = @"隐私政策";
|
||||||
|
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
|
||||||
|
[self.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ([string containsString:@"相关法律说明"]){
|
||||||
|
for (XJMineCenterUserModel * model in self.dataArray) {
|
||||||
|
if ([model.value integerValue] == 3) {
|
||||||
|
|
||||||
|
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
|
||||||
|
webVC.webTitle = @"相关法律说明";
|
||||||
|
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
|
||||||
|
[self.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)createData {
|
||||||
|
|
||||||
|
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[agreeAPI getUserAgreementPrivacy:nil];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark - ACTION
|
||||||
|
- (void)toClickFootBtn:(UIButton *)button{
|
||||||
|
|
||||||
|
if (self.agreenBtn.selected == false) {
|
||||||
|
[EasyTextView showErrorText:@"请选阅读并同意用户服务协议与隐私"];
|
||||||
|
return;;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (self.userNameField.text.length < 1) {
|
||||||
|
[EasyTextView showErrorText:@"请输入用户名"];
|
||||||
|
return;;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.passwordField.text.length < 12 || self.passwordField.text.length > 32) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"密码不安全,请先修改密码" preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
|
||||||
|
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||||
|
|
||||||
|
XJLoginFoundPasswordViewController * modifVC = [[XJLoginFoundPasswordViewController alloc] init];
|
||||||
|
[self.navigationController pushViewController:modifVC animated:YES];
|
||||||
|
|
||||||
|
}];
|
||||||
|
[alertController addAction:cancelAction];
|
||||||
|
[alertController addAction:sureAction];
|
||||||
|
|
||||||
|
[self presentViewController:alertController animated:YES completion:nil];
|
||||||
|
|
||||||
|
|
||||||
|
return;;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.passwordField.text.length < 1) {
|
||||||
|
[EasyTextView showErrorText:@"请输入密码"];
|
||||||
|
return;;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString * publish_key = @" MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmZfR/bA9X3vp86y1aEpvwzXJYKRRF1fLau2+05/ZtaITLpV8bhkmSf3neSy/Q9gAdvG75Fr73E+GWE+K5b0BpvIS1jDGo319+PpZR39SaZTKZ27XFXrosmJTZutN79t819HS1VseleunHAFgMVufE9U5jP6LGzl/wbkSy01GhzwIDAQAB";
|
||||||
|
|
||||||
|
// 原始数据,要加密的字符串
|
||||||
|
NSString *originalString = self.passwordField.text;
|
||||||
|
|
||||||
|
// RSA 加密,使用字符串格式的公钥私钥加密解密, RSAPublickKey 为公钥字符串(NSString 格式)
|
||||||
|
NSString *encryptStr = [RSAObjC encrypt:originalString PublicKey:publish_key];
|
||||||
|
|
||||||
|
[self showMBProgressHUDWithString:@"登录中" autoHidden:false];
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
|
[parmDic setObject:self.userNameField.text forKey:@"username"];
|
||||||
|
//新增
|
||||||
|
UIDevice *currentDevice = [UIDevice currentDevice];
|
||||||
|
NSString * phone = [currentDevice getCurrentDeviceModel];
|
||||||
|
// NSString * system = [NSString stringWithFormat:@"%.1f",CurrentSystemVersion] ;
|
||||||
|
if (!ValidStr(phone)) {
|
||||||
|
[parmDic setObject:phone forKey:@"deviceType"];
|
||||||
|
|
||||||
|
}
|
||||||
|
[parmDic setObject:@(CurrentSystemVersion) forKey:@"deviceSystem"];
|
||||||
|
|
||||||
|
[parmDic setObject:encryptStr forKey:@"password"];
|
||||||
|
|
||||||
|
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil];
|
||||||
|
[proctocolApi PostLogin:parmDic];
|
||||||
|
|
||||||
|
//
|
||||||
|
// NSString * userSig = @"";
|
||||||
|
// if ([self.userNameField.text isEqual:@"111"]) {
|
||||||
|
//
|
||||||
|
// userSig = @"eAEtzMsKgkAUBuB3OdtCzow2N3CTiZs01F4gcmpOkYgjUUTvnjhtv--ygeO*jXx3Pw0DdWBYgig1l1ytl2Sih51VSLHhUqgkqKcrGGhjXZZFvap2mTvnLneHbXOrG1k5XcT4Vk1Bo2Uq471PIQzta5gNjMBEIQZ72nE*4xH*O9TZfqILLcwYg*8PBAYuZw__";
|
||||||
|
// }else {
|
||||||
|
// userSig = @"eAEtzLsOgjAUBuB36arB9gR6gMSBQV0g0UBwcTFpK0esaQARY3x3iXX9-subVXkZ9Ko9O0eKpSLkHBNAiJe-ZCCrZ5UoI0CUodeeLixl1xticRRCtmbf2M0z2dVVsS2jCbKHMK-Tyo1NVotykdvDmvmlnhx186PkYcy5t1F38xsE-N8hpe8DGfIMwD5fblkvWg__";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [ESCTUIManager loginInitTUISDKUserID:self.userNameField.text userSig:userSig];
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark -网络请求处理
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"LOGINGAPI"]) {
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AVATAR"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"placeholdImg"];
|
||||||
|
|
||||||
|
NSDictionary * dic = response;
|
||||||
|
HQUserInfo * user = [[HQUserInfo alloc] init];
|
||||||
|
user.userInfo = [dic objectForKey:@"userInfo"];
|
||||||
|
user.token = [dic objectForKey:@"token"];
|
||||||
|
[HQCommonUtils keyedArchiverWithData:user key:LoginUserInfo];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
NSString * avatar = @"";
|
||||||
|
NSString * placeholdImg ;
|
||||||
|
if (!ValidStr(user.avatar)) {
|
||||||
|
avatar = user.avatar;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if ([user.sex_dictText isEqualToString:@"女"]) {
|
||||||
|
placeholdImg = @"heard_man";
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
placeholdImg = @"heard_woman";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ValidStr(user.personType) || [user.personType intValue] != 1 ) {
|
||||||
|
|
||||||
|
[self showMBProgressHUDOnlyWithString:@"账号或登录密码错误,请重试"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:avatar forKey:@"AVATAR"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:placeholdImg forKey:@"placeholdImg"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
|
||||||
|
KPostNotification(KNotificationLoginStateChange, @YES);
|
||||||
|
//登录im
|
||||||
|
[self loginImAccount];
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"IMAPI"]) {
|
||||||
|
|
||||||
|
NSDictionary * pamrDic = response;
|
||||||
|
|
||||||
|
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
|
||||||
|
|
||||||
|
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
|
||||||
|
iminfoModel.IMInfo = pamrDic;
|
||||||
|
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
|
||||||
|
|
||||||
|
|
||||||
|
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
|
||||||
|
// 2. 初始化 config 对象
|
||||||
|
V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init];
|
||||||
|
|
||||||
|
// 3. 指定 log 输出级别。
|
||||||
|
config.logLevel = V2TIM_LOG_INFO;
|
||||||
|
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
|
||||||
|
[[V2TIMManager sharedInstance] addIMSDKListener:self];
|
||||||
|
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
|
||||||
|
[[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config];
|
||||||
|
|
||||||
|
[ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig];
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"AGREEAPI"]) {
|
||||||
|
|
||||||
|
NSArray * array = response;
|
||||||
|
|
||||||
|
for (NSDictionary * parmDic in array) {
|
||||||
|
|
||||||
|
XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
|
||||||
|
https://api.cqygjk.com/health-consultation/api/consult/conDoctor/selectDictList?dictKey=qh_jump_url
|
||||||
|
[self.dataArray addObject:model];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"VERSIONAPI"]) {
|
||||||
|
|
||||||
|
NSString * version = response;
|
||||||
|
|
||||||
|
|
||||||
|
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||||
|
if (mainBundle) {
|
||||||
|
NSString *version = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||||
|
// NSString *build = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
|
||||||
|
// NSString *displayName = [mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
|
||||||
|
// NSString *fullVersion = [NSString stringWithFormat:@"%@ %@ (Build %@)", displayName, version, build];
|
||||||
|
if([version floatValue] < [version floatValue]) {
|
||||||
|
self.regisBtn.hidden = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
self.regisBtn.hidden = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)backHomeAction {
|
||||||
|
|
||||||
|
KPostNotification(KNotificationLoginStateChange, @YES);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)loginImAccount {
|
||||||
|
|
||||||
|
|
||||||
|
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
|
||||||
|
[proctocolApi GetIMLoginAccount:nil];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//建议整体禁用(复制、粘贴、全选等都被禁用了)
|
||||||
|
-(BOOL)canPerformAction:(SEL)action withSender:(id)sender{
|
||||||
|
|
||||||
|
UIMenuController *menuController = [UIMenuController sharedMenuController];
|
||||||
|
if (menuController) {
|
||||||
|
[UIMenuController sharedMenuController].menuVisible = NO;
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)agreeProtocolAction:(UIButton *)agreeBtn {
|
||||||
|
|
||||||
|
agreeBtn.selected = !agreeBtn.selected;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#pragma mark:找回密码
|
||||||
|
- (void)foundUserPasswordAction {
|
||||||
|
// GastoremteroscopeViewController * resultAppointVC = [[GastoremteroscopeViewController alloc] init];
|
||||||
|
// [self.navigationController pushViewController:resultAppointVC animated:YES];
|
||||||
|
XJLoginFoundPasswordViewController * foundVC = [[XJLoginFoundPasswordViewController alloc] init];
|
||||||
|
|
||||||
|
[self.navigationController pushViewController:foundVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)ishiderRegisData {
|
||||||
|
|
||||||
|
|
||||||
|
JKCQAPI * versionAPI = [[JKCQAPI alloc] init:self tag:@"VERSIONAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[versionAPI getVesionHideRegis:@{@"type":@"app_update_user_ios"}.mutableCopy];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark:注册
|
||||||
|
- (void)regisAction {
|
||||||
|
|
||||||
|
XJRegisterViewController * forgetVc = [[XJRegisterViewController alloc] init];
|
||||||
|
|
||||||
|
[self presentViewController:forgetVc animated:YES completion:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
|
||||||
|
|
||||||
|
if(textField == self.passwordField) {
|
||||||
|
|
||||||
|
self.passwordField.inputView = self.keyboard;
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)keyboard:(LVKeyboard *)keyboard didClickDeleteButton:(UIButton *)deleteBtn string:(NSMutableString *)string {
|
||||||
|
self.passwordField.text = string;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)keyboard:(LVKeyboard *)keyboard didClickTextButton:(UIButton *)textBtn string:(NSMutableString *)string {
|
||||||
|
self.passwordField.text = string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||||
|
[self.passwordField resignFirstResponder];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)togglePasswordVisibility {
|
||||||
|
self.passwordField.secureTextEntry = !self.passwordField.secureTextEntry;
|
||||||
|
self.toggleButton.selected = !self.toggleButton.selected;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// XJRegisterViewController.h
|
||||||
|
// healthQuestion
|
||||||
|
//
|
||||||
|
// Created by xulei on 2022/8/17.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJRegisterViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+264
@@ -0,0 +1,264 @@
|
|||||||
|
//
|
||||||
|
// XJRegisterViewController.m
|
||||||
|
// healthQuestion
|
||||||
|
//
|
||||||
|
// Created by xulei on 2022/8/17.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJRegisterViewController.h"
|
||||||
|
#import "ADJumpViewController.h"
|
||||||
|
#import "XJMineCenterUserModel.h"
|
||||||
|
|
||||||
|
@interface XJRegisterViewController ()<UITextFieldDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong)UITextField * phoneTextField;
|
||||||
|
@property (nonatomic, strong)UITextField * codeTextField;
|
||||||
|
@property (nonatomic, strong)UITextField * passwordTextField;
|
||||||
|
@property (nonatomic, strong)UITextField * surePasswordTextField;
|
||||||
|
@property (nonatomic, strong)UITextField * inviteCodeTextField;
|
||||||
|
@property (nonatomic, strong)UIButton * protocolBtn;
|
||||||
|
@property (nonatomic, strong)UIButton * codeButton;
|
||||||
|
@property (nonatomic, copy)NSString * protocolString;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJRegisterViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.isHidenNaviBar = YES;
|
||||||
|
self.StatusBarStyle = UIStatusBarStyleDefault;
|
||||||
|
self.view.backgroundColor = CViewBgColor;
|
||||||
|
[self createUI];
|
||||||
|
[self getUserProtocol];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI
|
||||||
|
{
|
||||||
|
|
||||||
|
UIImageView * topBackImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(243))];
|
||||||
|
topBackImg.image = IMAGE_NAMED(@"loginTopBimg");
|
||||||
|
[self.view addSubview:topBackImg];
|
||||||
|
|
||||||
|
UIImageView * cenetrImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, kRealValue(70), kRealValue(68), kRealValue(68))];
|
||||||
|
cenetrImg.centerX = self.view.centerX;
|
||||||
|
cenetrImg.image = IMAGE_NAMED(@"login_icon");
|
||||||
|
[self.view addSubview:cenetrImg];
|
||||||
|
|
||||||
|
|
||||||
|
UIImageView *titleImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, cenetrImg.bottom + kRealValue(20), kRealValue(109), kRealValue(24))];
|
||||||
|
titleImg.centerX = self.view.centerX;
|
||||||
|
titleImg.image = IMAGE_NAMED(@"loginTitle_Img");
|
||||||
|
[self.view addSubview:titleImg];
|
||||||
|
|
||||||
|
UIButton * leftButton = [[UIButton alloc] initWithFrame:CGRectMake(11, 40, 20, 20)];
|
||||||
|
[leftButton setImage:[UIImage imageNamed:@"close_Icon"] forState:UIWindowLevelNormal];
|
||||||
|
[leftButton addTarget:self action:@selector(leftBtnClick) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.view addSubview:leftButton];
|
||||||
|
|
||||||
|
UIView * connetView = [[UIView alloc] init];
|
||||||
|
connetView.frame = CGRectMake(0, topBackImg.bottom+1, kScreenWidth, 200);
|
||||||
|
connetView.backgroundColor = [UIColor whiteColor];
|
||||||
|
[self.view addSubview:connetView];
|
||||||
|
|
||||||
|
self.phoneTextField = [self createTextFieldWithFrame:CGRectMake(10, 0, kScreenWidth-20, 50) placeholder:@"请输入账户名" passWord:NO leftImageView:nil rightImageView:nil Font:14];
|
||||||
|
self.phoneTextField.delegate =self;
|
||||||
|
self.phoneTextField.keyboardType = UIKeyboardTypeNumberPad;
|
||||||
|
[connetView addSubview:self.phoneTextField];
|
||||||
|
|
||||||
|
|
||||||
|
self.passwordTextField = [self createTextFieldWithFrame:CGRectMake(10, self.phoneTextField.bottom+1, kScreenWidth-20, 50) placeholder:@"请输入密码(6-20位)" passWord:NO leftImageView:nil rightImageView:nil Font:14];
|
||||||
|
self.passwordTextField.secureTextEntry = YES;
|
||||||
|
self.passwordTextField.delegate =self;
|
||||||
|
[connetView addSubview:self.passwordTextField];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//平台协议
|
||||||
|
UIButton * protocolBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, connetView.bottom+9, 20, 20)];
|
||||||
|
[protocolBtn setImage:IMAGE_NAMED(@"login_nomalProtocol") forState:UIControlStateNormal];
|
||||||
|
[protocolBtn setImage:IMAGE_NAMED(@"login_selectProtocol") forState:UIControlStateSelected];
|
||||||
|
protocolBtn.selected = NO;
|
||||||
|
[protocolBtn addTarget:self action:@selector(agreeProtocol:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
self.protocolBtn = protocolBtn;
|
||||||
|
[self.view addSubview:protocolBtn];
|
||||||
|
|
||||||
|
UILabel * contentTitle = [[UILabel alloc] initWithFrame:CGRectMake(protocolBtn.right+5,connetView.bottom+9, 300, 20)];
|
||||||
|
NSString *text = @"我已阅读并同意《健康咨询员工端使用协议》";
|
||||||
|
NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc]initWithString:text];
|
||||||
|
[attributeStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:50/255.0 green:170/255.0 blue:223/255.0 alpha:1] range:NSMakeRange(7, text.length - 7)];
|
||||||
|
contentTitle.attributedText = attributeStr;
|
||||||
|
contentTitle.textAlignment = NSTextAlignmentLeft;
|
||||||
|
contentTitle.font = [UIFont systemFontOfSize:12];
|
||||||
|
contentTitle.userInteractionEnabled = YES;
|
||||||
|
UITapGestureRecognizer * tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)];
|
||||||
|
[contentTitle addGestureRecognizer:tapRecognizer];
|
||||||
|
[self.view addSubview:contentTitle];
|
||||||
|
|
||||||
|
UIButton * loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, self.surePasswordTextField.bottom+140, kScreenWidth-20, 44)];
|
||||||
|
loginBtn.mj_y = self.protocolBtn.bottom+25;
|
||||||
|
[loginBtn setTitle:@"注册" forState:UIControlStateNormal ];
|
||||||
|
loginBtn.tag = 100;
|
||||||
|
loginBtn.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:16];
|
||||||
|
[loginBtn setBackgroundImage:[UIImage imageNamed:@"loginBtn_img"] forState:UIControlStateNormal];
|
||||||
|
[loginBtn setTitleColor:UIColorTitle1 forState:UIControlStateNormal];
|
||||||
|
[loginBtn addTarget:self action:@selector(regisOnClick) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.view addSubview:loginBtn];
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)agreeProtocol:(UIButton *)agreeBtn
|
||||||
|
{
|
||||||
|
agreeBtn.selected = !agreeBtn.selected;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 获取协议
|
||||||
|
- (void)getUserProtocol {
|
||||||
|
|
||||||
|
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[agreeAPI getUserAgreementPrivacy:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转用户协议
|
||||||
|
- (void)tap
|
||||||
|
{
|
||||||
|
|
||||||
|
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
|
||||||
|
webVC.webTitle = @"用户注册协议";
|
||||||
|
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,self.protocolString];
|
||||||
|
[self.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)xmProtocol
|
||||||
|
{
|
||||||
|
self.protocolBtn.selected = YES;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 注册
|
||||||
|
|
||||||
|
- (void)regisOnClick
|
||||||
|
{
|
||||||
|
if ([NSString stringWithFormat:@"%@",self.passwordTextField.text].length<6||[NSString stringWithFormat:@"%@",self.passwordTextField.text].length>20)
|
||||||
|
{
|
||||||
|
[EasyTextView showErrorText:@"密码的长度是6-20位"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!self.protocolBtn.selected )
|
||||||
|
{
|
||||||
|
[EasyTextView showErrorText:@"请先阅读并同意协议"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[self showMBProgressHUDOnlyWithString:@"注册已提交,请等待审核通过后方可登录"];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"GetUserRegister"])
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:@"注册成功"];
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"AGREEAPI"]) {
|
||||||
|
|
||||||
|
NSArray * array = response;
|
||||||
|
NSMutableArray * dataArray = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
for (NSDictionary * parmDic in array) {
|
||||||
|
|
||||||
|
XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
|
||||||
|
if ([model.value integerValue] == 1) {
|
||||||
|
self.protocolString = model.text;
|
||||||
|
}
|
||||||
|
[dataArray addObject:model];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[EasyTextView showErrorText:message];
|
||||||
|
|
||||||
|
NSLog(@"apiError=%@",message);
|
||||||
|
// [self showMessage:message];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)leftBtnClick
|
||||||
|
{
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
}
|
||||||
|
//实现UITextField代理方法
|
||||||
|
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||||
|
|
||||||
|
[textField resignFirstResponder];//取消第一响应者
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||||
|
[self.view endEditing:YES];
|
||||||
|
}
|
||||||
|
- (void)didReceiveMemoryWarning {
|
||||||
|
[super didReceiveMemoryWarning];
|
||||||
|
// Dispose of any resources that can be recreated.
|
||||||
|
}
|
||||||
|
|
||||||
|
-(UITextField*)createTextFieldWithFrame:(CGRect)frame placeholder:(NSString*)placeholder passWord:(BOOL)YESorNO leftImageView:(UIView*)leftView rightImageView:(UIView*)rightView Font:(float)font
|
||||||
|
{
|
||||||
|
UITextField*textField=[[UITextField alloc]initWithFrame:frame];
|
||||||
|
//灰色提示框
|
||||||
|
textField.placeholder=placeholder;
|
||||||
|
//文字对齐方式
|
||||||
|
textField.textAlignment=NSTextAlignmentLeft;
|
||||||
|
textField.secureTextEntry=YESorNO;
|
||||||
|
|
||||||
|
//边框
|
||||||
|
//textField.borderStyle=UITextBorderStyleLine;
|
||||||
|
//键盘类型
|
||||||
|
textField.returnKeyType=UIReturnKeyDone;
|
||||||
|
//关闭首字母大写
|
||||||
|
textField.autocapitalizationType=NO;
|
||||||
|
//清除按钮
|
||||||
|
textField.clearButtonMode=NO;
|
||||||
|
//左图片
|
||||||
|
textField.leftView=leftView;
|
||||||
|
textField.leftViewMode=UITextFieldViewModeAlways;
|
||||||
|
//右图片
|
||||||
|
textField.rightView=rightView;
|
||||||
|
//编辑状态下一直存在
|
||||||
|
textField.rightViewMode=UITextFieldViewModeAlways;
|
||||||
|
//自定义键盘
|
||||||
|
//textField.inputView
|
||||||
|
//字体
|
||||||
|
textField.font=[UIFont systemFontOfSize:font];
|
||||||
|
//字体颜色
|
||||||
|
UIView * line2 = [[UIView alloc] initWithFrame:CGRectMake(0, frame.size.height-1, kScreenWidth, 1)];
|
||||||
|
line2.backgroundColor = UIColorLine;
|
||||||
|
[textField addSubview:line2];
|
||||||
|
return textField;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// XJAddContactViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
#import "XJEmergencyContactModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJAddContactViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * contact_id;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) XJEmergencyContactModel * model;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+355
@@ -0,0 +1,355 @@
|
|||||||
|
//
|
||||||
|
// XJAddContactViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJAddContactViewController.h"
|
||||||
|
#import "LineTextField.h"
|
||||||
|
#import "FamilyMemberRelationModel.h"
|
||||||
|
#import "BRStringPickerView.h"
|
||||||
|
|
||||||
|
@interface XJAddContactViewController ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) LineTextField * nameField;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) LineTextField * phoneField;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) LineTextField * cardNumberField;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) LineTextField * relationshipTextField;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * memberArray;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * familyInt;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJAddContactViewController
|
||||||
|
|
||||||
|
|
||||||
|
- (NSMutableArray *)memberArray {
|
||||||
|
if (!_memberArray) {
|
||||||
|
|
||||||
|
_memberArray = [[NSMutableArray alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
|
return _memberArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
self.isHidenNaviBar = false;
|
||||||
|
self.navigationItem.title = @"紧急联系人";
|
||||||
|
self.view.backgroundColor = KWhiteColor;
|
||||||
|
[self createUI];
|
||||||
|
[self getFamilyMembers];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
//咨询人姓名
|
||||||
|
self.nameField = [self createFieldWithLeftTitle:@"姓名" withRightString:@"" placeholderStr:@"请填写紧急联系人姓名" isShowRight:true];
|
||||||
|
self.nameField.frame = CGRectMake(0, 1, kScreenWidth, 51);
|
||||||
|
[self.view addSubview:self.nameField];
|
||||||
|
//手机号
|
||||||
|
self.phoneField = [self createFieldWithLeftTitle:@"手机号" withRightString:@" " placeholderStr:@"请填写手机号" isShowRight:true];
|
||||||
|
self.phoneField.frame = CGRectMake(0, self.nameField.bottom, kScreenWidth, 51);
|
||||||
|
[self.view addSubview:self.phoneField];
|
||||||
|
//身份证号码,
|
||||||
|
self.cardNumberField = [self createFieldWithLeftTitle:@"身份证号" withRightString:@"" placeholderStr:@"请填写身份证号" isShowRight:true];
|
||||||
|
self.cardNumberField.frame = CGRectMake(0, self.phoneField.bottom, kScreenWidth, 51);
|
||||||
|
[self.view addSubview:self.cardNumberField];
|
||||||
|
|
||||||
|
|
||||||
|
//与本人关系
|
||||||
|
self.relationshipTextField = [self createFieldWithLeftTitle:@"与咨询人关系" withRightString:@">" placeholderStr:@"请点击选择" isShowRight:true];
|
||||||
|
self.relationshipTextField.frame = CGRectMake(0, self.cardNumberField.bottom, kScreenWidth, 51);
|
||||||
|
self.relationshipTextField.userInteractionEnabled = true;
|
||||||
|
[self.view addSubview:self.relationshipTextField];
|
||||||
|
|
||||||
|
UIButton * shipBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 51)];
|
||||||
|
[shipBtn addTarget:self action:@selector(relastionShipOnclick) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.relationshipTextField addSubview:shipBtn];
|
||||||
|
|
||||||
|
|
||||||
|
//保存按钮
|
||||||
|
|
||||||
|
if (self.model) {
|
||||||
|
|
||||||
|
self.nameField.text = self.model.name;
|
||||||
|
self.phoneField.text = self.model.phone;
|
||||||
|
self.cardNumberField.text = self.model.idCard;
|
||||||
|
self.relationshipTextField.text = self.model.familyRelation_dictText;
|
||||||
|
|
||||||
|
UIButton * delectBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - kRealValue(120) , kScreenHeight - kTopHeight - kTabBarHeight - 30 - 40, kRealValue(110), 33)];
|
||||||
|
[delectBtn setTitle:@"删除" forState:UIControlStateNormal];
|
||||||
|
delectBtn.titleLabel.font = SYSTEMFONT(14);
|
||||||
|
delectBtn.layer.cornerRadius = 17.0f;
|
||||||
|
delectBtn.layer.masksToBounds = true;
|
||||||
|
delectBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||||
|
delectBtn.layer.borderWidth = 1.0f;
|
||||||
|
delectBtn.backgroundColor = KWhiteColor;
|
||||||
|
[delectBtn addTarget:self action:@selector(delectedInfoAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[delectBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||||
|
[self.view addSubview:delectBtn];
|
||||||
|
|
||||||
|
UIButton * saveBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(10), kScreenHeight - kTopHeight - kTabBarHeight - 30 - 40, kRealValue(110), 33)];
|
||||||
|
[saveBtn setTitle:@"保存" forState:UIControlStateNormal];
|
||||||
|
saveBtn.titleLabel.font = SYSTEMFONT(14);
|
||||||
|
saveBtn.layer.cornerRadius = 17;
|
||||||
|
saveBtn.layer.masksToBounds = true;
|
||||||
|
saveBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
[saveBtn addTarget:self action:@selector(saveInfo) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[saveBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||||
|
[self.view addSubview:saveBtn];
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
UIButton * saveBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(48), kScreenHeight - kTopHeight - kTabBarHeight - 30 - 40, kScreenWidth - kRealValue(96), 40)];
|
||||||
|
[saveBtn setTitle:@"保存" forState:UIControlStateNormal];
|
||||||
|
saveBtn.titleLabel.font = SYSTEMFONT(14);
|
||||||
|
saveBtn.layer.cornerRadius = 20.0f;
|
||||||
|
saveBtn.layer.masksToBounds = true;
|
||||||
|
saveBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||||
|
saveBtn.layer.borderWidth = 1.0f;
|
||||||
|
saveBtn.backgroundColor = KWhiteColor;
|
||||||
|
[saveBtn addTarget:self action:@selector(saveInfo) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[saveBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||||
|
[self.view addSubview:saveBtn];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (LineTextField *)createFieldWithLeftTitle:(NSString *)leftStr
|
||||||
|
withRightString:(NSString *)rightStr
|
||||||
|
placeholderStr:(NSString *)placeStr
|
||||||
|
isShowRight:(BOOL)isShowRight {
|
||||||
|
|
||||||
|
LineTextField * field = [[LineTextField alloc] init];
|
||||||
|
field.font = SYSTEMFONT(13);
|
||||||
|
field.placeholder = placeStr;
|
||||||
|
field.textAlignment = NSTextAlignmentRight;
|
||||||
|
field.backgroundColor = KWhiteColor;
|
||||||
|
UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 51)];
|
||||||
|
|
||||||
|
UILabel * leftlabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), 0, 100, 51)];
|
||||||
|
|
||||||
|
leftlabel.text = leftStr;
|
||||||
|
|
||||||
|
leftlabel.font = SYSTEMFONT(13);
|
||||||
|
|
||||||
|
leftlabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
|
||||||
|
leftlabel.textColor = UIColorHex(#666666);
|
||||||
|
|
||||||
|
[leftView addSubview:leftlabel];
|
||||||
|
|
||||||
|
field.leftView = leftView;
|
||||||
|
|
||||||
|
field.leftViewMode = UITextFieldViewModeAlways;
|
||||||
|
|
||||||
|
if (isShowRight) {
|
||||||
|
|
||||||
|
UIView * rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 51)];
|
||||||
|
|
||||||
|
UILabel * rightlabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 30, 51)];
|
||||||
|
|
||||||
|
rightlabel.text = rightStr;
|
||||||
|
|
||||||
|
rightlabel.font = SYSTEMFONT(13);
|
||||||
|
|
||||||
|
rightlabel.textColor = UIColorHex(#666666);
|
||||||
|
|
||||||
|
field.rightView = rightView;
|
||||||
|
|
||||||
|
rightlabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
|
||||||
|
field.rightViewMode = UITextFieldViewModeAlways;
|
||||||
|
|
||||||
|
[rightView addSubview:rightlabel];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return field;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)delectedInfoAction {
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
[parmDic setObject:self.model.contact_ID forKey:@"id"];
|
||||||
|
|
||||||
|
JKCQAPI * memberApi = [[JKCQAPI alloc] init:self tag:@"DelectedAPI" NeedToken:@""];
|
||||||
|
[memberApi getDelectedEmergencyContact:parmDic];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)getFamilyMembers {
|
||||||
|
|
||||||
|
JKCQAPI * memberApi = [[JKCQAPI alloc] init:self tag:@"Family" NeedToken:@""];
|
||||||
|
|
||||||
|
[memberApi getCheckKeyResult:@{@"dictKey":@"family_member_relation"}];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
if ([tag isEqualToString:@"Family"]) {
|
||||||
|
|
||||||
|
NSArray * array = response;
|
||||||
|
|
||||||
|
for (NSDictionary * dic in array) {
|
||||||
|
|
||||||
|
FamilyMemberRelationModel * model = [FamilyMemberRelationModel modelWithDictionary:dic] ;
|
||||||
|
|
||||||
|
[self.memberArray addObject:model];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"ADDAPI"]) {
|
||||||
|
|
||||||
|
[EasyTextView showSuccessText:@"操作成功"];
|
||||||
|
[self.navigationController popViewControllerAnimated:YES];
|
||||||
|
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"DelectedAPI"]) {
|
||||||
|
|
||||||
|
[EasyTextView showSuccessText:@"操作成功"];
|
||||||
|
[self.navigationController popViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)relastionShipOnclick {
|
||||||
|
|
||||||
|
/// 1.单列字符串选择器(传字符串数组)
|
||||||
|
BRStringPickerView *stringPickerView = [[BRStringPickerView alloc]init];
|
||||||
|
stringPickerView.pickerMode = BRStringPickerComponentSingle;
|
||||||
|
stringPickerView.title = @"关系";
|
||||||
|
|
||||||
|
NSMutableArray * array = [[NSMutableArray alloc] init];
|
||||||
|
for (FamilyMemberRelationModel * model in self.memberArray) {
|
||||||
|
|
||||||
|
[array addObject:model.text];
|
||||||
|
}
|
||||||
|
stringPickerView.dataSourceArr = array;
|
||||||
|
stringPickerView.selectIndex = 2;
|
||||||
|
stringPickerView.resultModelBlock = ^(BRResultModel *resultModel) {
|
||||||
|
NSLog(@"选择的值:%@", resultModel.value);
|
||||||
|
|
||||||
|
for (FamilyMemberRelationModel * model in self.memberArray) {
|
||||||
|
|
||||||
|
if ([model.text isEqualToString:resultModel.value]) {
|
||||||
|
|
||||||
|
self.familyInt = model.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
self.relationshipTextField.text = resultModel.value;
|
||||||
|
};
|
||||||
|
|
||||||
|
[stringPickerView show];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)saveInfo {
|
||||||
|
|
||||||
|
[self.view endEditing:TRUE];
|
||||||
|
|
||||||
|
|
||||||
|
if (ValidStr(self.nameField.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入紧急联系人姓名"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ValidStr(self.phoneField.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入手机号"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ValidStr(self.cardNumberField.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请输入身份证号"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ValidStr(self.relationshipTextField.text)) {
|
||||||
|
[EasyTextView showErrorText:@"请选择与咨询人关系"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
if (self.model) {
|
||||||
|
[parmDic setObject:self.model.contact_ID forKey:@"id"];
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
[parmDic setObject:@"" forKey:@"id"];
|
||||||
|
}
|
||||||
|
[parmDic setObject:self.nameField.text forKey:@"name"];
|
||||||
|
[parmDic setObject:self.phoneField.text forKey:@"phone"];
|
||||||
|
[parmDic setObject:self.cardNumberField.text forKey:@"idCard"];
|
||||||
|
[parmDic setObject:self.familyInt forKey:@"familyRelation"];
|
||||||
|
|
||||||
|
JKCQAPI * api = [[JKCQAPI alloc] init:self tag:@"ADDAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[api postAddEmergencyContact:parmDic];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)getTimestampFromTime:(NSString *)CurrentTime{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||||
|
|
||||||
|
[formatter setDateStyle:NSDateFormatterMediumStyle];
|
||||||
|
|
||||||
|
[formatter setTimeStyle:NSDateFormatterShortStyle];
|
||||||
|
|
||||||
|
[formatter setDateFormat:@"yyyy-MM-dd"]; //(@"YYYY-MM-dd hh:mm:ss") ----------设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制
|
||||||
|
|
||||||
|
//设置时区选择北京时间
|
||||||
|
|
||||||
|
NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"];
|
||||||
|
|
||||||
|
[formatter setTimeZone:timeZone];
|
||||||
|
|
||||||
|
NSDate* date = [formatter dateFromString:CurrentTime]; //------------将字符串按formatter转成nsdate
|
||||||
|
|
||||||
|
//时间转时间戳的方法:
|
||||||
|
|
||||||
|
NSInteger timeSp = [[NSNumber numberWithDouble:[date timeIntervalSince1970]] integerValue] * 1000;
|
||||||
|
|
||||||
|
|
||||||
|
return [NSString stringWithFormat:@"%ld",(long)timeSp];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// XJEditSystemViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2024/1/10.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJEditSystemViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+239
@@ -0,0 +1,239 @@
|
|||||||
|
//
|
||||||
|
// XJEditSystemViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2024/1/10.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJEditSystemViewController.h"
|
||||||
|
#import "XJLoginFoundPasswordViewController.h"
|
||||||
|
#import "XJMineCenterUserModel.h"
|
||||||
|
#import "ADJumpViewController.h"
|
||||||
|
|
||||||
|
@interface XJEditSystemViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UITableView * homeTableView;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJEditSystemViewController
|
||||||
|
|
||||||
|
- (NSMutableArray *)dataArray {
|
||||||
|
|
||||||
|
if (!_dataArray) {
|
||||||
|
_dataArray = [[NSMutableArray alloc] init];
|
||||||
|
}
|
||||||
|
return _dataArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.view.backgroundColor = CViewBgColor;
|
||||||
|
self.navigationItem.title = @"设置";
|
||||||
|
[self createUI];
|
||||||
|
[self createData];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI
|
||||||
|
{
|
||||||
|
self.homeTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight) style:UITableViewStyleGrouped];
|
||||||
|
if (@available(iOS 11.0, *)) {
|
||||||
|
self.homeTableView.estimatedRowHeight = 0;
|
||||||
|
self.homeTableView.estimatedSectionFooterHeight = 0;
|
||||||
|
self.homeTableView.estimatedSectionHeaderHeight = 0;
|
||||||
|
self.homeTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||||
|
}
|
||||||
|
self.homeTableView.delegate = self;
|
||||||
|
self.homeTableView.backgroundColor = CViewBgColor;
|
||||||
|
self.homeTableView.dataSource = self;
|
||||||
|
self.homeTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
|
||||||
|
self.homeTableView.showsVerticalScrollIndicator = NO;
|
||||||
|
[self.view addSubview:self.homeTableView];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createData {
|
||||||
|
|
||||||
|
JKCQAPI * agreeAPI = [[JKCQAPI alloc] init:self tag:@"AGREEAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[agreeAPI getUserAgreementPrivacy:nil];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
if ([tag isEqualToString:@"AGREEAPI"]) {
|
||||||
|
|
||||||
|
NSArray * array = response;
|
||||||
|
|
||||||
|
for (NSDictionary * parmDic in array) {
|
||||||
|
|
||||||
|
XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
|
||||||
|
|
||||||
|
[self.dataArray addObject:model];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark - DataSource
|
||||||
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||||
|
{
|
||||||
|
if (section == 0) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
|
||||||
|
if (indexPath.section == 0) {
|
||||||
|
|
||||||
|
NSArray * sectionOne = @[@"账号与安全(修改密码)",@"用户协议",@"隐私政策"];
|
||||||
|
|
||||||
|
|
||||||
|
static NSString * cellID = @"cellID";
|
||||||
|
|
||||||
|
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
|
||||||
|
|
||||||
|
if (!cell) {
|
||||||
|
|
||||||
|
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
|
||||||
|
}
|
||||||
|
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||||
|
cell.textLabel.font = SYSTEMFONT(14);
|
||||||
|
cell.textLabel.text = sectionOne[indexPath.row];
|
||||||
|
cell.textLabel.textColor = UIColorHex(#666666);
|
||||||
|
cell.textLabel.font = SYSTEMFONT(14);
|
||||||
|
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||||
|
cell.backgroundColor = KWhiteColor;
|
||||||
|
return cell;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (indexPath.section == 1) {
|
||||||
|
|
||||||
|
|
||||||
|
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CONNETCELL"];
|
||||||
|
|
||||||
|
if (!cell) {
|
||||||
|
|
||||||
|
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"CONNETCELL"];
|
||||||
|
}
|
||||||
|
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||||
|
cell.textLabel.font = SYSTEMFONT(14);
|
||||||
|
cell.textLabel.text = @"版本号";
|
||||||
|
cell.detailTextLabel.text = [[[NSBundle mainBundle]infoDictionary] objectForKey:@"CFBundleShortVersionString"];
|
||||||
|
return cell;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return UITableViewCell.new;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
|
||||||
|
|
||||||
|
return 44;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||||
|
{
|
||||||
|
|
||||||
|
return CGFLOAT_MIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (CGFloat )tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
|
||||||
|
{
|
||||||
|
return kRealValue(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||||
|
|
||||||
|
|
||||||
|
return UIView.new;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
|
||||||
|
if (indexPath.section == 0) {
|
||||||
|
|
||||||
|
if (indexPath.row == 0) {
|
||||||
|
|
||||||
|
XJLoginFoundPasswordViewController * loginVC = [[XJLoginFoundPasswordViewController alloc] init];
|
||||||
|
[self.navigationController pushViewController:loginVC animated:YES];
|
||||||
|
}
|
||||||
|
if (indexPath.row == 1) {
|
||||||
|
|
||||||
|
for (XJMineCenterUserModel * model in self.dataArray) {
|
||||||
|
|
||||||
|
if ([model.value integerValue] == 1) {
|
||||||
|
|
||||||
|
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
|
||||||
|
webVC.webTitle = @"用户协议";
|
||||||
|
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
|
||||||
|
[self.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (indexPath.row == 2) {
|
||||||
|
|
||||||
|
for (XJMineCenterUserModel * model in self.dataArray) {
|
||||||
|
|
||||||
|
if ([model.value integerValue] == 2) {
|
||||||
|
|
||||||
|
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
|
||||||
|
webVC.webTitle = @"隐私政策";
|
||||||
|
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
|
||||||
|
[self.navigationController pushViewController:webVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XJMinePictureRecordViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJMinePictureRecordViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger selectOnes;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+561
@@ -0,0 +1,561 @@
|
|||||||
|
//
|
||||||
|
// XJMinePictureRecordViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/25.
|
||||||
|
//
|
||||||
|
#import "XJMinePictureRecordViewController.h"
|
||||||
|
|
||||||
|
#import "QuestionRecoredTable.h"
|
||||||
|
#import "QuestionRecordModel.h"
|
||||||
|
#import "RecordIMListDateModel.h"
|
||||||
|
#import "XJDoctorMainViewController.h"
|
||||||
|
@interface XJMinePictureRecordViewController ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) QuestionRecoredTable * homeTable;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * buttonArray;
|
||||||
|
@property (nonatomic, strong) NSMutableArray * redCountArray;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger pageNo;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * type;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * groupIDArray;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * jingxingArray;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger totalCount;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation XJMinePictureRecordViewController
|
||||||
|
|
||||||
|
|
||||||
|
- (NSMutableArray *)groupIDArray {
|
||||||
|
|
||||||
|
if (!_groupIDArray) {
|
||||||
|
|
||||||
|
_groupIDArray = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
}
|
||||||
|
return _groupIDArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSMutableArray *)redCountArray {
|
||||||
|
|
||||||
|
if (!_redCountArray) {
|
||||||
|
|
||||||
|
_redCountArray = [[NSMutableArray alloc] init];
|
||||||
|
}
|
||||||
|
return _redCountArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
- (NSMutableArray *)jingxingArray {
|
||||||
|
|
||||||
|
if (!_jingxingArray) {
|
||||||
|
|
||||||
|
_jingxingArray = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
}
|
||||||
|
return _jingxingArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (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.pageNo = 0;
|
||||||
|
|
||||||
|
|
||||||
|
[self createUI];
|
||||||
|
|
||||||
|
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||||
|
|
||||||
|
[self loginImAccount];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([self.type integerValue] == 3)
|
||||||
|
{
|
||||||
|
[self getChatList];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self createData];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
|
|
||||||
|
[super viewWillAppear:animated];
|
||||||
|
|
||||||
|
[self.homeTable.mj_header beginRefreshing];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
NSArray * array = @[@"进行中",@"已评价",@"历史"];
|
||||||
|
[self.buttonArray removeAllObjects];
|
||||||
|
CGFloat w = kRealValue(80);
|
||||||
|
for (int index = 0; index < array.count; index ++) {
|
||||||
|
|
||||||
|
UIButton * listBtn = [[UIButton alloc] init];
|
||||||
|
|
||||||
|
listBtn.frame = CGRectMake(kRealValue(15) + (w + kRealValue(13)) * index , kRealValue(15), w, 27);
|
||||||
|
[listBtn setTitle:array[index] forState:UIControlStateNormal];
|
||||||
|
[listBtn setTitleColor:KWhiteColor forState:UIControlStateSelected];
|
||||||
|
[listBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||||
|
[listBtn addTarget:self action:@selector(statusChange:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
listBtn.titleLabel.font = SYSTEMFONT(13);
|
||||||
|
listBtn.layer.cornerRadius = 14.0;
|
||||||
|
listBtn.layer.masksToBounds = true;
|
||||||
|
listBtn.tag = 1000 + index;
|
||||||
|
[self.view addSubview:listBtn];
|
||||||
|
if (self.selectOnes == 3) {
|
||||||
|
if (index == 0 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (self.selectOnes == 4) {
|
||||||
|
if (index == 1 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (self.selectOnes == 5) {
|
||||||
|
if (index == 2 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (self.selectOnes == 6) {
|
||||||
|
if (index == 2 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self.buttonArray addObject:listBtn];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
self.homeTable = [[QuestionRecoredTable alloc] initWithFrame:CGRectMake(0, 50, kScreenWidth, kScreenHeight - kTopHeight - 50 - SafetyAreaHeight) style:UITableViewStyleGrouped];
|
||||||
|
|
||||||
|
self.homeTable.detailBlock = ^(NSString * _Nonnull recordID, NSString * _Nonnull imID, NSString * _Nonnull memberId, RecordIMListDateModel * _Nonnull model) {
|
||||||
|
|
||||||
|
// DoctorMainViewController * doctorVC = [[DoctorMainViewController alloc] init];
|
||||||
|
// doctorVC.yuyue_id = recordID;
|
||||||
|
// [self.navigationController pushViewController:doctorVC animated:YES];
|
||||||
|
if ([TUILogin isUserLogined]) {
|
||||||
|
ChatViewController * chatVC = [[ChatViewController alloc] init];
|
||||||
|
chatVC.isGroupID = YES;
|
||||||
|
chatVC.chatID = imID ;
|
||||||
|
chatVC.pictureEnd_id = recordID ;
|
||||||
|
chatVC.eableSendReport = true;
|
||||||
|
chatVC.eablehaveHelathData = false;
|
||||||
|
chatVC.navTitle = @"图文咨询";
|
||||||
|
chatVC.isVideo = NO;
|
||||||
|
chatVC.questionType = 2;
|
||||||
|
chatVC.medicalRecordsId = memberId;
|
||||||
|
//是否评价
|
||||||
|
if ([model.contentStatus integerValue] == 5 ) {
|
||||||
|
chatVC.isEveal = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
chatVC.isEveal = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([model.contentStatus intValue] >= 4)
|
||||||
|
{
|
||||||
|
chatVC.endRecordType = 100;
|
||||||
|
}
|
||||||
|
[self.navigationController pushViewController:chatVC animated:YES];
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
[self loginImAccount];
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
[self.view addSubview:self.homeTable];
|
||||||
|
|
||||||
|
// [self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
// make.top.mas_equalTo(@50);
|
||||||
|
// make.bottom.left.right.mas_offset(0);
|
||||||
|
// }];
|
||||||
|
|
||||||
|
|
||||||
|
__weak __typeof(self) weakSelf = self;
|
||||||
|
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||||
|
weakSelf.pageNo = 0;
|
||||||
|
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||||
|
|
||||||
|
[self loginImAccount];
|
||||||
|
}
|
||||||
|
if ([self.type integerValue] == 3)
|
||||||
|
{
|
||||||
|
[self getChatList];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[weakSelf createData];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}];
|
||||||
|
self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||||
|
weakSelf.pageNo ++;
|
||||||
|
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||||
|
|
||||||
|
[self loginImAccount];
|
||||||
|
}
|
||||||
|
if ([self.type integerValue] == 3)
|
||||||
|
{
|
||||||
|
[self getChatList];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[weakSelf createData];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" 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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//获取腾讯im会话列表
|
||||||
|
|
||||||
|
- (void)getChatList {
|
||||||
|
|
||||||
|
|
||||||
|
V2TIMConversationListFilter *filter = [[V2TIMConversationListFilter alloc] init];
|
||||||
|
// filter.type = V2TIM_C2C; //拉取单聊会话
|
||||||
|
filter.type = V2TIM_GROUP; //拉取群聊会话
|
||||||
|
[[V2TIMManager sharedInstance] getConversationListByFilter:filter nextSeq:self.pageNo count:50 succ:^(NSArray<V2TIMConversation *> *list, uint64_t nextSeq, BOOL isFinished) {
|
||||||
|
// 获取会话列表成功,list 为会话列表
|
||||||
|
if (self.pageNo == 0) {
|
||||||
|
[self.groupIDArray removeAllObjects];
|
||||||
|
}
|
||||||
|
DLog(@"%@",list);
|
||||||
|
[self.redCountArray addObjectsFromArray:list];
|
||||||
|
|
||||||
|
for (V2TIMConversation * v2Model in list) {
|
||||||
|
[self.groupIDArray addObject: v2Model.groupID];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
[self postGroupArray:self.groupIDArray];
|
||||||
|
} fail:^(int code, NSString *desc) {
|
||||||
|
// 获取会话列表失败
|
||||||
|
}];
|
||||||
|
|
||||||
|
// //获取所以会话的未读总数
|
||||||
|
// // filter.type = V2TIM_GROUP; //拉取群聊会话
|
||||||
|
//
|
||||||
|
// [[V2TIMManager sharedInstance] getUnreadMessageCountByFilter:filter succ:^(UInt64 totalUnreadCount) {
|
||||||
|
// self.totalCount = totalUnreadCount;
|
||||||
|
// } fail:^(int code, NSString *desc) {
|
||||||
|
//
|
||||||
|
// }];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark:上传id数组
|
||||||
|
- (void)postGroupArray:(NSArray *)array {
|
||||||
|
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
|
[parmDic setObject:array forKey:@"imIds"];
|
||||||
|
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO];
|
||||||
|
JKCQAPI * recordApi = [[JKCQAPI alloc] init:self tag:@"GROUPID" NeedToken:@""];
|
||||||
|
[recordApi PostGroupIDArray:parmDic];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)createData {
|
||||||
|
// type : 1 图文 2 音视频
|
||||||
|
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO];
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
[parmDic setObject:@(self.pageNo) forKey:@"pageNo"];
|
||||||
|
[parmDic setObject:@(10) forKey:@"pageSize"];
|
||||||
|
[parmDic setObject:self.type forKey:@"status"];
|
||||||
|
[parmDic setObject:@"1" forKey:@"type"];
|
||||||
|
//status 1 3 4 5 //4 代评价
|
||||||
|
JKCQAPI * recordApi = [[JKCQAPI alloc] init:self tag:@"RECORD" NeedToken:@""];
|
||||||
|
[recordApi getMineQuestionRecord:parmDic];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)loginImAccount {
|
||||||
|
|
||||||
|
|
||||||
|
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
|
||||||
|
[proctocolApi GetIMLoginAccount:nil];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
[self.homeTable.mj_footer endRefreshing];
|
||||||
|
[self.homeTable.mj_header endRefreshing];
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self.homeTable.mj_footer endRefreshing];
|
||||||
|
[self.homeTable.mj_header endRefreshing];
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"RECORD"]) {
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
if (self.pageNo == 0) {
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
}
|
||||||
|
NSArray * array = response ;
|
||||||
|
|
||||||
|
for (NSDictionary * dic in array) {
|
||||||
|
|
||||||
|
RecordIMListDateModel * model = [ RecordIMListDateModel modelWithDictionary:dic];
|
||||||
|
|
||||||
|
[self.dataArray addObject:model];
|
||||||
|
}
|
||||||
|
self.homeTable.dataArray = self.dataArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"IMAPI"]) {
|
||||||
|
|
||||||
|
|
||||||
|
NSDictionary * pamrDic = response;
|
||||||
|
|
||||||
|
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
|
||||||
|
|
||||||
|
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
|
||||||
|
iminfoModel.IMInfo = pamrDic;
|
||||||
|
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
|
||||||
|
|
||||||
|
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
|
||||||
|
// 2. 初始化 config 对象
|
||||||
|
V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init];
|
||||||
|
// 3. 指定 log 输出级别。
|
||||||
|
config.logLevel = V2TIM_LOG_INFO;
|
||||||
|
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
|
||||||
|
[[V2TIMManager sharedInstance] addIMSDKListener:self];
|
||||||
|
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
|
||||||
|
[[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config];
|
||||||
|
|
||||||
|
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
|
||||||
|
// 2. 初始化 config 对象
|
||||||
|
|
||||||
|
// 3. 指定 log 输出级别。
|
||||||
|
config.logLevel = V2TIM_LOG_INFO;
|
||||||
|
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
|
||||||
|
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
|
||||||
|
|
||||||
|
[TUILogin login:[model.sdkAppId intValue] userID:model.userId userSig:model.userSig succ:^{
|
||||||
|
|
||||||
|
[self getChatList];
|
||||||
|
|
||||||
|
} fail:^(int code, NSString *msg) {
|
||||||
|
|
||||||
|
[EasyTextView showErrorText:msg];
|
||||||
|
|
||||||
|
}];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"GROUPID"]) {
|
||||||
|
|
||||||
|
NSArray * array = response;
|
||||||
|
[self.jingxingArray removeAllObjects];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
for (NSDictionary * parmDic in array) {
|
||||||
|
|
||||||
|
RecordIMListDateModel * model = [ RecordIMListDateModel modelWithDictionary:parmDic];
|
||||||
|
|
||||||
|
for (V2TIMConversation * v2Model in self.redCountArray) {
|
||||||
|
|
||||||
|
if ([v2Model.groupID isEqualToString:model.imId])
|
||||||
|
{
|
||||||
|
model.unredCount = v2Model.unreadCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.jingxingArray addObject:model];
|
||||||
|
}
|
||||||
|
self.homeTable.dataArray = self.jingxingArray;
|
||||||
|
// self.homeTable.totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)statusChange:(UIButton *)statusBtn {
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
if (statusBtn.tag == 1000) {
|
||||||
|
self.type = @"3"; //进行中
|
||||||
|
[self getChatList];
|
||||||
|
}
|
||||||
|
if (statusBtn.tag == 1001) {
|
||||||
|
self.type = @"5"; //已评价
|
||||||
|
[self createData];
|
||||||
|
}
|
||||||
|
if (statusBtn.tag == 1002) {
|
||||||
|
self.type = @""; //全部 历史
|
||||||
|
[self createData];
|
||||||
|
}
|
||||||
|
for (UIButton * titBtn in self.buttonArray) {
|
||||||
|
|
||||||
|
if (titBtn == statusBtn) {
|
||||||
|
|
||||||
|
titBtn.selected = YES;
|
||||||
|
titBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
titBtn.selected = NO;
|
||||||
|
titBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setSelectOnes:(NSInteger)selectOnes {
|
||||||
|
|
||||||
|
_selectOnes = selectOnes;
|
||||||
|
self.type = [NSString stringWithFormat:@"%ld",_selectOnes];
|
||||||
|
switch (_selectOnes) {
|
||||||
|
case 3://进行中
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1000) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5://已评价
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1001) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1002) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//在线时票据过期:此时您需要生成新的 userSig,并再次重新调用初始化。
|
||||||
|
- (void)onKickedOffline {
|
||||||
|
|
||||||
|
[HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo];
|
||||||
|
[ESCTUIManager outLoginTUISDK];
|
||||||
|
KPostNotification(KNotificationLoginStateChange, @NO);
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
#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
|
||||||
|
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XJMineQuestionRecordViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJMineQuestionRecordViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger type; // 1 进行中 2 待评价 3 已评价 4 历史
|
||||||
|
@property (nonatomic, assign) NSInteger titleSelected; // 10 图文 11 音视频
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+256
@@ -0,0 +1,256 @@
|
|||||||
|
//
|
||||||
|
// XJMineQuestionRecordViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJMineQuestionRecordViewController.h"
|
||||||
|
#import "XJMineVideoRecordViewController.h"
|
||||||
|
#import "XJMinePictureRecordViewController.h"
|
||||||
|
|
||||||
|
@interface XJMineQuestionRecordViewController ()<UICollectionViewDataSource,UICollectionViewDelegate>
|
||||||
|
|
||||||
|
/** 顶部控件*/
|
||||||
|
@property (nonatomic, weak) UIScrollView *topView;
|
||||||
|
/** 下划线 */
|
||||||
|
@property (nonatomic, weak) UIView *lineView;
|
||||||
|
/** 滚动视图 */
|
||||||
|
@property (nonatomic, weak) UICollectionView *collectionView;
|
||||||
|
/** 当前选中的按钮 */
|
||||||
|
@property (nonatomic, weak) UIButton *selectButton;
|
||||||
|
/** 按钮数组 */
|
||||||
|
@property (nonatomic, strong) NSMutableArray *titleButtons;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJMineQuestionRecordViewController
|
||||||
|
|
||||||
|
#pragma mark - 懒加载
|
||||||
|
- (NSMutableArray *)titleButtons {
|
||||||
|
if (_titleButtons==nil) {
|
||||||
|
_titleButtons = [NSMutableArray array];
|
||||||
|
}
|
||||||
|
return _titleButtons;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.isHidenNaviBar = NO;
|
||||||
|
self.title = @"我的咨询";
|
||||||
|
self.view.backgroundColor = UIColorBackground;
|
||||||
|
// [self addNavigationItemWithImageNames:@[@"backIcon@2x"] isLeft:YES target:self action:@selector(popVc) tags:@[@"100"]];
|
||||||
|
[self createUI];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark:返回
|
||||||
|
- (void)popVc
|
||||||
|
{
|
||||||
|
[self.navigationController popViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI
|
||||||
|
{
|
||||||
|
[self setupNavgationBar];
|
||||||
|
|
||||||
|
// 添加底部内容view
|
||||||
|
[self setupBottomContentView];
|
||||||
|
|
||||||
|
// 添加所有子控制器
|
||||||
|
[self setupAllChildViewController];
|
||||||
|
|
||||||
|
[self setupAllTitle:self.titleSelected];
|
||||||
|
|
||||||
|
// 不添加额外滚动区域
|
||||||
|
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 添加所有的子控制器
|
||||||
|
- (void)setupAllChildViewController {
|
||||||
|
|
||||||
|
XJMinePictureRecordViewController * pictureVc = [[XJMinePictureRecordViewController alloc] init];
|
||||||
|
pictureVc.navigationItem.title = @"图文咨询";
|
||||||
|
pictureVc.selectOnes = self.type;
|
||||||
|
pictureVc.view.backgroundColor = CViewBgColor;
|
||||||
|
[self addChildViewController:pictureVc];
|
||||||
|
|
||||||
|
//
|
||||||
|
XJMineVideoRecordViewController * videoVc = [[XJMineVideoRecordViewController alloc] init];
|
||||||
|
videoVc.navigationItem.title = @"视频咨询";
|
||||||
|
videoVc.selectOnes = self.type;
|
||||||
|
videoVc.view.backgroundColor = CViewBgColor;
|
||||||
|
[self addChildViewController:videoVc];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 设置导航条内容
|
||||||
|
- (void)setupNavgationBar {
|
||||||
|
UIScrollView *topView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 1, kScreenWidth, kRealValue(48))];
|
||||||
|
topView.backgroundColor = [UIColor whiteColor];
|
||||||
|
_topView = topView;
|
||||||
|
[self.view addSubview:topView];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 按钮被点击
|
||||||
|
- (void)titleClick:(UIButton *)titleButton{
|
||||||
|
|
||||||
|
NSInteger i = titleButton.tag;
|
||||||
|
// 重复点击标题按钮的时候,刷新当前界面
|
||||||
|
if (titleButton == _selectButton) {
|
||||||
|
}
|
||||||
|
|
||||||
|
[self selButton:titleButton];
|
||||||
|
|
||||||
|
//滚动collectionView 修改偏移量
|
||||||
|
CGFloat offsetX = i * kScreenWidth;
|
||||||
|
_collectionView.contentOffset = CGPointMake(offsetX, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 选中标题按钮
|
||||||
|
- (void)selButton:(UIButton *)titleButton{
|
||||||
|
|
||||||
|
_selectButton.selected = NO;
|
||||||
|
titleButton.selected = YES;
|
||||||
|
_selectButton = titleButton;
|
||||||
|
|
||||||
|
// 移动下划线的位置
|
||||||
|
[UIView animateWithDuration:0.25 animations:^{
|
||||||
|
_lineView.centerX = titleButton.centerX;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 添加标题
|
||||||
|
- (void)setupAllTitle:(NSInteger)titleSelected{
|
||||||
|
|
||||||
|
NSUInteger count = self.childViewControllers.count;
|
||||||
|
CGFloat btnX = 0;
|
||||||
|
CGFloat btnW = kScreenWidth/count;
|
||||||
|
CGFloat btnH = _topView.height;
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
UIButton *titleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
titleButton.tag = i;
|
||||||
|
|
||||||
|
UIViewController *vc = self.childViewControllers[i];
|
||||||
|
[titleButton setTitle:vc.navigationItem.title forState:UIControlStateNormal];
|
||||||
|
// 设置标题颜色
|
||||||
|
[titleButton setTitleColor:RGBA(34, 34, 34, 1) forState:UIControlStateSelected];
|
||||||
|
[titleButton setTitleColor:RGBA(102, 102, 102, 1) forState:UIControlStateNormal];
|
||||||
|
|
||||||
|
// 设置标题字体
|
||||||
|
titleButton.titleLabel.font = MEDIUMFONT(14);
|
||||||
|
|
||||||
|
btnX = i * btnW;
|
||||||
|
|
||||||
|
titleButton.frame = CGRectMake(btnX, 0, btnW, btnH);
|
||||||
|
|
||||||
|
// 监听按钮点击
|
||||||
|
[titleButton addTarget:self action:@selector(titleClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
[_topView addSubview:titleButton];
|
||||||
|
|
||||||
|
if (i == titleSelected - 10) {
|
||||||
|
// 添加下划线
|
||||||
|
// 下划线宽度 = 按钮文字宽度
|
||||||
|
// 下划线中心点x = 按钮中心点x
|
||||||
|
CGFloat h = 5;
|
||||||
|
CGFloat y = kRealValue(45) ;
|
||||||
|
UIView *lineView =[[UIView alloc] init];
|
||||||
|
// 位置和尺寸
|
||||||
|
lineView.height = h;
|
||||||
|
// 先计算文字尺寸,在给label去赋值
|
||||||
|
[titleButton.titleLabel sizeToFit];
|
||||||
|
lineView.width = kRealValue(28);
|
||||||
|
lineView.centerX = titleButton.centerX;
|
||||||
|
lineView.mj_y = y;
|
||||||
|
lineView.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
_lineView = lineView;
|
||||||
|
[_topView addSubview:lineView];
|
||||||
|
|
||||||
|
[self titleClick:titleButton];
|
||||||
|
}
|
||||||
|
[self.titleButtons addObject:titleButton];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 添加底部内容view
|
||||||
|
- (void)setupBottomContentView
|
||||||
|
{
|
||||||
|
// 创建一个流水布局
|
||||||
|
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||||
|
layout.itemSize = CGSizeMake(kScreenWidth, kScreenHeight-44);
|
||||||
|
|
||||||
|
// 设置水平滚动方向
|
||||||
|
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||||
|
layout.minimumInteritemSpacing = 0;
|
||||||
|
layout.minimumLineSpacing = 0;
|
||||||
|
|
||||||
|
// 创建UICollectionView
|
||||||
|
UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0,kRealValue(48), kScreenWidth, kScreenHeight - kRealValue(48) ) collectionViewLayout:layout];
|
||||||
|
collectionView.backgroundColor = [UIColor whiteColor];
|
||||||
|
[self.view addSubview:collectionView];
|
||||||
|
_collectionView = collectionView;
|
||||||
|
collectionView.scrollsToTop = NO;
|
||||||
|
collectionView.scrollEnabled = YES;
|
||||||
|
// 开启分页
|
||||||
|
collectionView.pagingEnabled = YES;
|
||||||
|
collectionView.showsHorizontalScrollIndicator = NO;
|
||||||
|
collectionView.bounces = YES;
|
||||||
|
|
||||||
|
// 展示cell
|
||||||
|
collectionView.dataSource = self;
|
||||||
|
collectionView.delegate = self;
|
||||||
|
|
||||||
|
// 注册cell
|
||||||
|
[collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"COUPCELLID"];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - UICollectionViewDelegate
|
||||||
|
// 滚动完成的时候就会调用
|
||||||
|
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
|
||||||
|
// 获取角标
|
||||||
|
NSInteger i = scrollView.contentOffset.x / kScreenWidth;
|
||||||
|
|
||||||
|
// 获取选中标题
|
||||||
|
UIButton *selButton = self.titleButtons[i];
|
||||||
|
|
||||||
|
// 选中标题
|
||||||
|
[self selButton:selButton];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - UICollectionViewDataSource
|
||||||
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||||
|
|
||||||
|
return self.childViewControllers.count;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只要有新的cell出现的时候才会调用
|
||||||
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||||
|
|
||||||
|
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"COUPCELLID" forIndexPath:indexPath];
|
||||||
|
|
||||||
|
// 移除之前子控制器view
|
||||||
|
[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
||||||
|
|
||||||
|
// 取出对应的子控制器添加到对应cell上
|
||||||
|
UIViewController *vc = self.childViewControllers[indexPath.row];
|
||||||
|
|
||||||
|
[cell.contentView addSubview:vc.view];
|
||||||
|
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// XJMineUserInfoViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJMineUserInfoViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+141
@@ -0,0 +1,141 @@
|
|||||||
|
//
|
||||||
|
// XJMineUserInfoViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJMineUserInfoViewController.h"
|
||||||
|
#import "XJMineUserInfoTable.h"
|
||||||
|
#import "XJEmergencyContactModel.h"
|
||||||
|
#import "XJAddContactViewController.h"
|
||||||
|
@interface XJMineUserInfoViewController ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) XJMineUserInfoTable * homeTable;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJMineUserInfoViewController
|
||||||
|
|
||||||
|
- (NSMutableArray *)dataArray {
|
||||||
|
|
||||||
|
if (!_dataArray) {
|
||||||
|
|
||||||
|
_dataArray = [[NSMutableArray alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
|
return _dataArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.navigationItem.title = @"个人信息";
|
||||||
|
self.isHidenNaviBar = false;
|
||||||
|
self.view.backgroundColor = KWhiteColor;
|
||||||
|
[self createUI];
|
||||||
|
[self createData];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
|
|
||||||
|
[super viewWillAppear:animated] ;
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
[self getEmergencyContact];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
MJWeakSelf
|
||||||
|
self.homeTable = [[XJMineUserInfoTable alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight) style:UITableViewStyleGrouped];
|
||||||
|
self.homeTable.addBlcok = ^{
|
||||||
|
//新增紧急联系人
|
||||||
|
[weakSelf addEmergencyContact];
|
||||||
|
};
|
||||||
|
self.homeTable.editBlcok = ^(XJEmergencyContactModel * _Nonnull model) {
|
||||||
|
|
||||||
|
XJAddContactViewController * addVC = [[XJAddContactViewController alloc] init];
|
||||||
|
addVC.model = model;
|
||||||
|
[weakSelf.navigationController pushViewController:addVC animated:YES];
|
||||||
|
};
|
||||||
|
[self.view addSubview:self.homeTable];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createData {
|
||||||
|
|
||||||
|
JKCQAPI * infoApi = [[JKCQAPI alloc] init:self tag:@"USERINFO" NeedToken:@""];
|
||||||
|
[infoApi getMineCenterUserInfo:nil];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)getEmergencyContact {
|
||||||
|
|
||||||
|
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
|
JKCQAPI * numbeApi = [[JKCQAPI alloc] init:self tag:@"ContactAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[numbeApi getEmergencyContact:dic];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark -网络请求处理
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"USERINFO"]) {
|
||||||
|
NSDictionary * dic = response;
|
||||||
|
XJMineCenterUserModel * userModel = [XJMineCenterUserModel modelWithDictionary:dic];
|
||||||
|
self.homeTable.model = userModel;
|
||||||
|
|
||||||
|
}
|
||||||
|
if ([tag isEqualToString:@"ContactAPI"]) {
|
||||||
|
|
||||||
|
NSArray * array = response;
|
||||||
|
|
||||||
|
for (NSDictionary * parmDic in array) {
|
||||||
|
|
||||||
|
XJEmergencyContactModel * model = [XJEmergencyContactModel modelWithDictionary:parmDic];
|
||||||
|
|
||||||
|
[self.dataArray addObject:model];
|
||||||
|
|
||||||
|
}
|
||||||
|
self.homeTable.dataArray = self.dataArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma mark:新增联系人
|
||||||
|
- (void)addEmergencyContact {
|
||||||
|
|
||||||
|
XJAddContactViewController * addVC = [[XJAddContactViewController alloc] init];
|
||||||
|
|
||||||
|
[self.navigationController pushViewController:addVC animated:YES];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// XJMineVideoRecordViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJMineVideoRecordViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger selectOnes;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+374
@@ -0,0 +1,374 @@
|
|||||||
|
//
|
||||||
|
// XJMineVideoRecordViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/25.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJMineVideoRecordViewController.h"
|
||||||
|
#import "QuestionRecoredTable.h"
|
||||||
|
#import "QuestionRecordModel.h"
|
||||||
|
#import "RecordIMListDateModel.h"
|
||||||
|
#import "XJDoctorMainViewController.h"
|
||||||
|
@interface XJMineVideoRecordViewController ()<V2TIMSDKListener>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) QuestionRecoredTable * homeTable;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * buttonArray;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger pageNo;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * type;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * groupIDArray;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * jingxingArray;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation XJMineVideoRecordViewController
|
||||||
|
|
||||||
|
|
||||||
|
- (NSMutableArray *)groupIDArray {
|
||||||
|
|
||||||
|
if (!_groupIDArray) {
|
||||||
|
|
||||||
|
_groupIDArray = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
}
|
||||||
|
return _groupIDArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSMutableArray *)jingxingArray {
|
||||||
|
|
||||||
|
if (!_jingxingArray) {
|
||||||
|
|
||||||
|
_jingxingArray = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
}
|
||||||
|
return _jingxingArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (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.pageNo = 0;
|
||||||
|
self.type = [NSString stringWithFormat:@"%ld",_selectOnes];
|
||||||
|
[self createUI];
|
||||||
|
[self createData];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
|
|
||||||
|
[super viewWillAppear:animated];
|
||||||
|
|
||||||
|
[self.homeTable.mj_header beginRefreshing];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
NSArray * array = @[@"进行中",@"待评价",@"已评价",@"历史"];
|
||||||
|
[self.buttonArray removeAllObjects];
|
||||||
|
CGFloat w = kRealValue(70);
|
||||||
|
for (int index = 0; index < array.count; index ++) {
|
||||||
|
|
||||||
|
UIButton * listBtn = [[UIButton alloc] init];
|
||||||
|
|
||||||
|
listBtn.frame = CGRectMake(kRealValue(17) + (w + kRealValue(13)) * index , kRealValue(15), w, 27);
|
||||||
|
[listBtn setTitle:array[index] forState:UIControlStateNormal];
|
||||||
|
[listBtn setTitleColor:KWhiteColor forState:UIControlStateSelected];
|
||||||
|
[listBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||||
|
[listBtn addTarget:self action:@selector(statusChange:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
listBtn.titleLabel.font = SYSTEMFONT(13);
|
||||||
|
listBtn.layer.cornerRadius = 14.0;
|
||||||
|
listBtn.layer.masksToBounds = true;
|
||||||
|
listBtn.tag = 1000 + index;
|
||||||
|
[self.view addSubview:listBtn];
|
||||||
|
// if (index == 0 ) {
|
||||||
|
// listBtn.selected = YES;
|
||||||
|
// listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
// }else{
|
||||||
|
// listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
// }
|
||||||
|
if (self.selectOnes == 3) {
|
||||||
|
if (index == 0 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (self.selectOnes == 4) {
|
||||||
|
if (index == 1 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (self.selectOnes == 5) {
|
||||||
|
if (index == 2 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (self.selectOnes == 6) {
|
||||||
|
if (index == 3 ) {
|
||||||
|
listBtn.selected = YES;
|
||||||
|
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else{
|
||||||
|
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self.buttonArray addObject:listBtn];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
self.homeTable = [[QuestionRecoredTable alloc] initWithFrame:CGRectMake(0, 50, kScreenWidth, kScreenHeight - kTopHeight - 45 - 60) style:UITableViewStyleGrouped];
|
||||||
|
MJWeakSelf;
|
||||||
|
self.homeTable.detailBlock = ^(NSString * _Nonnull recordID, NSString * _Nonnull imID, NSString * _Nonnull memberId, RecordIMListDateModel * _Nonnull model) {
|
||||||
|
|
||||||
|
XJDoctorMainViewController * doctorVC = [[XJDoctorMainViewController alloc] init];
|
||||||
|
doctorVC.yuyue_id = recordID;
|
||||||
|
doctorVC.popType = 1;
|
||||||
|
[weakSelf.navigationController pushViewController:doctorVC animated:YES];
|
||||||
|
};
|
||||||
|
[self.view addSubview:self.homeTable];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||||
|
weakSelf.pageNo = 0;
|
||||||
|
[weakSelf createData];
|
||||||
|
|
||||||
|
|
||||||
|
}];
|
||||||
|
self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||||
|
weakSelf.pageNo ++;
|
||||||
|
[weakSelf createData];
|
||||||
|
}];
|
||||||
|
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" 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 {
|
||||||
|
// type : 1 图文 2 音视频
|
||||||
|
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO];
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
[parmDic setObject:@(self.pageNo) forKey:@"pageNo"];
|
||||||
|
[parmDic setObject:@(10) forKey:@"pageSize"];
|
||||||
|
[parmDic setObject:self.type forKey:@"status"];
|
||||||
|
[parmDic setObject:@"2" forKey:@"type"];
|
||||||
|
//status 1 3 4 5 //4 代评价
|
||||||
|
JKCQAPI * recordApi = [[JKCQAPI alloc] init:self tag:@"RECORD" NeedToken:@""];
|
||||||
|
[recordApi getMineQuestionRecord:parmDic];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
[self.homeTable.mj_footer endRefreshing];
|
||||||
|
[self.homeTable.mj_header endRefreshing];
|
||||||
|
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self.homeTable.mj_footer endRefreshing];
|
||||||
|
[self.homeTable.mj_header endRefreshing];
|
||||||
|
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"RECORD"]) {
|
||||||
|
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
if (self.pageNo == 1) {
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
}
|
||||||
|
NSArray * array = response ;
|
||||||
|
if (self.pageNo == 0) {
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
}
|
||||||
|
for (NSDictionary * dic in array) {
|
||||||
|
|
||||||
|
RecordIMListDateModel * model = [ RecordIMListDateModel modelWithDictionary:dic];
|
||||||
|
|
||||||
|
[self.dataArray addObject:model];
|
||||||
|
}
|
||||||
|
|
||||||
|
self.homeTable.dataArray = self.dataArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)statusChange:(UIButton *)statusBtn {
|
||||||
|
|
||||||
|
|
||||||
|
if (statusBtn.tag == 1000) { //进行中
|
||||||
|
self.type = @"3";
|
||||||
|
}
|
||||||
|
if (statusBtn.tag == 1001) { //待评价
|
||||||
|
self.type = @"4";
|
||||||
|
}
|
||||||
|
if (statusBtn.tag == 1002) { //已评价
|
||||||
|
self.type = @"5";
|
||||||
|
}
|
||||||
|
if (statusBtn.tag == 1003) { //全部
|
||||||
|
self.type = @"6";
|
||||||
|
}
|
||||||
|
for (UIButton * titBtn in self.buttonArray) {
|
||||||
|
|
||||||
|
if (titBtn == statusBtn) {
|
||||||
|
|
||||||
|
titBtn.selected = YES;
|
||||||
|
titBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
titBtn.selected = NO;
|
||||||
|
titBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.homeTable.mj_header beginRefreshing];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setSelectOnes:(NSInteger)selectOnes {
|
||||||
|
|
||||||
|
_selectOnes = selectOnes;
|
||||||
|
|
||||||
|
switch (_selectOnes) {
|
||||||
|
case 3: //进行中
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1000) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4: //待评价
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1001) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5://已经评价
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1002) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6:// 全部历史
|
||||||
|
{
|
||||||
|
for (UIButton * seleBtn in self.buttonArray) {
|
||||||
|
if (seleBtn.tag == 1002) {
|
||||||
|
seleBtn.selected = YES;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
seleBtn.selected = NO;
|
||||||
|
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
|
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// MyCenterViewController.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/2/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJMyCenterViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+294
@@ -0,0 +1,294 @@
|
|||||||
|
//
|
||||||
|
// MyCenterViewController.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/2/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJMyCenterViewController.h"
|
||||||
|
#import "XJSliderView.h"
|
||||||
|
#import "UILabel+Extension.h"
|
||||||
|
#import "XJMyCenterTableView.h"
|
||||||
|
#import "QuestionPeopleMangerVC.h"
|
||||||
|
#import "XJSosCenterViewController.h"
|
||||||
|
#import "XJMineQuestionRecordViewController.h"
|
||||||
|
#import "XJMineUserInfoViewController.h"
|
||||||
|
#import "XJMineCenterUserModel.h"
|
||||||
|
#import "XJEditSystemViewController.h"
|
||||||
|
#import "XJSOSLookDoctoreViewController.h"
|
||||||
|
|
||||||
|
@interface XJMyCenterViewController ()<myCenterHeardToolsDelegate,cenerCellListDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) XJMyCenterTableView * homeTable;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJMyCenterViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
self.isHidenNaviBar = false;
|
||||||
|
self.navigationItem.title = @"个人中心";
|
||||||
|
self.view.backgroundColor = UIColorHex(#EEEEEE);
|
||||||
|
// [self createTopAndNav];
|
||||||
|
[self addNavigationItemWithImageNames:@[@"setting_icon"] isLeft:false target:self action:@selector(settingAction) tags:@[ @"100"]];
|
||||||
|
[self createUI];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)viewWillAppear:(BOOL)animated {
|
||||||
|
|
||||||
|
[super viewWillAppear:animated];
|
||||||
|
|
||||||
|
if ([HQCommonUtils isLogin]) {
|
||||||
|
[self createUserInfo];
|
||||||
|
[self questionNumber];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (@available(iOS 15.0, *)) {
|
||||||
|
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
|
||||||
|
[appearance configureWithOpaqueBackground]; // 使用纯色背景(更推荐)
|
||||||
|
appearance.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
appearance.shadowColor = nil; // ✅ 隐藏底部阴影线
|
||||||
|
appearance.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};
|
||||||
|
|
||||||
|
self.navigationController.navigationBar.standardAppearance = appearance;
|
||||||
|
self.navigationController.navigationBar.scrollEdgeAppearance = appearance;
|
||||||
|
self.navigationController.navigationBar.compactAppearance = appearance;
|
||||||
|
|
||||||
|
self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; // 按钮颜色
|
||||||
|
} else {
|
||||||
|
self.navigationController.navigationBar.barTintColor = UIColorHex(#21BEBD);
|
||||||
|
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
|
||||||
|
[self.navigationController.navigationBar setShadowImage:[UIImage new]]; // ✅ 旧系统隐藏阴影线
|
||||||
|
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)settingAction {
|
||||||
|
|
||||||
|
XJEditSystemViewController * infoVC = [[XJEditSystemViewController alloc] init];
|
||||||
|
[self.navigationController pushViewController:infoVC animated:YES];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - numberFormat
|
||||||
|
- (NSString *)numberFormat:(float)num {
|
||||||
|
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
|
||||||
|
[formatter setPositiveFormat:@"0"];
|
||||||
|
return [formatter stringFromNumber:[NSNumber numberWithFloat:num]];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(120))];
|
||||||
|
topView.backgroundColor = UIColorHex(#21BEBD);
|
||||||
|
[self.view addSubview:topView];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
self.homeTable = [[XJMyCenterTableView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(25), kScreenWidth - kRealValue(30), kScreenHeight - kRealValue(25) - kTopHeight - kTabBarHeight) style:UITableViewStyleGrouped];
|
||||||
|
self.homeTable.heardDelegate =self;
|
||||||
|
self.homeTable.cellDelegate = self;
|
||||||
|
self.homeTable.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);
|
||||||
|
[self.homeTable scrollRectToVisible:CGRectMake(0, 29,1, 1) animated:YES];
|
||||||
|
[self.view addSubview:self.homeTable];
|
||||||
|
|
||||||
|
UIButton * outLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(48), kScreenHeight - kTabBarHeight - kTopHeight -kRealValue(100) , kScreenWidth - kRealValue(96), kRealValue(40))];
|
||||||
|
outLoginBtn.backgroundColor = KWhiteColor;
|
||||||
|
if ([HQCommonUtils isLogin]) {
|
||||||
|
[outLoginBtn setTitle:@"退出登录" forState:UIControlStateNormal];
|
||||||
|
[outLoginBtn addTarget:self action:@selector(outLoginUserinfo) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
[outLoginBtn setTitle:@"去登录" forState:UIControlStateNormal];
|
||||||
|
[outLoginBtn addTarget:self action:@selector(gotoLoginUserinfo) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
}
|
||||||
|
[outLoginBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||||
|
outLoginBtn.layer.cornerRadius = 20;
|
||||||
|
outLoginBtn.layer.masksToBounds = YES;
|
||||||
|
outLoginBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||||
|
outLoginBtn.titleLabel.font = SYSTEMFONT(14);
|
||||||
|
outLoginBtn.layer.borderWidth = 1.0f;
|
||||||
|
[self.view addSubview:outLoginBtn];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUserInfo {
|
||||||
|
|
||||||
|
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO];
|
||||||
|
JKCQAPI * infoApi = [[JKCQAPI alloc] init:self tag:@"USERINFO" NeedToken:@""];
|
||||||
|
[infoApi getMineCenterUserInfo:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)outLoginUserinfo {
|
||||||
|
|
||||||
|
|
||||||
|
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"是否确定退出登录?" preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
|
||||||
|
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||||
|
[HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo];
|
||||||
|
[ESCTUIManager outLoginTUISDK];
|
||||||
|
KPostNotification(KNotificationLoginStateChange, @NO);
|
||||||
|
}];
|
||||||
|
[alertController addAction:cancelAction];
|
||||||
|
[alertController addAction:sureAction];
|
||||||
|
|
||||||
|
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark:进行中
|
||||||
|
- (void)myCenterInProgress {
|
||||||
|
|
||||||
|
XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init];
|
||||||
|
recordVC.titleSelected = 10;//图文视频
|
||||||
|
recordVC.type = 3;
|
||||||
|
[self.navigationController pushViewController:recordVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark:待评价
|
||||||
|
- (void)waitEvaluation {
|
||||||
|
|
||||||
|
XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init];
|
||||||
|
recordVC.titleSelected = 11;//音视频
|
||||||
|
recordVC.type = 4;
|
||||||
|
[self.navigationController pushViewController:recordVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark:已评价
|
||||||
|
- (void)completeEvaluation {
|
||||||
|
XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init];
|
||||||
|
recordVC.titleSelected = 10;//图文视频
|
||||||
|
recordVC.type = 4;
|
||||||
|
[self.navigationController pushViewController:recordVC animated:YES];
|
||||||
|
|
||||||
|
}
|
||||||
|
#pragma mark:历史
|
||||||
|
- (void)myHistoryAction {
|
||||||
|
XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init];
|
||||||
|
recordVC.titleSelected = 10;//图文视频
|
||||||
|
recordVC.type = 6;
|
||||||
|
[self.navigationController pushViewController:recordVC animated:YES];
|
||||||
|
|
||||||
|
}
|
||||||
|
#pragma mark:查看全部
|
||||||
|
- (void)lookAllQuestion {
|
||||||
|
|
||||||
|
XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init];
|
||||||
|
recordVC.titleSelected = 10;//图文视频
|
||||||
|
recordVC.type = 6;
|
||||||
|
[self.navigationController pushViewController:recordVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)cellListClick:(NSInteger)cellIndex {
|
||||||
|
|
||||||
|
HQUserInfo *infoModel = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo];
|
||||||
|
|
||||||
|
UIViewController *vcToPush = nil;
|
||||||
|
switch (cellIndex) {
|
||||||
|
case 0:
|
||||||
|
vcToPush = [[QuestionPeopleMangerVC alloc] init];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
vcToPush = [[XJSOSLookDoctoreViewController alloc] init];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (vcToPush) {
|
||||||
|
[self.navigationController pushViewController:vcToPush animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)questionNumber {
|
||||||
|
|
||||||
|
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
|
JKCQAPI * numbeApi = [[JKCQAPI alloc] init:self tag:@"NUMBERAPI" NeedToken:@""];
|
||||||
|
|
||||||
|
[numbeApi getMineCenterNumber:dic];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)heardImageOnClick {
|
||||||
|
|
||||||
|
if (![HQCommonUtils isLogin]) {
|
||||||
|
|
||||||
|
KPostNotification(KNotificationLoginStateChange, @NO);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
XJMineUserInfoViewController * infoVC = [[XJMineUserInfoViewController alloc] init];
|
||||||
|
|
||||||
|
[self.navigationController pushViewController:infoVC animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"NUMBERAPI"]) {
|
||||||
|
|
||||||
|
NSString * number = response;
|
||||||
|
|
||||||
|
self.homeTable.number = [number integerValue];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([tag isEqualToString:@"USERINFO"]) {
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
NSDictionary * dic = response;
|
||||||
|
XJMineCenterUserModel * userModel = [XJMineCenterUserModel modelWithDictionary:dic];
|
||||||
|
self.homeTable.userModel = userModel;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)gotoLoginUserinfo {
|
||||||
|
|
||||||
|
KPostNotification(KNotificationLoginStateChange, @NO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XJSOSDetailInfoViewController.h
|
||||||
|
// EscortProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJSOSDetailInfoViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * sessionId;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
//
|
||||||
|
// XJSOSDetailInfoViewController.m
|
||||||
|
// EscortProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJSOSDetailInfoViewController.h"
|
||||||
|
#import "XJSOSDoctorDetailTable.h"
|
||||||
|
#import "XJSOSDoctorDetailInfoModel.h"
|
||||||
|
|
||||||
|
|
||||||
|
@interface XJSOSDetailInfoViewController ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) XJSOSDoctorDetailTable * homeTable;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJSOSDetailInfoViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.view.backgroundColor = CViewBgColor;
|
||||||
|
[self createUI];
|
||||||
|
[self createData];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
self.homeTable = [[XJSOSDoctorDetailTable alloc] initWithFrame:CGRectMake(kRealValue(10), kRealValue(58), kScreenWidth - kRealValue(20), kScreenHeight - kTopHeight - kRealValue(58)) style:UITableViewStyleGrouped];
|
||||||
|
self.homeTable.layer.cornerRadius = 10.0;
|
||||||
|
self.homeTable.layer.masksToBounds = YES;
|
||||||
|
[self.view addSubview:self.homeTable];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createData {
|
||||||
|
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
[parmDic setValue:self.sessionId forKey:@"id"];
|
||||||
|
|
||||||
|
JKCQAPI * detailApi = [[JKCQAPI alloc] init:self tag:@"DETAILAPI" NeedToken:@""];
|
||||||
|
[detailApi getSOSDoctorDetailInfo:parmDic];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
if ([tag isEqualToString:@"DETAILAPI"]) {
|
||||||
|
NSDictionary * dic = response;
|
||||||
|
|
||||||
|
XJSOSDoctorDetailInfoModel * model = [XJSOSDoctorDetailInfoModel modelWithDictionary:dic];
|
||||||
|
|
||||||
|
self.homeTable.model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XJSOSDetailSmallSumViewController.h
|
||||||
|
// EscortProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJSOSDetailSmallSumViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * hospital_id;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// XJSOSLookDoctorDetailViewController.h
|
||||||
|
// EscortProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJSOSLookDoctorDetailViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * sessionId;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * hospital_id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// XJSOSLookDoctoreViewController.h
|
||||||
|
// EscortProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HQBaseViewController.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJSOSLookDoctoreViewController : HQBaseViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
+135
@@ -0,0 +1,135 @@
|
|||||||
|
//
|
||||||
|
// XJSOSLookDoctoreViewController.m
|
||||||
|
// EscortProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJSOSLookDoctoreViewController.h"
|
||||||
|
#import "XJSOSDoctorTableView.h"
|
||||||
|
#import "XJSOSDoctorModel.h"
|
||||||
|
#import "XJSOSLookDoctorDetailViewController.h"
|
||||||
|
|
||||||
|
@interface XJSOSLookDoctoreViewController ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) XJSOSDoctorTableView * homeTable;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) NSInteger pageNo;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJSOSLookDoctoreViewController
|
||||||
|
|
||||||
|
- (NSMutableArray *)dataArray {
|
||||||
|
|
||||||
|
if (!_dataArray) {
|
||||||
|
_dataArray = [[NSMutableArray alloc] init];
|
||||||
|
}
|
||||||
|
return _dataArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
self.view.backgroundColor = CViewBgColor;
|
||||||
|
self.isHidenNaviBar = false;
|
||||||
|
self.navigationItem.title = @"应急就医";
|
||||||
|
self.pageNo = 1;
|
||||||
|
[self createUI];
|
||||||
|
[self createData];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createUI {
|
||||||
|
|
||||||
|
MJWeakSelf
|
||||||
|
self.homeTable = [[XJSOSDoctorTableView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kScreenHeight - kTopHeight) style:UITableViewStyleGrouped];
|
||||||
|
|
||||||
|
self.homeTable.recordBlock = ^(NSString * _Nonnull sessionId, NSString * _Nonnull hospitalId) {
|
||||||
|
XJSOSLookDoctorDetailViewController * detailVC = [[XJSOSLookDoctorDetailViewController alloc] init];
|
||||||
|
detailVC.sessionId = hospitalId;
|
||||||
|
detailVC.hospital_id = hospitalId;
|
||||||
|
[weakSelf.navigationController pushViewController:detailVC animated:YES];
|
||||||
|
};
|
||||||
|
[self.view addSubview:self.homeTable];
|
||||||
|
|
||||||
|
|
||||||
|
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||||
|
weakSelf.pageNo = 1;
|
||||||
|
[weakSelf createData];
|
||||||
|
|
||||||
|
|
||||||
|
}];
|
||||||
|
self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||||
|
weakSelf.pageNo ++;
|
||||||
|
[weakSelf createData];
|
||||||
|
}];
|
||||||
|
[self createData];
|
||||||
|
|
||||||
|
//初始化一个emptyView
|
||||||
|
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"boxNoData" titleStr:@"暂无数据" detailStr:@""];
|
||||||
|
|
||||||
|
//元素竖直方向的间距
|
||||||
|
emptyView.subViewMargin = 20.f;
|
||||||
|
//标题颜色
|
||||||
|
emptyView.titleLabTextColor = [UIColor blackColor];
|
||||||
|
//描述字体
|
||||||
|
emptyView.detailLabFont = [UIFont systemFontOfSize:17];
|
||||||
|
//按钮背景色
|
||||||
|
//设置空内容占位图
|
||||||
|
self.homeTable.ly_emptyView = emptyView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createData {
|
||||||
|
|
||||||
|
[self showMBProgressHUDWithString:@"数据加载中..." autoHidden:false];
|
||||||
|
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
|
[parmDic setObject:@(self.pageNo) forKey:@"pageNo"];
|
||||||
|
[parmDic setObject:@"20" forKey:@"pageSize"];
|
||||||
|
|
||||||
|
JKCQAPI * api = [[JKCQAPI alloc] init:self tag:@"STATUSING" NeedToken:@""];
|
||||||
|
|
||||||
|
[api getSOSDoctorRecordList:parmDic];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self showMBProgressHUDOnlyWithString:message];
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
[self.homeTable.mj_header endRefreshing];
|
||||||
|
[self.homeTable.mj_footer endRefreshing];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||||
|
{
|
||||||
|
[self.homeTable.mj_header endRefreshing];
|
||||||
|
[self.homeTable.mj_footer endRefreshing];
|
||||||
|
if ([tag isEqualToString:@"STATUSING"]) {
|
||||||
|
[self hiddenAllMBProgressHUD];
|
||||||
|
NSDictionary * dic = response;
|
||||||
|
|
||||||
|
if (self.pageNo == 1) {
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
}
|
||||||
|
|
||||||
|
XJSOSDoctorModel * model = [XJSOSDoctorModel modelWithDictionary:dic] ;
|
||||||
|
[self.dataArray addObjectsFromArray:model.records];
|
||||||
|
}
|
||||||
|
self.homeTable.dataArray = self.dataArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#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
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
//
|
|
||||||
// MineCenterUserModel.m
|
|
||||||
// EscortProject
|
|
||||||
//
|
|
||||||
// Created by 仁康信息 on 2023/7/26.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "MineCenterUserModel.h"
|
|
||||||
|
|
||||||
@implementation MineCenterUserModel
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// XJBigillessDetailModel.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJBigillessDetailModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * detail_id;
|
||||||
|
@property (nonatomic, copy) NSString * hospitalId;
|
||||||
|
@property (nonatomic, copy) NSString * hospitalName;
|
||||||
|
@property (nonatomic, copy) NSString * medicalCardNo;
|
||||||
|
@property (nonatomic, copy) NSString * registerCategory;
|
||||||
|
@property (nonatomic, copy) NSString * registerCategory_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * yiyuan_id;
|
||||||
|
@property (nonatomic, copy) NSString * state;
|
||||||
|
@property (nonatomic, copy) NSString * desireTime;
|
||||||
|
@property (nonatomic, copy) NSString * reservationOffice;
|
||||||
|
@property (nonatomic, copy) NSString * createTime;
|
||||||
|
@property (nonatomic, copy) NSString * reservationDoctor;
|
||||||
|
@property (nonatomic, copy) NSString * diseaseDescribe;
|
||||||
|
@property (nonatomic, copy) NSString * rejectionReason;
|
||||||
|
@property (nonatomic, copy) NSString * realname;
|
||||||
|
@property (nonatomic, copy) NSString * idNo;
|
||||||
|
@property (nonatomic, copy) NSString * telPhone;
|
||||||
|
@property (nonatomic, copy) NSString * reservationNo;
|
||||||
|
@property (nonatomic, copy) NSString * topState;
|
||||||
|
@property (nonatomic, copy) NSString * rejectionTime;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// XJBigillessDetailModel.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJBigillessDetailModel.h"
|
||||||
|
|
||||||
|
@implementation XJBigillessDetailModel
|
||||||
|
+ (NSDictionary *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
NSDictionary * dic =@{@"topState" :@"newState"};
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// XJBigillessHospitalModel.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJBigillessHospitalModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * yiyuan_id;
|
||||||
|
@property (nonatomic, copy) NSString * name;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// XJBigillessHospitalModel.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJBigillessHospitalModel.h"
|
||||||
|
|
||||||
|
@implementation XJBigillessHospitalModel
|
||||||
|
|
||||||
|
+ (NSDictionary *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
NSDictionary * dic =@{@"yiyuan_id" :@"id"};
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// XJBigillnessModel.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJBigillnessModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * zixun_id;
|
||||||
|
@property (nonatomic, copy) NSString * hospitalName;
|
||||||
|
@property (nonatomic, copy) NSString * reservationOffice;
|
||||||
|
@property (nonatomic, copy) NSString * reservationDoctor;
|
||||||
|
@property (nonatomic, copy) NSString * realname;
|
||||||
|
@property (nonatomic, copy) NSString * state ;// 状态 1未派单 2已派单 3已接单 4已预约 5已完成 6操作人员驳回 7驻场人员驳回 8 超时未接单 6,7,8红色 其余都是绿色
|
||||||
|
@property (nonatomic, copy) NSString * createTime;
|
||||||
|
@property (nonatomic, copy) NSString * desireTime;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// XJBigillnessModel.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJBigillnessModel.h"
|
||||||
|
|
||||||
|
@implementation XJBigillnessModel
|
||||||
|
|
||||||
|
+ (NSDictionary *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
NSDictionary * dic =@{@"zixun_id" :@"id"};
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// XJEmergencyContactModel.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJEmergencyContactModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * contact_ID;
|
||||||
|
@property (nonatomic, copy) NSString * phone;
|
||||||
|
@property (nonatomic, copy) NSString * familyRelation_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * name;
|
||||||
|
@property (nonatomic, copy) NSString * idCard;
|
||||||
|
@property (nonatomic, copy) NSString * familyRelation;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// XJEmergencyContactModel.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJEmergencyContactModel.h"
|
||||||
|
|
||||||
|
@implementation XJEmergencyContactModel
|
||||||
|
|
||||||
|
+ (NSDictionary *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
NSDictionary * dic =@{@"contact_ID" :@"id"};
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
// XJMineCenterUserModel.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJMineCenterUserModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * realname;
|
||||||
|
@property (nonatomic, copy) NSString * workNo;
|
||||||
|
@property (nonatomic, copy) NSString * phone;
|
||||||
|
@property (nonatomic, copy) NSString * idCard;
|
||||||
|
@property (nonatomic, copy) NSString * sex;
|
||||||
|
@property (nonatomic, copy) NSString * sex_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * personType;
|
||||||
|
@property (nonatomic, copy) NSString * personType_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * orgCode;
|
||||||
|
@property (nonatomic, copy) NSString * avatar;
|
||||||
|
@property (nonatomic, copy) NSString * value;
|
||||||
|
@property (nonatomic, copy) NSString * text;
|
||||||
|
@property (nonatomic, copy) NSString * title;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// XJMineCenterUserModel.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/7/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJMineCenterUserModel.h"
|
||||||
|
|
||||||
|
@implementation XJMineCenterUserModel
|
||||||
|
|
||||||
|
@end
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// XJSOSDoctorDetailInfoModel.h
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XJSOSDoctorDetailHistory : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * status;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserId;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserName;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserSex;
|
||||||
|
@property (nonatomic, copy) NSString * accept_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * updateTime;
|
||||||
|
@property (nonatomic, copy) NSString * stationBusiness_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * sendOrderHospital;
|
||||||
|
@property (nonatomic, copy) NSString * orderId;
|
||||||
|
@property (nonatomic, copy) NSString * stationBusiness;
|
||||||
|
@property (nonatomic, copy) NSString * createTime;
|
||||||
|
@property (nonatomic, copy) NSString * createBy;
|
||||||
|
@property (nonatomic, copy) NSString * history_id;
|
||||||
|
@property (nonatomic, copy) NSString * transferOrderTime;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface XJSOSDoctorDetailInfoModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * createTimeEnd;
|
||||||
|
@property (nonatomic, copy) NSString * majorSalvageOpinion;
|
||||||
|
@property (nonatomic, copy) NSString * infoDesc;
|
||||||
|
@property (nonatomic, copy) NSString * delFlag;
|
||||||
|
@property (nonatomic, copy) NSString * detail_id;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserDepart;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserMobile;
|
||||||
|
@property (nonatomic, copy) NSString * memo;
|
||||||
|
@property (nonatomic, copy) NSString * orderDetail;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserAvatar;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * updateBy;
|
||||||
|
@property (nonatomic, copy) NSString * sessionNow;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserSex;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserId;
|
||||||
|
@property (nonatomic, copy) NSString * isDispatch_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * createBy;
|
||||||
|
@property (nonatomic, copy) NSString * stationRejectionTime;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserName;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserAge;
|
||||||
|
@property (nonatomic, copy) NSString * createTime;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * resourceId;
|
||||||
|
@property (nonatomic, copy) NSString * operationUserSex;
|
||||||
|
@property (nonatomic, copy) NSString * stationBusiness;
|
||||||
|
@property (nonatomic, copy) NSString * majorUserSex;
|
||||||
|
@property (nonatomic, copy) NSString * status;
|
||||||
|
@property (nonatomic, copy) NSString * operationUserName;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserDepart;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserSecondDepart;
|
||||||
|
@property (nonatomic, copy) NSString * majorUserId;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserSex;
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSArray<XJSOSDoctorDetailHistory *> * orderSendRecordList;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * stationBusiness_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * majorResponseTime;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserMobile;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserId;
|
||||||
|
@property (nonatomic, copy) NSString * orderStatus;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserAvatar;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorType;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserAge;
|
||||||
|
@property (nonatomic, copy) NSString * sessionId;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserName;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserMobile;
|
||||||
|
@property (nonatomic, copy) NSString * stationUserName;
|
||||||
|
@property (nonatomic, copy) NSString * updateTime;
|
||||||
|
@property (nonatomic, copy) NSString * operationUserMobile;
|
||||||
|
@property (nonatomic, copy) NSString * majorUserName;
|
||||||
|
@property (nonatomic, copy) NSString * isDispatch;
|
||||||
|
@property (nonatomic, copy) NSString * orderStatus_dictText;
|
||||||
|
@property (nonatomic, copy) NSString * resourceName;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserSecondDepart;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserDepart;
|
||||||
|
@property (nonatomic, copy) NSString * orderOverTime;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserIdCard;
|
||||||
|
@property (nonatomic, copy) NSString * initiatorUserAvatar;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserId;
|
||||||
|
@property (nonatomic, copy) NSString * operationUserId;
|
||||||
|
@property (nonatomic, copy) NSString * operationResponseTime;
|
||||||
|
@property (nonatomic, copy) NSString * stationResponseTime;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString * operationSendOrderTime;
|
||||||
|
@property (nonatomic, assign) BOOL isFill;
|
||||||
|
@property (nonatomic, copy) NSString * sendOrderHospital;
|
||||||
|
@property (nonatomic, copy) NSString * salvageUserIdCard;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
//
|
||||||
|
// XJSOSDoctorDetailInfoModel.m
|
||||||
|
// XinjiangProject
|
||||||
|
//
|
||||||
|
// Created by 仁康信息 on 2023/8/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XJSOSDoctorDetailInfoModel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@implementation XJSOSDoctorDetailHistory
|
||||||
|
|
||||||
|
+ (NSDictionary *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
NSDictionary * dic =@{@"history_id" :@"id"};
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XJSOSDoctorDetailInfoModel
|
||||||
|
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||||
|
{
|
||||||
|
|
||||||
|
return @{
|
||||||
|
@"orderSendRecordList":[XJSOSDoctorDetailHistory class]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (NSDictionary *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
NSDictionary * dic =@{@"detail_id" :@"id"};
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user