新疆员工端更新请求地址,手机号、icon

This commit is contained in:
History
2025-11-05 10:41:28 +08:00
parent 8f7d08f1e1
commit 2ec6c65bef
47 changed files with 869 additions and 20 deletions
@@ -395,7 +395,7 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -439,7 +439,7 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -73,16 +73,12 @@
//#define H5DevHost UserDefaultObjectForKey(@"H5DevHost")//
//#define IntervenH5 UserDefaultObjectForKey(@"IntervenH5")
//测试环境地址
//四合一
//正文斌 @"http://192.168.1.28"。青海项目:https://quarry-api.yg.icdat.cn 四合一://https://starry.test.icdat.cn
//#define Http @"https://starry.test.icdat.cn"
//#define H5DevHost @"starry.test.icdat.cn"//
//#define IntervenH5 @"https://starry.out.icdat.cn"
//开发环境地址
//#define Http @"https://xjgateway.mcrm.vip:8888"//
//开发环境地址 彭杰 http://192.168.1.37
//#define Http @"http://192.168.1.37"//
//#define H5DevHost @"xjgateway.mcrm.vip:8888"//
//#define IntervenH5 @"https://xjconsole.mcrm.vip:8888"
//#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
@@ -91,9 +87,12 @@
//#define Http @"http://192.168.1.23"//昊
#define Http @"https://api.xjygjk.com"//
#define H5DevHost @"api.xjygjk.com"//
#define IntervenH5 @"https://console.xjygjk.com"
//正式地址
#define Http @"https://api-jkglpt.iosp.ydpt.tech"//
#define H5DevHost @"api-jkglpt.iosp.ydpt.tech"//
#define IntervenH5 @"https://console-jkglpt.iosp.ydpt.tech"
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
#define SCHEME @"https" //
#endif /* StatusMacros_h */
@@ -25,7 +25,7 @@
//高德key
#define AMAPSDKKEY @"59c99e428ea0ea0086d1e1bd7ab2ca6b"
#define AMAPSDKKEY @"43f28dcc5782a0aa98169624f6e94b76"
#define KNotificAgreeProtoocl @"AGREEPMAP"
@@ -133,4 +133,5 @@
- (void)getSOSSmallSumData:(NSMutableDictionary *)parmDic;
- (void)healthAccountLogin:(NSMutableDictionary *)parmDic;
@end
@@ -778,5 +778,11 @@
//
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/orderThrough",Http] params:parmDic];
}
//登录
- (void)healthAccountLogin:(NSMutableDictionary *)parmDic {
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/sys/mLoginAnYan",Http] params:parmDic];
}
@end
@@ -7,7 +7,8 @@
#import "AppDelegate+AppService.h"
#import "HQBaseTabBarController.h"
#import "XJLoginViewController.h"
//#import "XJLoginViewController.h"
#import "XJLoginTopChangeViewController.h"
#import <IQKeyboardManager/IQKeyboardManager.h>
#import <AMapFoundationKit/AMapFoundationKit.h>
@@ -323,7 +324,7 @@
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = KWhiteColor;
XJLoginViewController * loginvc = [[XJLoginViewController alloc] init];
XJLoginTopChangeViewController * loginvc = [[XJLoginTopChangeViewController alloc] init];
HQBaseNavigationController * nav = [[HQBaseNavigationController alloc] initWithRootViewController:loginvc];
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
@@ -0,0 +1,16 @@
//
// XJLoginTopChangeViewController.h
// XinjiangProject
//
// Created by Apple on 2025/10/31.
//
#import "HQBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XJLoginTopChangeViewController : HQBaseViewController
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,656 @@
//
// XJLoginTopChangeViewController.m
// XinjiangProject
//
// Created by Apple on 2025/10/31.
//
#import "XJLoginTopChangeViewController.h"
#import "TUIC2CChatViewController.h"
#import "XJLoginFoundPasswordViewController.h"
#import "IMUserInfoModel.h"
#import "RSAObjC.h"
#import "XJMineCenterUserModel.h"
#import "ADJumpViewController.h"
#import "XJRegisterViewController.h"
#import "LVKeyboard.h"
#import "MQTextField.h"
@interface XJLoginTopChangeViewController ()<V2TIMSDKListener,V2TIMSDKListener,LVKeyboardDelegate,UITextFieldDelegate>
@property (nonatomic, strong) UITextField * userNameField;
@property (nonatomic, strong) MQTextField * passwordField;
@property (nonatomic, strong) UIButton * logoBtn;
@property (nonatomic, strong) UIView * loginView;
@property (nonatomic, strong) UIButton * privacyPolicyBtn;
@property (nonatomic, strong) UIButton * agreenBtn;
@property (nonatomic, strong) IMUserInfoModel * model ;
@property (nonatomic, strong) NSMutableArray * dataArray;
@property (nonatomic, strong) UIButton * regisBtn;
@property (nonatomic, strong) LVKeyboard *keyboard;
@property (nonatomic, strong) UIButton *toggleButton;
@property (nonatomic, strong) UIButton * leftLoginBtn;
@property (nonatomic, strong) UIButton * rightLoginBtn;
@property (nonatomic, assign) NSInteger loginType;
@end
@implementation XJLoginTopChangeViewController
- (NSMutableArray *)dataArray {
if (!_dataArray) {
_dataArray = [[NSMutableArray alloc] init];
}
return _dataArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.isHidenNaviBar = YES;
self.view.backgroundColor = KWhiteColor;
[self createUI];
[self createData];
self.loginType = 1;
[self setNeedsStatusBarAppearanceUpdate];
//初始化键盘
LVKeyboard *keyboard = [[LVKeyboard alloc] init];
keyboard.delegate = self;
self.keyboard = keyboard;
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
- (void)createUI {
UIImageView * topBackImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(251))];
topBackImg.image = IMAGE_NAMED(@"XJLoginTopImg");
topBackImg.userInteractionEnabled = true;
[self.view addSubview:topBackImg];
UILabel *headLab = [[UILabel alloc] initWithFrame:CGRectMake(24, topBackImg.bottom - kRealValue(46) - 58, 300, 58)];
headLab.numberOfLines = 0;
headLab.textColor = KWhiteColor;
headLab.textAlignment = NSTextAlignmentLeft;
NSString *text = @"你好呀,\n欢迎使用 健康油我";
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
style.lineSpacing = 6; // 设置行间距为10
style.alignment = NSTextAlignmentLeft;
NSDictionary *attributes = @{
NSFontAttributeName: BOLDSYSTEMFONT(20),
NSForegroundColorAttributeName: KWhiteColor,
NSParagraphStyleAttributeName: style
};
headLab.attributedText = [[NSAttributedString alloc] initWithString:text attributes:attributes];
[self.view addSubview:headLab];
UIButton * homeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
homeBtn.frame = CGRectMake(kRealValue(15), kRealValue(40),kRealValue(100), 41);
[homeBtn setTitle:@"< 去首页" forState:UIControlStateNormal];
[homeBtn.titleLabel setFont:BOLDSYSTEMFONT(14)];
[homeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[homeBtn addTarget:self action:@selector(backHomeAction) forControlEvents:UIControlEventTouchUpInside];
[topBackImg addSubview:homeBtn];
//
UIView *loginView = [[UIView alloc]init];
loginView.frame = CGRectMake(0, topBackImg.bottom - kRealValue(20), kScreenWidth, kScreenHeight - topBackImg.bottom - kRealValue(20));
[self.view addSubview:loginView];
loginView.backgroundColor = KWhiteColor;
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:loginView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(16, 16)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.path = maskPath.CGPath;
loginView.layer.mask = maskLayer;
self.loginView = loginView;
// 新增切换逻辑
CGFloat btnWidth = (kScreenWidth - kRealValue(37) * 2) / 2 ;
self.leftLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(37), kRealValue(40), btnWidth, 48)];
[self.leftLoginBtn setTitle:@"平台统一认证" forState:UIControlStateNormal];
[self.leftLoginBtn setTitleColor:KWhiteColor forState:UIControlStateSelected];
[self.leftLoginBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal];
self.leftLoginBtn.selected = true;
self.leftLoginBtn.titleLabel.font = MEDIUMFONT(16);
[self.leftLoginBtn setBackgroundImage:[UIImage imageNamed:@"leftLoginNomal"] forState:UIControlStateNormal];
[self.leftLoginBtn setBackgroundImage:[UIImage imageNamed:@"loginSelectedImg"] forState:UIControlStateSelected];
[self.leftLoginBtn addTarget:self action:@selector(accountLoginTypeClick) forControlEvents:UIControlEventTouchUpInside];
[self.loginView addSubview:self.leftLoginBtn];
self.rightLoginBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.leftLoginBtn.right, kRealValue(40), btnWidth, 48)];
[self.rightLoginBtn setTitle:@"健康系统认证" forState:UIControlStateNormal];
[self.rightLoginBtn setTitleColor:KWhiteColor forState:UIControlStateSelected];
[self.rightLoginBtn setTitleColor:UIColorHex(#2EB8B2) forState:UIControlStateNormal];
self.rightLoginBtn.selected = false;
self.rightLoginBtn.titleLabel.font = MEDIUMFONT(16);
[self.rightLoginBtn setBackgroundImage:[UIImage imageNamed:@"loginNomalImg"] forState:UIControlStateNormal];
[self.rightLoginBtn setBackgroundImage:[UIImage imageNamed:@"rightLoginSelected"] forState:UIControlStateSelected];
[self.rightLoginBtn addTarget:self action:@selector(healthLoginTypeClick) forControlEvents:UIControlEventTouchUpInside];
[self.loginView addSubview:self.rightLoginBtn];
UITextField *accountField = [[UITextField alloc]init];
accountField.frame = CGRectMake(kRealValue(37),self.leftLoginBtn.bottom + kRealValue(24), loginView.width - kRealValue(74), 48);
accountField.placeholder = @"请输入员工编号或用户名";
accountField.font = BOLDSYSTEMFONT(14);
accountField.textColor = CFontColor1;
self.userNameField = accountField;
self.userNameField.backgroundColor = UIColorHex(#EEEEEE);
self.userNameField.layer.cornerRadius = 24;
self.userNameField.layer.masksToBounds = true;
UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 48)];
UIImageView * userLeftImg = [[UIImageView alloc] initWithFrame:CGRectMake(16, 14, 20, 20)];
userLeftImg.image = [UIImage imageNamed:@"userInputLeftImg"];
[leftview addSubview:userLeftImg];
self.userNameField.leftView = leftview;
self.userNameField.leftViewMode = UITextFieldViewModeAlways;
self.userNameField.autocapitalizationType = UITextAutocapitalizationTypeNone;
[loginView addSubview:accountField ];
//
//
MQTextField * passwordField = [[MQTextField alloc]init];
passwordField.frame = CGRectMake(kRealValue(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;
UIView * passLeftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 48)];
UIImageView * passLeftImg = [[UIImageView alloc] initWithFrame:CGRectMake(16, 14, 20, 20)];
passLeftImg.image = [UIImage imageNamed:@"passLockImg"];
[passLeftview addSubview:passLeftImg];
self.passwordField.leftView = passLeftview;
self.passwordField.leftViewMode = UITextFieldViewModeAlways;
self.passwordField.layer.cornerRadius = 24;
self.passwordField.layer.masksToBounds = true;
self.passwordField.delegate = self;
self.passwordField.inputView = self.keyboard;
self.toggleButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.toggleButton setImage:[UIImage imageNamed:@"eye"] forState:UIControlStateNormal];
[self.toggleButton setImage:[UIImage imageNamed:@"eye.slash"] forState:UIControlStateSelected];
self.toggleButton.frame = CGRectMake(0, 9, 30,30);
[self.toggleButton addTarget:self action:@selector(togglePasswordVisibility) forControlEvents:UIControlEventTouchUpInside];
// 创建一个容器视图来包含按钮,并增加边距
UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 48)];
[rightView addSubview:self.toggleButton];
// 调整按钮在容器视图中的位置,增加边距
self.toggleButton.center = CGPointMake(rightView.frame.size.width - self.toggleButton.frame.size.width / 2, rightView.frame.size.height / 2);
self.passwordField.rightView = rightView;
self.passwordField.rightViewMode = UITextFieldViewModeAlways;
[loginView addSubview:passwordField];
UIButton *loginBtn = [UIButton buttonWithType:UIButtonTypeCustom];
loginBtn.frame = CGRectMake(kRealValue(37), self.passwordField.bottom + kRealValue(20), WIDTH - kRealValue(74), 48);
[loginBtn setTitle:@"登录" forState:UIControlStateNormal];
[loginBtn.titleLabel setFont:BOLDSYSTEMFONT(16)];
loginBtn.backgroundColor = UIColorHex(#2EB8B2);
loginBtn.layer.cornerRadius = 24;
loginBtn.layer.masksToBounds = true;
[loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[loginBtn addTarget:self action:@selector(toClickFootBtn:) forControlEvents:UIControlEventTouchUpInside];
[loginView addSubview:loginBtn];
UIButton * foundPasswordBtn = [UIButton buttonWithType:UIButtonTypeCustom];
foundPasswordBtn.frame = CGRectMake(kRealValue(35), loginBtn.bottom + kRealValue(23), WIDTH - kRealValue(70), 20);
[foundPasswordBtn setTitle:@"找回密码" forState:UIControlStateNormal];
foundPasswordBtn.titleLabel.font = MEDIUMFONT(14);
[foundPasswordBtn setTitleColor:UIColorHex(#B6B6B6) forState:UIControlStateNormal];
[foundPasswordBtn addTarget:self action:@selector(foundUserPasswordAction) forControlEvents:UIControlEventTouchUpInside];
[loginView addSubview:foundPasswordBtn];
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"LOGINAgree"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSUserDefaults * agreeDefaul = [NSUserDefaults standardUserDefaults];
NSString * agree = [agreeDefaul objectForKey:@"LOGINAgree"];
//隐私
NSString *string = @"我已阅读并同意用户协议和隐私政策";
YYLabel * yslabel = [[YYLabel alloc] init];
yslabel.textColor = UIColorHex(#B6B6B6);
yslabel.textAlignment = NSTextAlignmentCenter;
[self.view addSubview:yslabel];
[yslabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_offset(-29 - SafetyAreaHeight);
make.centerX.mas_equalTo(self.view);
}];
yslabel.numberOfLines = 0;
NSMutableAttributedString *attributed = [[NSMutableAttributedString alloc] initWithString:string];
// 1️⃣ 给整段文字设置默认样式(灰色)
attributed.font = [UIFont systemFontOfSize:13 weight:UIFontWeightRegular];
attributed.color = UIColorHex(#B6B6B6); // 默认灰色
[attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#2EB8B2) range:[string rangeOfString:@"用户协议"]];
[attributed setAttribute:NSForegroundColorAttributeName value:UIColorHex(#2EB8B2) range:[string rangeOfString:@"隐私政策"]];
YYTextHighlight * protocolHightlight = [[YYTextHighlight alloc] init];
protocolHightlight.userInfo = @{@"协议":@"用户协议"};
[protocolHightlight setColor:UIColorHex(#2EB8B2)];
[attributed setTextHighlight:protocolHightlight range:[string rangeOfString:@"用户协议"]];
YYTextHighlight * layHightlight = [[YYTextHighlight alloc] init];
layHightlight.userInfo = @{@"隐私":@"隐私政策"};
[layHightlight setColor:UIColorHex(#2EB8B2)];
[attributed setTextHighlight:layHightlight range:[string rangeOfString:@"隐私政策"]];
attributed.lineSpacing = 3;
attributed.paragraphSpacing = 5;
yslabel.attributedText = attributed;
yslabel.highlightTapAction = ^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
NSString *string = [text.string substringWithRange:range];
if ([string containsString:@"用户协议"]){
if (self.dataArray.count <= 0) {
[EasyTextView showErrorText:@"暂无用户协议"];
return;
}
for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 1) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
webVC.webTitle = @"用户协议";
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
if ([string containsString:@"隐私政策"]){
if (self.dataArray.count <= 0) {
[EasyTextView showErrorText:@"暂无隐私政策"];
return;
}
for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 2) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
webVC.webTitle = @"隐私政策";
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
if ([string containsString:@"相关法律说明"]){
for (XJMineCenterUserModel * model in self.dataArray) {
if ([model.value integerValue] == 3) {
ADJumpViewController * webVC= [[ADJumpViewController alloc] init];
webVC.webTitle = @"相关法律说明";
webVC.webUrl = [NSString stringWithFormat:@"%@%@",IntervenH5,model.text];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
};
self.agreenBtn = [[UIButton alloc] init];
[self.agreenBtn addTarget:self action:@selector(agreeProtocolAction:) forControlEvents:UIControlEventTouchUpInside];
[self.agreenBtn setImage:IMAGE_NAMED(@"login_nomalProtocol") forState:UIControlStateNormal];
[self.agreenBtn setImage:IMAGE_NAMED(@"login_selectProtocol") forState:UIControlStateSelected];
if ([agree intValue] == 1) {
self.agreenBtn.selected = true;
}else
{
self.agreenBtn.selected = false;
}
[self.view addSubview:self.agreenBtn];
[self.agreenBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(yslabel.mas_left).offset(-5);
make.width.height.mas_offset(kRealValue(20));
make.centerY.mas_equalTo(yslabel);
}];
}
- (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 < 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"];
[parmDic setObject:encryptStr forKey:@"password"];
//新增
UIDevice *currentDevice = [UIDevice currentDevice];
NSString * phone = [currentDevice getCurrentDeviceModel];
// NSString * system = [NSString stringWithFormat:@"%.1f",CurrentSystemVersion] ;
if (!ValidStr(phone)) {
[parmDic setObject:phone forKey:@"deviceType"];
}
[parmDic setObject:@(CurrentSystemVersion) forKey:@"deviceSystem"];
//统一平台登录
if (self.loginType == 1) {
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil];
[proctocolApi healthAccountLogin:parmDic];
}
else //健康系统登录
{
if (self.passwordField.text.length < 12 || self.passwordField.text.length > 32) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"密码不安全,请先修改密码" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
}];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
XJLoginFoundPasswordViewController * modifVC = [[XJLoginFoundPasswordViewController alloc] init];
[self.navigationController pushViewController:modifVC animated:YES];
}];
[alertController addAction:cancelAction];
[alertController addAction:sureAction];
[self presentViewController:alertController animated:YES completion:nil];
return;
}
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"LOGINGAPI" NeedToken:nil];
[proctocolApi PostLogin:parmDic];
}
}
#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) && ![user.avatar isEqualToString:ResourceAddress]) {
avatar = user.avatar;
}else
{
if ([user.sex_dictText isEqualToString:@""]) {
placeholdImg = @"heard_woman";
}else
{
placeholdImg = @"heard_man";
}
}
if (ValidStr(user.personType) || [user.personType intValue] != 1 ) {
[self showMBProgressHUDOnlyWithString:@"账号或登录密码错误,请重试"];
return;
}
[[NSUserDefaults standardUserDefaults] setObject:avatar forKey:@"AVATAR"];
[[NSUserDefaults standardUserDefaults] setObject:placeholdImg forKey:@"placeholdImg"];
[[NSUserDefaults standardUserDefaults] synchronize];
KPostNotification(KNotificationLoginStateChange, @YES);
#if DEBUG
[self loginImAccount];
#else
[self loginImAccount];
#endif
}
if ([tag isEqualToString:@"IMAPI"]) {
NSDictionary * pamrDic = response;
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
iminfoModel.IMInfo = pamrDic;
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
// 2. 初始化 config 对象
V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init];
// 3. 指定 log 输出级别。
config.logLevel = V2TIM_LOG_INFO;
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
[[V2TIMManager sharedInstance] addIMSDKListener:self];
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
[[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config];
[ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig];
}
if ([tag isEqualToString:@"AGREEAPI"]) {
NSArray * array = response;
for (NSDictionary * parmDic in array) {
XJMineCenterUserModel * model = [XJMineCenterUserModel modelWithDictionary:parmDic];
https://api.cqygjk.com/health-consultation/api/consult/conDoctor/selectDictList?dictKey=qh_jump_url
[self.dataArray addObject:model];
}
}
if ([tag isEqualToString:@"VERSIONAPI"]) {
NSString * version = response;
NSBundle *mainBundle = [NSBundle mainBundle];
if (mainBundle) {
NSString *version = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
// NSString *build = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"];
// NSString *displayName = [mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
// NSString *fullVersion = [NSString stringWithFormat:@"%@ %@ (Build %@)", displayName, version, build];
if([version floatValue] < [version floatValue]) {
self.regisBtn.hidden = true;
}else
{
self.regisBtn.hidden = false;
}
}
}
}
- (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;
}
#pragma mark:顶部点击
- (void)accountLoginTypeClick {
self.loginType = 1;
self.leftLoginBtn.selected = true;
self.rightLoginBtn.selected = false;
}
//健康系统登录方法
- (void)healthLoginTypeClick {
self.loginType = 2;
self.leftLoginBtn.selected = false;
self.rightLoginBtn.selected = true;
}
@end
@@ -31,6 +31,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) NSArray * assoSymtomIds;
@property (nonatomic, copy) NSString * status;
@property (nonatomic, copy) NSString * createBy;
@property (nonatomic, copy) NSString * mobile;
@end
NS_ASSUME_NONNULL_END
@@ -209,8 +209,8 @@
}];
self.addressLabel.text = [NSString stringWithFormat:@"%.2f | %@",_aedModel.distance / 1000.0, _aedModel.resourceAddress] ;
self.hospitalName.text = _aedModel.resourceName;
if (!ValidStr(_aedModel.principalPhone)) {
self.phoneLabel.text = _aedModel.principalPhone;
if (!ValidStr(_aedModel.mobile)) {
self.phoneLabel.text = _aedModel.mobile;
self.samllPhoneBtn.hidden = false;
}else
{
@@ -58,7 +58,7 @@
self.titleLabel= [[UILabel alloc] init];
self.titleLabel.font = BOLDSYSTEMFONT(21);
self.titleLabel.textColor = KWhiteColor;
self.titleLabel.text = @"小助手";
self.titleLabel.text = @"全科医生";
self.titleLabel.textAlignment = NSTextAlignmentLeft;
[topView addSubview:self.titleLabel];
Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "健康油我 1.png",
"filename" : "3、健康油我.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
@@ -13,7 +13,7 @@
"value" : "dark"
}
],
"filename" : "健康油我.png",
"filename" : "3、健康油我 1.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
@@ -25,7 +25,7 @@
"value" : "tinted"
}
],
"filename" : "健康油我 2.png",
"filename" : "3、健康油我 2.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "XJLoginTopImg.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "XJLoginTopImg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "XJLoginTopImg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "leftLoginNomal.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "leftLoginNomal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "leftLoginNomal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "loginNomalImg.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "loginNomalImg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "loginNomalImg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "loginSelectedImg.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "loginSelectedImg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "loginSelectedImg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "passLockImg.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "passLockImg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "passLockImg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "rightLoginSelected.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "rightLoginSelected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "rightLoginSelected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "userInputLeftImg.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "userInputLeftImg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "userInputLeftImg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB