提交
This commit is contained in:
@@ -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