提交
This commit is contained in:
@@ -41,7 +41,8 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
}
|
||||
- (void)loadData {
|
||||
// H5ServerUrl
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs",H5ServerUrl];
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs?h=%ld",H5ServerUrl,safeTop];
|
||||
NSURL* url=[NSURL URLWithString:urlStr];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
[self.contentWebView loadRequest:request];
|
||||
|
||||
@@ -256,9 +256,10 @@
|
||||
MJWeakSelf
|
||||
showLoadingInView(self.view);
|
||||
[QXMineNetwork postRealNameInfoWithRealName:realName card_number:idNumber successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
hideLoadingInView(self.view);
|
||||
hideLoadingInView(weakSelf.view);
|
||||
weakSelf.realNamedict = dict;
|
||||
[weakSelf startFace];
|
||||
// [weakSelf startFace];
|
||||
[weakSelf authSuccess];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
hideLoadingInView(self.view);
|
||||
showToast(msg);
|
||||
@@ -308,16 +309,16 @@
|
||||
if (faceVerifyResult.isSuccess) {
|
||||
QXLOG(@"人脸核验通过");
|
||||
MJWeakSelf
|
||||
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
|
||||
al.type = QXAlertViewTypeNoCancel;
|
||||
al.title = @"温馨提示";
|
||||
al.message = @"恭喜您获得内测资格,将获得10万金币";
|
||||
al.commitBlock = ^{
|
||||
[weakSelf authSuccess];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:al popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
// QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
|
||||
// al.type = QXAlertViewTypeNoCancel;
|
||||
// al.title = @"温馨提示";
|
||||
// al.message = @"恭喜您获得内测资格,将获得10万金币";
|
||||
// al.commitBlock = ^{
|
||||
[self authSuccess];
|
||||
// };
|
||||
// [[QXGlobal shareGlobal] showView:al popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
//
|
||||
// }];
|
||||
|
||||
/// 通知服务端实名验证结果
|
||||
[QXMineNetwork postRealNameResultWithOrderNo:faceVerifyResult.orderNo successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
@interface QXPayTypeStatusModel : NSObject
|
||||
|
||||
/// 6-西来喜微信,7-西来喜支付宝,8-西来喜QQ钱包,9-西来喜云闪付 1 原生微信 2原生支付宝 4
|
||||
@property (nonatomic,strong)QXPayTypeModel *ali;
|
||||
|
||||
@property (nonatomic,strong)QXPayTypeModel *wx;
|
||||
@@ -38,6 +38,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic,strong)QXPayTypeModel *ali_tl;
|
||||
|
||||
@property (nonatomic,strong)QXPayTypeModel *xlx_wx;
|
||||
|
||||
@property (nonatomic,strong)QXPayTypeModel *xlx_ali;
|
||||
|
||||
@property (nonatomic,strong)QXPayTypeModel *xlx_bank;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
[QXMineNetwork getRechargeListSuccessBlock:^(NSArray<QXRechargeListModel *> * _Nonnull list) {
|
||||
[weakSelf.rechargeDataArray removeAllObjects];
|
||||
[weakSelf.rechargeDataArray addObjectsFromArray:list];
|
||||
QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
model.money = @"0";
|
||||
model.coins = @"0";
|
||||
[weakSelf.rechargeDataArray addObject:model];
|
||||
// QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
// model.money = @"0";
|
||||
// model.coins = @"0";
|
||||
// [weakSelf.rechargeDataArray addObject:model];
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
@@ -111,7 +111,22 @@
|
||||
if (model.ali_tl.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.ali_tl];
|
||||
}
|
||||
if (!self.isOnlyDisplayPayType) {
|
||||
if (model.xlx_wx.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.xlx_wx];
|
||||
}
|
||||
if (model.xlx_ali.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.xlx_ali];
|
||||
}
|
||||
if (model.xlx_bank.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.xlx_bank];
|
||||
}
|
||||
//#if DEBUG
|
||||
// QXPayTypeModel *md = [QXPayTypeModel new];
|
||||
// md.type = @"6";
|
||||
// model.xlx_wx = md;
|
||||
// [weakSelf.payTypeArray addObject:model.xlx_wx];
|
||||
//#endif
|
||||
if (!weakSelf.isOnlyDisplayPayType) {
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]];
|
||||
}
|
||||
|
||||
@@ -264,19 +279,18 @@
|
||||
showToast(@"请选择充值金额");
|
||||
return;
|
||||
}
|
||||
if (self.isPop) {
|
||||
[self hide];
|
||||
}
|
||||
MJWeakSelf
|
||||
|
||||
@weakify(self)
|
||||
[QXMineNetwork rechargePayWithMoney:self.selectedModel.money coin:self.selectedModel.coins type:self.selectedPayTypeModel.type userId:QXGlobal.shareGlobal.loginModel.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
if (weakSelf.selectedPayTypeModel.type.intValue == 2) {
|
||||
@strongify(self)
|
||||
if (self.selectedPayTypeModel.type.intValue == 2) {
|
||||
NSDictionary *resultDict = dict[@"data"];
|
||||
NSString *order = [NSString stringWithFormat:@"%@",resultDict[@"ali"]];
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"midilive" callback:^(NSDictionary *resultDic) {
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"myyuliaolive" callback:^(NSDictionary *resultDic) {
|
||||
NSLog(@"支付宝H5支付回调 - %@", resultDic);
|
||||
|
||||
}];
|
||||
}else if (weakSelf.selectedPayTypeModel.type.intValue == 1) {
|
||||
}else if (self.selectedPayTypeModel.type.intValue == 1) {
|
||||
NSDictionary *resultDict = dict[@"data"][@"wx"];
|
||||
NSString *appid = resultDict[@"appid"];
|
||||
NSString *partnerId = resultDict[@"partnerid"];
|
||||
@@ -297,11 +311,11 @@
|
||||
|
||||
}];
|
||||
}
|
||||
else if (weakSelf.selectedPayTypeModel.type.intValue == 4) {
|
||||
else if (self.selectedPayTypeModel.type.intValue == 4) {
|
||||
NSMutableDictionary*dic = [NSMutableDictionary dictionaryWithDictionary:dict[@"data"][@"tl"]];
|
||||
[dic removeObjectForKey:@"json_data"];
|
||||
NSString *json = [dic jsonStringEncoded];
|
||||
NSString *thirdPartSchema = @"thirdPartSchema=qxlive://";
|
||||
NSString *thirdPartSchema = @"thirdPartSchema=myyuliaolive://";
|
||||
NSString *json1 = [json stringByReplacingOccurrencesOfString:@"\\" withString:@""];
|
||||
NSCharacterSet *customSet1 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
|
||||
// NSCharacterSet *customSet2 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
|
||||
@@ -312,7 +326,7 @@
|
||||
NSString *doubleEncodedQuery = [queryString stringByAddingPercentEncodingWithAllowedCharacters:customSet3];
|
||||
NSString *jumpStr = [NSString stringWithFormat:@"alipays://platformapi/startapp?appId=2021001104615521&page=pages/orderDetail/orderDetail&%@&query=%@",encodedString,doubleEncodedQuery];
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:jumpStr] options:@{} completionHandler:nil];
|
||||
}else if (weakSelf.selectedPayTypeModel.type.intValue == 5) {
|
||||
}else if (self.selectedPayTypeModel.type.intValue == 5) {
|
||||
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
|
||||
launchMiniProgramReq.userName = @"gh_e64a1a89a0ad";
|
||||
NSDictionary *dic = dict[@"data"][@"tl"];
|
||||
@@ -327,8 +341,28 @@
|
||||
launchMiniProgramReq.path = [NSString stringWithFormat:@"pages/orderDetail/orderDetail?%@",param];
|
||||
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease;
|
||||
[WXApi sendReq:launchMiniProgramReq completion:nil];
|
||||
}else if (self.selectedPayTypeModel.type.intValue == 6) {
|
||||
NSString *json = dict[@"data"][@"xlx"];
|
||||
if ([json isKindOfClass:[NSNull class]]) {
|
||||
showToast(@"请求异常");
|
||||
return;
|
||||
}
|
||||
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:json] options:@{} completionHandler:nil];
|
||||
}else if (self.selectedPayTypeModel.type.intValue == 7) {
|
||||
// NSDictionary *dic = dict[@"data"][@"xlx"];
|
||||
// NSString *json = [dic jsonStringEncoded];
|
||||
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:json] options:@{} completionHandler:nil];
|
||||
NSString *json = dict[@"data"][@"xlx"];
|
||||
if ([json isKindOfClass:[NSNull class]]) {
|
||||
showToast(@"请求异常");
|
||||
return;
|
||||
}
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:json] options:@{} completionHandler:nil];
|
||||
}
|
||||
if (self.isPop) {
|
||||
[self hide];
|
||||
}
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg)
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user