提交
This commit is contained in:
@@ -21,13 +21,22 @@
|
||||
self.bgImaegView.image = [UIImage imageNamed:@"app_start_yusheng"];;
|
||||
self.bgImaegView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[self.view addSubview:self.bgImaegView];
|
||||
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess) name:noticeUserLogin object:nil];
|
||||
[self getAppTheme];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appStartNetWork) name:noticeUserLogin object:nil];
|
||||
|
||||
if ([QXRequset shareInstance].AFNetWorkStatus == AFNetworkReachabilityStatusReachableViaWWAN || [QXRequset shareInstance].AFNetWorkStatus == AFNetworkReachabilityStatusReachableViaWiFi) {
|
||||
[self getAppTheme];
|
||||
}
|
||||
|
||||
}
|
||||
-(void)viewDidDisappear:(BOOL)animated{
|
||||
[super viewDidDisappear:animated];
|
||||
// [[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
-(void)appStartNetWork{
|
||||
[self getAppTheme];
|
||||
}
|
||||
|
||||
-(void)getAppTheme{
|
||||
NSString *themeUrl = [NSString stringWithFormat:@"%@%@",ServerUrl,QXAppTheme];
|
||||
[[QXRequset shareInstance] getWithUrl:themeUrl parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
|
||||
@@ -19,6 +19,7 @@ typedef void (^showFinishBlock)(void);
|
||||
|
||||
@interface QXGlobal : NSObject
|
||||
+(instancetype)shareGlobal;
|
||||
@property (nonatomic,assign)BOOL isNeedUpdate;
|
||||
// 是否登录
|
||||
@property (nonatomic,readonly,assign)BOOL isLogin;
|
||||
@property (nonatomic,assign)BOOL isShowLoginVC;
|
||||
|
||||
@@ -156,8 +156,9 @@
|
||||
[self.alertViewController hideViewFinishBlock:closeBlock];
|
||||
}
|
||||
-(BOOL)isOpenRecharge{
|
||||
BOOL isOpenRecharge = [[NSUserDefaults standardUserDefaults] boolForKey:kIsOpenRecharge];
|
||||
return isOpenRecharge;
|
||||
// BOOL isOpenRecharge = [[NSUserDefaults standardUserDefaults] boolForKey:kIsOpenRecharge];
|
||||
// return isOpenRecharge;
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)finishTask{
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -715,6 +715,8 @@
|
||||
-(void)listWillAppear{
|
||||
if ([self.giftLabelId isEqualToString:@"-10"]) {
|
||||
[self getBagList];
|
||||
}else{
|
||||
[self reloadData];
|
||||
}
|
||||
self.selectedIndex = -1;
|
||||
[self.collectionView reloadData];
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
if (imgs.count==0) {
|
||||
return;
|
||||
}
|
||||
if (isAppStore) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
self.rechargePermissionView.hidden = YES;
|
||||
}else{
|
||||
self.rechargePermissionView.hidden = NO;
|
||||
@@ -329,6 +329,11 @@
|
||||
}
|
||||
-(void)popFirstRechargeViewOnlyRecharge:(BOOL)onlyRecharge{
|
||||
if ([QXGlobal shareGlobal].isAppStore) {
|
||||
if (self.signStatus.intValue == 1) {
|
||||
[self popRecommendRoom];
|
||||
}else{
|
||||
[self popSignTask];
|
||||
}
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
}
|
||||
-(void)startAnimating{
|
||||
[self.animateImageView startAnimating];
|
||||
// [self.animateImageView startAnimating];
|
||||
}
|
||||
-(void)endAnimating{
|
||||
[self.animateImageView stopAnimating];
|
||||
// [self.animateImageView stopAnimating];
|
||||
}
|
||||
-(void)setHistoryModel:(QXMyRoomHistory *)historyModel{
|
||||
_historyModel = historyModel;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qsd-Ig-Nmi">
|
||||
<rect key="frame" x="8" y="8" width="28" height="14"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="T17-NM-Dxi">
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Flow 10001.png" translatesAutoresizingMaskIntoConstraints="NO" id="T17-NM-Dxi">
|
||||
<rect key="frame" x="7.6666666666666661" y="2" width="12.999999999999998" height="10"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="10" id="Jz4-mP-9ub"/>
|
||||
@@ -175,6 +175,7 @@
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="Flow 10001.png" width="150" height="115"/>
|
||||
<image name="room_hot_icon" width="14" height="14"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef void(^RestoreFailurreCompletionHandler)(void);//恢复失败的回调
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
-(void)butGoodsWithId:(NSString*)productId;
|
||||
-(void)buyGoodsWithId:(NSString*)productId orderNo:(NSString*)orderNo;
|
||||
- (void)getReceiptState:(void (^)(BOOL success))completion;
|
||||
//恢复内购
|
||||
- (void)resumeInAppPurchase;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
@interface QXIAPManager()<SKPaymentTransactionObserver,SKProductsRequestDelegate,SKRequestDelegate>
|
||||
|
||||
@property (nonatomic,strong)NSString*orderNo;
|
||||
@end
|
||||
|
||||
@implementation QXIAPManager
|
||||
@@ -31,12 +31,13 @@
|
||||
/*
|
||||
购买
|
||||
*/
|
||||
-(void)butGoodsWithId:(NSString*)productId{
|
||||
-(void)buyGoodsWithId:(NSString*)productId orderNo:(NSString*)orderNo{
|
||||
self.orderNo = orderNo;
|
||||
//productId要跟服务端的关键字对应
|
||||
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
|
||||
|
||||
if ([SKPaymentQueue canMakePayments]) { //用户允许app内购
|
||||
if (productId.length) {
|
||||
showLoadingInView(KEYWINDOW);
|
||||
NSLog(@"%@商品正在请求中...",productId);
|
||||
NSArray *product = [[NSArray alloc] initWithObjects:productId, nil];
|
||||
NSSet *set = [NSSet setWithArray:product];
|
||||
@@ -59,9 +60,15 @@
|
||||
|
||||
#pragma mark SKProductsRequestDelegate 查询成功后的回调
|
||||
- (void)productsRequest:(nonnull SKProductsRequest *)request didReceiveResponse:(nonnull SKProductsResponse *)response {
|
||||
|
||||
|
||||
NSArray *product = response.products;
|
||||
if (response.invalidProductIdentifiers.count) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(KEYWINDOW);
|
||||
});
|
||||
NSLog(@"商品请求错误,error:%@", response.invalidProductIdentifiers);
|
||||
showToast(@"商品请求错误");
|
||||
if (self.subscriptionFailurreCompletionHandler) {
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
}
|
||||
@@ -73,6 +80,9 @@
|
||||
}
|
||||
|
||||
- (void)paymentQueue:(nonnull SKPaymentQueue *)queue updatedTransactions:(nonnull NSArray<SKPaymentTransaction *> *)transactions {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(KEYWINDOW);
|
||||
});
|
||||
// NSInteger i = 0;
|
||||
for (SKPaymentTransaction *tran in transactions) {
|
||||
// if(i != transactions.count - 1){
|
||||
@@ -100,9 +110,14 @@
|
||||
}
|
||||
[self vertifyReceipt:^(BOOL success) {
|
||||
if(success){
|
||||
self.subscriptionSuccessCompletionHandler();
|
||||
if (self.subscriptionSuccessCompletionHandler) {
|
||||
self.subscriptionSuccessCompletionHandler();
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticeAlipayResult object:nil];
|
||||
}else{
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
if (self.subscriptionFailurreCompletionHandler) {
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
}
|
||||
}
|
||||
}]; //获取交易成功后的购买凭证
|
||||
NSLog(@"交易完成,正在校验凭证....");
|
||||
@@ -111,8 +126,10 @@
|
||||
|
||||
case SKPaymentTransactionStateFailed://交易失败
|
||||
[[SKPaymentQueue defaultQueue] finishTransaction:tran];
|
||||
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
if (self.subscriptionFailurreCompletionHandler) {
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
@@ -203,39 +220,52 @@
|
||||
*/
|
||||
- (void)vertifyReceipt:(void (^)(BOOL success))completion {
|
||||
NSLog(@"~~~正在检验。。。");
|
||||
NSString *receipt = [self getReceipt];
|
||||
NSString *password = @"秘钥";
|
||||
NSString *payment_token = [self getReceipt];
|
||||
// NSString *password = @"秘钥";
|
||||
|
||||
NSString *urlString = [NSString stringWithFormat:@"https://校验地址"];
|
||||
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
|
||||
NSDictionary *parameters = @{
|
||||
@"apple_receipt": receipt,
|
||||
@"password": password
|
||||
};
|
||||
|
||||
[manager POST:urlString parameters:parameters headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
// 请求成功,处理返回的数据
|
||||
NSLog(@"弹窗提示用户请求成功");
|
||||
if (responseObject) {
|
||||
NSString *string = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
||||
if ([string isEqualToString:@"success"] || [string isEqualToString:@"订单已存在"]) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(YES);
|
||||
});
|
||||
}else if ([string isEqualToString:@"failure"] || [string isEqualToString:@"fail"]){
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(NO);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
// 请求失败,处理错误信息
|
||||
NSLog(@"请求失败:%@", error.localizedDescription);
|
||||
// NSString *urlString = [NSString stringWithFormat:@"https://sandbox.itunes.apple.com/verifyReceipt"];
|
||||
// AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
// manager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
//
|
||||
// NSDictionary *parameters = @{
|
||||
// @"apple_receipt": receipt,
|
||||
// @"password": @"a24591f9614b4814b1a77f8ffda41afc"
|
||||
// };
|
||||
//
|
||||
// [manager POST:urlString parameters:parameters headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
// // 请求成功,处理返回的数据
|
||||
// NSLog(@"弹窗提示用户请求成功");
|
||||
// if (responseObject) {
|
||||
// NSString *string = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
||||
// if ([string isEqualToString:@"success"] || [string isEqualToString:@"订单已存在"]) {
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// completion(YES);
|
||||
// });
|
||||
// }else if ([string isEqualToString:@"failure"] || [string isEqualToString:@"fail"]){
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// completion(NO);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
// // 请求失败,处理错误信息
|
||||
// NSLog(@"请求失败:%@", error.localizedDescription);
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// completion(NO);
|
||||
// });
|
||||
// }];
|
||||
showLoadingInView(KEYWINDOW)
|
||||
[[QXRequset shareInstance] postWithUrl:@"api/Payment/notify_apple" parameters:@{@"order_no":self.orderNo?:@"",@"payment_token":payment_token?:@""} needCache:NO success:^(id responseObject) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(KEYWINDOW);
|
||||
completion(YES);
|
||||
});
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(KEYWINDOW);
|
||||
completion(NO);
|
||||
showToast(msg);
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticePhotosStatusChange object:nil];
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg)
|
||||
}];
|
||||
}else{
|
||||
[QXMineNetwork createPhotosWithName:self.textField.text
|
||||
@@ -295,7 +295,7 @@
|
||||
|
||||
}
|
||||
failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg)
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
#import "QXPhotosDetailVC.h"
|
||||
#import "QXIntimateContentView.h"
|
||||
#import "QXHeartBeatSpaceViewController.h"
|
||||
#import "QXMenuPopView.h"
|
||||
#import "QXReportViewController.h"
|
||||
|
||||
@interface QXUserHomePageViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,SDCycleScrollViewDelegate>
|
||||
@interface QXUserHomePageViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,SDCycleScrollViewDelegate,QXMenuPopViewDelegate>
|
||||
@property (nonatomic,strong)UIImageView * backgourdImageView;
|
||||
@property (nonatomic,strong)SDCycleScrollView * cycleScrollView;
|
||||
@property (nonatomic,strong)UIButton *backBtn;
|
||||
@@ -46,6 +48,13 @@
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
|
||||
if (![self.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
UIButton*moreBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
|
||||
[moreBtn setImage:[UIImage imageNamed:@"dynamic_more"] forState:(UIControlStateNormal)];
|
||||
// backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
|
||||
[moreBtn addTarget:self action:@selector(moreAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:moreBtn];
|
||||
}
|
||||
}
|
||||
- (void)initSubViews{
|
||||
self.bgImageHidden = YES;
|
||||
@@ -114,6 +123,13 @@
|
||||
|
||||
self.pagingView.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight);
|
||||
}
|
||||
|
||||
-(void)moreAction{
|
||||
QXMenuPopView *menuView = [[QXMenuPopView alloc] initWithPoint:CGPointMake(SCREEN_WIDTH-60, NavContentHeight+10)];
|
||||
menuView.dataArray = @[QXText(@"举报"),QXText(@"拉黑")];
|
||||
menuView.delegate = self;
|
||||
[menuView showInView:KEYWINDOW];
|
||||
}
|
||||
-(void)getUserInfo{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork userHomePageWithUserId:self.user_id successBlock:^(QXUserHomeModel * _Nonnull userModel) {
|
||||
@@ -150,6 +166,20 @@
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
-(void)didSelectedIndex:(NSInteger)index menuTitle:(NSString*)menuTitle{
|
||||
if ([menuTitle isEqualToString:QXText(@"举报")]) {
|
||||
QXReportViewController *reportVC = [[QXReportViewController alloc] init];
|
||||
reportVC.reportType = @"1";
|
||||
reportVC.fromId = self.user_id;
|
||||
[self.navigationController pushViewController:reportVC animated:YES];
|
||||
}else if ([menuTitle isEqualToString:QXText(@"拉黑")]) {
|
||||
[QXMineNetwork addOrRemoveBlackListIsAdd:YES userId:self.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"操作成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
}
|
||||
#pragma mark - JXPagingViewDelegate
|
||||
|
||||
- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
|
||||
|
||||
@@ -90,12 +90,16 @@
|
||||
weakSelf.topView.model = model;
|
||||
weakSelf.contentView.model = model;
|
||||
[weakSelf.contentView reloadData];
|
||||
if (weakSelf.model.nobility_info.status.intValue == 0) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
weakSelf.bottomView.hidden = YES;;
|
||||
}else{
|
||||
[weakSelf.userAvatarView setHeadIcon:model.user_info.avatar dress:@""];
|
||||
weakSelf.bottomNickNameLabel.text = [NSString stringWithFormat:@"%@的当前爵位状态是%@",model.user_info.nickname,model.nobility_info.name];
|
||||
weakSelf.bottomView.hidden = NO;;
|
||||
if (weakSelf.model.nobility_info.status.intValue == 0) {
|
||||
weakSelf.bottomView.hidden = YES;;
|
||||
}else{
|
||||
[weakSelf.userAvatarView setHeadIcon:model.user_info.avatar dress:@""];
|
||||
weakSelf.bottomNickNameLabel.text = [NSString stringWithFormat:@"%@的当前爵位状态是%@",model.user_info.nickname,model.nobility_info.name];
|
||||
weakSelf.bottomView.hidden = NO;;
|
||||
}
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
[weakSelf.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface QXRechargeListModel : NSObject
|
||||
@property (nonatomic,strong)NSString *money;
|
||||
@property (nonatomic,strong)NSString *coins;
|
||||
@property (nonatomic,strong)NSString *product_id;
|
||||
@property (nonatomic,strong)NSString *ios_coins;
|
||||
@property (nonatomic,assign)BOOL isSelected;
|
||||
@end
|
||||
|
||||
|
||||
@@ -854,8 +854,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
充值列表
|
||||
*/
|
||||
+(void)getRechargeListSuccessBlock:(void (^)(NSArray<QXRechargeListModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
+(void)getRechargeListIsAppStore:(BOOL)isAppStore
|
||||
successBlock:(void (^)(NSArray<QXRechargeListModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
/**
|
||||
支付
|
||||
type 1微信2支付宝 3通联支付宝 4通联微信
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
[QXGlobal shareGlobal].loginModel.hide_status = userModel.hide_status;
|
||||
[QXGlobal shareGlobal].loginModel.singer_status = userModel.singer_status;
|
||||
[[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel];
|
||||
BOOL api_version = [responseObject[@"api_version"] boolValue];
|
||||
[QXGlobal shareGlobal].isAppStore = api_version;
|
||||
// BOOL api_version = [responseObject[@"api_version"] boolValue];
|
||||
// [QXGlobal shareGlobal].isAppStore = api_version;
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:userModel.is_can_chat forKey:kIsCanChat];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:userModel.can_chat_money forKey:kIsCanChatMoney];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
@@ -1689,8 +1689,11 @@
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)getRechargeListSuccessBlock:(void (^)(NSArray<QXRechargeListModel *> * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXRechargeList parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
+(void)getRechargeListIsAppStore:(BOOL)isAppStore
|
||||
successBlock:(void (^)(NSArray<QXRechargeListModel *> * _Nonnull))successBlock
|
||||
failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
NSString *urlString = isAppStore?QXRechargeListIOS:QXRechargeList;
|
||||
[[QXRequset shareInstance] getWithUrl:urlString parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSArray*list = [NSArray yy_modelArrayWithClass:[QXRechargeListModel class] json:responseObject[@"data"]];
|
||||
successBlock(list);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
-(void)setModel:(QXRechargeListModel *)model{
|
||||
_model = model;
|
||||
self.priceLabel.text = model.money;
|
||||
[self.cornBtn setTitle:model.coins forState:(UIControlStateNormal)];
|
||||
[self.cornBtn setTitle:QXGlobal.shareGlobal.isAppStore?model.ios_coins:model.coins forState:(UIControlStateNormal)];
|
||||
if (model.money.intValue == 0 && model.coins.intValue == 0) {
|
||||
self.customLabel.hidden = NO;
|
||||
self.cornBtn.hidden = YES;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#import "QXMineNetwork.h"
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
#import <WXApi.h>
|
||||
#import "QXIAPManager.h"
|
||||
|
||||
@class QXRechargeCustomView,QXRechargeHeaderView;
|
||||
@interface QXRechargeView()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,UIGestureRecognizerDelegate>
|
||||
@@ -38,10 +39,10 @@
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
model.money = @"0";
|
||||
model.coins = @"0";
|
||||
[self.rechargeDataArray addObject:model];
|
||||
// QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
// model.money = @"0";
|
||||
// model.coins = @"0";
|
||||
// [self.rechargeDataArray addObject:model];
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hide)];
|
||||
tap.delegate = self;
|
||||
tap.enabled = NO;
|
||||
@@ -84,40 +85,47 @@
|
||||
}
|
||||
|
||||
-(void)getRechargeList{
|
||||
MJWeakSelf
|
||||
[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];
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
|
||||
[QXMineNetwork walletPayTypeWithUserId:QXGlobal.shareGlobal.loginModel.user_id successBlock:^(QXPayTypeStatusModel * _Nonnull model) {
|
||||
[weakSelf.payTypeArray removeAllObjects];
|
||||
if (model.wx.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.wx];
|
||||
}
|
||||
if (model.ali.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.ali];
|
||||
}
|
||||
if (model.wx_tl.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.wx_tl];
|
||||
}
|
||||
if (model.ali_tl.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.ali_tl];
|
||||
}
|
||||
if (!self.isOnlyDisplayPayType) {
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]];
|
||||
}
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getRechargeListIsAppStore:YES successBlock:^(NSArray<QXRechargeListModel *> * _Nonnull list) {
|
||||
[weakSelf.rechargeDataArray removeAllObjects];
|
||||
[weakSelf.rechargeDataArray addObjectsFromArray:list];
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}else{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getRechargeListIsAppStore:NO successBlock:^(NSArray<QXRechargeListModel *> * _Nonnull list) {
|
||||
[weakSelf.rechargeDataArray removeAllObjects];
|
||||
[weakSelf.rechargeDataArray addObjectsFromArray:list];
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
[QXMineNetwork walletPayTypeWithUserId:QXGlobal.shareGlobal.loginModel.user_id successBlock:^(QXPayTypeStatusModel * _Nonnull model) {
|
||||
[weakSelf.payTypeArray removeAllObjects];
|
||||
if (model.wx.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.wx];
|
||||
}
|
||||
if (model.ali.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.ali];
|
||||
}
|
||||
if (model.wx_tl.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.wx_tl];
|
||||
}
|
||||
if (model.ali_tl.is_pay_open.intValue == 1) {
|
||||
[weakSelf.payTypeArray addObject:model.ali_tl];
|
||||
}
|
||||
if (!self.isOnlyDisplayPayType) {
|
||||
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]];
|
||||
}
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setIsPop:(BOOL)isPop{
|
||||
@@ -166,67 +174,101 @@
|
||||
//}
|
||||
|
||||
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
|
||||
if (self.isOnlyDisplayPayType) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return 1;
|
||||
}else{
|
||||
if (self.isOnlyDisplayPayType) {
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
if (section == 0 && !self.isOnlyDisplayPayType) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return self.rechargeDataArray.count;
|
||||
}else{
|
||||
if (section == 0 && !self.isOnlyDisplayPayType) {
|
||||
return self.rechargeDataArray.count;
|
||||
}
|
||||
return self.payTypeArray.count;
|
||||
}
|
||||
return self.payTypeArray.count;
|
||||
}
|
||||
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
QXRechargePriceCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXRechargePriceCell" forIndexPath:indexPath];
|
||||
cell.model = self.rechargeDataArray[indexPath.row];
|
||||
return cell;
|
||||
}else{
|
||||
QXRechargePayTypeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXRechargePayTypeCell" forIndexPath:indexPath];
|
||||
cell.model = self.payTypeArray[indexPath.row];
|
||||
return cell;
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
QXRechargePriceCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXRechargePriceCell" forIndexPath:indexPath];
|
||||
cell.model = self.rechargeDataArray[indexPath.row];
|
||||
return cell;
|
||||
}else{
|
||||
QXRechargePayTypeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXRechargePayTypeCell" forIndexPath:indexPath];
|
||||
cell.model = self.payTypeArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
}
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2-1)/3, 76);
|
||||
}else{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2-1)/3, 76);
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return 12;
|
||||
}else{
|
||||
if (section == 0) {
|
||||
return 12;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && [kind isEqualToString:UICollectionElementKindSectionFooter] && self.isCustom) {
|
||||
self.rechargeCustomView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"QXRechargeCustomView" forIndexPath:indexPath];
|
||||
return self.rechargeCustomView;
|
||||
}else if (indexPath.section == 1 && [kind isEqualToString:UICollectionElementKindSectionHeader] ) {
|
||||
self.rechargeHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"QXRechargeHeaderView" forIndexPath:indexPath];
|
||||
return self.rechargeHeaderView;
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return nil;
|
||||
}else{
|
||||
if (indexPath.section == 0 && [kind isEqualToString:UICollectionElementKindSectionFooter] && self.isCustom) {
|
||||
self.rechargeCustomView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"QXRechargeCustomView" forIndexPath:indexPath];
|
||||
return self.rechargeCustomView;
|
||||
}else if (indexPath.section == 1 && [kind isEqualToString:UICollectionElementKindSectionHeader] ) {
|
||||
self.rechargeHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"QXRechargeHeaderView" forIndexPath:indexPath];
|
||||
return self.rechargeHeaderView;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return CGSizeZero;
|
||||
}else{
|
||||
if (section == 0) {
|
||||
return CGSizeZero;
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section{
|
||||
if (section == 0 && self.isCustom) {
|
||||
return CGSizeMake(SCREEN_WIDTH, 50);
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
return CGSizeZero;
|
||||
}else{
|
||||
if (section == 0 && self.isCustom) {
|
||||
return CGSizeMake(SCREEN_WIDTH, 50);
|
||||
}
|
||||
return CGSizeZero;
|
||||
}
|
||||
return CGSizeZero;
|
||||
}
|
||||
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
QXRechargeListModel *model = self.rechargeDataArray[indexPath.row];
|
||||
if (self.selectedModel) {
|
||||
self.selectedModel.isSelected = NO;
|
||||
@@ -240,40 +282,61 @@
|
||||
}
|
||||
[collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
|
||||
}else{
|
||||
QXPayTypeModel *model = self.payTypeArray[indexPath.row];
|
||||
if (model == self.selectedPayTypeModel) {
|
||||
return;
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
QXRechargeListModel *model = self.rechargeDataArray[indexPath.row];
|
||||
if (self.selectedModel) {
|
||||
self.selectedModel.isSelected = NO;
|
||||
}
|
||||
model.isSelected = YES;
|
||||
self.selectedModel = model;
|
||||
if (model.money.intValue == 0 && model.coins.intValue == 0) {
|
||||
self.isCustom = YES;
|
||||
}else{
|
||||
self.isCustom = NO;
|
||||
}
|
||||
[collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
|
||||
}else{
|
||||
QXPayTypeModel *model = self.payTypeArray[indexPath.row];
|
||||
if (model == self.selectedPayTypeModel) {
|
||||
return;
|
||||
}
|
||||
if (self.selectedPayTypeModel) {
|
||||
self.selectedPayTypeModel.isSelected = NO;
|
||||
}
|
||||
model.isSelected = YES;
|
||||
self.selectedPayTypeModel = model;
|
||||
[collectionView reloadData];
|
||||
}
|
||||
if (self.selectedPayTypeModel) {
|
||||
self.selectedPayTypeModel.isSelected = NO;
|
||||
}
|
||||
model.isSelected = YES;
|
||||
self.selectedPayTypeModel = model;
|
||||
[collectionView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)rechargeAction:(UIButton*)sender{
|
||||
if (self.selectedPayTypeModel == nil) {
|
||||
showToast(@"请选择支付方式");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.selectedModel == nil) {
|
||||
showToast(@"请选择充值金额");
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *coins = @"0";
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
self.selectedPayTypeModel = [[QXPayTypeModel alloc] init];
|
||||
self.selectedPayTypeModel.type = @"6";
|
||||
coins = self.selectedModel.ios_coins;
|
||||
}else{
|
||||
coins = self.selectedModel.coins;
|
||||
if (self.selectedPayTypeModel == nil) {
|
||||
showToast(@"请选择支付方式");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@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 nobility_id:@"" successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[QXMineNetwork rechargePayWithMoney:self.selectedModel.money coin:coins type:self.selectedPayTypeModel.type userId:QXGlobal.shareGlobal.loginModel.user_id typeId:self.gift_bag_id nobility_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:AppScheme callback:^(NSDictionary *resultDic) {
|
||||
NSLog(@"支付宝H5支付回调 - %@", resultDic);
|
||||
|
||||
|
||||
}];
|
||||
}else if (self.selectedPayTypeModel.type.intValue == 1) {
|
||||
NSDictionary *resultDict = dict[@"data"][@"wx"];
|
||||
@@ -293,7 +356,7 @@
|
||||
req.package = package;
|
||||
req.sign = sign;
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
|
||||
|
||||
}];
|
||||
}
|
||||
else if (self.selectedPayTypeModel.type.intValue == 4) {
|
||||
@@ -303,7 +366,7 @@
|
||||
NSString *thirdPartSchema = [NSString stringWithFormat:@"thirdPartSchema=%@://",AppScheme];
|
||||
NSString *json1 = [json stringByReplacingOccurrencesOfString:@"\\" withString:@""];
|
||||
NSCharacterSet *customSet1 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
|
||||
// NSCharacterSet *customSet2 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
|
||||
// NSCharacterSet *customSet2 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
|
||||
NSCharacterSet *customSet3 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
|
||||
NSString *json2 = [json1 stringByAddingPercentEncodingWithAllowedCharacters:customSet1];
|
||||
NSString *encodedString = [thirdPartSchema stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
@@ -326,6 +389,9 @@
|
||||
launchMiniProgramReq.path = [NSString stringWithFormat:@"pages/orderDetail/orderDetail?%@",param];
|
||||
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease;
|
||||
[WXApi sendReq:launchMiniProgramReq completion:nil];
|
||||
}else if (self.selectedPayTypeModel.type.intValue == 6) {
|
||||
NSString*order_no = [NSString stringWithFormat:@"%@",dict[@"data"][@"order_no"]];
|
||||
[[QXIAPManager sharedInstance] buyGoodsWithId:self.selectedModel.product_id orderNo:order_no];
|
||||
}
|
||||
if (self.isPop) {
|
||||
[self hide];
|
||||
|
||||
@@ -126,9 +126,14 @@
|
||||
}
|
||||
}
|
||||
-(void)setHaveNobility:(BOOL)have{
|
||||
self.openBtn.hidden = have;
|
||||
self.buyBtn.hidden = !have;
|
||||
self.currentNobilityLabel.hidden = !have;
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
self.openBtn.hidden = YES;
|
||||
self.buyBtn.hidden = YES;
|
||||
}else{
|
||||
self.openBtn.hidden = have;
|
||||
self.buyBtn.hidden = !have;
|
||||
self.currentNobilityLabel.hidden = !have;
|
||||
}
|
||||
self.currentNobilityLabel.text = self.model.nobility_info.name;
|
||||
self.currentNobilityTimeLabel.text = have?[NSString stringWithFormat:@"截止时间:%@",self.model.nobility_info.end_time]:@"您尚未开通任何爵位";
|
||||
}
|
||||
|
||||
@@ -278,6 +278,9 @@
|
||||
[[QXGiftDisplayManager sharedManager] becomeFront];
|
||||
[[QXGlobal shareGlobal] dirfViewBecomeToFront];
|
||||
}else{
|
||||
if (QXGlobal.shareGlobal.isNeedUpdate) {
|
||||
return;
|
||||
}
|
||||
[self getRecommendRoom];
|
||||
}
|
||||
}
|
||||
@@ -365,9 +368,18 @@
|
||||
XHLaunchVideoAdConfiguration *videoAdconfiguration = [XHLaunchVideoAdConfiguration defaultConfiguration];
|
||||
// NSString *path = [[NSBundle mainBundle] pathForResource:@"app_start" ofType:@"mp4"];
|
||||
videoAdconfiguration.videoNameOrURLString = @"app_start2.mp4";
|
||||
videoAdconfiguration.duration = 7;
|
||||
videoAdconfiguration.duration = 19;
|
||||
videoAdconfiguration.skipButtonType = SkipTypeNone;
|
||||
videoAdconfiguration.videoCycleOnce = YES;
|
||||
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-60-10, 80, 60, 30)];
|
||||
[btn setTitle:@"跳过" forState:(UIControlStateNormal)];
|
||||
[btn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
btn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[btn addRoundedCornersWithRadius:17.5];
|
||||
btn.layer.borderColor = QXConfig.themeColor.CGColor;
|
||||
btn.layer.borderWidth = 1;
|
||||
[btn addTarget:self action:@selector(jumpAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
videoAdconfiguration.subViews = @[btn];
|
||||
[XHLaunchAd videoAdWithVideoAdConfiguration:videoAdconfiguration delegate:self];
|
||||
//广告图片URLString/或本地图片名(.jpg/.gif请带上后缀)
|
||||
// imageAdconfiguration. = model.img;
|
||||
@@ -376,6 +388,10 @@
|
||||
// //显示开屏广告
|
||||
// [XHLaunchAd imageAdWithImageAdConfiguration:imageAdconfiguration delegate:self];
|
||||
}
|
||||
|
||||
-(void)jumpAction{
|
||||
[XHLaunchAd removeAndAnimated:YES];
|
||||
}
|
||||
- (BOOL)xhLaunchAd:(XHLaunchAd *)launchAd clickAtOpenModel:(id)openModel clickPoint:(CGPoint)clickPoint{
|
||||
[XHLaunchAd removeAndAnimated:YES];
|
||||
return YES;
|
||||
|
||||
22
QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/Contents.json
vendored
Normal file
22
QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "gift_coin_funny_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "gift_coin_funny_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@2x.png
vendored
Normal file
BIN
QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@3x.png
vendored
Normal file
BIN
QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
@@ -20,6 +20,8 @@ static NSString* ServerUrl = @"https://test.vespa.qxyushen.top/";
|
||||
//static NSString* ServerUrl = @"http://test.chat.qxyushen.top";
|
||||
static NSString* H5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
#else
|
||||
//static NSString* ServerUrl = @"https://test.vespa.qxyushen.top/";
|
||||
//static NSString* H5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
//static NSString* ServerUrl = @"https://vespa.qxyushen.top/";
|
||||
//static NSString* H5ServerUrl = @"https://vespa.qxyushen.top/h5/";
|
||||
static NSString* ServerUrl = @"https://yushengapi.qxyushen.top/";
|
||||
@@ -388,6 +390,8 @@ static NSString * QXRealNameInfo = @"api/UserData/real_name_info";
|
||||
|
||||
/// 充值列表
|
||||
static NSString * QXRechargeList = @"api/UserWallet/can_recharge_list";
|
||||
/// 充值列表上架版
|
||||
static NSString * QXRechargeListIOS = @"api/UserWallet/can_recharge_list_ios";
|
||||
/// 支付
|
||||
static NSString * QXRechargePay = @"api/Payment/app_pay";
|
||||
/// 兑币比例 | 提现手续费 | 人民币购买金币
|
||||
|
||||
@@ -181,7 +181,7 @@ NSPhotoLibraryUsageDescription = "访问您的相册,允许可以把视频保存
|
||||
"请输入监护密码" = "请输入监护密码";
|
||||
"请输入房间密码" = "请输入房间密码";
|
||||
"请联系客服" = "请联系客服";
|
||||
"为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码" = "为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码";
|
||||
"为了呵护未成年人健康成长,羽声语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码" = "为了呵护未成年人健康成长,羽声语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码";
|
||||
"移除" = "移除";
|
||||
"回关" = "回关";
|
||||
"已互关" = "已互关";
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
NSLog(@"需要更新:新版本 %@ 比当前版本 %@ 新", latestVersion, currentVersion);
|
||||
weakSelf.appUpdateView.model = model;
|
||||
[weakSelf.appUpdateView showInView:KEYWINDOW];
|
||||
QXGlobal.shareGlobal.isNeedUpdate = YES;
|
||||
break;
|
||||
case 0:
|
||||
NSLog(@"版本相同:当前版本 %@ 已是最新", currentVersion);
|
||||
@@ -96,6 +97,9 @@
|
||||
}
|
||||
#pragma mark - 青少年模式
|
||||
-(void)popChirldView{
|
||||
if (QXGlobal.shareGlobal.isNeedUpdate) {
|
||||
return;
|
||||
}
|
||||
self.isAlreadyShowChirld = YES;
|
||||
MJWeakSelf
|
||||
QXChirldPopView *view = [[QXChirldPopView alloc] init];
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
self.contentLabel.numberOfLines = 0;
|
||||
self.contentLabel.font = [UIFont boldSystemFontOfSize:14];
|
||||
self.contentLabel.textColor = RGB16(0x666666);
|
||||
self.contentLabel.text = QXText(@"为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码");
|
||||
self.contentLabel.text = QXText(@"为了呵护未成年人健康成长,羽声语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码");
|
||||
[self addSubview:self.contentLabel];
|
||||
|
||||
// self.goBtn = [[UIButton alloc] init];
|
||||
|
||||
Reference in New Issue
Block a user