覆盖羽声
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.bgView.layer.borderColor = RGB16(0x333333).CGColor;
|
||||
self.bgView.layer.borderColor = QXConfig.themeColor.CGColor;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign)BOOL isPop;
|
||||
@property (nonatomic,assign)BOOL isOnlyDisplayPayType;
|
||||
@property (nonatomic,strong)QXRechargeListModel *selectedModel;
|
||||
@property (nonatomic,strong)NSString *gift_bag_id;
|
||||
-(void)showInView:(UIView *)view;
|
||||
@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) {
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
}
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2)/3, 76);
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2-1)/3, 76);
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
@@ -264,19 +264,18 @@
|
||||
showToast(@"请选择充值金额");
|
||||
return;
|
||||
}
|
||||
if (self.isPop) {
|
||||
[self hide];
|
||||
}
|
||||
MJWeakSelf
|
||||
[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) {
|
||||
|
||||
@weakify(self)
|
||||
[QXMineNetwork rechargePayWithMoney:self.selectedModel.money coin:self.selectedModel.coins type:self.selectedPayTypeModel.type userId:QXGlobal.shareGlobal.loginModel.user_id typeId:self.gift_bag_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
@strongify(self)
|
||||
if (self.selectedPayTypeModel.type.intValue == 2) {
|
||||
NSDictionary *resultDict = dict[@"data"];
|
||||
NSString *order = [NSString stringWithFormat:@"%@",resultDict[@"ali"]];
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"qxlive" callback:^(NSDictionary *resultDic) {
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"midilive" 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,7 +296,7 @@
|
||||
|
||||
}];
|
||||
}
|
||||
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];
|
||||
@@ -312,7 +311,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"];
|
||||
@@ -328,7 +327,9 @@
|
||||
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease;
|
||||
[WXApi sendReq:launchMiniProgramReq completion:nil];
|
||||
}
|
||||
|
||||
if (self.isPop) {
|
||||
[self hide];
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg)
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user