我的-贵族中心入口
This commit is contained in:
@@ -127,6 +127,9 @@
|
||||
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */; };
|
||||
9BE29A6B27D1BFF700446AB5 /* anchor_room_speak.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */; };
|
||||
9BE29A6D27D210A500446AB5 /* anchor_room_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */; };
|
||||
9BC5C8ED277AFF63007C8719 /* XPNobleCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */; };
|
||||
9BC5C8F6277B0263007C8719 /* XPNobleCenterListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F5277B0263007C8719 /* XPNobleCenterListViewController.m */; };
|
||||
9BC5C8F9277B02EA007C8719 /* Api+NobleCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F8277B02EA007C8719 /* Api+NobleCenter.m */; };
|
||||
E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E80487642717DDD9008595F2 /* XPRoomMenuItem.m */; };
|
||||
E80CBDE627D0C1CF001E1EC2 /* HomeMenuSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80CBDE527D0C1CF001E1EC2 /* HomeMenuSourceModel.m */; };
|
||||
E80CBDEA27D0C53F001E1EC2 /* XPWeakTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = E80CBDE927D0C53F001E1EC2 /* XPWeakTimer.m */; };
|
||||
@@ -702,6 +705,13 @@
|
||||
9BB865B4272076140029CDE0 /* RtcImplDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RtcImplDelegate.h; sourceTree = "<group>"; };
|
||||
9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_speak.svga; sourceTree = "<group>"; };
|
||||
9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_bg.svga; sourceTree = "<group>"; };
|
||||
9BC5C8EB277AFF63007C8719 /* XPNobleCenterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterViewController.h; sourceTree = "<group>"; };
|
||||
9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterViewController.m; sourceTree = "<group>"; };
|
||||
9BC5C8F3277B0144007C8719 /* XPNobleCenterProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterProtocol.h; sourceTree = "<group>"; };
|
||||
9BC5C8F4277B0263007C8719 /* XPNobleCenterListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterListViewController.h; sourceTree = "<group>"; };
|
||||
9BC5C8F5277B0263007C8719 /* XPNobleCenterListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterListViewController.m; sourceTree = "<group>"; };
|
||||
9BC5C8F7277B02EA007C8719 /* Api+NobleCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+NobleCenter.h"; sourceTree = "<group>"; };
|
||||
9BC5C8F8277B02EA007C8719 /* Api+NobleCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+NobleCenter.m"; sourceTree = "<group>"; };
|
||||
B66633E061B1B34177CD011C /* Pods-xplan-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.release.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.release.xcconfig"; sourceTree = "<group>"; };
|
||||
CACF623970097D653132D69A /* Pods_xplan_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_xplan_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E80487632717DDD9008595F2 /* XPRoomMenuItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMenuItem.h; sourceTree = "<group>"; };
|
||||
@@ -2092,6 +2102,60 @@
|
||||
path = Session;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8EA277AFEDC007C8719 /* Noble */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC5C8F2277B00C1007C8719 /* Protocol */,
|
||||
9BC5C8F1277B00B5007C8719 /* Presenter */,
|
||||
9BC5C8F0277B00A6007C8719 /* View */,
|
||||
9BC5C8EF277B009A007C8719 /* Api */,
|
||||
9BC5C8EE277B0095007C8719 /* Model */,
|
||||
);
|
||||
path = Noble;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8EE277B0095007C8719 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8EF277B009A007C8719 /* Api */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC5C8F7277B02EA007C8719 /* Api+NobleCenter.h */,
|
||||
9BC5C8F8277B02EA007C8719 /* Api+NobleCenter.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8F0277B00A6007C8719 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC5C8EB277AFF63007C8719 /* XPNobleCenterViewController.h */,
|
||||
9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */,
|
||||
9BC5C8F4277B0263007C8719 /* XPNobleCenterListViewController.h */,
|
||||
9BC5C8F5277B0263007C8719 /* XPNobleCenterListViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8F1277B00B5007C8719 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8F2277B00C1007C8719 /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC5C8F3277B0144007C8719 /* XPNobleCenterProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BFB922F5D81845AC32D1E1ED /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -3591,6 +3655,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E896EF912771AA6C00AD2CC1 /* Friend */,
|
||||
9BC5C8EA277AFEDC007C8719 /* Noble */,
|
||||
E83953232769FF2400CF2F24 /* DressUp */,
|
||||
E8E70D8026F2F3C500F03460 /* Cell */,
|
||||
E8E70D7F26F2F39000F03460 /* SubViews */,
|
||||
@@ -4006,6 +4071,7 @@
|
||||
E84BF7D1277BFCDD00EF8877 /* RoomTagModel.m in Sources */,
|
||||
E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */,
|
||||
E80DE40A277568D300BE5BCB /* ThemeColor+FirstRecharge.m in Sources */,
|
||||
9BC5C8ED277AFF63007C8719 /* XPNobleCenterViewController.m in Sources */,
|
||||
18EE3FE22750C29D00A452BF /* NIMBadgeView.m in Sources */,
|
||||
E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */,
|
||||
E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */,
|
||||
@@ -4036,6 +4102,7 @@
|
||||
E8AC721926F46E0B007D6E91 /* XPMineSettingItemModel.m in Sources */,
|
||||
E82325E6274CCAFA003A3332 /* XPShareInfoModel.m in Sources */,
|
||||
189DD55A26DE39D200AB55B1 /* BaseMvpPresenter.m in Sources */,
|
||||
9BC5C8F9277B02EA007C8719 /* Api+NobleCenter.m in Sources */,
|
||||
180806D827293794001FD836 /* NSObject+MJExtension.m in Sources */,
|
||||
189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */,
|
||||
E8788945273A55C200BF1D57 /* XPGiftInfoView.m in Sources */,
|
||||
@@ -4289,6 +4356,7 @@
|
||||
E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */,
|
||||
9B7B606227BB96E40070BB72 /* XPRoomAnchorInfoCardView.m in Sources */,
|
||||
E8395334276A03C300CF2F24 /* XPMineDressUpPresenter.m in Sources */,
|
||||
9BC5C8F6277B0263007C8719 /* XPNobleCenterListViewController.m in Sources */,
|
||||
189DD75926E6003C00AB55B1 /* Api.m in Sources */,
|
||||
E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */,
|
||||
E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */,
|
||||
|
@@ -26,7 +26,7 @@ typedef NS_ENUM(NSInteger, XPMineItemType) {
|
||||
XPMineItemType_My_Dressup,///我的装扮
|
||||
XPMineItemType_Attention_List,///关注列表
|
||||
XPMineItemType_Fans_List,///粉丝列表
|
||||
XPMineItem吧Type_Fans_Level,///我的等级
|
||||
XPMineItemType_Noble_Center,///贵族中心
|
||||
};
|
||||
|
||||
|
||||
|
@@ -80,8 +80,15 @@
|
||||
realNameItem.itmeName = @"实名认证";
|
||||
realNameItem.itmeImageName = @"mine_normal_real_name_authentic";
|
||||
realNameItem.type = XPMineItemType_Real_Name_Authentic;
|
||||
realNameItem.cornerType = UIRectCornerBottomLeft | UIRectCornerBottomRight;
|
||||
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, realNameItem];
|
||||
|
||||
XPMineItemModel * nobleCenterItem = [[XPMineItemModel alloc] init];
|
||||
nobleCenterItem.itmeName = @"贵族中心";
|
||||
#warning todo --暂无图片资源
|
||||
nobleCenterItem.itmeImageName = @"mine_normal_real_name_authentic";
|
||||
nobleCenterItem.type = XPMineItemType_Noble_Center;
|
||||
nobleCenterItem.cornerType = UIRectCornerBottomLeft | UIRectCornerBottomRight;
|
||||
|
||||
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, realNameItem, nobleCenterItem];
|
||||
[[self getView] onGetNormalItemsSuccess:array];
|
||||
}
|
||||
|
||||
|
20
xplan-ios/Main/Mine/View/Noble/Api/Api+NobleCenter.h
Normal file
20
xplan-ios/Main/Mine/View/Noble/Api/Api+NobleCenter.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Api+NobleCenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (NobleCenter)
|
||||
|
||||
/// 贵族中心等级列表
|
||||
/// @param completion 完成
|
||||
+ (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
19
xplan-ios/Main/Mine/View/Noble/Api/Api+NobleCenter.m
Normal file
19
xplan-ios/Main/Mine/View/Noble/Api/Api+NobleCenter.m
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Api+NobleCenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "Api+NobleCenter.h"
|
||||
|
||||
@implementation Api (NobleCenter)
|
||||
|
||||
/// 贵族中心等级列表
|
||||
/// @param completion 完成
|
||||
+ (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid {
|
||||
// [self makeRequest:@"car/carport/v2/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, ticket, uid, nil];
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// XPNobleCenterProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol XPNobleCenterProtocol <NSObject>
|
||||
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPNobleCenterListViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterListViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// XPNobleCenterListViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "XPNobleCenterListViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
|
||||
///P
|
||||
#import "XPNobleCenterProtocol.h"
|
||||
|
||||
@interface XPNobleCenterListViewController ()<XPNobleCenterProtocol>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray *datasource;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterListViewController
|
||||
|
||||
//- (XPMineDressUpPresenter *)createPresenter {
|
||||
// return [[XPMineDressUpPresenter alloc] init];
|
||||
//}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
// [self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
// [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.view);
|
||||
// }];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPMineDressUpProtocol
|
||||
//- (void)getUserHeadwearListSuccess:(NSArray *)array {
|
||||
// self.datasource = array;
|
||||
// [self.tableView reloadData];
|
||||
//}
|
||||
//
|
||||
//- (void)getUserCarListSuccess:(NSArray *)array {
|
||||
// self.datasource = array;
|
||||
// [self.tableView reloadData];
|
||||
//}
|
||||
//
|
||||
//- (void)getUserNameplateListSuccess:(NSArray *)array {
|
||||
// self.datasource = array;
|
||||
// [self.tableView reloadData];
|
||||
//}
|
||||
//
|
||||
//- (void)useHeadwearSuccess:(NSString *)headWearId {
|
||||
// [self.presenter getUserHeadwearList];
|
||||
// [self showSuccessToast:headWearId.integerValue == 0 ? @"取消使用头饰成功" : @"头饰使用成功"];
|
||||
//
|
||||
//}
|
||||
//
|
||||
//- (void)useCarSuccess:(NSString *)carId {
|
||||
// [self.presenter getUserCarList];
|
||||
// [self showSuccessToast:carId.integerValue == 0 ? @"取消使用座驾成功" : @"座驾使用成功"];
|
||||
//}
|
||||
//
|
||||
//- (void)useNameplateSuccess:(NSString *)nameplateId {
|
||||
// [self.presenter getUserNameplateList];
|
||||
// [self showSuccessToast:nameplateId.integerValue == 0 ? @"取消使用铭牌成功" : @"铭牌使用成功"];
|
||||
//}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
/*
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return self.datasource.count > 0 ? 120 : (KScreenHeight - kNavigationHeight - 100 -50);
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
if (self.type == DressUpListType_HeadWear) {
|
||||
XPMineHeadwearTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineHeadwearTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
|
||||
}
|
||||
cell.headwearModel = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
} else if(self.type == DressUpListType_Car) {
|
||||
XPMineCarTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineCarTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
|
||||
}
|
||||
cell.carInfo = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
} else {
|
||||
XPMineNameplateTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineNameplateTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
|
||||
}
|
||||
cell.nameplateModel = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
|
||||
XPMineDressEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineDressEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
|
||||
}
|
||||
cell.emptyTitle = self.type == DressUpListType_HeadWear ? @"亲爱的用户,你还没有头饰噢!" : self.type == DressUpListType_Car ? @"亲爱的用户,你还没有座驾噢!" : @"亲爱的用户,你还没有铭牌噢!";
|
||||
return cell;
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
//- (void)setType:(DressUpListType)type {
|
||||
// _type = type;
|
||||
// switch (type) {
|
||||
// case DressUpListType_HeadWear:
|
||||
// [self.presenter getUserHeadwearList];
|
||||
// break;
|
||||
// case DressUpListType_Car:
|
||||
// [self.presenter getUserCarList];
|
||||
// break;
|
||||
// case DressUpListType_Nameplate:
|
||||
// [self.presenter getUserNameplateList];
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
|
||||
//- (UITableView *)tableView {
|
||||
// if (!_tableView) {
|
||||
// _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
// _tableView.delegate = self;
|
||||
// _tableView.dataSource = self;
|
||||
// _tableView.tableFooterView = [UIView new];
|
||||
// _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
// _tableView.backgroundColor = [UIColor clearColor];
|
||||
// if (@available(iOS 11.0, *)) {
|
||||
// _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
// }
|
||||
// [_tableView registerClass:[XPMineNameplateTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
|
||||
// [_tableView registerClass:[XPMineCarTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
|
||||
// [_tableView registerClass:[XPMineHeadwearTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
|
||||
// [_tableView registerClass:[XPMineDressEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
|
||||
//
|
||||
// }
|
||||
// return _tableView;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPNobleCenterViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterViewController : BaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,161 @@
|
||||
//
|
||||
// XPNobleCenterViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "Api+NobleCenter.h"
|
||||
///View
|
||||
#import "XPNobleCenterListViewController.h"
|
||||
|
||||
@interface XPNobleCenterViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, SDCycleScrollViewDelegate>
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
///分页控件
|
||||
@property (nonatomic, strong) JXCategoryTitleView *titleView;
|
||||
///分页lineView
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *contentView;
|
||||
///头饰
|
||||
@property (nonatomic,strong) XPNobleCenterListViewController *nobleListView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self requestNobleTagList];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = @"贵族中心";
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.contentView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(50);
|
||||
make.top.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.titleView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
return self.nobleListView;
|
||||
}
|
||||
|
||||
// 点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,不关心具体是点击还是滚动选中的。
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
// 侧滑手势处理
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (JXCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[JXCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.titleColor = [ThemeColor secondTextColor];
|
||||
_titleView.titleSelectedColor = [ThemeColor mainTextColor];
|
||||
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
|
||||
_titleView.titleSelectedFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.listContainer = self.contentView;
|
||||
|
||||
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
|
||||
lineView.indicatorColor = [ThemeColor appMainColor];
|
||||
lineView.indicatorWidth = 8.f;
|
||||
lineView.indicatorHeight = 4.f;
|
||||
lineView.indicatorCornerRadius = 2.f;
|
||||
_titleView.indicators = @[lineView];
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
- (JXCategoryListContainerView *)contentView {
|
||||
if (!_contentView) {
|
||||
_contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_contentView.scrollView.backgroundColor = [UIColor clearColor];
|
||||
_contentView.defaultSelectedIndex = 0;
|
||||
}
|
||||
return _contentView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[@"骑士", @"男爵", @"子爵"];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
|
||||
- (XPNobleCenterListViewController *)nobleListView {
|
||||
if (!_nobleListView) {
|
||||
_nobleListView = [[XPNobleCenterListViewController alloc] init];
|
||||
}
|
||||
return _nobleListView;
|
||||
}
|
||||
|
||||
///请求贵族中心数据
|
||||
- (void)requestNobleTagList {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[Api nobleCenterLevelList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
// if (code == 200) {
|
||||
// NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
// if (array.count <= 0) {
|
||||
// [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.mas_equalTo(0);
|
||||
// }];
|
||||
// }
|
||||
// if (array.count <=0) return;
|
||||
// self.activityList = array;
|
||||
// NSMutableArray * picList = [NSMutableArray array];
|
||||
// [array enumerateObjectsUsingBlock:^(ActivityInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
// if (obj.bannerPic.length > 0) {
|
||||
// [picList addObject:obj.bannerPic];
|
||||
// }
|
||||
// }];
|
||||
// self.cycleScrollView.imageURLStringsGroup = picList;
|
||||
// if (array.count > 1) {
|
||||
// [self.cycleScrollView setAutoScroll:YES];
|
||||
// self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
// } else {
|
||||
// [self.cycleScrollView setAutoScroll:NO];
|
||||
// }
|
||||
// } else {
|
||||
// [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.mas_equalTo(0);
|
||||
// }];
|
||||
// }
|
||||
} ticket:ticket uid:uid];
|
||||
}
|
||||
|
||||
@end
|
@@ -33,7 +33,7 @@
|
||||
#import "XPMineDressUpViewController.h"
|
||||
#import "XPMineFansViewController.h"
|
||||
#import "XPMineAttentionViewController.h"
|
||||
|
||||
#import "XPNobleCenterViewController.h"
|
||||
|
||||
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineMatchTableViewCellDelegate, XPMineHeadViewDelegate>
|
||||
///
|
||||
@@ -171,6 +171,12 @@
|
||||
case XPMineItemType_My_Level:
|
||||
[self pushWebViewWIthUrl:URLWithType(kUserLevelURL)];
|
||||
break;
|
||||
case XPMineItemType_Noble_Center:
|
||||
{
|
||||
XPNobleCenterViewController *nobleCenterVC = [[XPNobleCenterViewController alloc] init];
|
||||
[self.navigationController pushViewController:nobleCenterVC animated:YES];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user