我加入的粉丝团列表
This commit is contained in:
@@ -120,6 +120,10 @@
|
||||
9B16A34B27E1915A00E13A98 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */; };
|
||||
9B17F71827BD150600440843 /* SVGAParserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B17F71727BD150600440843 /* SVGAParserManager.m */; };
|
||||
9B1B7292280010E8003FACE9 /* Api+FansTeam.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1B7291280010E8003FACE9 /* Api+FansTeam.m */; };
|
||||
9B1B729528002099003FACE9 /* XPMineFansTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */; };
|
||||
9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1B729728002147003FACE9 /* XPMineFansTeamPresenter.m */; };
|
||||
9B1B729D28002264003FACE9 /* XPMineAnchorFansTeamModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1B729C28002264003FACE9 /* XPMineAnchorFansTeamModel.m */; };
|
||||
9B1B72A1280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1B72A0280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.m */; };
|
||||
9B1EF3D227E81C0600554295 /* XPMineDressUpBubbleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1EF3D127E81C0600554295 /* XPMineDressUpBubbleViewController.m */; };
|
||||
9B1EF3D527E8294B00554295 /* XPMineDressEmptyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1EF3D427E8294B00554295 /* XPMineDressEmptyCollectionViewCell.m */; };
|
||||
9B1FC3D527E49A5D006EFFE0 /* ChatBubbleModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B1FC3D427E49A5D006EFFE0 /* ChatBubbleModel.m */; };
|
||||
@@ -836,6 +840,15 @@
|
||||
9B17F71727BD150600440843 /* SVGAParserManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAParserManager.m; sourceTree = "<group>"; };
|
||||
9B1B7290280010E8003FACE9 /* Api+FansTeam.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+FansTeam.h"; sourceTree = "<group>"; };
|
||||
9B1B7291280010E8003FACE9 /* Api+FansTeam.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+FansTeam.m"; sourceTree = "<group>"; };
|
||||
9B1B729328002099003FACE9 /* XPMineFansTeamViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansTeamViewController.h; sourceTree = "<group>"; };
|
||||
9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansTeamViewController.m; sourceTree = "<group>"; };
|
||||
9B1B729628002147003FACE9 /* XPMineFansTeamPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansTeamPresenter.h; sourceTree = "<group>"; };
|
||||
9B1B729728002147003FACE9 /* XPMineFansTeamPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansTeamPresenter.m; sourceTree = "<group>"; };
|
||||
9B1B7299280021E7003FACE9 /* XPMineAnchorFansTeamProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAnchorFansTeamProtocol.h; sourceTree = "<group>"; };
|
||||
9B1B729B28002264003FACE9 /* XPMineAnchorFansTeamModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAnchorFansTeamModel.h; sourceTree = "<group>"; };
|
||||
9B1B729C28002264003FACE9 /* XPMineAnchorFansTeamModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAnchorFansTeamModel.m; sourceTree = "<group>"; };
|
||||
9B1B729F280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAnchorFansTeamTableViewCell.h; sourceTree = "<group>"; };
|
||||
9B1B72A0280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAnchorFansTeamTableViewCell.m; sourceTree = "<group>"; };
|
||||
9B1EF3D027E81C0600554295 /* XPMineDressUpBubbleViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDressUpBubbleViewController.h; sourceTree = "<group>"; };
|
||||
9B1EF3D127E81C0600554295 /* XPMineDressUpBubbleViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineDressUpBubbleViewController.m; sourceTree = "<group>"; };
|
||||
9B1EF3D327E8294B00554295 /* XPMineDressEmptyCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDressEmptyCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -2524,6 +2537,24 @@
|
||||
path = SVGAParserManager;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B1B729A28002249003FACE9 /* AnchorFansTeam */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B1B729B28002264003FACE9 /* XPMineAnchorFansTeamModel.h */,
|
||||
9B1B729C28002264003FACE9 /* XPMineAnchorFansTeamModel.m */,
|
||||
);
|
||||
path = AnchorFansTeam;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B1B729E280023D5003FACE9 /* AnchorFansTeam */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B1B729F280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.h */,
|
||||
9B1B72A0280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.m */,
|
||||
);
|
||||
path = AnchorFansTeam;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B208A372779C1EF00F9E54A /* FaceView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -4871,6 +4902,7 @@
|
||||
E8E70D7026F2EB3800F03460 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B1B729A28002249003FACE9 /* AnchorFansTeam */,
|
||||
E896EFB32771D53500AD2CC1 /* Friend */,
|
||||
9BD9A18127A0F110004186FE /* Visitor */,
|
||||
E8B846D926FDE21900A777FE /* Recharge */,
|
||||
@@ -4918,6 +4950,8 @@
|
||||
E824546026F5F4E400BE8163 /* XPMineResetPayPwdViewController.m */,
|
||||
9BD9A17A27A0EE24004186FE /* XPMineVisitorViewController.h */,
|
||||
9BD9A17B27A0EE24004186FE /* XPMineVisitorViewController.m */,
|
||||
9B1B729328002099003FACE9 /* XPMineFansTeamViewController.h */,
|
||||
9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */,
|
||||
E8B846C826FDD79700A777FE /* Recharge */,
|
||||
E88B5CBE26FB404800DA9178 /* MineInfo */,
|
||||
E88B5CA926FB15B900DA9178 /* Teenager */,
|
||||
@@ -4966,6 +5000,8 @@
|
||||
E896EF962771AAE400AD2CC1 /* XPMineAttentionPresenter.m */,
|
||||
9BD9A17727A0EC57004186FE /* XPMineVisitorPresenter.h */,
|
||||
9BD9A17827A0EC57004186FE /* XPMineVisitorPresenter.m */,
|
||||
9B1B729628002147003FACE9 /* XPMineFansTeamPresenter.h */,
|
||||
9B1B729728002147003FACE9 /* XPMineFansTeamPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -4990,6 +5026,7 @@
|
||||
E896EF982771AB0000AD2CC1 /* XPMineFansProtocol.h */,
|
||||
E896EF992771AB1800AD2CC1 /* XPMineAttentionProtocol.h */,
|
||||
9BD9A17627A0E953004186FE /* XPMineVisitorProtocol.h */,
|
||||
9B1B7299280021E7003FACE9 /* XPMineAnchorFansTeamProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -5020,6 +5057,7 @@
|
||||
E8E70D8026F2F3C500F03460 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B1B729E280023D5003FACE9 /* AnchorFansTeam */,
|
||||
E896EFA32771AEC500AD2CC1 /* Friend */,
|
||||
9BD9A17D27A0EFB1004186FE /* Visitor */,
|
||||
E8B846D026FDDBCD00A777FE /* Recharge */,
|
||||
@@ -5445,6 +5483,7 @@
|
||||
E87AE7F9277AABE50037823A /* XPRoomTagListViewController.m in Sources */,
|
||||
18E7B26926E8D5D60064BC9B /* XCCurrentVCStackManager.m in Sources */,
|
||||
E824544326F58FCE00BE8163 /* XPMinePayPwdInputView.m in Sources */,
|
||||
9B1B72A1280023F3003FACE9 /* XPMineAnchorFansTeamTableViewCell.m in Sources */,
|
||||
1808073027315E8E001FD836 /* NetImageView.m in Sources */,
|
||||
E880B3AC278BD98600A83B0D /* XPAcrossRoomPKEmptyTableViewCell.m in Sources */,
|
||||
18486235271EB794005FC5DC /* AgoraRtcImpl.m in Sources */,
|
||||
@@ -5545,6 +5584,7 @@
|
||||
9B85B6D7279FDABA00A0A1AC /* XPUserCardSkillCardView.m in Sources */,
|
||||
9B33E3CB27D85379003B0E62 /* UploadFile.m in Sources */,
|
||||
E8AEAEF327141C7C0017FCE0 /* XPRoomMessageContainerView.m in Sources */,
|
||||
9B1B729D28002264003FACE9 /* XPMineAnchorFansTeamModel.m in Sources */,
|
||||
E8C6FFE02754EEF9004DC9F0 /* XPHomeSearchViewController.m in Sources */,
|
||||
E8AE427327153A3500BEEBB2 /* XPRoomActivityContainerView.m in Sources */,
|
||||
9BB89DC627FEB9E100586A83 /* XPAnchorFansTaskViewController.m in Sources */,
|
||||
@@ -5609,6 +5649,7 @@
|
||||
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */,
|
||||
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
|
||||
E8AEAEF927141CA30017FCE0 /* RoomHeaderView.m in Sources */,
|
||||
9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */,
|
||||
9B7B606627BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m in Sources */,
|
||||
E81C1B29277069DD0020D1E4 /* XPArrangeMicEmptyTableViewCell.m in Sources */,
|
||||
E8AC721C26F4720B007D6E91 /* XPMineSettingPresent.m in Sources */,
|
||||
@@ -5759,6 +5800,7 @@
|
||||
E8A03DF927634A590098D9EA /* CandyTreeResultModel.m in Sources */,
|
||||
E872308D26E89DAA00B90D4F /* LoginInputView.m in Sources */,
|
||||
E81C1B2C27706E5C0020D1E4 /* ArrangeMicModel.m in Sources */,
|
||||
9B1B729528002099003FACE9 /* XPMineFansTeamViewController.m in Sources */,
|
||||
E87E91522796A15500A7B3F2 /* MicroExtModel.m in Sources */,
|
||||
E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */,
|
||||
9BA8A47227C5D590000365A3 /* XPVoiceCardCircleLayer.m in Sources */,
|
||||
|
22
xplan-ios/Assets.xcassets/Mine/mine_normal_anchor_fansTeam.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Mine/mine_normal_anchor_fansTeam.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_normal_anchor_fansTeam@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_normal_anchor_fansTeam@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@@ -188,6 +188,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param uid 被访问的用户uid
|
||||
+ (void)uploadVisitUserCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
|
||||
|
||||
/// 获取粉丝团列表
|
||||
/// @param completion 完成
|
||||
/// @param pageNum 当前页数
|
||||
/// @param pageSize 一页多少个
|
||||
+ (void)getAnchorFansTeamListCompletion:(HttpRequestHelperCompletion)completion pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -198,4 +198,12 @@
|
||||
[self makeRequest:@"user/detail/visitUserDetail" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
/// 获取粉丝团列表
|
||||
/// @param completion 完成
|
||||
/// @param pageNum 当前页数
|
||||
/// @param pageSize 一页多少个
|
||||
+ (void)getAnchorFansTeamListCompletion:(HttpRequestHelperCompletion)completion pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize {
|
||||
[self makeRequest:@"anchorFansTeam/getJoinFansTeamList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, pageNum, pageSize, nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// XPMineAnchorFansTeamModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineAnchorFansTeamModel : NSObject
|
||||
|
||||
///头像
|
||||
@property (nonatomic, copy) NSString *anchorAvatar;
|
||||
///粉丝团id
|
||||
@property (nonatomic, assign) NSInteger teamId;
|
||||
///粉丝团uid
|
||||
@property (nonatomic, assign) NSInteger teamUid;
|
||||
///粉丝团名称
|
||||
@property (nonatomic, copy) NSString *anchorNick;
|
||||
///粉丝团铭牌
|
||||
@property (nonatomic, copy) NSString *icon;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPMineAnchorFansTeamModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import "XPMineAnchorFansTeamModel.h"
|
||||
|
||||
@implementation XPMineAnchorFansTeamModel
|
||||
|
||||
@end
|
@@ -30,6 +30,7 @@ typedef NS_ENUM(NSInteger, XPMineItemType) {
|
||||
XPMineItemType_Match_Manage, ///赛程管理
|
||||
XPMineItemType_Skill_Card, ///技能卡
|
||||
XPMineItemType_Visitor,///访客记录
|
||||
XPMineItemType_FansTeam,///粉丝团
|
||||
};
|
||||
|
||||
|
||||
|
21
xplan-ios/Main/Mine/Presenter/XPMineFansTeamPresenter.h
Normal file
21
xplan-ios/Main/Mine/Presenter/XPMineFansTeamPresenter.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPMineFansTeamPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFansTeamPresenter : BaseMvpPresenter
|
||||
|
||||
/// 获取粉丝团列表
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页多少个
|
||||
- (void)getAnchorFansTeamList:(int)page pageSize:(int)pageSize state:(int)state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
27
xplan-ios/Main/Mine/Presenter/XPMineFansTeamPresenter.m
Normal file
27
xplan-ios/Main/Mine/Presenter/XPMineFansTeamPresenter.m
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// XPMineFansTeamPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import "XPMineFansTeamPresenter.h"
|
||||
#import "Api+Mine.h"
|
||||
#import "XPMineAnchorFansTeamProtocol.h"
|
||||
#import "XPMineAnchorFansTeamModel.h"
|
||||
|
||||
@implementation XPMineFansTeamPresenter
|
||||
|
||||
/// 获取粉丝团列表
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页多少个
|
||||
- (void)getAnchorFansTeamList:(int)page pageSize:(int)pageSize state:(int)state {
|
||||
[Api getAnchorFansTeamListCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray *array = [XPMineAnchorFansTeamModel modelsWithArray:data.data];
|
||||
[[self getView] getAnchorFansTeamListSuccess:array state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getAnchorFansTeamListFail:state];
|
||||
}] pageNum:[NSString stringWithFormat:@"%d", page] pageSize:[NSString stringWithFormat:@"%d", pageSize]];
|
||||
}
|
||||
|
||||
@end
|
@@ -82,7 +82,12 @@
|
||||
BaseViewController *vc = [self getView];
|
||||
visitorItem.unReadCount = [vc.tabBarItem.badgeValue integerValue];
|
||||
|
||||
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, inviteFriend, visitorItem, realNameItem];
|
||||
XPMineItemModel * fansTeamItem = [[XPMineItemModel alloc] init];
|
||||
fansTeamItem.itemName = @"粉丝团";
|
||||
fansTeamItem.itemImageName = @"mine_normal_anchor_fansTeam";
|
||||
fansTeamItem.type = XPMineItemType_FansTeam;
|
||||
|
||||
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, inviteFriend, visitorItem, fansTeamItem, realNameItem];
|
||||
|
||||
[[self getView] onGetNormalItemsSuccess:array];
|
||||
}
|
||||
|
22
xplan-ios/Main/Mine/Protocol/XPMineAnchorFansTeamProtocol.h
Normal file
22
xplan-ios/Main/Mine/Protocol/XPMineAnchorFansTeamProtocol.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// XPMineAnchorFansTeamProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPMineAnchorFansTeamProtocol <NSObject>
|
||||
|
||||
///获取访客列表成功
|
||||
- (void)getAnchorFansTeamListSuccess:(NSArray *)array state:(int)state;
|
||||
|
||||
///获取访客列表失败
|
||||
- (void)getAnchorFansTeamListFail:(int)state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPMineAnchorFansTeamTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "XPMineAnchorFansTeamModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineAnchorFansTeamTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) XPMineAnchorFansTeamModel *item;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// XPMineAnchorFansTeamTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import "XPMineAnchorFansTeamTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "NetImageView.h"
|
||||
|
||||
@interface XPMineAnchorFansTeamTableViewCell()
|
||||
|
||||
///头像
|
||||
@property (nonatomic ,strong) NetImageView *avaterImgView;
|
||||
///昵称
|
||||
@property (nonatomic, strong) UILabel *nickLabel;
|
||||
///铭牌
|
||||
@property (nonatomic ,strong) NetImageView *iconImageView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineAnchorFansTeamTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self setUpUI];
|
||||
[self setUpConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - lifeCycle
|
||||
- (void)setUpUI {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.avaterImgView];
|
||||
[self.contentView addSubview:self.nickLabel];
|
||||
[self.contentView addSubview:self.iconImageView];
|
||||
}
|
||||
|
||||
#pragma mark - Constraints
|
||||
- (void)setUpConstraints {
|
||||
[self.avaterImgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.width.height.mas_equalTo(40);
|
||||
make.centerY.mas_equalTo(self.contentView.mas_centerY);
|
||||
}];
|
||||
|
||||
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.avaterImgView.mas_right).mas_offset(10);
|
||||
make.centerY.mas_equalTo(self.contentView.mas_centerY);
|
||||
make.right.mas_equalTo(self.iconImageView.mas_left);
|
||||
}];
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.nickLabel.mas_centerY);
|
||||
make.width.mas_equalTo(95);
|
||||
make.height.mas_equalTo(27);
|
||||
make.right.mas_equalTo(-15);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setItem:(XPMineAnchorFansTeamModel *)item {
|
||||
_item = item;
|
||||
self.nickLabel.text = item.anchorNick;
|
||||
self.avaterImgView.imageUrl = item.anchorAvatar;
|
||||
self.iconImageView.imageUrl = item.icon;
|
||||
}
|
||||
|
||||
- (NetImageView *)avaterImgView {
|
||||
if (!_avaterImgView) {
|
||||
_avaterImgView = [[NetImageView alloc] init];
|
||||
_avaterImgView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_avaterImgView.layer.cornerRadius = 20;
|
||||
_avaterImgView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _avaterImgView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.textColor = UIColorFromRGB(0x333333);
|
||||
_nickLabel.font = [UIFont systemFontOfSize:13];
|
||||
_nickLabel.text = @"用户昵称";
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (NetImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[NetImageView alloc] init];
|
||||
_iconImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_iconImageView.layer.cornerRadius = 20;
|
||||
_iconImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Mine/View/XPMineFansTeamViewController.h
Normal file
16
xplan-ios/Main/Mine/View/XPMineFansTeamViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMineFansTeamViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFansTeamViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
136
xplan-ios/Main/Mine/View/XPMineFansTeamViewController.m
Normal file
136
xplan-ios/Main/Mine/View/XPMineFansTeamViewController.m
Normal file
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// XPMineFansTeamViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/4/8.
|
||||
//
|
||||
|
||||
#import "XPMineFansTeamViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "XPMineAnchorFansTeamModel.h"
|
||||
///View
|
||||
#import "XPMineAnchorFansTeamTableViewCell.h"
|
||||
#import "XPMineVisitorEmptyTableViewCell.h"
|
||||
///P
|
||||
#import "XPMineFansTeamPresenter.h"
|
||||
#import "XPMineAnchorFansTeamProtocol.h"
|
||||
///VC
|
||||
#import "XPMineUserInfoViewController.h"
|
||||
#import "SessionViewController.h"
|
||||
|
||||
@interface XPMineFansTeamViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineAnchorFansTeamProtocol>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||
///当前页数
|
||||
@property (nonatomic,assign) int page;
|
||||
///更多数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
@end
|
||||
|
||||
@implementation XPMineFansTeamViewController
|
||||
|
||||
- (XPMineFansTeamPresenter *)createPresenter {
|
||||
return [[XPMineFansTeamPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self.presenter getAnchorFansTeamList:self.page pageSize:100 state:0];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = @"我加入的粉丝团";
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineAnchorFansTeamProtocol
|
||||
- (void)getAnchorFansTeamListSuccess:(NSArray *)array state:(int)state {
|
||||
[self.datasource addObjectsFromArray:array];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getAnchorFansTeamListFail:(int)state {
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
XPMineAnchorFansTeamTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineAnchorFansTeamTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineAnchorFansTeamTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineAnchorFansTeamTableViewCell class])];
|
||||
}
|
||||
cell.item = [self.datasource objectAtIndex:indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
|
||||
XPMineVisitorEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineVisitorEmptyTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineVisitorEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineVisitorEmptyTableViewCell class])];
|
||||
}
|
||||
cell.emptyTitle = @"暂无粉丝团";
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPMineAnchorFansTeamModel *item = [self.datasource objectAtIndex:indexPath.row];
|
||||
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
|
||||
userInfoVC.uid = item.teamUid;
|
||||
[self.navigationController pushViewController:userInfoVC animated:YES];
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.row == 0) {
|
||||
return 85;
|
||||
} else {
|
||||
return 56;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (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];
|
||||
_tableView.rowHeight = 56;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPMineVisitorEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineVisitorEmptyTableViewCell class])];
|
||||
[_tableView registerClass:[XPMineAnchorFansTeamTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineAnchorFansTeamTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -44,6 +44,7 @@
|
||||
#import "XPMatchManageViewController.h"
|
||||
#import "XPSkillCardViewController.h"
|
||||
#import "XPMineVisitorViewController.h"
|
||||
#import "XPMineFansTeamViewController.h"
|
||||
|
||||
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineHeadItemTableViewCellDelegate, XPMineHeadViewDelegate>
|
||||
///顶部背景
|
||||
@@ -260,6 +261,11 @@
|
||||
}
|
||||
XPMineVisitorViewController *visitorVC = [[XPMineVisitorViewController alloc] init];
|
||||
[self.navigationController pushViewController:visitorVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case XPMineItemType_FansTeam: {
|
||||
XPMineFansTeamViewController *fansTeamVc = [[XPMineFansTeamViewController alloc] init];
|
||||
[self.navigationController pushViewController:fansTeamVc animated:YES];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user