Commit f3a97633 authored by 吕繁刚's avatar 吕繁刚 💬

提交

parent 7d10e1ad
...@@ -115,13 +115,45 @@ ...@@ -115,13 +115,45 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "BenYueWallet/Class/home/Controller/SLHomeNewVC.m" filePath = "BenYueWallet/Tools/LLContactUtilies.m"
timestampString = "584601911.277411" timestampString = "584611878.873239"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "288" startingLineNumber = "47"
endingLineNumber = "288" endingLineNumber = "47"
landmarkName = "-layoutNoTest" landmarkName = "-checkAuthorizationStatusAndDeniedShowAlertWithController:CompleteContactInfo:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "BenYueWallet/Tools/LLContactUtilies.m"
timestampString = "584611878.873286"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "37"
endingLineNumber = "37"
landmarkName = "-checkAuthorizationStatusAndDeniedShowAlertWithController:CompleteContactInfo:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "BenYueWallet/Tools/LLContactUtilies.m"
timestampString = "584611878.8733259"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "34"
endingLineNumber = "34"
landmarkName = "-checkAuthorizationStatusAndDeniedShowAlertWithController:CompleteContactInfo:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
if (!_nextBtn) { if (!_nextBtn) {
// _nextBtn = [UIButton createButtonWithTitle:@"下一步" titleColor:[UIColor whiteColor] titleFont:[UIFont systemFontOfSize:18] normalBackgroundImage:[UIImage imageNamed:@"anniu"] disabledBackgroundImage:[UIImage imageNamed:@"灰色按钮"] target:self action:@selector(nextBtnClick)]; // _nextBtn = [UIButton createButtonWithTitle:@"下一步" titleColor:[UIColor whiteColor] titleFont:[UIFont systemFontOfSize:18] normalBackgroundImage:[UIImage imageNamed:@"anniu"] disabledBackgroundImage:[UIImage imageNamed:@"灰色按钮"] target:self action:@selector(nextBtnClick)];
_nextBtn = [UIButton createButtonWithTitle:@"下一步" titleColor:[UIColor whiteColor] titleFont:[UIFont systemFontOfSize:20*Iphone6_WIDE_SCALE] backgroundColor:BENYUE_NONMAL_BLUE cornerRadius:22 target:self action:@selector(nextBtnClick)]; _nextBtn = [UIButton createButtonWithTitle:@"完成" titleColor:[UIColor whiteColor] titleFont:[UIFont systemFontOfSize:20*Iphone6_WIDE_SCALE] backgroundColor:BENYUE_NONMAL_BLUE cornerRadius:22 target:self action:@selector(nextBtnClick)];
_nextBtn.frame = CGRectMake(60, self.pwdTF.bottom + 50, SCREEN_WIDTH - 120, 50); _nextBtn.frame = CGRectMake(60, self.pwdTF.bottom + 50, SCREEN_WIDTH - 120, 50);
} }
return _nextBtn; return _nextBtn;
......
...@@ -17,8 +17,7 @@ static NSString *chooseCellIdentifier = @"contactchoosecell"; ...@@ -17,8 +17,7 @@ static NSString *chooseCellIdentifier = @"contactchoosecell";
static NSString *tfCellIdentifier = @"contacttfcell"; static NSString *tfCellIdentifier = @"contacttfcell";
static NSString *phoneCellIdentifier = @"contactphonecell"; static NSString *phoneCellIdentifier = @"contactphonecell";
@interface SLContactViewController ()<UITableViewDelegate, UITableViewDataSource, LLLocationManagerDelegate> @interface SLContactViewController ()<UITableViewDelegate, UITableViewDataSource, LLLocationManagerDelegate>{
{
CGFloat _longitude; // 经度 CGFloat _longitude; // 经度
CGFloat _latitude; // 纬度 CGFloat _latitude; // 纬度
} }
...@@ -61,8 +60,7 @@ static NSString *phoneCellIdentifier = @"contactphonecell"; ...@@ -61,8 +60,7 @@ static NSString *phoneCellIdentifier = @"contactphonecell";
} }
// 获取通讯录上传 // 获取通讯录上传
- (void)getContactInfo - (void)getContactInfo{
{
[self.contactUtilis checkAuthorizationStatusAndDeniedShowAlertWithController:nil CompleteContactInfo:^(NSMutableArray *contactArray) { [self.contactUtilis checkAuthorizationStatusAndDeniedShowAlertWithController:nil CompleteContactInfo:^(NSMutableArray *contactArray) {
//TODO: 把通讯录数据传给后台 //TODO: 把通讯录数据传给后台
NSDictionary *dic = @{@"userPhoneLists" : contactArray}; NSDictionary *dic = @{@"userPhoneLists" : contactArray};
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
_orderTypeLab.textColor = [UIColor colorWithHexString:@"#F5A623"]; _orderTypeLab.textColor = [UIColor colorWithHexString:@"#F5A623"];
} }
self.amountLab.text = [NSString stringWithFormat:@"%.2f",model.borrowMoney]; self.amountLab.text = [NSString stringWithFormat:@"%.2f",model.borrowMoney];
self.daysLab.text = [NSString stringWithFormat:@"%.2f",model.realPayMoney]; self.daysLab.text = [NSString stringWithFormat:@"%.2f",model.needPayMoney];
self.repaymentLab.text = model.limitDays; self.repaymentLab.text = model.limitDays;
} }
......
...@@ -18,16 +18,22 @@ ...@@ -18,16 +18,22 @@
_orderImageView.image = [UIImage imageNamed:@"orderDetOverdue"]; //u逾期还款 _orderImageView.image = [UIImage imageNamed:@"orderDetOverdue"]; //u逾期还款
_orderStatusLab.text = @"订单已逾期"; _orderStatusLab.text = @"订单已逾期";
_orderStatusLab.textColor = [UIColor colorWithHexString:@"#EB4542"]; _orderStatusLab.textColor = [UIColor colorWithHexString:@"#EB4542"];
_yuqiDaysLab.textColor = [UIColor colorWithHexString:@"#EB4542"];
_yuqiMoneyLab.textColor = [UIColor colorWithHexString:@"#EB4542"];
}else{ }else{
_orderImageView.image = [UIImage imageNamed:@"orderDetNormal"]; //正常还款 _orderImageView.image = [UIImage imageNamed:@"orderDetNormal"]; //正常还款
_orderStatusLab.text = @"订单已完成"; _orderStatusLab.text = @"订单已完成";
_orderStatusLab.textColor = [UIColor colorWithHexString:@"#20B759"]; _orderStatusLab.textColor = [UIColor colorWithHexString:@"#20B759"];
_yuqiMoneyLab.textColor = [UIColor colorWithHexString:@"#333333"];
_yuqiDaysLab.textColor = [UIColor colorWithHexString:@"#333333"];
} }
}else if ([dataArray[0] isEqualToString:@"6"]){ }else if ([dataArray[0] isEqualToString:@"6"]){
_orderImageView.image = [UIImage imageNamed:@"orderDetPass"]; //订单被拒 _orderImageView.image = [UIImage imageNamed:@"orderDetPass"]; //订单被拒
_orderStatusLab.text = @"审核未通过"; _orderStatusLab.text = @"审核未通过";
_orderStatusLab.textColor = [UIColor colorWithHexString:@"#F5A623"]; _orderStatusLab.textColor = [UIColor colorWithHexString:@"#F5A623"];
_yuqiMoneyLab.textColor = [UIColor colorWithHexString:@"#333333"];
_yuqiDaysLab.textColor = [UIColor colorWithHexString:@"#333333"];
} }
_orderNoLab.text = dataArray[2]; _orderNoLab.text = dataArray[2];
......
...@@ -32,6 +32,17 @@ ...@@ -32,6 +32,17 @@
_protocolLab.text = dataArray[4]; _protocolLab.text = dataArray[4];
CGFloat allMoney = [[NSString stringWithFormat:@"%@",dataArray[5]] floatValue]; CGFloat allMoney = [[NSString stringWithFormat:@"%@",dataArray[5]] floatValue];
_allMoneyLab.text = [NSString stringWithFormat:@"%.2f元",allMoney]; _allMoneyLab.text = [NSString stringWithFormat:@"%.2f元",allMoney];
NSInteger yuqiDays = [dataArray[2] integerValue];
if (yuqiDays > 0) {
_orderStatusLab.textColor = [UIColor colorWithHexString:@"#EB4542"];
_yuqiDaysLab.textColor = [UIColor colorWithHexString:@"#EB4542"];
_yuqiMoneyLab.textColor = [UIColor colorWithHexString:@"#EB4542"];
}else{
_orderStatusLab.textColor = [UIColor colorWithHexString:@"#333333"];
_yuqiDaysLab.textColor = [UIColor colorWithHexString:@"#333333"];
_yuqiMoneyLab.textColor = [UIColor colorWithHexString:@"#333333"];
}
} }
- (void)awakeFromNib { - (void)awakeFromNib {
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tsD-gV-cwG"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tsD-gV-cwG">
<rect key="frame" x="15" y="95" width="297" height="1"/> <rect key="frame" x="15" y="95" width="297" height="1"/>
<color key="backgroundColor" red="0.60784313729999995" green="0.60784313729999995" blue="0.60784313729999995" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.95890945196151733" green="0.95963555574417114" blue="0.95902186632156372" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="MFD-p5-hJm"/> <constraint firstAttribute="height" constant="1" id="MFD-p5-hJm"/>
</constraints> </constraints>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xuz-h4-dgb"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xuz-h4-dgb">
<rect key="frame" x="15" y="258" width="297" height="1"/> <rect key="frame" x="15" y="258" width="297" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" red="0.95890945196151733" green="0.95963555574417114" blue="0.95902186632156372" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="ByB-Uj-0nm"/> <constraint firstAttribute="height" constant="1" id="ByB-Uj-0nm"/>
</constraints> </constraints>
......
...@@ -342,19 +342,22 @@ ...@@ -342,19 +342,22 @@
if (!self.isBind) { if (!self.isBind) {
[self confirmBindCard]; [self confirmBindCard];
} else { } else {
// 先解绑,再绑卡 // // 先解绑,再绑卡
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); // dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
dispatch_queue_global_t queue = dispatch_get_global_queue(0, 0); // dispatch_queue_global_t queue = dispatch_get_global_queue(0, 0);
dispatch_group_t group = dispatch_group_create(); // dispatch_group_t group = dispatch_group_create();
dispatch_group_async(group, queue, ^{ // dispatch_group_async(group, queue, ^{
[self unbindCardWithSemaphore:semaphore]; // [self unbindCardWithSemaphore:semaphore];
}); // });
dispatch_group_notify(group, queue, ^{ // dispatch_group_notify(group, queue, ^{
[self confirmBindCard]; // [self confirmBindCard];
}); // });
[self resetBindCard];
} }
} }
// 绑定银行卡 // 绑定银行卡
- (void)confirmBindCard{ - (void)confirmBindCard{
NSString * idStr = [USER_DEFAULT objectForKey:BENYUE_USER_ID_NUM]; NSString * idStr = [USER_DEFAULT objectForKey:BENYUE_USER_ID_NUM];
...@@ -374,10 +377,29 @@ ...@@ -374,10 +377,29 @@
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
NSLog(@"绑卡失败"); NSLog(@"绑卡失败");
}]; }];
}
- (void)resetBindCard{
NSString * idStr = [USER_DEFAULT objectForKey:BENYUE_USER_ID_NUM];
__block __typeof(self) weakself = self;
NSDictionary * dict = @{@"bankCardNo":weakself.bankNumTF.text,
@"bankName":weakself.bankNameStr,
@"bankPhone":weakself.phoneNumTF.text,
@"userName":weakself.userNameLab.text,
@"idCardNo":idStr,
@"msgCode":weakself.smsNumTF.text};
[[LLNetworkManagerTool sharedManager] postJsonWithUrlString:@"userBank/changeBind" parameters:dict success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSLog(@"换绑成功");
[MBProgressHUD showAutoHideMessage:@"换绑成功"];
[[NSNotificationCenter defaultCenter] postNotificationName:changeVerifyStatus object:@(self.index)];
[self.navigationController popViewControllerAnimated:YES];
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
NSLog(@"换绑失败");
}];
} }
// 解绑银行卡 // 解绑银行卡
- (void)unbindCardWithSemaphore:(dispatch_semaphore_t)semaphore{ - (void)unbindCardWithSemaphore:(dispatch_semaphore_t)semaphore{
[[LLNetworkManagerTool sharedManager] requestMethod:POST urlString:@"userBank/unBind" parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { [[LLNetworkManagerTool sharedManager] requestMethod:POST urlString:@"userBank/unBind" parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
......
...@@ -96,7 +96,11 @@ static NSString *labelCellIdentifier = @"finishOrderDetailCell"; ...@@ -96,7 +96,11 @@ static NSString *labelCellIdentifier = @"finishOrderDetailCell";
[self.dataArray addObject:self.model.gmtDatetime]; [self.dataArray addObject:self.model.gmtDatetime];
[self.dataArray addObject:[NSString stringWithFormat:@"%.2f元", self.model.needPayMoney]]; [self.dataArray addObject:[NSString stringWithFormat:@"%.2f元", self.model.needPayMoney]];
[self.dataArray addObject:self.model.limitPayTime]; [self.dataArray addObject:self.model.limitPayTime];
if (_model.realPayTime) {
[self.dataArray addObject:self.model.realPayTime]; [self.dataArray addObject:self.model.realPayTime];
}else{
[self.dataArray addObject:@""];
}
[self.dataArray addObject:[NSString stringWithFormat:@"%@天", self.model.overdueDays]]; [self.dataArray addObject:[NSString stringWithFormat:@"%@天", self.model.overdueDays]];
[self.dataArray addObject:[NSString stringWithFormat:@"%@元", self.model.overdueMoney]]; [self.dataArray addObject:[NSString stringWithFormat:@"%@元", self.model.overdueMoney]];
[self.dataArray addObject:[NSString stringWithFormat:@"%.2f元", self.model.realPayMoney]]; [self.dataArray addObject:[NSString stringWithFormat:@"%.2f元", self.model.realPayMoney]];
......
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
[MBProgressHUD showAutoHideMessage:@"还款成功"]; [MBProgressHUD showAutoHideMessage:@"还款成功"];
[[SLLoginSingle sharedSingle].orderStatusSubject sendNext:@(YES)]; [[SLLoginSingle sharedSingle].orderStatusSubject sendNext:@(YES)];
[self.navigationController popToRootViewControllerAnimated:YES]; [self.navigationController popToRootViewControllerAnimated:YES];
self.navigationController.tabBarController.selectedIndex = 0;
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment