Commit a623a042 authored by guanghui.shi's avatar guanghui.shi

还款页面接口变更

parent e1e0fedb
...@@ -26,8 +26,16 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -26,8 +26,16 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *type ; @property (nonatomic, copy) NSString *type ;
/// 一下均是还款中用到的数据
/// 卡Id,享花卡还款中用到 /// 卡Id,享花卡还款中用到
@property (nonatomic, copy) NSString *cardId ; @property (nonatomic, copy) NSString *cardId ;
/// 账单号
@property (nonatomic, copy) NSString *billNumber ;
/// 是否最低还款
@property (nonatomic, assign) BOOL isLowestRepay;
/// 0:正常还款,1:提前还款,
@property (nonatomic, assign) NSInteger isPreRepay;
@end @end
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
/// 校验交易密码 /// 校验交易密码
if (self.type == QGDepositTypeRepay) { if (self.type == QGDepositTypeRepay) {
///还款交易 ///还款交易
[self verifyPaymentWithEbcryPwd:encryptPwd]; [self verifyPaymentWithEncryPwd:encryptPwd];
}else{ }else{
/// 转入转出交易 /// 转入转出交易
[self verifyTradeWithEncryptPwd:encryptPwd]; [self verifyTradeWithEncryptPwd:encryptPwd];
...@@ -189,15 +189,20 @@ ...@@ -189,15 +189,20 @@
#pragma mark - 享花卡还款交易 #pragma mark - 享花卡还款交易
-(void)verifyPaymentWithEbcryPwd:(NSString *)pwd -(void)verifyPaymentWithEncryPwd:(NSString *)pwd
{ {
QGTalosNetwork *networking = [QGTalosNetwork shareManager]; QGTalosNetwork *networking = [QGTalosNetwork shareManager];
NSMutableDictionary *param = [NSMutableDictionary dictionary]; NSMutableDictionary *param = [NSMutableDictionary dictionary];
[param setObject:self.card.cardId forKey:@"cardId"]; [param setObject:self.card.cardId forKey:@"cardId"];
[param setObject:pwd forKey:@"pwd"]; [param setObject:pwd forKey:@"encryptPwd"];
[param setObject:self.card.bankName forKey:@"bankCardName"];
[param setObject:self.card.billNumber forKey:@"billNumber"];
[param setObject:@(self.card.isLowestRepay) forKey:@"isLowestRepay"];
[param setObject:@(self.card.isPreRepay) forKey:@"isPreRepay"];
// [QGRepaymentReuestApi urlWithIndex:QGRepaymentRequestServerMethodRepay] // [QGRepaymentReuestApi urlWithIndex:QGRepaymentRequestServerMethodRepay]
[networking POST:@"http://yapi.quantgroups.com/mock/305/vcc/repay" parameters:param success:^(id _Nonnull responseObject) { [networking POST:@"http://yapi.quantgroups.com/mock/305/vcc/encrypt_repay" parameters:param success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud]; [QGHUDManager hideHud];
if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) { if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
if (self.tradeResultBlock) { if (self.tradeResultBlock) {
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
@property (nonatomic, strong)UITableView *tableView; @property (nonatomic, strong)UITableView *tableView;
@property (nonatomic, strong) UIView *headerView ; @property (nonatomic, strong) UIView *headerView ;
///还款名字
@property (nonatomic, strong) UILabel *payNameLab ; @property (nonatomic, strong) UILabel *payNameLab ;
///金额
@property (nonatomic, strong) UILabel *amountLab ; @property (nonatomic, strong) UILabel *amountLab ;
/// 还款账单描述
@property (nonatomic, strong) UILabel *payDesLab ; @property (nonatomic, strong) UILabel *payDesLab ;
/// 银行名字 /// 银行名字
...@@ -40,16 +40,33 @@ ...@@ -40,16 +40,33 @@
@property (nonatomic, copy) NSString *cardId ; @property (nonatomic, copy) NSString *cardId ;
/// 卡列表URL /// 卡列表URL
@property (nonnull, copy) NSString *bankCardListH5Url; @property (nonnull, copy) NSString *bankCardListH5Url;
/// 还款-提前还款 1:还款2:提前还款 /// 还款-提前还款 0:还款1:提前还款
@property (nonatomic, assign) NSInteger repayType; @property (nonatomic, assign) NSInteger repayType;
///还款金额 ///还款金额
@property (nonatomic, assign) CGFloat repayAmt; @property (nonatomic, assign) CGFloat repayAmt;
/// 账单号
@property (nonatomic, copy) NSString *billNumber ;
@end @end
@implementation QGRepaymentCommitViewController @implementation QGRepaymentCommitViewController
- (BOOL)checkParameters:(NSDictionary *)param
{
if (param[@"repayType"]) {
return YES;
}
return NO;
}
- (void)transferParameters:(NSDictionary *)param
{
self.repayType = [param[@"repayType"] integerValue];
self.billNumber = param[@"billNumber"];
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
...@@ -125,6 +142,11 @@ ...@@ -125,6 +142,11 @@
{ {
QGTalosNetwork *networking = [QGTalosNetwork shareManager]; QGTalosNetwork *networking = [QGTalosNetwork shareManager];
[QGHUDManager showHud:nil]; [QGHUDManager showHud:nil];
NSMutableDictionary *param = [NSMutableDictionary dictionary];
[param setObject:@(self.repayType) forKey:@"repayType"];
if (self.billNumber) {
[param setObject:self.billNumber forKey:@"billNumber"];
}
// [QGRepaymentReuestApi urlWithIndex:QGRepaymentRequestServerMethodRepayInfo]; // [QGRepaymentReuestApi urlWithIndex:QGRepaymentRequestServerMethodRepayInfo];
[networking GET:@"http://yapi.quantgroups.com/mock/305/vcc/repay/page" parameters:nil success:^(id _Nonnull responseObject) { [networking GET:@"http://yapi.quantgroups.com/mock/305/vcc/repay/page" parameters:nil success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud]; [QGHUDManager hideHud];
...@@ -138,7 +160,6 @@ ...@@ -138,7 +160,6 @@
self.bankLimitAmtPerTrade = [responseObject[@"data"][@"bankLimitAmtPerTrade"] floatValue]; self.bankLimitAmtPerTrade = [responseObject[@"data"][@"bankLimitAmtPerTrade"] floatValue];
self.bankCardListH5Url = responseObject[@"data"][@"bankCardListH5Url"]; self.bankCardListH5Url = responseObject[@"data"][@"bankCardListH5Url"];
self.repayType = [responseObject[@"data"][@"repayType"] integerValue]; self.repayType = [responseObject[@"data"][@"repayType"] integerValue];
self.repayAmt = [responseObject[@"data"][@"repayAmt"] floatValue];
self.cardId = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"bankCardId"]]; self.cardId = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"bankCardId"]];
[self.tableView reloadData]; [self.tableView reloadData];
} }
...@@ -236,6 +257,8 @@ ...@@ -236,6 +257,8 @@
card.cardId = self.cardId; card.cardId = self.cardId;
card.minAmount = @"0.00"; card.minAmount = @"0.00";
card.maxAmount = [NSString stringWithFormat:@"%.2f",self.bankLimitAmtPerTrade]; card.maxAmount = [NSString stringWithFormat:@"%.2f",self.bankLimitAmtPerTrade];
card.billNumber = self.billNumber;
card.isPreRepay = self.repayType;
QGDepositPwdManager *manager = [QGDepositPwdManager defaultMangerWithType:QGDepositTypeRepay amount:[NSString stringWithFormat:@"%.2f",self.repayAmt] card:card]; QGDepositPwdManager *manager = [QGDepositPwdManager defaultMangerWithType:QGDepositTypeRepay amount:[NSString stringWithFormat:@"%.2f",self.repayAmt] card:card];
[manager showInView:self.view]; [manager showInView:self.view];
......
...@@ -28,6 +28,11 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -28,6 +28,11 @@ NS_ASSUME_NONNULL_BEGIN
///是否展示待还订单 ///是否展示待还订单
@property (nonatomic, assign) BOOL shouldBillOverdueFlag; @property (nonatomic, assign) BOOL shouldBillOverdueFlag;
/// 还款
@property (nonatomic, copy) NSString *appRepayUrl ;
/// 提前还款
@property (nonatomic, copy) NSString *appPreRepayUrl ;
@end @end
......
...@@ -14,7 +14,7 @@ typedef NS_ENUM(NSInteger,QGRepaymentRequestServerMethod){ ...@@ -14,7 +14,7 @@ typedef NS_ENUM(NSInteger,QGRepaymentRequestServerMethod){
QGRepaymentRequestServerMethodGroupMerge, // 首页列表接口 QGRepaymentRequestServerMethodGroupMerge, // 首页列表接口
QGRepaymentRequestServerMethodHistoryBills, // 历史账单接口 QGRepaymentRequestServerMethodHistoryBills, // 历史账单接口
QGRepaymentRequestServerMethodBillDetail, // 账单详情接口 QGRepaymentRequestServerMethodBillDetail, // 账单详情接口
QGRepaymentRequestServerMethodRepay, // 还款 QGRepaymentRequestServerMethodEncryptRepay, // 还款
QGRepaymentRequestServerMethodRepayStatus, // 还款状态 QGRepaymentRequestServerMethodRepayStatus, // 还款状态
QGRepaymentRequestServerMethodRepayInfo // 还款页面信息 QGRepaymentRequestServerMethodRepayInfo // 还款页面信息
} ; } ;
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
case QGRepaymentRequestServerMethodBillDetail: case QGRepaymentRequestServerMethodBillDetail:
return @"vcc/bill_detail"; return @"vcc/bill_detail";
break; break;
case QGRepaymentRequestServerMethodRepay: case QGRepaymentRequestServerMethodEncryptRepay:
return @"vcc/repay"; return @"vcc/encrypt_repay";
break; break;
case QGRepaymentRequestServerMethodRepayStatus: case QGRepaymentRequestServerMethodRepayStatus:
return @"vcc/repayStatus"; return @"vcc/repayStatus";
......
...@@ -40,7 +40,9 @@ typedef NS_ENUM(NSInteger, QGLoginRequestServerMethod) { ...@@ -40,7 +40,9 @@ typedef NS_ENUM(NSInteger, QGLoginRequestServerMethod) {
/// 根据unionId查询是否可以绑定 /// 根据unionId查询是否可以绑定
QGLoginRequestServerMethodBindAvailable, QGLoginRequestServerMethodBindAvailable,
/// 解绑微信 /// 解绑微信
QGLoginRequestServerMethodUnBindWeChat QGLoginRequestServerMethodUnBindWeChat,
/// 设置页面绑定微信获取验证码
QGLoginRequestServerMethodWxVerifyGetCode
}; };
/*! /*!
......
...@@ -63,9 +63,15 @@ ...@@ -63,9 +63,15 @@
case QGLoginRequestServerMethodBindAvailable: case QGLoginRequestServerMethodBindAvailable:
url = @"vcc/external/login/auth_status/authId"; url = @"vcc/external/login/auth_status/authId";
break; break;
///解除微信授权
case QGLoginRequestServerMethodUnBindWeChat: case QGLoginRequestServerMethodUnBindWeChat:
url = @"vcc/external/login/weChat/unbind"; url = @"vcc/external/login/weChat/unbind";
break; break;
///微信授权获取验证码
case QGLoginRequestServerMethodWxVerifyGetCode:
url = @"vcc/account/send_verify_code";
break;
default: default:
break; break;
} }
......
...@@ -178,13 +178,7 @@ ...@@ -178,13 +178,7 @@
[param setObject:self.wxModel.unionid forKey:@"unionId"]; [param setObject:self.wxModel.unionid forKey:@"unionId"];
[param setObject:self.wxModel.headimgurl ? self.wxModel.headimgurl : @"" forKey:@"headImgUrl"]; [param setObject:self.wxModel.headimgurl ? self.wxModel.headimgurl : @"" forKey:@"headImgUrl"];
[param setObject:self.wxModel.nickname ? self.wxModel.nickname :@"" forKey:@"nickName"]; [param setObject:self.wxModel.nickname ? self.wxModel.nickname :@"" forKey:@"nickName"];
NSString *sex = @"N"; [param setObject:self.wxModel.sex forKey:@"sex"];
if ([self.wxModel.sex isEqualToString:@"1"]) {
sex = @"M";
}else if([self.wxModel.sex isEqualToString:@"2"]){
sex = @"F";
}
[param setObject:sex forKey:@"sex"];
[param setObject:@"" forKey:@"userDesc"]; [param setObject:@"" forKey:@"userDesc"];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodLoginWechat]; // [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodLoginWechat];
...@@ -207,12 +201,23 @@ ...@@ -207,12 +201,23 @@
- (void)vCodeBtnAction:(UIButton *)btn - (void)vCodeBtnAction:(UIButton *)btn
{ {
__weak typeof(self) weakSelf = self;
[self.sendVerifyCodeManger sendMessageCodeWithPhoneNumber:self.phone success:^{ QGTalosNetwork *networking = [QGTalosNetwork shareManager];
[weakSelf fireTimer]; [QGHUDManager showHud:nil];
} fail:^{ // [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodWxVerifyGetCode]
weakSelf.vCodeBtn.userInteractionEnabled = YES; //@"http://yapi.quantgroups.com/mock/305/vcc/account/send_verify_code"
[networking POST:[QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodWxVerifyGetCode] parameters:nil success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud];
if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
[self fireTimer];
}else{
self.vCodeBtn.userInteractionEnabled = YES;
}
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
[QGHUDManager hideHud];
self.vCodeBtn.userInteractionEnabled = YES;
}]; }];
} }
//启动定时器 //启动定时器
......
...@@ -51,7 +51,7 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){ ...@@ -51,7 +51,7 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.title = @"设置"; self.title = @"安全中心";
[self setIsBelowNavBar:NO]; [self setIsBelowNavBar:NO];
[self setNavBarBottomLineHidden:YES]; [self setNavBarBottomLineHidden:YES];
[self custemLeftDefaultBarButtonItem]; [self custemLeftDefaultBarButtonItem];
...@@ -75,7 +75,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){ ...@@ -75,7 +75,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
} }
QGTalosNetwork *networking = [QGTalosNetwork shareManager]; QGTalosNetwork *networking = [QGTalosNetwork shareManager];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodQueryStatus] // [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodQueryStatus]
[networking GET:@"http://yapi.quantgroups.com/mock/305/vcc/external/login/auth_status" parameters:nil success:^(id _Nonnull responseObject) { //@"http://yapi.quantgroups.com/mock/305/vcc/external/login/auth_status"
[networking GET:[QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodQueryStatus] parameters:nil success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud]; [QGHUDManager hideHud];
if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) { if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
NSDictionary *data = responseObject[@"data"]; NSDictionary *data = responseObject[@"data"];
...@@ -238,7 +239,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){ ...@@ -238,7 +239,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
{ {
QGTalosNetwork *networking = [QGTalosNetwork shareManager]; QGTalosNetwork *networking = [QGTalosNetwork shareManager];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodUnBindWeChat] // [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodUnBindWeChat]
[networking GET:@"http://yapi.quantgroups.com/mock/305/vcc/external/login/weChat/unbind" parameters:nil success:^(id _Nonnull responseObject) { //@"http://yapi.quantgroups.com/mock/305/vcc/external/login/weChat/unbind"
[networking GET:[QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodUnBindWeChat] parameters:nil success:^(id _Nonnull responseObject) {
if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) { if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
/// 刷新页面 /// 刷新页面
self.wxAuthStatus = QGAuthStatusUnAuth; self.wxAuthStatus = QGAuthStatusUnAuth;
...@@ -271,7 +273,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){ ...@@ -271,7 +273,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
[QGHUDManager showHud:nil]; [QGHUDManager showHud:nil];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodBindAvailable] // [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodBindAvailable]
[networking GET:@"http://yapi.quantgroups.com/mock/305/vcc/external/login/auth_status/authId" parameters:param success:^(id _Nonnull responseObject) { //@"http://yapi.quantgroups.com/mock/305/vcc/external/login/auth_status/authId"
[networking GET:[QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodBindAvailable] parameters:param success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud]; [QGHUDManager hideHud];
if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) { if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
if (completeBlock) { if (completeBlock) {
......
...@@ -37,6 +37,7 @@ typedef enum : NSUInteger { ...@@ -37,6 +37,7 @@ typedef enum : NSUInteger {
XYQBJumpTypeMembershipCenter, //会员中心 XYQBJumpTypeMembershipCenter, //会员中心
XYQBJumpTypeMyFans, //我的粉丝 XYQBJumpTypeMyFans, //我的粉丝
XYQBJumpTypeSharePoster, //分享海报 XYQBJumpTypeSharePoster, //分享海报
XYQBJumpTypeRepayment, //还款页面
} XYQBJumpType; } XYQBJumpType;
/** /**
......
...@@ -113,6 +113,7 @@ static QGApplicationOpenURL *shareInstance = nil; ...@@ -113,6 +113,7 @@ static QGApplicationOpenURL *shareInstance = nil;
[loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeDepositInOut)]; [loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeDepositInOut)];
[loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeMyFans)]; [loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeMyFans)];
[loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeSharePoster)]; [loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeSharePoster)];
[loginTypeDic setObject:@(YES) forKey:@(XYQBJumpTypeRepayment)];
return loginTypeDic; return loginTypeDic;
} }
...@@ -173,6 +174,8 @@ static QGApplicationOpenURL *shareInstance = nil; ...@@ -173,6 +174,8 @@ static QGApplicationOpenURL *shareInstance = nil;
//分享海报 //分享海报
[hostMap setObject:@(XYQBJumpTypeSharePoster) forKey:@"share/poster"]; [hostMap setObject:@(XYQBJumpTypeSharePoster) forKey:@"share/poster"];
[hostMap setObject:@(XYQBJumpTypeRepayment) forKey:@"payment"];
return hostMap; return hostMap;
} }
...@@ -442,6 +445,8 @@ static QGApplicationOpenURL *shareInstance = nil; ...@@ -442,6 +445,8 @@ static QGApplicationOpenURL *shareInstance = nil;
[Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGFansContainerViewController) parameters:nil handlerBlock:NULL]; [Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGFansContainerViewController) parameters:nil handlerBlock:NULL];
}else if (hostValue == XYQBJumpTypeSharePoster){ }else if (hostValue == XYQBJumpTypeSharePoster){
[Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGSharePosterViewController) parameters:nil handlerBlock:NULL]; [Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGSharePosterViewController) parameters:nil handlerBlock:NULL];
}else if (hostValue == XYQBJumpTypeRepayment){
[self jumpRepayment:queryDic];
} }
else { else {
[QGHUDManager showHud:@"版本过低,不支持此功能" afterDelay:1]; [QGHUDManager showHud:@"版本过低,不支持此功能" afterDelay:1];
...@@ -632,4 +637,10 @@ static QGApplicationOpenURL *shareInstance = nil; ...@@ -632,4 +637,10 @@ static QGApplicationOpenURL *shareInstance = nil;
[Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGDepositeRecordedViewController) parameters:param handlerBlock:NULL]; [Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGDepositeRecordedViewController) parameters:param handlerBlock:NULL];
} }
// 还款页面
- (void)jumpRepayment:(NSDictionary *)param
{
[Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGRepaymentCommitViewController) parameters:param handlerBlock:NULL];
}
@end @end
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
2、切换scheme为MediatorScript 2、切换scheme为MediatorScript
3、编译 3、编译
*/ */
//#import "QGRepaymentCommitViewController.h"
//#import "QGSharePosterViewController.h" //#import "QGSharePosterViewController.h"
//#import "QGFansContainerViewController.h" //#import "QGFansContainerViewController.h"
//#import "QGDepositViewController.h" //#import "QGDepositViewController.h"
......
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
typedef enum : NSUInteger { typedef enum : NSUInteger {
QGHeaderTypeQGRepaymentCommitViewController,
QGHeaderTypeQGSharePosterViewController, QGHeaderTypeQGSharePosterViewController,
QGHeaderTypeQGFansContainerViewController, QGHeaderTypeQGFansContainerViewController,
QGHeaderTypeQGDepositViewController, QGHeaderTypeQGDepositViewController,
......
...@@ -16,6 +16,8 @@ NSString * ClassNameWithHeadType(QGHeaderType headerType) ...@@ -16,6 +16,8 @@ NSString * ClassNameWithHeadType(QGHeaderType headerType)
+ (NSString *)QGClassNameWithHeaderType:(QGHeaderType)headerType { + (NSString *)QGClassNameWithHeaderType:(QGHeaderType)headerType {
switch (headerType) { switch (headerType) {
case QGHeaderTypeQGRepaymentCommitViewController:
return @"QGRepaymentCommitViewController";
case QGHeaderTypeQGSharePosterViewController: case QGHeaderTypeQGSharePosterViewController:
return @"QGSharePosterViewController"; return @"QGSharePosterViewController";
case QGHeaderTypeQGFansContainerViewController: case QGHeaderTypeQGFansContainerViewController:
......
...@@ -106,32 +106,23 @@ ...@@ -106,32 +106,23 @@
[info setObject:model.sex ? model.sex :@"" forKey:@"sex"]; /// 性别 [info setObject:model.sex ? model.sex :@"" forKey:@"sex"]; /// 性别
[info setObject:model.address ? model.address :@"" forKey:@"address"]; /// 住址 [info setObject:model.address ? model.address :@"" forKey:@"address"]; /// 住址
if (model.frontFullImg) { /// 人像面图片 if (model.frontFullImg) { /// 人像面图片
NSData *imageData = UIImageJPEGRepresentation(model.frontFullImg, 0.5f); NSData *imageData = UIImageJPEGRepresentation(model.frontFullImg, 0.8f);
NSString *imageStr = [imageData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]; NSString *imageStr = [imageData base64EncodedStringWithOptions:0];
NSString *handleStr = [self handleString:imageStr]; [info setObject:imageStr forKey:@"base64Str"];
[info setObject:handleStr forKey:@"base64Str"];
} }
}else{ }else{
[info setObject:model.authority ? model.authority :@"" forKey:@"authority"]; /// 签发机关 [info setObject:model.authority ? model.authority :@"" forKey:@"authority"]; /// 签发机关
[info setObject:model.validDate ? model.validDate :@"" forKey:@"validDate"]; /// 有效日期 [info setObject:model.validDate ? model.validDate :@"" forKey:@"validDate"]; /// 有效日期
if (model.backFullImg) { /// 国徽面图片 if (model.backFullImg) { /// 国徽面图片
NSData *imageData = UIImageJPEGRepresentation(model.backFullImg, 0.5f); NSData *imageData = UIImageJPEGRepresentation(model.backFullImg, 0.8f);
NSString *imageStr = [imageData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]; NSString *imageStr = [imageData base64EncodedStringWithOptions:0];
NSString *handleStr = [self handleString:imageStr]; [info setObject:imageStr forKey:@"base64Str"];
[info setObject:handleStr forKey:@"base64Str"];
} }
} }
[parmas setObject:info forKey:@"data"]; [parmas setObject:info forKey:@"data"];
/// 回传给H5 /// 回传给H5
[self callJSWithMethod:@"xyqbNativeEvent" callWithArguments:@[parmas]]; [self callJSWithMethod:@"xyqbNativeEvent" callWithArguments:@[parmas]];
} }
- (NSString *)handleString:(NSString *)string
{
NSString *handleString = nil;
handleString = [string stringByReplacingOccurrencesOfString:@"\r" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, string.length)];
handleString = [handleString stringByReplacingOccurrencesOfString:@"\n" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, handleString.length)];
return handleString;
}
// OCR统计信息 // OCR统计信息
......
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
#import "QGBaseWebViewController+FaceSDK.h" #import "QGBaseWebViewController+FaceSDK.h"
#import "QGBaiChuanManager.h" #import "QGBaiChuanManager.h"
#import "QGApplicationOpenURL.h" #import "QGApplicationOpenURL.h"
#import "QGAlertView.h"
#import "QGSafeBindSmsVerifyViewController.h"
#import "QGLoginRequestApi.h"
//神策 //神策
#import "SensorsAnalyticsSDK.h" #import "SensorsAnalyticsSDK.h"
//友盟 //友盟
...@@ -422,6 +427,7 @@ ...@@ -422,6 +427,7 @@
else if ([event isEqualToString:@"openNewUrl"]) else if ([event isEqualToString:@"openNewUrl"])
{ {
[self openNewUrl:eventDic]; [self openNewUrl:eventDic];
/// 选择的银行卡
}else if ([event isEqualToString:@"selectBankCard"]){ }else if ([event isEqualToString:@"selectBankCard"]){
[self selectBankCard:eventDic]; [self selectBankCard:eventDic];
} }
...@@ -438,9 +444,19 @@ ...@@ -438,9 +444,19 @@
[[QGThirdPlatformService shareInstance] wxAuthWithSuccess:^(QGWechatLoginInfoModel * infoModel) { [[QGThirdPlatformService shareInstance] wxAuthWithSuccess:^(QGWechatLoginInfoModel * infoModel) {
@strongify(self); @strongify(self);
NSDictionary *callDic = @{@"event" : @"wxAuthSuccess", /// 查询微信号是否可用
@"data" : [infoModel yy_modelToJSONObject]}; [self queryAuthStatusWithOpenId:infoModel.unionid complete:^{
[self callJSWithMethod:@"xyqbNativeEvent" callWithArguments:@[callDic]]; @strongify(self);
/// 身份验证
QGSafeBindSmsVerifyViewController *vc = [[QGSafeBindSmsVerifyViewController alloc]init];
vc.wxModel = infoModel;
vc.bindSuccessBlock = ^(BOOL Success) {
NSDictionary *callDic = @{@"event" : @"wxAuthSuccessNew",
@"data" : [infoModel yy_modelToJSONObject]};
[self callJSWithMethod:@"xyqbNativeEvent" callWithArguments:@[callDic]];
};
[self.navigationController pushViewController:vc animated:YES];
}];
}]; }];
} }
...@@ -699,6 +715,48 @@ ...@@ -699,6 +715,48 @@
} }
} }
#pragma mark - 微信授权查询接口
/// 查询当前的微信id是否可以被绑定
/// @param unionId 唯一id
/// @param completeBlock 可用完成回调
- (void)queryAuthStatusWithOpenId:(NSString *)unionId complete:(void(^)(void))completeBlock
{
if (unionId == nil) return;
QGTalosNetwork *networking = [QGTalosNetwork shareManager];
NSMutableDictionary *param = [NSMutableDictionary dictionary];
[param setObject:unionId forKey:@"authId"];
// 1:微信 2:apple 3:淘宝 4:百川
[param setObject:@(1) forKey:@"authType"];
[QGHUDManager showHud:nil];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodBindAvailable]
//@"http://yapi.quantgroups.com/mock/305/vcc/external/login/auth_status/authId"
[networking GET:[QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodBindAvailable] parameters:param success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud];
if ([QGTalosNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
if (completeBlock) {
completeBlock();
}
}else{
NSString *businessCode = responseObject[@"businessCode"];
/// 已被绑定,不可用
if ([businessCode isEqualToString:@"1012"]) {
QGAlertView *alert = [[QGAlertView alloc]initWithTitle:nil message:@"该微信已绑定其他真享生活账号,无法进行授权!" cancelButtonTitle:nil sureButtonTitle:@"知道了" clickBlock:NULL];
[alert showInView:self.view];
}else{
NSString *msg = responseObject[@"msg"] ? responseObject[@"msg"]:@"授权错误";
[QGHUDManager showHud:msg];
}
}
} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
[QGHUDManager showHud:@"网络错误,请稍后再试"];
}];
}
- (void)dealloc { - (void)dealloc {
//资源释放的时候,停止webView加载 并将webView的delegate置为nil 减少某些机型可能触发的bug //资源释放的时候,停止webView加载 并将webView的delegate置为nil 减少某些机型可能触发的bug
......
...@@ -218,7 +218,7 @@ static SystemManager * shareManager = nil; ...@@ -218,7 +218,7 @@ static SystemManager * shareManager = nil;
[alertView showInView:nil]; [alertView showInView:nil];
//清空粘贴板 //清空粘贴板
[UIPasteboard generalPasteboard].string = @""; [UIPasteboard generalPasteboard].string = @"";
[QGCacheManager.shareCacheManager removeAppConfigWithKeys:@[kPasteboardCurrentContentKey]];
__block NSString * searchText = pasteboardStr; __block NSString * searchText = pasteboardStr;
alertView.searchBlock = ^{ alertView.searchBlock = ^{
NSMutableDictionary *param = [NSMutableDictionary dictionary]; NSMutableDictionary *param = [NSMutableDictionary dictionary];
......
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