Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VirtualCard-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
APP
VirtualCard-iOS
Commits
a623a042
Commit
a623a042
authored
May 27, 2020
by
guanghui.shi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还款页面接口变更
parent
e1e0fedb
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
170 additions
and
49 deletions
+170
-49
QGDepositeCardModel.h
...asses/Card/Function/QGDeposit/Model/QGDepositeCardModel.h
+8
-0
QGDepositPwdManager.m
...ses/Card/Function/QGDeposit/PwdView/QGDepositPwdManager.m
+9
-4
QGRepaymentCommitViewController.m
.../QGRepayment/Controller/QGRepaymentCommitViewController.m
+28
-5
QGRepaymentBillHeadModel.h
...epayment/Model/QGRepaymentHome/QGRepaymentBillHeadModel.h
+5
-0
QGRepaymentReuestApi.h
...lPayment/QGClasses/Card/RequestApi/QGRepaymentReuestApi.h
+1
-1
QGRepaymentReuestApi.m
...lPayment/QGClasses/Card/RequestApi/QGRepaymentReuestApi.m
+2
-2
QGLoginRequestApi.h
...ualPayment/QGClasses/Login/RequestApi/QGLoginRequestApi.h
+3
-1
QGLoginRequestApi.m
...ualPayment/QGClasses/Login/RequestApi/QGLoginRequestApi.m
+6
-0
QGSafeBindSmsVerifyViewController.m
...r/Function/SafeCenter/QGSafeBindSmsVerifyViewController.m
+17
-12
QGSafeCenterViewController.m
...erCenter/Function/SafeCenter/QGSafeCenterViewController.m
+7
-4
QGApplicationOpenURL.h
...ualPayment/QGUtils/QGTool/Mediator/QGApplicationOpenURL.h
+1
-0
QGApplicationOpenURL.m
...ualPayment/QGUtils/QGTool/Mediator/QGApplicationOpenURL.m
+11
-0
QGMediatorClassHeader.h
...alPayment/QGUtils/QGTool/Mediator/QGMediatorClassHeader.h
+1
-1
QGMediatorClassTools.h
...ualPayment/QGUtils/QGTool/Mediator/QGMediatorClassTools.h
+1
-0
QGMediatorClassTools.m
...ualPayment/QGUtils/QGTool/Mediator/QGMediatorClassTools.m
+2
-0
QGBaseWebViewController+FaceSDK.m
...l/QGBasicControllerTool/QGBaseWebViewController+FaceSDK.m
+6
-15
QGBaseWebViewController.m
...ls/QGTool/QGBasicControllerTool/QGBaseWebViewController.m
+61
-3
SystemManager.m
VirtualPayment/VirtualPayment/QGUtils/QGTool/SystemManager.m
+1
-1
No files found.
VirtualPayment/VirtualPayment/QGClasses/Card/Function/QGDeposit/Model/QGDepositeCardModel.h
View file @
a623a042
...
...
@@ -26,8 +26,16 @@ NS_ASSUME_NONNULL_BEGIN
@property
(
nonatomic
,
copy
)
NSString
*
type
;
/// 一下均是还款中用到的数据
/// 卡Id,享花卡还款中用到
@property
(
nonatomic
,
copy
)
NSString
*
cardId
;
/// 账单号
@property
(
nonatomic
,
copy
)
NSString
*
billNumber
;
/// 是否最低还款
@property
(
nonatomic
,
assign
)
BOOL
isLowestRepay
;
/// 0:正常还款,1:提前还款,
@property
(
nonatomic
,
assign
)
NSInteger
isPreRepay
;
@end
...
...
VirtualPayment/VirtualPayment/QGClasses/Card/Function/QGDeposit/PwdView/QGDepositPwdManager.m
View file @
a623a042
...
...
@@ -158,7 +158,7 @@
/// 校验交易密码
if
(
self
.
type
==
QGDepositTypeRepay
)
{
///还款交易
[
self
verifyPaymentWithE
b
cryPwd
:
encryptPwd
];
[
self
verifyPaymentWithE
n
cryPwd
:
encryptPwd
];
}
else
{
/// 转入转出交易
[
self
verifyTradeWithEncryptPwd
:
encryptPwd
];
...
...
@@ -189,15 +189,20 @@
#pragma mark - 享花卡还款交易
-
(
void
)
verifyPaymentWithE
b
cryPwd
:(
NSString
*
)
pwd
-
(
void
)
verifyPaymentWithE
n
cryPwd
:(
NSString
*
)
pwd
{
QGTalosNetwork
*
networking
=
[
QGTalosNetwork
shareManager
];
NSMutableDictionary
*
param
=
[
NSMutableDictionary
dictionary
];
[
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]
[
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
];
if
([
QGTalosNetwork
checkBusinessCodeAndCodeWithResponseObjectObject
:
responseObject
])
{
if
(
self
.
tradeResultBlock
)
{
...
...
VirtualPayment/VirtualPayment/QGClasses/Card/Function/QGRepayment/Controller/QGRepayment/Controller/QGRepaymentCommitViewController.m
View file @
a623a042
...
...
@@ -21,11 +21,11 @@
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UIView
*
headerView
;
///还款名字
@property
(
nonatomic
,
strong
)
UILabel
*
payNameLab
;
///金额
@property
(
nonatomic
,
strong
)
UILabel
*
amountLab
;
/// 还款账单描述
@property
(
nonatomic
,
strong
)
UILabel
*
payDesLab
;
/// 银行名字
...
...
@@ -40,16 +40,33 @@
@property
(
nonatomic
,
copy
)
NSString
*
cardId
;
/// 卡列表URL
@property
(
nonnull
,
copy
)
NSString
*
bankCardListH5Url
;
/// 还款-提前还款
1:还款2
:提前还款
/// 还款-提前还款
0:还款1
:提前还款
@property
(
nonatomic
,
assign
)
NSInteger
repayType
;
///还款金额
@property
(
nonatomic
,
assign
)
CGFloat
repayAmt
;
/// 账单号
@property
(
nonatomic
,
copy
)
NSString
*
billNumber
;
@end
@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
{
[
super
viewDidLoad
];
...
...
@@ -125,6 +142,11 @@
{
QGTalosNetwork
*
networking
=
[
QGTalosNetwork
shareManager
];
[
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];
[
networking
GET
:
@"http://yapi.quantgroups.com/mock/305/vcc/repay/page"
parameters
:
nil
success
:^
(
id
_Nonnull
responseObject
)
{
[
QGHUDManager
hideHud
];
...
...
@@ -138,7 +160,6 @@
self
.
bankLimitAmtPerTrade
=
[
responseObject
[
@"data"
][
@"bankLimitAmtPerTrade"
]
floatValue
];
self
.
bankCardListH5Url
=
responseObject
[
@"data"
][
@"bankCardListH5Url"
];
self
.
repayType
=
[
responseObject
[
@"data"
][
@"repayType"
]
integerValue
];
self
.
repayAmt
=
[
responseObject
[
@"data"
][
@"repayAmt"
]
floatValue
];
self
.
cardId
=
[
NSString
stringWithFormat
:
@"%@"
,
responseObject
[
@"data"
][
@"bankCardId"
]];
[
self
.
tableView
reloadData
];
}
...
...
@@ -236,6 +257,8 @@
card
.
cardId
=
self
.
cardId
;
card
.
minAmount
=
@"0.00"
;
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
];
[
manager
showInView
:
self
.
view
];
...
...
VirtualPayment/VirtualPayment/QGClasses/Card/Function/QGRepayment/Model/QGRepaymentHome/QGRepaymentBillHeadModel.h
View file @
a623a042
...
...
@@ -28,6 +28,11 @@ NS_ASSUME_NONNULL_BEGIN
///是否展示待还订单
@property
(
nonatomic
,
assign
)
BOOL
shouldBillOverdueFlag
;
/// 还款
@property
(
nonatomic
,
copy
)
NSString
*
appRepayUrl
;
/// 提前还款
@property
(
nonatomic
,
copy
)
NSString
*
appPreRepayUrl
;
@end
...
...
VirtualPayment/VirtualPayment/QGClasses/Card/RequestApi/QGRepaymentReuestApi.h
View file @
a623a042
...
...
@@ -14,7 +14,7 @@ typedef NS_ENUM(NSInteger,QGRepaymentRequestServerMethod){
QGRepaymentRequestServerMethodGroupMerge
,
// 首页列表接口
QGRepaymentRequestServerMethodHistoryBills
,
// 历史账单接口
QGRepaymentRequestServerMethodBillDetail
,
// 账单详情接口
QGRepaymentRequestServerMethod
Repay
,
// 还款
QGRepaymentRequestServerMethod
EncryptRepay
,
// 还款
QGRepaymentRequestServerMethodRepayStatus
,
// 还款状态
QGRepaymentRequestServerMethodRepayInfo
// 还款页面信息
}
;
...
...
VirtualPayment/VirtualPayment/QGClasses/Card/RequestApi/QGRepaymentReuestApi.m
View file @
a623a042
...
...
@@ -22,8 +22,8 @@
case
QGRepaymentRequestServerMethodBillDetail
:
return
@"vcc/bill_detail"
;
break
;
case
QGRepaymentRequestServerMethodRepay
:
return
@"vcc/repay"
;
case
QGRepaymentRequestServerMethod
Encrypt
Repay
:
return
@"vcc/
encrypt_
repay"
;
break
;
case
QGRepaymentRequestServerMethodRepayStatus
:
return
@"vcc/repayStatus"
;
...
...
VirtualPayment/VirtualPayment/QGClasses/Login/RequestApi/QGLoginRequestApi.h
View file @
a623a042
...
...
@@ -40,7 +40,9 @@ typedef NS_ENUM(NSInteger, QGLoginRequestServerMethod) {
/// 根据unionId查询是否可以绑定
QGLoginRequestServerMethodBindAvailable
,
/// 解绑微信
QGLoginRequestServerMethodUnBindWeChat
QGLoginRequestServerMethodUnBindWeChat
,
/// 设置页面绑定微信获取验证码
QGLoginRequestServerMethodWxVerifyGetCode
};
/*!
...
...
VirtualPayment/VirtualPayment/QGClasses/Login/RequestApi/QGLoginRequestApi.m
View file @
a623a042
...
...
@@ -63,9 +63,15 @@
case
QGLoginRequestServerMethodBindAvailable
:
url
=
@"vcc/external/login/auth_status/authId"
;
break
;
///解除微信授权
case
QGLoginRequestServerMethodUnBindWeChat
:
url
=
@"vcc/external/login/weChat/unbind"
;
break
;
///微信授权获取验证码
case
QGLoginRequestServerMethodWxVerifyGetCode
:
url
=
@"vcc/account/send_verify_code"
;
break
;
default:
break
;
}
...
...
VirtualPayment/VirtualPayment/QGClasses/UserCenter/Function/SafeCenter/QGSafeBindSmsVerifyViewController.m
View file @
a623a042
...
...
@@ -178,13 +178,7 @@
[
param
setObject
:
self
.
wxModel
.
unionid
forKey
:
@"unionId"
];
[
param
setObject
:
self
.
wxModel
.
headimgurl
?
self
.
wxModel
.
headimgurl
:
@""
forKey
:
@"headImgUrl"
];
[
param
setObject
:
self
.
wxModel
.
nickname
?
self
.
wxModel
.
nickname
:
@""
forKey
:
@"nickName"
];
NSString
*
sex
=
@"N"
;
if
([
self
.
wxModel
.
sex
isEqualToString
:
@"1"
])
{
sex
=
@"M"
;
}
else
if
([
self
.
wxModel
.
sex
isEqualToString
:
@"2"
]){
sex
=
@"F"
;
}
[
param
setObject
:
sex
forKey
:
@"sex"
];
[
param
setObject
:
self
.
wxModel
.
sex
forKey
:
@"sex"
];
[
param
setObject
:
@""
forKey
:
@"userDesc"
];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodLoginWechat];
...
...
@@ -207,12 +201,23 @@
-
(
void
)
vCodeBtnAction
:(
UIButton
*
)
btn
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
.
sendVerifyCodeManger
sendMessageCodeWithPhoneNumber
:
self
.
phone
success
:
^
{
[
weakSelf
fireTimer
];
}
fail
:^
{
weakSelf
.
vCodeBtn
.
userInteractionEnabled
=
YES
;
QGTalosNetwork
*
networking
=
[
QGTalosNetwork
shareManager
];
[
QGHUDManager
showHud
:
nil
];
// [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodWxVerifyGetCode]
//@"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
;
}];
}
//启动定时器
...
...
VirtualPayment/VirtualPayment/QGClasses/UserCenter/Function/SafeCenter/QGSafeCenterViewController.m
View file @
a623a042
...
...
@@ -51,7 +51,7 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"
设置
"
;
self
.
title
=
@"
安全中心
"
;
[
self
setIsBelowNavBar
:
NO
];
[
self
setNavBarBottomLineHidden
:
YES
];
[
self
custemLeftDefaultBarButtonItem
];
...
...
@@ -75,7 +75,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
}
QGTalosNetwork
*
networking
=
[
QGTalosNetwork
shareManager
];
// [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
];
if
([
QGTalosNetwork
checkBusinessCodeAndCodeWithResponseObjectObject
:
responseObject
])
{
NSDictionary
*
data
=
responseObject
[
@"data"
];
...
...
@@ -238,7 +239,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
{
QGTalosNetwork
*
networking
=
[
QGTalosNetwork
shareManager
];
// [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
])
{
/// 刷新页面
self
.
wxAuthStatus
=
QGAuthStatusUnAuth
;
...
...
@@ -271,7 +273,8 @@ typedef NS_ENUM(NSInteger,QGAuthStatus){
[
QGHUDManager
showHud
:
nil
];
// [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
];
if
([
QGTalosNetwork
checkBusinessCodeAndCodeWithResponseObjectObject
:
responseObject
])
{
if
(
completeBlock
)
{
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/Mediator/QGApplicationOpenURL.h
View file @
a623a042
...
...
@@ -37,6 +37,7 @@ typedef enum : NSUInteger {
XYQBJumpTypeMembershipCenter
,
//会员中心
XYQBJumpTypeMyFans
,
//我的粉丝
XYQBJumpTypeSharePoster
,
//分享海报
XYQBJumpTypeRepayment
,
//还款页面
}
XYQBJumpType
;
/**
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/Mediator/QGApplicationOpenURL.m
View file @
a623a042
...
...
@@ -113,6 +113,7 @@ static QGApplicationOpenURL *shareInstance = nil;
[
loginTypeDic
setObject
:
@
(
YES
)
forKey
:
@
(
XYQBJumpTypeDepositInOut
)];
[
loginTypeDic
setObject
:
@
(
YES
)
forKey
:
@
(
XYQBJumpTypeMyFans
)];
[
loginTypeDic
setObject
:
@
(
YES
)
forKey
:
@
(
XYQBJumpTypeSharePoster
)];
[
loginTypeDic
setObject
:
@
(
YES
)
forKey
:
@
(
XYQBJumpTypeRepayment
)];
return
loginTypeDic
;
}
...
...
@@ -173,6 +174,8 @@ static QGApplicationOpenURL *shareInstance = nil;
//分享海报
[
hostMap
setObject
:
@
(
XYQBJumpTypeSharePoster
)
forKey
:
@"share/poster"
];
[
hostMap
setObject
:
@
(
XYQBJumpTypeRepayment
)
forKey
:
@"payment"
];
return
hostMap
;
}
...
...
@@ -442,6 +445,8 @@ static QGApplicationOpenURL *shareInstance = nil;
[
Mediator
performTarget
:
ClassNameWithHeadType
(
QGHeaderTypeQGFansContainerViewController
)
parameters
:
nil
handlerBlock
:
NULL
];
}
else
if
(
hostValue
==
XYQBJumpTypeSharePoster
){
[
Mediator
performTarget
:
ClassNameWithHeadType
(
QGHeaderTypeQGSharePosterViewController
)
parameters
:
nil
handlerBlock
:
NULL
];
}
else
if
(
hostValue
==
XYQBJumpTypeRepayment
){
[
self
jumpRepayment
:
queryDic
];
}
else
{
[
QGHUDManager
showHud
:
@"版本过低,不支持此功能"
afterDelay
:
1
];
...
...
@@ -632,4 +637,10 @@ static QGApplicationOpenURL *shareInstance = nil;
[
Mediator
performTarget
:
ClassNameWithHeadType
(
QGHeaderTypeQGDepositeRecordedViewController
)
parameters
:
param
handlerBlock
:
NULL
];
}
// 还款页面
-
(
void
)
jumpRepayment
:(
NSDictionary
*
)
param
{
[
Mediator
performTarget
:
ClassNameWithHeadType
(
QGHeaderTypeQGRepaymentCommitViewController
)
parameters
:
param
handlerBlock
:
NULL
];
}
@end
VirtualPayment/VirtualPayment/QGUtils/QGTool/Mediator/QGMediatorClassHeader.h
View file @
a623a042
...
...
@@ -8,7 +8,7 @@
2、切换scheme为MediatorScript
3、编译
*/
//#import "QGRepaymentCommitViewController.h"
//#import "QGSharePosterViewController.h"
//#import "QGFansContainerViewController.h"
//#import "QGDepositViewController.h"
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/Mediator/QGMediatorClassTools.h
View file @
a623a042
#import <Foundation/Foundation.h>
typedef
enum
:
NSUInteger
{
QGHeaderTypeQGRepaymentCommitViewController
,
QGHeaderTypeQGSharePosterViewController
,
QGHeaderTypeQGFansContainerViewController
,
QGHeaderTypeQGDepositViewController
,
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/Mediator/QGMediatorClassTools.m
View file @
a623a042
...
...
@@ -16,6 +16,8 @@ NSString * ClassNameWithHeadType(QGHeaderType headerType)
+
(
NSString
*
)
QGClassNameWithHeaderType
:(
QGHeaderType
)
headerType
{
switch
(
headerType
)
{
case
QGHeaderTypeQGRepaymentCommitViewController
:
return
@"QGRepaymentCommitViewController"
;
case
QGHeaderTypeQGSharePosterViewController
:
return
@"QGSharePosterViewController"
;
case
QGHeaderTypeQGFansContainerViewController
:
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/QGBasicControllerTool/QGBaseWebViewController+FaceSDK.m
View file @
a623a042
...
...
@@ -106,32 +106,23 @@
[
info
setObject
:
model
.
sex
?
model
.
sex
:
@""
forKey
:
@"sex"
];
/// 性别
[
info
setObject
:
model
.
address
?
model
.
address
:
@""
forKey
:
@"address"
];
/// 住址
if
(
model
.
frontFullImg
)
{
/// 人像面图片
NSData
*
imageData
=
UIImageJPEGRepresentation
(
model
.
frontFullImg
,
0
.
5
f
);
NSString
*
imageStr
=
[
imageData
base64EncodedStringWithOptions
:
NSDataBase64Encoding64CharacterLineLength
];
NSString
*
handleStr
=
[
self
handleString
:
imageStr
];
[
info
setObject
:
handleStr
forKey
:
@"base64Str"
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
model
.
frontFullImg
,
0
.
8
f
);
NSString
*
imageStr
=
[
imageData
base64EncodedStringWithOptions
:
0
];
[
info
setObject
:
imageStr
forKey
:
@"base64Str"
];
}
}
else
{
[
info
setObject
:
model
.
authority
?
model
.
authority
:
@""
forKey
:
@"authority"
];
/// 签发机关
[
info
setObject
:
model
.
validDate
?
model
.
validDate
:
@""
forKey
:
@"validDate"
];
/// 有效日期
if
(
model
.
backFullImg
)
{
/// 国徽面图片
NSData
*
imageData
=
UIImageJPEGRepresentation
(
model
.
backFullImg
,
0
.
5
f
);
NSString
*
imageStr
=
[
imageData
base64EncodedStringWithOptions
:
NSDataBase64Encoding64CharacterLineLength
];
NSString
*
handleStr
=
[
self
handleString
:
imageStr
];
[
info
setObject
:
handleStr
forKey
:
@"base64Str"
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
model
.
backFullImg
,
0
.
8
f
);
NSString
*
imageStr
=
[
imageData
base64EncodedStringWithOptions
:
0
];
[
info
setObject
:
imageStr
forKey
:
@"base64Str"
];
}
}
[
parmas
setObject
:
info
forKey
:
@"data"
];
/// 回传给H5
[
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统计信息
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/QGBasicControllerTool/QGBaseWebViewController.m
View file @
a623a042
...
...
@@ -20,6 +20,11 @@
#import "QGBaseWebViewController+FaceSDK.h"
#import "QGBaiChuanManager.h"
#import "QGApplicationOpenURL.h"
#import "QGAlertView.h"
#import "QGSafeBindSmsVerifyViewController.h"
#import "QGLoginRequestApi.h"
//神策
#import "SensorsAnalyticsSDK.h"
//友盟
...
...
@@ -422,6 +427,7 @@
else
if
([
event
isEqualToString
:
@"openNewUrl"
])
{
[
self
openNewUrl
:
eventDic
];
/// 选择的银行卡
}
else
if
([
event
isEqualToString
:
@"selectBankCard"
]){
[
self
selectBankCard
:
eventDic
];
}
...
...
@@ -438,9 +444,19 @@
[[
QGThirdPlatformService
shareInstance
]
wxAuthWithSuccess
:
^
(
QGWechatLoginInfoModel
*
infoModel
)
{
@strongify
(
self
);
NSDictionary
*
callDic
=
@{
@"event"
:
@"wxAuthSuccess"
,
@"data"
:
[
infoModel
yy_modelToJSONObject
]};
[
self
callJSWithMethod
:
@"xyqbNativeEvent"
callWithArguments
:@[
callDic
]];
/// 查询微信号是否可用
[
self
queryAuthStatusWithOpenId
:
infoModel
.
unionid
complete
:
^
{
@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 @@
}
}
#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
{
//资源释放的时候,停止webView加载 并将webView的delegate置为nil 减少某些机型可能触发的bug
...
...
VirtualPayment/VirtualPayment/QGUtils/QGTool/SystemManager.m
View file @
a623a042
...
...
@@ -218,7 +218,7 @@ static SystemManager * shareManager = nil;
[
alertView
showInView
:
nil
];
//清空粘贴板
[
UIPasteboard
generalPasteboard
].
string
=
@""
;
[
QGCacheManager
.
shareCacheManager
removeAppConfigWithKeys
:@[
kPasteboardCurrentContentKey
]];
__block
NSString
*
searchText
=
pasteboardStr
;
alertView
.
searchBlock
=
^
{
NSMutableDictionary
*
param
=
[
NSMutableDictionary
dictionary
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment