diff --git a/QXLive.xcodeproj/project.pbxproj b/QXLive.xcodeproj/project.pbxproj index eca4799..96f2e0c 100644 --- a/QXLive.xcodeproj/project.pbxproj +++ b/QXLive.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ 95C3EFF52E49F44A004B2D82 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FC2DEF0AAC0031E710 /* libiconv.tbd */; }; 95C3EFF62E49F44A004B2D82 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FA2DEF0AA10031E710 /* Security.framework */; }; 95EEB7902EFBCE35000BB488 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95EEB78F2EFBCE35000BB488 /* StoreKit.framework */; }; + 95EEB7912EFBD9C2000BB488 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95EEB78F2EFBCE35000BB488 /* StoreKit.framework */; }; 95F204FB2DEF0AA10031E710 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FA2DEF0AA10031E710 /* Security.framework */; }; 95F204FD2DEF0AAC0031E710 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FC2DEF0AAC0031E710 /* libiconv.tbd */; }; 95F204FF2DEF0AB20031E710 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FE2DEF0AB20031E710 /* SystemConfiguration.framework */; }; @@ -246,6 +247,7 @@ buildActionMask = 2147483647; files = ( 95C3EFEF2E49F44A004B2D82 /* ReplayKit.framework in Frameworks */, + 95EEB7912EFBD9C2000BB488 /* StoreKit.framework in Frameworks */, 95C3EFF02E49F44A004B2D82 /* libz.tbd in Frameworks */, 95C3EFF12E49F44A004B2D82 /* CoreTelephony.framework in Frameworks */, 95C3EFF22E49F44A004B2D82 /* libsqlite3.tbd in Frameworks */, @@ -791,7 +793,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.13; + MARKETING_VERSION = 1.1.14; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -857,7 +859,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.13; + MARKETING_VERSION = 1.1.14; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/QXLive/Base/QXAppStartViewController.m b/QXLive/Base/QXAppStartViewController.m index 096ef7f..710bafd 100644 --- a/QXLive/Base/QXAppStartViewController.m +++ b/QXLive/Base/QXAppStartViewController.m @@ -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) { diff --git a/QXLive/Base/QXGlobal.h b/QXLive/Base/QXGlobal.h index 5e52ec2..76fc9db 100644 --- a/QXLive/Base/QXGlobal.h +++ b/QXLive/Base/QXGlobal.h @@ -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; diff --git a/QXLive/Base/QXGlobal.m b/QXLive/Base/QXGlobal.m index 9957a3d..500f16e 100644 --- a/QXLive/Base/QXGlobal.m +++ b/QXLive/Base/QXGlobal.m @@ -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{ diff --git a/QXLive/Dynamic(语圈)/Controller/QXPublishViewController.m b/QXLive/Dynamic(语圈)/Controller/QXPublishViewController.m index 306fe34..f16b8f6 100644 --- a/QXLive/Dynamic(语圈)/Controller/QXPublishViewController.m +++ b/QXLive/Dynamic(语圈)/Controller/QXPublishViewController.m @@ -123,7 +123,7 @@ [weakSelf.navigationController popViewControllerAnimated:YES]; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - + showToast(msg); }]; } diff --git a/QXLive/Dynamic(语圈)/View/QXSendGiftView.m b/QXLive/Dynamic(语圈)/View/QXSendGiftView.m index 714de21..1ffc194 100644 --- a/QXLive/Dynamic(语圈)/View/QXSendGiftView.m +++ b/QXLive/Dynamic(语圈)/View/QXSendGiftView.m @@ -715,6 +715,8 @@ -(void)listWillAppear{ if ([self.giftLabelId isEqualToString:@"-10"]) { [self getBagList]; + }else{ + [self reloadData]; } self.selectedIndex = -1; [self.collectionView reloadData]; diff --git a/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m b/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m index f6a2ea7..daea0ae 100644 --- a/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m +++ b/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m @@ -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 diff --git a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m index 5c8841c..aabfd23 100644 --- a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m +++ b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m @@ -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; diff --git a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib index 2296453..98f4ec9 100644 --- a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib +++ b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib @@ -36,7 +36,7 @@ - + @@ -175,6 +175,7 @@ + diff --git a/QXLive/Manager/QXIAPManager.h b/QXLive/Manager/QXIAPManager.h index 5e3cdcb..7e55a87 100644 --- a/QXLive/Manager/QXIAPManager.h +++ b/QXLive/Manager/QXIAPManager.h @@ -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; diff --git a/QXLive/Manager/QXIAPManager.m b/QXLive/Manager/QXIAPManager.m index c6afaa5..c8c8772 100644 --- a/QXLive/Manager/QXIAPManager.m +++ b/QXLive/Manager/QXIAPManager.m @@ -14,7 +14,7 @@ @interface QXIAPManager() - +@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 *)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); }); }]; } diff --git a/QXLive/Mine(音域)/Controller/个人主页/QXCreatPhotosViewController.m b/QXLive/Mine(音域)/Controller/个人主页/QXCreatPhotosViewController.m index 5eb1a6d..5511b4b 100644 --- a/QXLive/Mine(音域)/Controller/个人主页/QXCreatPhotosViewController.m +++ b/QXLive/Mine(音域)/Controller/个人主页/QXCreatPhotosViewController.m @@ -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) }]; } diff --git a/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m b/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m index e327d3f..2a474da 100644 --- a/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m +++ b/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m @@ -18,8 +18,10 @@ #import "QXPhotosDetailVC.h" #import "QXIntimateContentView.h" #import "QXHeartBeatSpaceViewController.h" +#import "QXMenuPopView.h" +#import "QXReportViewController.h" -@interface QXUserHomePageViewController () +@interface QXUserHomePageViewController () @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 { diff --git a/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m b/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m index 985eaf8..fab8cb8 100644 --- a/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m +++ b/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m @@ -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) { diff --git a/QXLive/Mine(音域)/Controller/设置/QXSetPwdViewController.m b/QXLive/Mine(音域)/Controller/设置/QXSetPwdViewController.m index 4e046d5..c604ef7 100644 --- a/QXLive/Mine(音域)/Controller/设置/QXSetPwdViewController.m +++ b/QXLive/Mine(音域)/Controller/设置/QXSetPwdViewController.m @@ -103,7 +103,7 @@ [weakSelf.navigationController popToRootViewControllerAnimated:YES]; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - + showToast(msg); }]; } diff --git a/QXLive/Mine(音域)/Model/QXRechargeListModel.h b/QXLive/Mine(音域)/Model/QXRechargeListModel.h index 8f581f0..2af982b 100644 --- a/QXLive/Mine(音域)/Model/QXRechargeListModel.h +++ b/QXLive/Mine(音域)/Model/QXRechargeListModel.h @@ -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 diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.h b/QXLive/Mine(音域)/Services/QXMineNetwork.h index 35759d8..b518aee 100644 --- a/QXLive/Mine(音域)/Services/QXMineNetwork.h +++ b/QXLive/Mine(音域)/Services/QXMineNetwork.h @@ -854,8 +854,9 @@ NS_ASSUME_NONNULL_BEGIN /** 充值列表 */ -+(void)getRechargeListSuccessBlock:(void (^)(NSArray* list))successBlock - failBlock:(void (^)(NSError * error, NSString * msg))failBlock; ++(void)getRechargeListIsAppStore:(BOOL)isAppStore + successBlock:(void (^)(NSArray* list))successBlock + failBlock:(void (^)(NSError * error, NSString * msg))failBlock; /** 支付 type 1微信2支付宝 3通联支付宝 4通联微信 diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.m b/QXLive/Mine(音域)/Services/QXMineNetwork.m index 3d3d6f7..8e5ea6a 100644 --- a/QXLive/Mine(音域)/Services/QXMineNetwork.m +++ b/QXLive/Mine(音域)/Services/QXMineNetwork.m @@ -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 * _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 * _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); diff --git a/QXLive/Mine(音域)/View/充值/QXRechargePriceCell.m b/QXLive/Mine(音域)/View/充值/QXRechargePriceCell.m index 4655ee8..92af6c4 100644 --- a/QXLive/Mine(音域)/View/充值/QXRechargePriceCell.m +++ b/QXLive/Mine(音域)/View/充值/QXRechargePriceCell.m @@ -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; diff --git a/QXLive/Mine(音域)/View/充值/QXRechargeView.m b/QXLive/Mine(音域)/View/充值/QXRechargeView.m index 30cdd84..3fe27df 100644 --- a/QXLive/Mine(音域)/View/充值/QXRechargeView.m +++ b/QXLive/Mine(音域)/View/充值/QXRechargeView.m @@ -11,6 +11,7 @@ #import "QXMineNetwork.h" #import #import +#import "QXIAPManager.h" @class QXRechargeCustomView,QXRechargeHeaderView; @interface QXRechargeView() @@ -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 * _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 * _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 * _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]; diff --git a/QXLive/Mine(音域)/View/爵位/QXNobilityHeaderView.m b/QXLive/Mine(音域)/View/爵位/QXNobilityHeaderView.m index 7f91721..cfec4b8 100644 --- a/QXLive/Mine(音域)/View/爵位/QXNobilityHeaderView.m +++ b/QXLive/Mine(音域)/View/爵位/QXNobilityHeaderView.m @@ -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]:@"您尚未开通任何爵位"; } diff --git a/QXLive/Other/AppDelegate.m b/QXLive/Other/AppDelegate.m index 803282a..3f2dfb0 100644 --- a/QXLive/Other/AppDelegate.m +++ b/QXLive/Other/AppDelegate.m @@ -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; diff --git a/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/Contents.json b/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/Contents.json new file mode 100644 index 0000000..30d27de --- /dev/null +++ b/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/Contents.json @@ -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 + } +} diff --git a/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@2x.png b/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@2x.png new file mode 100644 index 0000000..3bca674 Binary files /dev/null and b/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@3x.png b/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@3x.png new file mode 100644 index 0000000..9e9f039 Binary files /dev/null and b/QXLive/Other/Assets.xcassets/room/gift_coin_funny_bg.imageset/gift_coin_funny_bg@3x.png differ diff --git a/QXLive/Other/QXApi.h b/QXLive/Other/QXApi.h index 09c9e04..27b5038 100644 --- a/QXLive/Other/QXApi.h +++ b/QXLive/Other/QXApi.h @@ -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"; /// 兑币比例 | 提现手续费 | 人民币购买金币 diff --git a/QXLive/Other/zh-Hans.lproj/Localizable.strings b/QXLive/Other/zh-Hans.lproj/Localizable.strings index 6edabce..d87fb98 100644 --- a/QXLive/Other/zh-Hans.lproj/Localizable.strings +++ b/QXLive/Other/zh-Hans.lproj/Localizable.strings @@ -181,7 +181,7 @@ NSPhotoLibraryUsageDescription = "访问您的相册,允许可以把视频保存 "请输入监护密码" = "请输入监护密码"; "请输入房间密码" = "请输入房间密码"; "请联系客服" = "请联系客服"; -"为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码" = "为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码"; +"为了呵护未成年人健康成长,羽声语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码" = "为了呵护未成年人健康成长,羽声语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码"; "移除" = "移除"; "回关" = "回关"; "已互关" = "已互关"; diff --git a/QXLive/Tabbar/QXTabbarController.m b/QXLive/Tabbar/QXTabbarController.m index bf10115..85b2991 100644 --- a/QXLive/Tabbar/QXTabbarController.m +++ b/QXLive/Tabbar/QXTabbarController.m @@ -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]; diff --git a/QXLive/Tabbar/弹窗/QXChirldPopView.m b/QXLive/Tabbar/弹窗/QXChirldPopView.m index f439ba7..7c2d373 100644 --- a/QXLive/Tabbar/弹窗/QXChirldPopView.m +++ b/QXLive/Tabbar/弹窗/QXChirldPopView.m @@ -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];