个人中心-足迹
This commit is contained in:
@@ -211,6 +211,7 @@
|
||||
9B92A36D2798179B00AD168F /* XPSkillCardTypeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A36C2798179B00AD168F /* XPSkillCardTypeCollectionViewCell.m */; };
|
||||
9B92A37027981F5B00AD168F /* XPSkillCardEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A36F27981F5B00AD168F /* XPSkillCardEditViewController.m */; };
|
||||
9B92C02227E0BD040044C5EA /* XPNobleTrumpetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92C02127E0BD040044C5EA /* XPNobleTrumpetModel.m */; };
|
||||
9B9BBF7F288F8D4E004E2E74 /* XPFootPrintNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9BBF7E288F8D4E004E2E74 /* XPFootPrintNavView.m */; };
|
||||
9B9DD94A281BC17600DBA903 /* XPCandyTreeMoreRuleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9DD949281BC17600DBA903 /* XPCandyTreeMoreRuleCell.m */; };
|
||||
9B9DFD9A27DB2194000F95B3 /* XPSessionMessageHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9DFD9927DB2194000F95B3 /* XPSessionMessageHeadView.m */; };
|
||||
9B9EEF4E27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF4D27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m */; };
|
||||
@@ -250,6 +251,10 @@
|
||||
9BCF585C279909D7008401A4 /* XPSkillCardEditPropCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCF585B279909D7008401A4 /* XPSkillCardEditPropCell.m */; };
|
||||
9BCF585F27995363008401A4 /* XPSkillCardSelectPropView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCF585E27995363008401A4 /* XPSkillCardSelectPropView.m */; };
|
||||
9BCF586227995426008401A4 /* XPSkillCardSelectPropCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCF586127995426008401A4 /* XPSkillCardSelectPropCell.m */; };
|
||||
9BD2ECCE288F829600F5CD9A /* XPMineFootPrintViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD2ECCD288F829600F5CD9A /* XPMineFootPrintViewController.m */; };
|
||||
9BD2ECD2288F833B00F5CD9A /* XPMineFootPrintModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD2ECD1288F833B00F5CD9A /* XPMineFootPrintModel.m */; };
|
||||
9BD2ECD5288F838200F5CD9A /* XPMineFootPrintPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD2ECD4288F838200F5CD9A /* XPMineFootPrintPresenter.m */; };
|
||||
9BD2ECDA288F867000F5CD9A /* XPMineFootPrintTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD2ECD9288F867000F5CD9A /* XPMineFootPrintTableViewCell.m */; };
|
||||
9BD63FAB277EE885006EB744 /* Api+RoomRadio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD63FAA277EE885006EB744 /* Api+RoomRadio.m */; };
|
||||
9BD63FAE277EE97A006EB744 /* XPReleaseRadioPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD63FAD277EE97A006EB744 /* XPReleaseRadioPresenter.m */; };
|
||||
9BD63FB4277EF1B3006EB744 /* XPReleaseRadioModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BD63FB3277EF1B3006EB744 /* XPReleaseRadioModel.m */; };
|
||||
@@ -1282,6 +1287,8 @@
|
||||
9B92A36F27981F5B00AD168F /* XPSkillCardEditViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardEditViewController.m; sourceTree = "<group>"; };
|
||||
9B92C02027E0BD040044C5EA /* XPNobleTrumpetModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleTrumpetModel.h; sourceTree = "<group>"; };
|
||||
9B92C02127E0BD040044C5EA /* XPNobleTrumpetModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleTrumpetModel.m; sourceTree = "<group>"; };
|
||||
9B9BBF7D288F8D4E004E2E74 /* XPFootPrintNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPFootPrintNavView.h; sourceTree = "<group>"; };
|
||||
9B9BBF7E288F8D4E004E2E74 /* XPFootPrintNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPFootPrintNavView.m; sourceTree = "<group>"; };
|
||||
9B9DD948281BC17600DBA903 /* XPCandyTreeMoreRuleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeMoreRuleCell.h; sourceTree = "<group>"; };
|
||||
9B9DD949281BC17600DBA903 /* XPCandyTreeMoreRuleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeMoreRuleCell.m; sourceTree = "<group>"; };
|
||||
9B9DFD9827DB2194000F95B3 /* XPSessionMessageHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSessionMessageHeadView.h; sourceTree = "<group>"; };
|
||||
@@ -1360,6 +1367,15 @@
|
||||
9BCF585E27995363008401A4 /* XPSkillCardSelectPropView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardSelectPropView.m; sourceTree = "<group>"; };
|
||||
9BCF586027995426008401A4 /* XPSkillCardSelectPropCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardSelectPropCell.h; sourceTree = "<group>"; };
|
||||
9BCF586127995426008401A4 /* XPSkillCardSelectPropCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardSelectPropCell.m; sourceTree = "<group>"; };
|
||||
9BD2ECCC288F829600F5CD9A /* XPMineFootPrintViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFootPrintViewController.h; sourceTree = "<group>"; };
|
||||
9BD2ECCD288F829600F5CD9A /* XPMineFootPrintViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFootPrintViewController.m; sourceTree = "<group>"; };
|
||||
9BD2ECD0288F833B00F5CD9A /* XPMineFootPrintModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFootPrintModel.h; sourceTree = "<group>"; };
|
||||
9BD2ECD1288F833B00F5CD9A /* XPMineFootPrintModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFootPrintModel.m; sourceTree = "<group>"; };
|
||||
9BD2ECD3288F838200F5CD9A /* XPMineFootPrintPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFootPrintPresenter.h; sourceTree = "<group>"; };
|
||||
9BD2ECD4288F838200F5CD9A /* XPMineFootPrintPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFootPrintPresenter.m; sourceTree = "<group>"; };
|
||||
9BD2ECD6288F849300F5CD9A /* XPMineFootPrintProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFootPrintProtocol.h; sourceTree = "<group>"; };
|
||||
9BD2ECD8288F867000F5CD9A /* XPMineFootPrintTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFootPrintTableViewCell.h; sourceTree = "<group>"; };
|
||||
9BD2ECD9288F867000F5CD9A /* XPMineFootPrintTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFootPrintTableViewCell.m; sourceTree = "<group>"; };
|
||||
9BD63FA9277EE885006EB744 /* Api+RoomRadio.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+RoomRadio.h"; sourceTree = "<group>"; };
|
||||
9BD63FAA277EE885006EB744 /* Api+RoomRadio.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+RoomRadio.m"; sourceTree = "<group>"; };
|
||||
9BD63FAC277EE97A006EB744 /* XPReleaseRadioPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPReleaseRadioPresenter.h; sourceTree = "<group>"; };
|
||||
@@ -3825,6 +3841,8 @@
|
||||
9BBC02862786D75C0007C24B /* XPNobleUpgradeLevelView.m */,
|
||||
9B86D87E2817F4A300494FCD /* XPNobleSettingNavView.h */,
|
||||
9B86D87F2817F4A300494FCD /* XPNobleSettingNavView.m */,
|
||||
9B9BBF7D288F8D4E004E2E74 /* XPFootPrintNavView.h */,
|
||||
9B9BBF7E288F8D4E004E2E74 /* XPFootPrintNavView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
@@ -3962,6 +3980,24 @@
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BD2ECCF288F832300F5CD9A /* FootPrint */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BD2ECD0288F833B00F5CD9A /* XPMineFootPrintModel.h */,
|
||||
9BD2ECD1288F833B00F5CD9A /* XPMineFootPrintModel.m */,
|
||||
);
|
||||
path = FootPrint;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BD2ECD7288F865900F5CD9A /* FootPrint */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BD2ECD8288F867000F5CD9A /* XPMineFootPrintTableViewCell.h */,
|
||||
9BD2ECD9288F867000F5CD9A /* XPMineFootPrintTableViewCell.m */,
|
||||
);
|
||||
path = FootPrint;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BD63FAF277EEAC2006EB744 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -6651,6 +6687,7 @@
|
||||
E8E70D7026F2EB3800F03460 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BD2ECCF288F832300F5CD9A /* FootPrint */,
|
||||
E80B070F280D0A6700A79F63 /* Friend */,
|
||||
9B1B729A28002249003FACE9 /* AnchorFansTeam */,
|
||||
E8D34D57280821F3009C4835 /* UserInfo */,
|
||||
@@ -6688,6 +6725,8 @@
|
||||
E8E70D7626F2F15100F03460 /* XPMineViewController.m */,
|
||||
9BD9A17A27A0EE24004186FE /* XPMineVisitorViewController.h */,
|
||||
9BD9A17B27A0EE24004186FE /* XPMineVisitorViewController.m */,
|
||||
9BD2ECCC288F829600F5CD9A /* XPMineFootPrintViewController.h */,
|
||||
9BD2ECCD288F829600F5CD9A /* XPMineFootPrintViewController.m */,
|
||||
9B1B729328002099003FACE9 /* XPMineFansTeamViewController.h */,
|
||||
9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */,
|
||||
E8B846C826FDD79700A777FE /* Recharge */,
|
||||
@@ -6752,6 +6791,8 @@
|
||||
9BD9A17827A0EC57004186FE /* XPMineVisitorPresenter.m */,
|
||||
9B1B729628002147003FACE9 /* XPMineFansTeamPresenter.h */,
|
||||
9B1B729728002147003FACE9 /* XPMineFansTeamPresenter.m */,
|
||||
9BD2ECD3288F838200F5CD9A /* XPMineFootPrintPresenter.h */,
|
||||
9BD2ECD4288F838200F5CD9A /* XPMineFootPrintPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -6783,6 +6824,7 @@
|
||||
E84CBCE8284380B300D43221 /* XPMineFriendProtocol.h */,
|
||||
9BD9A17627A0E953004186FE /* XPMineVisitorProtocol.h */,
|
||||
9B1B7299280021E7003FACE9 /* XPMineAnchorFansTeamProtocol.h */,
|
||||
9BD2ECD6288F849300F5CD9A /* XPMineFootPrintProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -6813,6 +6855,7 @@
|
||||
E8E70D8026F2F3C500F03460 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BD2ECD7288F865900F5CD9A /* FootPrint */,
|
||||
9B1B729E280023D5003FACE9 /* AnchorFansTeam */,
|
||||
E896EFA32771AEC500AD2CC1 /* Friend */,
|
||||
9BD9A17D27A0EFB1004186FE /* Visitor */,
|
||||
@@ -7244,6 +7287,7 @@
|
||||
E88B5CB226FB1CFF00DA9178 /* XPMineTeenagerProtocol.h in Sources */,
|
||||
E8E859C928264C2300EE4857 /* HTTPConnection.m in Sources */,
|
||||
9BD9A18027A0EFC7004186FE /* XPMineVisitorTableViewCell.m in Sources */,
|
||||
9BD2ECD2288F833B00F5CD9A /* XPMineFootPrintModel.m in Sources */,
|
||||
E824546626F5FF6000BE8163 /* XPMineResetPayPasswordProtocol.h in Sources */,
|
||||
E800807227FD6C3D0055A8AB /* XPClanPresenter.m in Sources */,
|
||||
E89DA66427005932008483C1 /* XPIAPHelper.m in Sources */,
|
||||
@@ -7296,6 +7340,7 @@
|
||||
E8EEB8F726FC2673007C6EBA /* UserPhoto.m in Sources */,
|
||||
E8664EDF27E45EC7000171BA /* XPRoomPKRecordPresenter.m in Sources */,
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
9B9BBF7F288F8D4E004E2E74 /* XPFootPrintNavView.m in Sources */,
|
||||
E80E900C27E0358900434B90 /* XPRoomTopicAlertView.m in Sources */,
|
||||
9BB54966278303EB0090CD26 /* XPNobleCenterNavView.m in Sources */,
|
||||
9B92A36327980DCC00AD168F /* Api+SkillCard.m in Sources */,
|
||||
@@ -7595,6 +7640,7 @@
|
||||
9B6B3AAB278C2EA7005551EC /* XPRoomNobleLevelUpView.m in Sources */,
|
||||
E8834E3828000CB50029CCC1 /* GuildSearchUserInfoModel.m in Sources */,
|
||||
E8A03DE9276301CC0098D9EA /* XPCandyRankContainerView.m in Sources */,
|
||||
9BD2ECD5288F838200F5CD9A /* XPMineFootPrintPresenter.m in Sources */,
|
||||
9B1B72BF2800422E003FACE9 /* XPAnchorPKRuleView.m in Sources */,
|
||||
186A534B26FC6ED900D67B2C /* TTPopupManagerService.m in Sources */,
|
||||
E8834E35280009090029CCC1 /* XPMineGuildSearchMemberTableViewCell.m in Sources */,
|
||||
@@ -7880,6 +7926,7 @@
|
||||
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,
|
||||
E8A6C28C27CF436300AC7442 /* XPHomeLikeViewController.m in Sources */,
|
||||
9BCF586227995426008401A4 /* XPSkillCardSelectPropCell.m in Sources */,
|
||||
9BD2ECCE288F829600F5CD9A /* XPMineFootPrintViewController.m in Sources */,
|
||||
E86A16BF2856D4D5004228B8 /* XPSessionFindNewGreetListView.m in Sources */,
|
||||
E8E70D8F26F2F5DB00F03460 /* XPMineMenuTableViewCell.m in Sources */,
|
||||
E80016422804228100D6D17A /* XPGuildIncomePresenter.m in Sources */,
|
||||
@@ -7929,6 +7976,7 @@
|
||||
E8C6FFEA2755040B004DC9F0 /* XPHomeSearchNavView.m in Sources */,
|
||||
E8E859C628264C2300EE4857 /* HTTPAsyncFileResponse.m in Sources */,
|
||||
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */,
|
||||
9BD2ECDA288F867000F5CD9A /* XPMineFootPrintTableViewCell.m in Sources */,
|
||||
E8001635280410BD00D6D17A /* XPGuildIncomeSectionView.m in Sources */,
|
||||
E8395339276A0CC100CF2F24 /* XPMineHeadwearTableViewCell.m in Sources */,
|
||||
E875FA8727D619820086ED04 /* ClientDataModel.m in Sources */,
|
||||
|
@@ -245,6 +245,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param completion 完成
|
||||
/// @param uids 用户的uid
|
||||
+ (void)getUsersListInfo:(HttpRequestHelperCompletion)completion uids:(NSString *)uids;
|
||||
|
||||
/// 获取用户进房记录
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)requestFootPrint:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize;
|
||||
|
||||
/// 清除进房记录
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户uid
|
||||
+ (void)requestCleanFootPrint:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -269,4 +269,18 @@
|
||||
[self makeRequest:@"user/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uids, nil];
|
||||
}
|
||||
|
||||
/// 获取用户进房记录
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)requestFootPrint:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize {
|
||||
[self makeRequest:@"userroom/getInRoomRecord" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, page, pageSize, nil];
|
||||
}
|
||||
|
||||
/// 清除进房记录
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户uid
|
||||
+ (void)requestCleanFootPrint:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
||||
[self makeRequest:@"userroom/deleteInRoomRecord" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
24
xplan-ios/Main/Mine/Model/FootPrint/XPMineFootPrintModel.h
Normal file
24
xplan-ios/Main/Mine/Model/FootPrint/XPMineFootPrintModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// XPMineFootPrintModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFootPrintModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *roomUid;//房间uid
|
||||
@property (nonatomic, copy) NSString *roomId;//房间id
|
||||
@property (nonatomic, copy) NSString *title;//房间名称
|
||||
@property (nonatomic, copy) NSString *avatar;//房间头像
|
||||
@property (nonatomic, assign) BOOL valid;//开房状态
|
||||
@property (nonatomic, assign) long long erbanNo;
|
||||
@property (nonatomic, assign) long long updateTime;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Mine/Model/FootPrint/XPMineFootPrintModel.m
Normal file
12
xplan-ios/Main/Mine/Model/FootPrint/XPMineFootPrintModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPMineFootPrintModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import "XPMineFootPrintModel.h"
|
||||
|
||||
@implementation XPMineFootPrintModel
|
||||
|
||||
@end
|
@@ -18,6 +18,7 @@ typedef NS_ENUM(NSInteger, XPMineItemType) {
|
||||
XPMineItemType_Account,///我的账户
|
||||
XPMineItemType_Personinfo,///个人中心
|
||||
XPMineItemType_Attention_List,///关注列表
|
||||
XPMineItemType_Foot_Print, ///足迹、进房记录
|
||||
XPMineItemType_Fans_List,///粉丝列表
|
||||
XPMineItemType_Noble_Center,///贵族中心
|
||||
XPMineItemType_Skill_Card, ///技能卡
|
||||
|
25
xplan-ios/Main/Mine/Presenter/XPMineFootPrintPresenter.h
Normal file
25
xplan-ios/Main/Mine/Presenter/XPMineFootPrintPresenter.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPMineFootPrintPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFootPrintPresenter : BaseMvpPresenter
|
||||
|
||||
///获取进房记录
|
||||
/// @param page 当前页码
|
||||
/// @param pageSize 每页数量
|
||||
/// @param state 0:刷新, 1:加载更多
|
||||
- (void)getFootPrintListWithPage:(int)page pageSize:(int)pageSize state:(int)state;
|
||||
|
||||
/// 清除进房记录
|
||||
- (void)cleanFootPrint;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
38
xplan-ios/Main/Mine/Presenter/XPMineFootPrintPresenter.m
Normal file
38
xplan-ios/Main/Mine/Presenter/XPMineFootPrintPresenter.m
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// XPMineFootPrintPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import "XPMineFootPrintPresenter.h"
|
||||
#import "Api+Mine.h"
|
||||
#import "XPMineFootPrintProtocol.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "XPMineFootPrintModel.h"
|
||||
|
||||
@implementation XPMineFootPrintPresenter
|
||||
|
||||
///获取进房记录
|
||||
/// @param page 当前页码
|
||||
/// @param pageSize 每页数量
|
||||
/// @param state 0:刷新, 1:加载更多
|
||||
- (void)getFootPrintListWithPage:(int)page pageSize:(int)pageSize state:(int)state {
|
||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||
[Api requestFootPrint:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray *array = [XPMineFootPrintModel modelsWithArray:data.data];
|
||||
[[self getView] getFootPrintListSuccess:array state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getFootPrintListFail:state];
|
||||
}] uid:uid page:[NSString stringWithFormat:@"%d", page] pageSize:[NSString stringWithFormat:@"%d", pageSize]];
|
||||
}
|
||||
|
||||
/// 清除进房记录
|
||||
- (void)cleanFootPrint {
|
||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||
[Api requestCleanFootPrint:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] cleanFootPrintSuccess];
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
@end
|
25
xplan-ios/Main/Mine/Protocol/XPMineFootPrintProtocol.h
Normal file
25
xplan-ios/Main/Mine/Protocol/XPMineFootPrintProtocol.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPMineFootPrintProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPMineFootPrintProtocol <NSObject>
|
||||
|
||||
///获取进房记录列表成功
|
||||
- (void)getFootPrintListSuccess:(NSArray *)array state:(int)state;
|
||||
|
||||
///获取进房记录列表失败
|
||||
- (void)getFootPrintListFail:(int)state;
|
||||
|
||||
///清除进房记录成功
|
||||
- (void)cleanFootPrintSuccess;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPMineFootPrintTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "XPMineFootPrintModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFootPrintTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) XPMineFootPrintModel *item;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// XPMineFootPrintTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import "XPMineFootPrintTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "NetImageView.h"
|
||||
|
||||
@interface XPMineFootPrintTableViewCell()
|
||||
|
||||
@property (nonatomic ,strong) NetImageView *avaterImgView;
|
||||
@property (nonatomic, strong) UILabel *nickLabel;
|
||||
@property (nonatomic ,strong) UILabel *memberIdLabel;
|
||||
@property (nonatomic ,strong) UILabel *timeLabel;
|
||||
@property (nonatomic, strong) UIView *lineView;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPMineFootPrintTableViewCell
|
||||
|
||||
- (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.memberIdLabel];
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
[self.contentView addSubview:self.lineView];
|
||||
}
|
||||
|
||||
#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(8);
|
||||
make.bottom.mas_equalTo(self.avaterImgView.mas_centerY).mas_offset(-4);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
|
||||
[self.memberIdLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.avaterImgView.mas_centerY).mas_offset(4);
|
||||
make.left.mas_equalTo(self.nickLabel);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-15);
|
||||
make.centerY.mas_equalTo(self.nickLabel.mas_centerY);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(0);
|
||||
make.left.mas_equalTo(self.avaterImgView);
|
||||
make.right.mas_equalTo(-15);
|
||||
make.height.mas_equalTo(0.5);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setItem:(XPMineFootPrintModel *)item {
|
||||
_item = item;
|
||||
self.nickLabel.text = item.title;
|
||||
self.avaterImgView.imageUrl = item.avatar;
|
||||
self.memberIdLabel.text = [NSString stringWithFormat:@"ID:%lld", item.erbanNo];
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:item.updateTime/ 1000];
|
||||
self.timeLabel.text = [dateFormatter stringFromDate:date];
|
||||
}
|
||||
|
||||
- (NetImageView *)avaterImgView {
|
||||
if (!_avaterImgView) {
|
||||
_avaterImgView = [[NetImageView alloc] init];
|
||||
_avaterImgView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_avaterImgView.layer.cornerRadius = 4;
|
||||
_avaterImgView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _avaterImgView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.textColor = [ThemeColor mainTextColor];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:14];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)memberIdLabel {
|
||||
if (!_memberIdLabel) {
|
||||
_memberIdLabel = [[UILabel alloc] init];
|
||||
_memberIdLabel.textColor = [ThemeColor secondTextColor];
|
||||
_memberIdLabel.font = [UIFont systemFontOfSize:12];
|
||||
}
|
||||
return _memberIdLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] init];
|
||||
_timeLabel.textColor = [ThemeColor textThirdColor];
|
||||
_timeLabel.font = [UIFont boldSystemFontOfSize:10];
|
||||
}
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
_lineView.backgroundColor = UIColorFromRGB(0xEAEAF1);
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// XPFootPrintNavView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPFootPrintNavView;
|
||||
@protocol XPFootPrintNavViewDelegate <NSObject>
|
||||
|
||||
///点击了返回按钮
|
||||
- (void)xPFootPrintNavView:(XPFootPrintNavView *)view didClickBackButton:(UIButton *)sender;
|
||||
///点击了清除按钮
|
||||
- (void)xPFootPrintNavView:(XPFootPrintNavView *)view didClickClearButton:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface XPFootPrintNavView : UIView
|
||||
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPFootPrintNavViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// XPFootPrintNavView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import "XPFootPrintNavView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
|
||||
@interface XPFootPrintNavView ()
|
||||
|
||||
///返回按钮
|
||||
@property (nonatomic,strong) UIButton *backButton;
|
||||
///显示文本
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///设置按钮
|
||||
@property (nonatomic, strong) UIButton *settingButton;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPFootPrintNavView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Response
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPFootPrintNavView:didClickBackButton:)]) {
|
||||
[self.delegate xPFootPrintNavView:self didClickBackButton:sender];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)clearButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPFootPrintNavView:didClickClearButton:)]) {
|
||||
[self.delegate xPFootPrintNavView:self didClickClearButton:sender];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.backButton];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.settingButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
[self.settingButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-15);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIButton *)backButton {
|
||||
if (!_backButton) {
|
||||
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backButton setImage:[UIImage imageNamed:@"common_nav_back"] forState:UIControlStateNormal];
|
||||
_backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_backButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
}
|
||||
return _backButton;
|
||||
}
|
||||
|
||||
- (UIButton *)settingButton {
|
||||
if (!_settingButton) {
|
||||
_settingButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_settingButton setTitle:@"全部清除" forState:UIControlStateNormal];
|
||||
_settingButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
[_settingButton setTitleColor:[ThemeColor textThirdColor] forState:UIControlStateNormal];
|
||||
[_settingButton addTarget:self action:@selector(clearButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_settingButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
}
|
||||
return _settingButton;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
_titleLabel.text = @"足迹";
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Mine/View/XPMineFootPrintViewController.h
Normal file
16
xplan-ios/Main/Mine/View/XPMineFootPrintViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMineFootPrintViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
// 足迹/进房记录
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFootPrintViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
213
xplan-ios/Main/Mine/View/XPMineFootPrintViewController.m
Normal file
213
xplan-ios/Main/Mine/View/XPMineFootPrintViewController.m
Normal file
@@ -0,0 +1,213 @@
|
||||
//
|
||||
// XPMineFootPrintViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/7/26.
|
||||
//
|
||||
|
||||
#import "XPMineFootPrintViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
///Model
|
||||
#import "XPMineFootPrintModel.h"
|
||||
///View
|
||||
#import "XPMineFootPrintTableViewCell.h"
|
||||
#import "XPMineVisitorEmptyTableViewCell.h"
|
||||
#import "XPFootPrintNavView.h"
|
||||
///P
|
||||
#import "XPMineFootPrintPresenter.h"
|
||||
#import "XPMineFootPrintProtocol.h"
|
||||
///VC
|
||||
#import "XPMineUserInfoViewController.h"
|
||||
|
||||
@interface XPMineFootPrintViewController()<UITableViewDelegate,UITableViewDataSource, XPMineFootPrintProtocol, XPFootPrintNavViewDelegate>
|
||||
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||
///当前页数
|
||||
@property (nonatomic,assign) int page;
|
||||
///更多数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
@property (nonatomic, strong) XPFootPrintNavView *navView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineFootPrintViewController
|
||||
|
||||
- (XPMineFootPrintPresenter *)createPresenter {
|
||||
return [[XPMineFootPrintPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - 下拉刷新
|
||||
- (void)initHeaderAndFooterRrfresh {
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
|
||||
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
header.lastUpdatedTimeLabel.textColor = [ThemeColor secondTextColor];
|
||||
self.tableView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
self.tableView.mj_footer = footer;
|
||||
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getFootPrintListWithPage:self.page pageSize:20 state:0];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多进房记录了"];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getFootPrintListWithPage:self.page pageSize:20 state:1];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.navView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineFootPrintProtocol
|
||||
- (void)getFootPrintListSuccess:(NSArray *)array state:(int)state {
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
}
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
if (array.count > 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
[self.datasource addObjectsFromArray:array];
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
[self.tableView.mj_footer endRefreshingWithNoMoreData];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getFootPrintListFail:(int)state {
|
||||
if (state == 0) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
///清除进房记录成功
|
||||
- (void)cleanFootPrintSuccess {
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
#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) {
|
||||
XPMineFootPrintTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFootPrintTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineFootPrintTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFootPrintTableViewCell 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;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count == 0) {
|
||||
return 85;
|
||||
} else {
|
||||
return 66;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPFootPrintNavViewDelegate
|
||||
///点击了返回按钮
|
||||
- (void)xPFootPrintNavView:(XPFootPrintNavView *)view didClickBackButton:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
///点击了清除按钮
|
||||
- (void)xPFootPrintNavView:(XPFootPrintNavView *)view didClickClearButton:(UIButton *)sender {
|
||||
[self.presenter cleanFootPrint];
|
||||
}
|
||||
|
||||
#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 = 65;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPMineVisitorEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineVisitorEmptyTableViewCell class])];
|
||||
[_tableView registerClass:[XPMineFootPrintTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFootPrintTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
- (XPFootPrintNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPFootPrintNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
@end
|
@@ -52,7 +52,7 @@
|
||||
#import "XPMineFansTeamViewController.h"
|
||||
#import "XPMineClanViewController.h"
|
||||
#import "XPMineGuildViewController.h"
|
||||
|
||||
#import "XPMineFootPrintViewController.h"
|
||||
|
||||
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineHeadItemTableViewCellDelegate, XPMineHeadViewDelegate, XPMineGameTableViewCellDelegate, XPHomeBannerTableViewCellDelegate>
|
||||
///顶部背景
|
||||
@@ -162,6 +162,12 @@
|
||||
case XPMineItemType_Match_Relevance_Account:
|
||||
[self pushWebViewWIthUrl:item.centerUrl];
|
||||
break;
|
||||
case XPMineItemType_Foot_Print:
|
||||
{
|
||||
XPMineFootPrintViewController *vc = [[XPMineFootPrintViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
break;
|
||||
case XPMineItemType_Teenager_Mode:
|
||||
{
|
||||
XPMineTeenagerViewController * vc = [[XPMineTeenagerViewController alloc] init];
|
||||
@@ -368,7 +374,7 @@
|
||||
|
||||
///点击了足迹
|
||||
- (void)xpMineHeadViewClickFootprint {
|
||||
// [self pushViewControllerWithType:XPMineItemType_Attention_List];
|
||||
[self pushViewControllerWithType:XPMineItemType_Foot_Print functionItem:nil];
|
||||
}
|
||||
|
||||
///点击了账户中心
|
||||
|
Reference in New Issue
Block a user