修正反馈问题
This commit is contained in:
@@ -163,7 +163,6 @@
|
||||
2331C1672A5EB71000E1D940 /* NobleLevelUpModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C13C2A5EB71000E1D940 /* NobleLevelUpModel.m */; };
|
||||
2331C1682A5EB71000E1D940 /* NobleAuthInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C13D2A5EB71000E1D940 /* NobleAuthInfo.m */; };
|
||||
2331C1692A5EB71000E1D940 /* XPNobleSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1412A5EB71000E1D940 /* XPNobleSettingViewController.m */; };
|
||||
2331C16A2A5EB71000E1D940 /* XPNobleCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1442A5EB71000E1D940 /* XPNobleCenterViewController.m */; };
|
||||
2331C16B2A5EB71000E1D940 /* XPNobleCenterMyNobleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1482A5EB71000E1D940 /* XPNobleCenterMyNobleView.m */; };
|
||||
2331C16C2A5EB71000E1D940 /* XPNobleCenterEmptyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C14C2A5EB71000E1D940 /* XPNobleCenterEmptyView.m */; };
|
||||
2331C16D2A5EB71000E1D940 /* XPNobleSettingNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1522A5EB71000E1D940 /* XPNobleSettingNavView.m */; };
|
||||
@@ -1883,7 +1882,6 @@
|
||||
2331C1412A5EB71000E1D940 /* XPNobleSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPNobleSettingViewController.m; sourceTree = "<group>"; };
|
||||
2331C1422A5EB71000E1D940 /* ThemeColor+NobleCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+NobleCenter.h"; sourceTree = "<group>"; };
|
||||
2331C1432A5EB71000E1D940 /* XPNobleCenterListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterListViewController.h; sourceTree = "<group>"; };
|
||||
2331C1442A5EB71000E1D940 /* XPNobleCenterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterViewController.m; sourceTree = "<group>"; };
|
||||
2331C1462A5EB71000E1D940 /* XPNobleAuthorityDescView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPNobleAuthorityDescView.h; sourceTree = "<group>"; };
|
||||
2331C1472A5EB71000E1D940 /* XPNobleSettingNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPNobleSettingNavView.h; sourceTree = "<group>"; };
|
||||
2331C1482A5EB71000E1D940 /* XPNobleCenterMyNobleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterMyNobleView.m; sourceTree = "<group>"; };
|
||||
@@ -1907,7 +1905,6 @@
|
||||
2331C15C2A5EB71000E1D940 /* XPNobleSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPNobleSettingViewController.h; sourceTree = "<group>"; };
|
||||
2331C15D2A5EB71000E1D940 /* ThemeColor+NobleCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+NobleCenter.m"; sourceTree = "<group>"; };
|
||||
2331C15E2A5EB71000E1D940 /* XPNobleCenterListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterListViewController.m; sourceTree = "<group>"; };
|
||||
2331C15F2A5EB71000E1D940 /* XPNobleCenterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterViewController.h; sourceTree = "<group>"; };
|
||||
2331C1612A5EB71000E1D940 /* Api+NobleCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+NobleCenter.h"; sourceTree = "<group>"; };
|
||||
2331C1622A5EB71000E1D940 /* Api+NobleCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+NobleCenter.m"; sourceTree = "<group>"; };
|
||||
2331C1792A5EB7AB00E1D940 /* XPNobleCenterEntranceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterEntranceView.m; sourceTree = "<group>"; };
|
||||
@@ -5515,8 +5512,6 @@
|
||||
2331C15D2A5EB71000E1D940 /* ThemeColor+NobleCenter.m */,
|
||||
2331C1432A5EB71000E1D940 /* XPNobleCenterListViewController.h */,
|
||||
2331C15E2A5EB71000E1D940 /* XPNobleCenterListViewController.m */,
|
||||
2331C15F2A5EB71000E1D940 /* XPNobleCenterViewController.h */,
|
||||
2331C1442A5EB71000E1D940 /* XPNobleCenterViewController.m */,
|
||||
5456F3C62C6EF962000E1805 /* VIPCenterViewController.h */,
|
||||
5456F3C72C6EF962000E1805 /* VIPCenterViewController.m */,
|
||||
2331C15C2A5EB71000E1D940 /* XPNobleSettingViewController.h */,
|
||||
@@ -12441,7 +12436,6 @@
|
||||
236B2E452AA07D06003967A8 /* NSData+RW.m in Sources */,
|
||||
E85E7B272A4EB0D300B6D00A /* XPGuildSuperAdminMenuView.m in Sources */,
|
||||
189DD74526E21CCC00AB55B1 /* YYReachability.m in Sources */,
|
||||
2331C16A2A5EB71000E1D940 /* XPNobleCenterViewController.m in Sources */,
|
||||
238B37D62AC55A2C00BFC9D5 /* XPTreasureFairyTrialsView.m in Sources */,
|
||||
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,
|
||||
E878B8582835F0D300E22DCF /* MonentsInteractiveModel.m in Sources */,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#import "XPDressUpShopViewController.h"
|
||||
#import "XPMineLoginPasswordViewController.h"
|
||||
#import "XPMomentTopicContainerViewController.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "VIPCenterViewController.h"
|
||||
///P
|
||||
#import "RoomHostDelegate.h"
|
||||
@interface MessageContentTextClickable()
|
||||
@@ -241,7 +241,7 @@
|
||||
break;
|
||||
case SecretaryRouterType_Nobel_Center:
|
||||
{
|
||||
XPNobleCenterViewController *nobleCenter = [XPNobleCenterViewController new];
|
||||
VIPCenterViewController *nobleCenter = [VIPCenterViewController new];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobleCenter animated:YES];
|
||||
break;
|
||||
}
|
||||
|
@@ -114,10 +114,10 @@
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPExchangeDiamondsView2")];
|
||||
return;
|
||||
}
|
||||
if(self.diamondNum.doubleValue < self.model.minDiamonds){
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:[NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsView3"),self.model.minDiamonds]];
|
||||
return;
|
||||
}
|
||||
// if(self.diamondNum.doubleValue < self.model.minDiamonds){
|
||||
// [XNDJTDDLoadingTool showErrorWithMessage:[NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsView3"),self.model.minDiamonds]];
|
||||
// return;
|
||||
// }
|
||||
if(self.diamondNum.doubleValue > self.model.maxDiamonds){
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:[NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsView4"),self.model.maxDiamonds]];
|
||||
return;
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#import "NobleLevelUpModel.h"
|
||||
///View
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "VIPCenterViewController.h"
|
||||
|
||||
@interface XPNobleUpgradeLevelView ()
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
- (void)onJumpButtonClick:(UIButton *)button {
|
||||
[TTPopup dismiss];
|
||||
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:nil];
|
||||
VIPCenterViewController * nobleVC = [[VIPCenterViewController alloc] init];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobleVC animated:YES];
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface VIPCenterViewController : MvpViewController
|
||||
|
||||
- (instancetype)initWithRoomUid:(NSInteger)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -364,13 +364,21 @@
|
||||
@property (nonatomic, copy) NSArray *vipIdentificationInfoArray;
|
||||
@property (nonatomic, copy) NSArray *vipExclusivePrivilegesInfoArray;
|
||||
|
||||
///订单编号
|
||||
@property (nonatomic,copy) NSString *orderId;
|
||||
@property (nonatomic, assign) NSInteger roomUid;
|
||||
|
||||
@end
|
||||
|
||||
@implementation VIPCenterViewController
|
||||
|
||||
|
||||
|
||||
- (instancetype)initWithRoomUid:(NSInteger)roomUid {
|
||||
if (self = [super init]) {
|
||||
self.roomUid = roomUid;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
@@ -426,7 +434,6 @@
|
||||
- (void)setupNavigationBar {
|
||||
[self.view addSubview:self.titleLabel];
|
||||
[self.view addSubview:self.backButton];
|
||||
[self.view addSubview:self.helpButton];
|
||||
[self.view addSubview:self.settingButton];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -441,14 +448,8 @@
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
}];
|
||||
|
||||
[self.helpButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self.view).offset(-16);
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
}];
|
||||
|
||||
[self.settingButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self.helpButton.mas_leading).offset(-16);
|
||||
make.trailing.mas_equalTo(self.view).offset(-16);
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
}];
|
||||
@@ -627,6 +628,7 @@
|
||||
forState:UIControlStateNormal];
|
||||
[purchaseButton setBackgroundImage:kImage(@"vip_center_purchase_button_bg")
|
||||
forState:UIControlStateNormal];
|
||||
[purchaseButton.titleLabel setFont:kFontSemibold(16)];
|
||||
[purchaseButton addTarget:self
|
||||
action:@selector(didTapPurchaseButton)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -640,7 +642,7 @@
|
||||
UIImageView *coin = [[UIImageView alloc] initWithImage:kImage(@"vip_center_purchase_coin")];
|
||||
[_purchaseContainer addSubview:coin];
|
||||
[coin mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(6);
|
||||
make.top.mas_equalTo(10);
|
||||
make.leading.mas_equalTo(16);
|
||||
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(20), kGetScaleWidth(20)));
|
||||
}];
|
||||
@@ -961,7 +963,6 @@
|
||||
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
|
||||
}
|
||||
} else {
|
||||
// TODO: 没有 VIP 或者 等级不够,显示 Not obtained VIP
|
||||
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
|
||||
}
|
||||
}
|
||||
@@ -981,7 +982,8 @@
|
||||
#pragma mark - XPNobleCenterPayViewDelegate
|
||||
- (void)payWithType:(NobleCenterPayType)type vipLevel:(NSString * _Nullable)vipLevel{
|
||||
if(type == NobleCenterPayType_diamond){
|
||||
[self.presenter openVipWithDiamondRoomUid:@(self.userInfo.uid).stringValue vipLevel:vipLevel];
|
||||
NSString *roomUid = self.roomUid > 0 ? @(self.roomUid).stringValue : @(self.userInfo.uid).stringValue;
|
||||
[self.presenter openVipWithDiamondRoomUid:roomUid vipLevel:vipLevel];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1018,18 +1020,6 @@
|
||||
return _backButton;
|
||||
}
|
||||
|
||||
- (UIButton *)helpButton {
|
||||
if (!_helpButton) {
|
||||
_helpButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_helpButton setImage:kImage(@"vip_center_help_button")
|
||||
forState:UIControlStateNormal];
|
||||
[_helpButton addTarget:self
|
||||
action:@selector(didTapHelpButton)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _helpButton;
|
||||
}
|
||||
|
||||
- (UIButton *)settingButton {
|
||||
if (!_settingButton) {
|
||||
_settingButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
|
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// XPNobleCenterViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterViewController : MvpViewController
|
||||
|
||||
///通过roomUid初始化(从房间进入)
|
||||
- (instancetype)initWithRoomUid:(NSInteger)roomUid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,753 +0,0 @@
|
||||
//
|
||||
// XPNobleCenterViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "XPNobleCenterViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
#import <Base64/MF_Base64Additions.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "ThemeColor+NobleCenter.h"
|
||||
#import "Api+NobleCenter.h"
|
||||
#import "Api+Main.h"
|
||||
|
||||
#import "RechargeStorage.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "TTPopup.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
///View
|
||||
#import "XPNobleCenterListViewController.h"
|
||||
#import "XPNobleCenterNavView.h"
|
||||
#import "XPNobleCenterMyNobleView.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPNobleSettingViewController.h"
|
||||
#import "XPSkillCardPlayerManager.h"
|
||||
#import "SessionViewController.h"
|
||||
#import "PINobleCenterTitleView.h"
|
||||
#import "XPNobleCenterWindow.h"
|
||||
///P
|
||||
#import "XPNobleCenterPresenter.h"
|
||||
#import "Api+Gift.h"
|
||||
///model
|
||||
#import "NobleCenterModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "NobleRechargeModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
#import "WalletInfoModel.h"
|
||||
#import "XPNobleCenterPayView.h"
|
||||
#import "XPNobleCenterProtocol.h"
|
||||
#import "XPIAPRechargeViewController.h"
|
||||
#import "YuMi-swift.h"
|
||||
#import "ClientConfig.h"
|
||||
@interface XPNobleCenterViewController ()<XPNobleCenterProtocol,XPNobleCenterPayViewDelegate,JXCategoryViewDelegate, JXCategoryListContainerViewDelegate,XPNobleCenterNavViewDelegate, NIMSystemNotificationManagerDelegate,XPNobleCenterMyNobleViewDelegate>
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
///分页控件
|
||||
@property (nonatomic, strong) PINobleCenterTitleView *titleView;
|
||||
///分页lineView
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *lineView;
|
||||
///头饰
|
||||
@property (nonatomic,strong) XPNobleCenterListViewController *nobleListView;
|
||||
///头部背景图
|
||||
@property (nonatomic, strong) UIImageView *headBGImgeView;
|
||||
|
||||
@property (nonatomic, strong) XPNobleCenterNavView *navView;
|
||||
|
||||
///总数据
|
||||
@property (nonatomic, strong) NobleCenterModel *model;
|
||||
///用户信息
|
||||
@property (nonatomic, strong) UserInfoModel *userInfo;
|
||||
///开通VIP
|
||||
@property (nonatomic, strong) UILabel *openNobleButton;
|
||||
///
|
||||
@property (nonatomic,strong) UIImageView *openNobleView;
|
||||
@property (nonatomic,strong) UIImageView *openNobleIconView;
|
||||
///当前用户VIP信息-开通了VIP才显示
|
||||
@property (nonatomic, strong) XPNobleCenterMyNobleView *myNobleView;
|
||||
///更新用户信息
|
||||
@property (nonatomic, assign) BOOL needUpdateUserInfo;
|
||||
|
||||
///充值-----
|
||||
@property (nonatomic, strong) NSArray *rechargeList;
|
||||
@property(nonatomic,strong) RechargeListModel *rechargeModel;
|
||||
@property(nonatomic,strong) NobleInfo *vipInfo;
|
||||
///订单编号
|
||||
@property (nonatomic,copy) NSString *orderId;
|
||||
///房间UID
|
||||
@property (nonatomic, assign) NSInteger roomUid;
|
||||
@property (nonatomic,strong) WalletInfoModel * infoModel;
|
||||
@property(nonatomic,strong) UIButton *rankBtn;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterViewController
|
||||
|
||||
///通过roomUid初始化(从房间进入)
|
||||
- (instancetype)initWithRoomUid:(NSInteger)roomUid {
|
||||
if (self = [super init]) {
|
||||
self.roomUid = roomUid;
|
||||
}
|
||||
return self;;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
|
||||
[self requestHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(getDiamondNot:) name:@"kNobleCenterGetDiamond" object:nil];
|
||||
}
|
||||
-(void)getDiamondNot:(NSNotification *)not{
|
||||
PINobleRebateModel *model = not.object;
|
||||
[self.presenter getNobleCenterReturnDiamond:model.returnProfitRecordId];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[self hideNavigationBar];
|
||||
if (self.needUpdateUserInfo) {
|
||||
[self.presenter getUserInfo];
|
||||
}
|
||||
if([XPSkillCardPlayerManager shareInstance].isInRoom == YES && [XPSkillCardPlayerManager shareInstance].isInRoomFirstRecharge == NO){
|
||||
[XPSkillCardPlayerManager shareInstance].isInRoomFirstRecharge = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (XPNobleCenterPresenter *)createPresenter {
|
||||
return [[XPNobleCenterPresenter alloc] init];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = UIColorFromRGB(0x221E13);
|
||||
[self.view addSubview:self.headBGImgeView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.lineView];
|
||||
[self.view addSubview:self.openNobleView];
|
||||
[self.view addSubview:self.myNobleView];
|
||||
[self.openNobleView addSubview:self.openNobleIconView];
|
||||
[self.openNobleView addSubview:self.openNobleButton];
|
||||
[self.view addSubview:self.rankBtn];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
CGFloat height = KScreenWidth * 410 / 375.0;
|
||||
[self.headBGImgeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.top.trailing.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(height);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(50);
|
||||
make.top.mas_equalTo(self.navView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.titleView.mas_bottom);
|
||||
}];
|
||||
[self.openNobleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(-kSafeAreaBottomHeight - 5);
|
||||
make.width.mas_equalTo(300);
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
[self.openNobleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_lessThanOrEqualTo(258);
|
||||
make.centerX.equalTo(self.openNobleView);
|
||||
make.top.bottom.equalTo(self.openNobleView);
|
||||
}];
|
||||
[self.myNobleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
|
||||
make.leading.bottom.trailing.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.openNobleIconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
make.centerY.equalTo(self.openNobleView);
|
||||
make.trailing.equalTo(self.openNobleButton.mas_leading).mas_offset(-2);
|
||||
|
||||
}];
|
||||
[self.rankBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(isMSZH() ? 57 : 78);
|
||||
make.height.mas_equalTo(24);
|
||||
make.trailing.mas_equalTo(-24);
|
||||
make.top.mas_equalTo(139);
|
||||
}];
|
||||
|
||||
}
|
||||
#pragma mark - XPNobleCenterPayViewDelegate
|
||||
- (void)payWithType:(NobleCenterPayType)type vipLevel:(NSString * _Nullable)vipLevel{
|
||||
if(type == NobleCenterPayType_diamond){
|
||||
|
||||
NSString *roomUid = self.roomUid > 0 ? @(self.roomUid).stringValue : @(self.userInfo.uid).stringValue;
|
||||
[self.presenter openVipWithDiamondRoomUid:roomUid vipLevel:vipLevel];
|
||||
return;
|
||||
}
|
||||
|
||||
[XNDJTDDLoadingTool showOnlyView:kWindow];
|
||||
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:self.rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil];
|
||||
}
|
||||
#pragma mark - XPNobleCenterMyNobleViewDelegate
|
||||
-(void)payNobleCenterWithModel:(RechargeListModel *)rechargeModel vipInfo:(NobleInfo *)vipInfo {
|
||||
XPNobleCenterWindow *window = [[XPNobleCenterWindow alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
[TTPopup popupView:window style:TTPopupStyleAlert];
|
||||
window.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterWindow1"),self.vipInfo.vipName,vipInfo.vipName];
|
||||
@kWeakify(self);
|
||||
window.confirmBlcok = ^{
|
||||
@kStrongify(self);
|
||||
XPNobleCenterPayView *payView = [[XPNobleCenterPayView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
payView.money = self.rechargeModel.money;
|
||||
payView.diamonds = self.infoModel.diamonds;
|
||||
payView.vipLevel = @(vipInfo.vipLevel).stringValue;
|
||||
payView.delegate = self;
|
||||
[self.view addSubview:payView];
|
||||
};
|
||||
|
||||
}
|
||||
-(void)openVipWithDiamondSuccess{
|
||||
[self requestHttp];
|
||||
}
|
||||
-(void)openVipWithDiamondFail:(NSInteger)code{
|
||||
if(code == 31005){
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.message = YMLocalizedString(@"XPNobleCenterViewController3");
|
||||
config.actionStyle = TTAlertActionBothStyle;
|
||||
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
|
||||
|
||||
XPIAPRechargeViewController * webVC =[[XPIAPRechargeViewController alloc] init];
|
||||
webVC.type = @"4";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
///请求VIP中心数据
|
||||
- (void)requestHttp {
|
||||
[self.presenter getUserInfo];
|
||||
[self checkTranscationIds];
|
||||
[self.presenter getNobleChargeProductListWithChannelType:@"9"];
|
||||
[self getWalletInfo];
|
||||
}
|
||||
-(void)getWalletInfo{
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
@kWeakify(self);
|
||||
[Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if(code == 200){
|
||||
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
|
||||
self.infoModel = model;
|
||||
}
|
||||
} uid:uid ticket:ticket];
|
||||
}
|
||||
///批量验证
|
||||
- (void)checkTranscationIds {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSArray * array = [RechargeStorage getAllReciptsWithUid:uid];
|
||||
for (NSDictionary *transcation in array) {
|
||||
NSString *orderId = transcation[@"orderId"];
|
||||
NSString *transcationId = transcation[@"transcationId"];
|
||||
///二次验证
|
||||
[self.presenter checkReceiptWithOrderId:orderId transcationId:transcationId errorToast:NO];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPNobleCenterProtocol
|
||||
- (void)getNobleCenterDiamondSuccess:(NSString *)recordId{
|
||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kNobleCenterGetDiamondSuccess" object:recordId];
|
||||
[self getWalletInfo];
|
||||
}
|
||||
///获取用户信息成功
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
self.userInfo = userInfo;
|
||||
self.needUpdateUserInfo = NO;
|
||||
[self.presenter getNobleCenterInfo];
|
||||
}
|
||||
|
||||
- (void)getNobleCenterInfoSuccess:(NobleCenterModel *)model {
|
||||
self.model = model;
|
||||
__block NSMutableArray<NSString *> *names = [NSMutableArray array];
|
||||
NSInteger defaultSelectIndex = 0;
|
||||
for (int index = 0; index < model.vipInfos.count; index++) {
|
||||
NobleInfo *tagInfo = [model.vipInfos xpSafeObjectAtIndex:index];
|
||||
[names addObject:tagInfo.vipName];
|
||||
if (model.currentLevel > 0){
|
||||
if (tagInfo.vipLevel == model.currentLevel) {
|
||||
defaultSelectIndex = index;
|
||||
self.vipInfo = tagInfo;
|
||||
}
|
||||
}else{
|
||||
self.vipInfo = [model.vipInfos xpSafeObjectAtIndex:0];
|
||||
}
|
||||
|
||||
}
|
||||
self.titles = names.copy;
|
||||
self.titleView.titles = self.titles;
|
||||
self.titleView.defaultSelectedIndex = defaultSelectIndex;
|
||||
[self.titleView reloadData];
|
||||
[self.lineView reloadData];
|
||||
self.navView.hideSettingBtn = self.model.currentLevel < 9;
|
||||
self.titleView.vipInfos = model.vipInfos;
|
||||
[self setPayBtnStatus:self.model.currentLevel];
|
||||
|
||||
}
|
||||
-(void)setPayBtnStatus:(NSInteger)currLevel{
|
||||
self.rechargeModel = nil;
|
||||
if (currLevel > 0){
|
||||
for (RechargeListModel *rechargeModel in self.rechargeList) {
|
||||
if (rechargeModel.prodDesc.integerValue == currLevel){
|
||||
self.rechargeModel = rechargeModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for (RechargeListModel *rechargeModel in self.rechargeList) {
|
||||
if (rechargeModel.prodDesc.integerValue == 1){
|
||||
self.rechargeModel = rechargeModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self.rechargeModel != nil){
|
||||
self.openNobleView.hidden = self.userInfo.userVipInfoVO.vipLevel;
|
||||
self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel;
|
||||
if (self.openNobleView.hidden == NO){
|
||||
self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterMyNobleView11"),self.rechargeModel.money.floatValue,self.vipInfo.vipName];
|
||||
}else{
|
||||
if (self.userInfo.userVipInfoVO) {
|
||||
self.myNobleView.rechargeModel = self.rechargeModel;
|
||||
self.myNobleView.model = self.model;
|
||||
self.myNobleView.vipInfo = self.vipInfo;
|
||||
}
|
||||
}
|
||||
if (self.vipInfo.vipLevel > self.model.currentLevel){
|
||||
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(150+kSafeAreaBottomHeight);
|
||||
}];
|
||||
}else{
|
||||
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
|
||||
}];
|
||||
}
|
||||
}else{
|
||||
self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel;
|
||||
if (self.userInfo.userVipInfoVO == nil){
|
||||
self.openNobleView.hidden = self.rechargeModel == nil;
|
||||
self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterMyNobleView11"),self.rechargeModel.money.floatValue,self.vipInfo.vipName];
|
||||
return;
|
||||
}
|
||||
|
||||
self.myNobleView.rechargeModel = self.rechargeModel;
|
||||
self.myNobleView.model = self.model;
|
||||
self.myNobleView.vipInfo = self.vipInfo;
|
||||
self.myNobleView.isHiddenPayBtn = YES;
|
||||
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
///获取VIP充值信息成功
|
||||
- (void)onGetNobleRechargeDataSuccess:(NSArray *)list {
|
||||
self.rechargeList = list;
|
||||
}
|
||||
|
||||
///请求充值id的状态成功
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId uuid:(NSString *)uuid{
|
||||
|
||||
if (orderId.length > 0) {
|
||||
self.orderId = orderId;
|
||||
if (@available(iOS 15.0, *)) {
|
||||
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
@kWeakify(self);
|
||||
iap.ConditionBlock = ^(enum StoreConditionResult state, NSDictionary<NSString *,id> * _Nullable result) {
|
||||
@kStrongify(self);
|
||||
|
||||
[self rechargeNewProcessStatus:state];
|
||||
switch (state) {
|
||||
case StoreConditionResultVerifiedServer:
|
||||
{
|
||||
NSString *transactionId = result[@"transactionId"];
|
||||
|
||||
[self rechargeSuccess:transactionId];
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
} else {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController10")];
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
}
|
||||
}
|
||||
///请求充值账单失败
|
||||
- (void)requestIAPRechargeOrderFail:(NSString *)message code:(NSInteger)code {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
|
||||
if(code == 50000){
|
||||
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.title = YMLocalizedString(@"XPIAPRechargeViewController7");
|
||||
config.message = YMLocalizedString(@"XPIAPRechargeViewController8");
|
||||
TTAlertButtonConfig *confirmButtonConfig = [[TTAlertButtonConfig alloc]init];
|
||||
confirmButtonConfig.title = YMLocalizedString(@"XPIAPRechargeViewController9");
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x13E2F5),UIColorFromRGB(0x9DB4FF),UIColorFromRGB(0xCC67FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(200, 200)];
|
||||
confirmButtonConfig.backgroundColor = [UIColor colorWithPatternImage:image];
|
||||
confirmButtonConfig.cornerRadius = 38/2;
|
||||
config.confirmButtonConfig = confirmButtonConfig;
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
[self.presenter getContactCustomerService];
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
[self showErrorToast:message];
|
||||
|
||||
|
||||
|
||||
}
|
||||
- (void)getContactCustomerServiceSuccessWithUid:(NSString *)uid{
|
||||
[self hideHUD];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
NIMSession * session = [NIMSession session:uid type:NIMSessionTypeP2P];
|
||||
SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:session];
|
||||
[self.navigationController pushViewController:sessionVC animated:YES];
|
||||
});
|
||||
|
||||
}
|
||||
///二次校验成功
|
||||
- (void)checkReceiptSuccess:(NSString *)transcationId {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
[self deleteRechageReciptWithTransactionIdentifier:transcationId];
|
||||
self.orderId = nil;
|
||||
//5秒之后如果没有收到开通成功的云信消息,则请求一次用户信息
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if (!self.userInfo.userVipInfoVO) {
|
||||
///刷新一下用户的信息
|
||||
[self requestHttp];
|
||||
}
|
||||
});
|
||||
}
|
||||
- (void)checkReceiptFailWithCode:(NSInteger)code transcationId:(NSString *)transcationId{
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
if(code == 1444){
|
||||
if (@available(iOS 15.0, *)) {
|
||||
PIIAPRegulate *iap = [PIIAPRegulate shared];
|
||||
[iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
|
||||
|
||||
}];
|
||||
}
|
||||
[self deleteRechageReciptWithTransactionIdentifier:transcationId];
|
||||
}
|
||||
}
|
||||
///删除本地保存的
|
||||
- (void)deleteRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL deleteSuccess = [RechargeStorage delegateTranscationId:transactionIdentifier uid:uid];
|
||||
if (deleteSuccess) {
|
||||
#warning to do 保存失败 需要埋点
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkTranscationIdsSuccess {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[RechargeStorage delegateAllTranscationIdsWithUid:uid];
|
||||
}
|
||||
-(void)rankAction{
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kNobleRankURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
#pragma mark - XPIAPHelperDelegate
|
||||
///当前充值的状态
|
||||
- (void)rechargeNewProcessStatus:(StoreConditionResult)status {
|
||||
|
||||
|
||||
if (status == StoreConditionResultPay || status == StoreConditionResultStart || status == StoreConditionResultVerifiedServer) {
|
||||
|
||||
}else if (status == StoreConditionResultUnowned) {
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController1")];
|
||||
}else{
|
||||
[XNDJTDDLoadingTool hideOnlyView:kWindow];
|
||||
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController0")];
|
||||
}
|
||||
}
|
||||
|
||||
///充值成功回调id
|
||||
- (void)rechargeSuccess:(NSString *)transactionIdentifier {
|
||||
///保存唯一凭证
|
||||
[self saveRechageReciptWithTransactionIdentifier:transactionIdentifier];
|
||||
///二次验证
|
||||
[self.presenter checkReceiptWithOrderId:self.orderId transcationId:transactionIdentifier errorToast:YES];
|
||||
}
|
||||
|
||||
///充值成功之后保存订单到钥匙串
|
||||
- (void)saveRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSData *receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
|
||||
NSString *encodeStr = [receipt base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
|
||||
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
|
||||
if(transactionIdentifier != nil){
|
||||
[dictionary setObject:transactionIdentifier forKey:@"transcationId"];
|
||||
}
|
||||
if(encodeStr != nil){
|
||||
[dictionary setObject:encodeStr forKey:@"recipt"];
|
||||
}
|
||||
if(self.orderId != nil){
|
||||
[dictionary setObject:self.orderId forKey:@"orderId"];
|
||||
}
|
||||
if(dictionary.allKeys.count == 0)return;
|
||||
NSString *reciptJson = [dictionary toJSONString];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL saveSuccess = [RechargeStorage saveTranscationId:transactionIdentifier recipt:reciptJson uid:uid];
|
||||
if (!saveSuccess) {
|
||||
#warning to do 保存失败 需要埋点
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
XPNobleCenterListViewController *VC = [[XPNobleCenterListViewController alloc] init];
|
||||
VC.isOpenNoble = self.userInfo.userVipInfoVO.vipLevel;
|
||||
NobleInfo *vipInfo = [self.model.vipInfos xpSafeObjectAtIndex:index];
|
||||
VC.vipInfo = vipInfo;
|
||||
if (vipInfo.comingSoon != 2) {
|
||||
VC.vipAuthInfos = [[NSMutableArray alloc]initWithArray:self.model.vipAuthInfos];
|
||||
VC.isCurrentLevel = self.userInfo.userVipInfoVO.vipLevel == vipInfo.vipLevel;
|
||||
VC.currentScore = self.model.currScore;
|
||||
}
|
||||
return VC;
|
||||
}
|
||||
|
||||
// 点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,不关心具体是点击还是滚动选中的。
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
// 侧滑手势处理
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
|
||||
NobleInfo *vipInfo = [self.model.vipInfos xpSafeObjectAtIndex:index];
|
||||
self.vipInfo = vipInfo;
|
||||
[self setPayBtnStatus:vipInfo.vipLevel];
|
||||
}
|
||||
|
||||
#pragma mark -NIMSystemNotificationManagerDelegate
|
||||
- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification {
|
||||
if (notification.receiverType == NIMSessionTypeP2P) {
|
||||
if (notification.content != nil) {
|
||||
NSData *jsonData = [notification.content dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *err;
|
||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
|
||||
if(err) {
|
||||
NSLog(@"json解析失败:%@",err);
|
||||
return;
|
||||
}
|
||||
if ([dic[@"first"] intValue] == CustomMessageType_Noble_VIP && [dic[@"second"] intValue] == Custom_Message_Sub_Open_Noble_Success) { // 开通VIP成功
|
||||
[self requestHttp];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPNobleCenterNavViewDelegate
|
||||
- (void)xPNobleCenterNavView:(XPNobleCenterNavView *)view didClickBackButton:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)xPNobleCenterNavView:(XPNobleCenterNavView *)view didClickHelpButton:(UIButton *)sender {
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kNobleRuleURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)xPNobleCenterNavView:(XPNobleCenterNavView *)view didClickSettingButton:(UIButton *)sender {
|
||||
XPNobleSettingViewController * settingVC =[[XPNobleSettingViewController alloc] init];
|
||||
settingVC.enterHide = self.userInfo.userVipInfoVO.enterHide;
|
||||
settingVC.didUpdateEnterHideBlock = ^{
|
||||
self.needUpdateUserInfo = YES;
|
||||
};
|
||||
[self.navigationController pushViewController:settingVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - events
|
||||
- (void)onOpenNobleButtonClick {
|
||||
|
||||
XPNobleCenterPayView *payView = [[XPNobleCenterPayView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
payView.money = self.rechargeModel.money;
|
||||
payView.diamonds = self.infoModel.diamonds;
|
||||
payView.vipLevel = @(self.vipInfo.vipLevel).stringValue;
|
||||
payView.delegate = self;
|
||||
[self.view addSubview:payView];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (PINobleCenterTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[PINobleCenterTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.titleColor = [DJDKMIMOMColor normalNobleTextColor];
|
||||
_titleView.titleSelectedColor = [DJDKMIMOMColor hightNobleLightTextColor];
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:14];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.listContainer = self.lineView;
|
||||
_titleView.cellWidth = isMSRTL() ? 70 : 60;
|
||||
_titleView.cellSpacing = 0;
|
||||
|
||||
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
|
||||
lineView.indicatorWidth = 26;
|
||||
lineView.indicatorHeight = 3;
|
||||
lineView.indicatorColor = UIColorFromRGB(0xFFD3A8);
|
||||
lineView.verticalMargin = 8;
|
||||
_titleView.indicators = @[lineView];
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
- (JXCategoryListContainerView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_lineView.scrollView.backgroundColor = [UIColor clearColor];
|
||||
_lineView.defaultSelectedIndex = 0;
|
||||
_lineView.scrollView.scrollEnabled = NO;
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
|
||||
- (XPNobleCenterListViewController *)nobleListView {
|
||||
if (!_nobleListView) {
|
||||
_nobleListView = [[XPNobleCenterListViewController alloc] init];
|
||||
}
|
||||
return _nobleListView;
|
||||
}
|
||||
|
||||
- (UIImageView *)headBGImgeView {
|
||||
if (!_headBGImgeView) {
|
||||
_headBGImgeView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobleCenter_head_bg"]];
|
||||
_headBGImgeView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _headBGImgeView;
|
||||
}
|
||||
|
||||
- (XPNobleCenterNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPNobleCenterNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (UILabel *)openNobleButton {
|
||||
if (!_openNobleButton) {
|
||||
NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterViewController0"), @"2.99"];
|
||||
_openNobleButton = [UILabel new];
|
||||
_openNobleButton.text = title;
|
||||
_openNobleButton.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||
_openNobleButton.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
_openNobleButton.numberOfLines = 0;
|
||||
_openNobleButton.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
}
|
||||
return _openNobleButton;
|
||||
}
|
||||
- (UIImageView *)openNobleView{
|
||||
if (!_openNobleView){
|
||||
_openNobleView = [UIImageView new];
|
||||
_openNobleView.image = kImage(@"noble_open_btn_bg");
|
||||
_openNobleView.userInteractionEnabled = YES;
|
||||
_openNobleView.hidden = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onOpenNobleButtonClick)];
|
||||
[_openNobleView addGestureRecognizer:tap];
|
||||
}
|
||||
return _openNobleView;
|
||||
}
|
||||
-(UIImageView *)openNobleIconView{
|
||||
if (!_openNobleIconView){
|
||||
_openNobleIconView = [UIImageView new];
|
||||
_openNobleIconView.image = kImage(@"noble_open_btn");
|
||||
}
|
||||
return _openNobleIconView;
|
||||
}
|
||||
- (XPNobleCenterMyNobleView *)myNobleView {
|
||||
if (!_myNobleView) {
|
||||
_myNobleView = [[XPNobleCenterMyNobleView alloc] init];
|
||||
_myNobleView.hidden = YES;
|
||||
_myNobleView.delegate = self;
|
||||
}
|
||||
return _myNobleView;
|
||||
}
|
||||
- (UIButton *)rankBtn{
|
||||
if(!_rankBtn){
|
||||
_rankBtn = [UIButton new];
|
||||
[_rankBtn setBackgroundImage:[UIImage getLanguageImage:@"mine_noble_center_rank"] forState:UIControlStateNormal];
|
||||
[_rankBtn addTarget:self action:@selector(rankAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _rankBtn;
|
||||
}
|
||||
@end
|
@@ -61,7 +61,7 @@
|
||||
#import "XPMineGiveDiamondVC.h"
|
||||
#import "XPIAPRechargeViewController.h"
|
||||
#import "XPIncomeRecordVC.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "VIPCenterViewController.h"
|
||||
#import "LittleGameInfoModel.h"
|
||||
#import "HomeLittleGameRoomModel.h"
|
||||
#import "XPLittleGameRoomOpenView.h"
|
||||
@@ -300,8 +300,6 @@ UIKIT_EXTERN NSString *kRequestTicket;
|
||||
{
|
||||
VIPCenterViewController *vc = [[VIPCenterViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
// XPNobleCenterViewController *nobleCenterVC = [[XPNobleCenterViewController alloc] init];
|
||||
// [self.navigationController pushViewController:nobleCenterVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case XPMineItemType_FansTeam: {
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#import "XPSendGiftView.h"
|
||||
#import "SessionListViewController.h"
|
||||
#import "XPRoomMoreMenuViewController.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "VIPCenterViewController.h"
|
||||
#import "XPRoomFaceViewController.h"
|
||||
#import "XPRoomHalfMessageView.h"
|
||||
#import "XPRoomMessageBubbleView.h"
|
||||
@@ -198,7 +198,7 @@
|
||||
break;
|
||||
case XPRoomMenuItemType_Noble: {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceRoomClick];
|
||||
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
VIPCenterViewController * nobleVC = [[VIPCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
[self.delegate.getCurrentNav pushViewController:nobleVC animated:YES];
|
||||
}
|
||||
break;
|
||||
|
@@ -39,7 +39,7 @@
|
||||
#import "XPGiftHeadTypeView.h"
|
||||
#import "XPGiftLuckyGiftBroadcastView.h"
|
||||
#import "XPGiftTwelveStarBroadcastView.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "VIPCenterViewController.h"
|
||||
///P
|
||||
#import "XPGiftProtocol.h"
|
||||
///VC
|
||||
@@ -514,7 +514,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
@kStrongify(self);
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceGiftClick];
|
||||
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
VIPCenterViewController * nobleVC = [[VIPCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobleVC animated:YES];
|
||||
}];
|
||||
}
|
||||
|
Reference in New Issue
Block a user