添加了粉丝和关注列表我的等级

This commit is contained in:
fengshuo
2021-12-21 18:10:33 +08:00
parent 03d8e0bcfa
commit ac2e53ad27
39 changed files with 1963 additions and 62 deletions

View File

@@ -253,6 +253,17 @@
E8937ACC276C3EDE00B2C7E1 /* svga_member_in_lv80.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8937AC5276C3EDE00B2C7E1 /* svga_member_in_lv80.svga */; };
E8937ACD276C3EDE00B2C7E1 /* svga_member_in_lv30.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8937AC6276C3EDE00B2C7E1 /* svga_member_in_lv30.svga */; };
E8937ACF276C99C300B2C7E1 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E8937ACE276C99C300B2C7E1 /* Launch Screen.storyboard */; };
E896EF942771AAC100AD2CC1 /* XPMineFansPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EF932771AAC100AD2CC1 /* XPMineFansPresenter.m */; };
E896EF972771AAE400AD2CC1 /* XPMineAttentionPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EF962771AAE400AD2CC1 /* XPMineAttentionPresenter.m */; };
E896EF9C2771AE6B00AD2CC1 /* XPMineFansViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EF9B2771AE6B00AD2CC1 /* XPMineFansViewController.m */; };
E896EF9F2771AE7B00AD2CC1 /* XPMineAttentionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EF9E2771AE7B00AD2CC1 /* XPMineAttentionViewController.m */; };
E896EFA22771AE9400AD2CC1 /* XPMineFriendViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFA12771AE9400AD2CC1 /* XPMineFriendViewController.m */; };
E896EFA62771AEDD00AD2CC1 /* XPMineFansTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFA52771AEDD00AD2CC1 /* XPMineFansTableViewCell.m */; };
E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFA82771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m */; };
E896EFAC2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFAB2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m */; };
E896EFAF2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFAE2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m */; };
E896EFB22771C93B00AD2CC1 /* XPMineFriendNumberView.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFB12771C93B00AD2CC1 /* XPMineFriendNumberView.m */; };
E896EFB62771D55500AD2CC1 /* FansInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFB52771D55500AD2CC1 /* FansInfoModel.m */; };
E899C68927508F4E00E189E5 /* XPUserCardInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E899C68827508F4E00E189E5 /* XPUserCardInfoModel.m */; };
E899C68C275093B800E189E5 /* XPUserCardMicroItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E899C68B275093B800E189E5 /* XPUserCardMicroItemModel.m */; };
E89D60BA271D643A001F8895 /* Api+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = E89D60B9271D643A001F8895 /* Api+Room.m */; };
@@ -864,6 +875,30 @@
E8937AC5276C3EDE00B2C7E1 /* svga_member_in_lv80.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = svga_member_in_lv80.svga; sourceTree = "<group>"; };
E8937AC6276C3EDE00B2C7E1 /* svga_member_in_lv30.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = svga_member_in_lv30.svga; sourceTree = "<group>"; };
E8937ACE276C99C300B2C7E1 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
E896EF922771AAC100AD2CC1 /* XPMineFansPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansPresenter.h; sourceTree = "<group>"; };
E896EF932771AAC100AD2CC1 /* XPMineFansPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansPresenter.m; sourceTree = "<group>"; };
E896EF952771AAE400AD2CC1 /* XPMineAttentionPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionPresenter.h; sourceTree = "<group>"; };
E896EF962771AAE400AD2CC1 /* XPMineAttentionPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAttentionPresenter.m; sourceTree = "<group>"; };
E896EF982771AB0000AD2CC1 /* XPMineFansProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansProtocol.h; sourceTree = "<group>"; };
E896EF992771AB1800AD2CC1 /* XPMineAttentionProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionProtocol.h; sourceTree = "<group>"; };
E896EF9A2771AE6B00AD2CC1 /* XPMineFansViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansViewController.h; sourceTree = "<group>"; };
E896EF9B2771AE6B00AD2CC1 /* XPMineFansViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansViewController.m; sourceTree = "<group>"; };
E896EF9D2771AE7B00AD2CC1 /* XPMineAttentionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionViewController.h; sourceTree = "<group>"; };
E896EF9E2771AE7B00AD2CC1 /* XPMineAttentionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAttentionViewController.m; sourceTree = "<group>"; };
E896EFA02771AE9400AD2CC1 /* XPMineFriendViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendViewController.h; sourceTree = "<group>"; };
E896EFA12771AE9400AD2CC1 /* XPMineFriendViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendViewController.m; sourceTree = "<group>"; };
E896EFA42771AEDD00AD2CC1 /* XPMineFansTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansTableViewCell.h; sourceTree = "<group>"; };
E896EFA52771AEDD00AD2CC1 /* XPMineFansTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansTableViewCell.m; sourceTree = "<group>"; };
E896EFA72771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionTableViewCell.h; sourceTree = "<group>"; };
E896EFA82771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAttentionTableViewCell.m; sourceTree = "<group>"; };
E896EFAA2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendTableViewCell.h; sourceTree = "<group>"; };
E896EFAB2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendTableViewCell.m; sourceTree = "<group>"; };
E896EFAD2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendEmptyTableViewCell.h; sourceTree = "<group>"; };
E896EFAE2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendEmptyTableViewCell.m; sourceTree = "<group>"; };
E896EFB02771C93B00AD2CC1 /* XPMineFriendNumberView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendNumberView.h; sourceTree = "<group>"; };
E896EFB12771C93B00AD2CC1 /* XPMineFriendNumberView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendNumberView.m; sourceTree = "<group>"; };
E896EFB42771D55500AD2CC1 /* FansInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FansInfoModel.h; sourceTree = "<group>"; };
E896EFB52771D55500AD2CC1 /* FansInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FansInfoModel.m; sourceTree = "<group>"; };
E899C68727508F4E00E189E5 /* XPUserCardInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardInfoModel.h; sourceTree = "<group>"; };
E899C68827508F4E00E189E5 /* XPUserCardInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardInfoModel.m; sourceTree = "<group>"; };
E899C68A275093B700E189E5 /* XPUserCardMicroItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardMicroItemModel.h; sourceTree = "<group>"; };
@@ -2458,6 +2493,43 @@
path = enterroom;
sourceTree = "<group>";
};
E896EF912771AA6C00AD2CC1 /* Friend */ = {
isa = PBXGroup;
children = (
E896EF9A2771AE6B00AD2CC1 /* XPMineFansViewController.h */,
E896EF9B2771AE6B00AD2CC1 /* XPMineFansViewController.m */,
E896EF9D2771AE7B00AD2CC1 /* XPMineAttentionViewController.h */,
E896EF9E2771AE7B00AD2CC1 /* XPMineAttentionViewController.m */,
E896EFA02771AE9400AD2CC1 /* XPMineFriendViewController.h */,
E896EFA12771AE9400AD2CC1 /* XPMineFriendViewController.m */,
);
path = Friend;
sourceTree = "<group>";
};
E896EFA32771AEC500AD2CC1 /* Friend */ = {
isa = PBXGroup;
children = (
E896EFA42771AEDD00AD2CC1 /* XPMineFansTableViewCell.h */,
E896EFA52771AEDD00AD2CC1 /* XPMineFansTableViewCell.m */,
E896EFA72771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.h */,
E896EFA82771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m */,
E896EFAA2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.h */,
E896EFAB2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m */,
E896EFAD2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.h */,
E896EFAE2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m */,
);
path = Friend;
sourceTree = "<group>";
};
E896EFB32771D53500AD2CC1 /* Friend */ = {
isa = PBXGroup;
children = (
E896EFB42771D55500AD2CC1 /* FansInfoModel.h */,
E896EFB52771D55500AD2CC1 /* FansInfoModel.m */,
);
path = Friend;
sourceTree = "<group>";
};
E899C68D2750DA3C00E189E5 /* CustomMessage */ = {
isa = PBXGroup;
children = (
@@ -2615,7 +2687,6 @@
isa = PBXGroup;
children = (
E81C1B1327705EF00020D1E4 /* ArrangeMic */,
E8252FEF27688808002B3164 /* RoomRank */,
E8A1E4462761F8EA00B294CA /* CandyTree */,
E8DEC9962764A51F0078CB70 /* MoreView */,
E838D99D275E1B6C0079E0B5 /* AnimationView */,
@@ -2957,6 +3028,7 @@
E8E70D7026F2EB3800F03460 /* Model */ = {
isa = PBXGroup;
children = (
E896EFB32771D53500AD2CC1 /* Friend */,
E8B846D926FDE21900A777FE /* Recharge */,
E8E70D9026F2F60C00F03460 /* XPMineItemModel.h */,
E8E70D9126F2F60C00F03460 /* XPMineItemModel.m */,
@@ -2975,6 +3047,7 @@
E8E70D7126F2EB4900F03460 /* View */ = {
isa = PBXGroup;
children = (
E896EF912771AA6C00AD2CC1 /* Friend */,
E83953232769FF2400CF2F24 /* DressUp */,
E8E70D8026F2F3C500F03460 /* Cell */,
E8E70D7F26F2F39000F03460 /* SubViews */,
@@ -3038,6 +3111,10 @@
E8B846C426FDB41A00A777FE /* XPMineUserInfolbumPresenter.m */,
E8B846D426FDE01B00A777FE /* XPMineRechargePresenter.h */,
E8B846D526FDE01B00A777FE /* XPMineRechargePresenter.m */,
E896EF922771AAC100AD2CC1 /* XPMineFansPresenter.h */,
E896EF932771AAC100AD2CC1 /* XPMineFansPresenter.m */,
E896EF952771AAE400AD2CC1 /* XPMineAttentionPresenter.h */,
E896EF962771AAE400AD2CC1 /* XPMineAttentionPresenter.m */,
);
path = Presenter;
sourceTree = "<group>";
@@ -3059,6 +3136,8 @@
E8EEB91026FC6AD3007C6EBA /* XPMineUserInfoEditProtocol.h */,
E8B846C626FDB44100A777FE /* XPMineUserInfoAlbumProtocol.h */,
E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */,
E896EF982771AB0000AD2CC1 /* XPMineFansProtocol.h */,
E896EF992771AB1800AD2CC1 /* XPMineAttentionProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
@@ -3071,6 +3150,8 @@
E88B5CAA26FB168200DA9178 /* Teenager */,
E8E70D8126F2F51A00F03460 /* XPMineHeadView.h */,
E8E70D8226F2F51A00F03460 /* XPMineHeadView.m */,
E896EFB02771C93B00AD2CC1 /* XPMineFriendNumberView.h */,
E896EFB12771C93B00AD2CC1 /* XPMineFriendNumberView.m */,
E8E70D8426F2F55C00F03460 /* XPMineAccountView.h */,
E8E70D8526F2F55C00F03460 /* XPMineAccountView.m */,
E824544126F58FCE00BE8163 /* XPMinePayPwdInputView.h */,
@@ -3086,6 +3167,7 @@
E8E70D8026F2F3C500F03460 /* Cell */ = {
isa = PBXGroup;
children = (
E896EFA32771AEC500AD2CC1 /* Friend */,
E8B846D026FDDBCD00A777FE /* Recharge */,
E8EEB8F826FC285B007C6EBA /* MineInfo */,
E8E70D8726F2F58F00F03460 /* XPMineMatchTableViewCell.h */,
@@ -3309,6 +3391,7 @@
E824545C26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m in Sources */,
E8A1E44E2761F98600B294CA /* XPCandyTreeViewController.m in Sources */,
E8AC723726F49982007D6E91 /* XPMineNotificaProtocol.h in Sources */,
E896EFAC2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m in Sources */,
E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */,
E8C6FFD72754BC61004DC9F0 /* XPHomeNavView.m in Sources */,
E8AC723226F49710007D6E91 /* XPMineNotificationTableViewCell.m in Sources */,
@@ -3471,6 +3554,7 @@
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */,
E8C6FFCB27548120004DC9F0 /* XPHomeViewController.m in Sources */,
E8680718271967B00024F48F /* MicroView.m in Sources */,
E896EF942771AAC100AD2CC1 /* XPMineFansPresenter.m in Sources */,
E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */,
E88B5CBD26FB3BDF00DA9178 /* XPTeenagerAlertView.m in Sources */,
E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */,
@@ -3485,6 +3569,7 @@
E8DACCFB2766EDC60052092C /* MicroGiftValueView.m in Sources */,
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */,
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */,
E896EFA62771AEDD00AD2CC1 /* XPMineFansTableViewCell.m in Sources */,
E8E7DAEB2745158500C631CC /* XPGiftUserInfoModel.m in Sources */,
E83DB487274670DA00D8CBD1 /* XPRoomGiftBroadCastModel.m in Sources */,
E8AC722C26F49580007D6E91 /* XPMineNotificaViewController.m in Sources */,
@@ -3493,6 +3578,7 @@
E8A1E4572762092700B294CA /* XPCandyTreePresenter.m in Sources */,
E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */,
E8E70D8C26F2F5A500F03460 /* XPMineMatchCollectionViewCell.m in Sources */,
E896EFA22771AE9400AD2CC1 /* XPMineFriendViewController.m in Sources */,
186A534A26FC6ED900D67B2C /* TTActionSheetConfig.m in Sources */,
E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */,
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
@@ -3508,6 +3594,7 @@
E8EEB8FE26FC2DF8007C6EBA /* XPMineUserInfoCustomNavView.m in Sources */,
E839532A276A002800CF2F24 /* XPMineDressUpViewController.m in Sources */,
E88B5CAD26FB16A800DA9178 /* XPMineTeenagerDesView.m in Sources */,
E896EF972771AAE400AD2CC1 /* XPMineAttentionPresenter.m in Sources */,
E8C6FFDA2754BE81004DC9F0 /* ThemeColor+Home.m in Sources */,
E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */,
E8EEB90F26FC6AB8007C6EBA /* XPMineUserInfoEditPresenter.m in Sources */,
@@ -3523,6 +3610,7 @@
18C17A5D26F338F300C48E11 /* XplanFBFlutterViewContainer.m in Sources */,
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */,
1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */,
E896EFAF2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m in Sources */,
18486213271EA9DA005FC5DC /* RtcManager.m in Sources */,
186A536926FC6F2E00D67B2C /* XPShareView.m in Sources */,
186A534C26FC6ED900D67B2C /* TTAlertView.m in Sources */,
@@ -3538,6 +3626,7 @@
9BAA5FED277A1BBE007453F3 /* XPPrivacyViewController.m in Sources */,
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */,
186A534626FC6ED900D67B2C /* TTPopup.m in Sources */,
E896EFB62771D55500AD2CC1 /* FansInfoModel.m in Sources */,
E81C278C26EAFAF60031E639 /* Base64.m in Sources */,
189DD73D26E21C3F00AB55B1 /* YYUtility+Device.m in Sources */,
187EEEDC26E89B32002833B2 /* BaseModel.m in Sources */,
@@ -3564,6 +3653,7 @@
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,
E8E70D8F26F2F5DB00F03460 /* XPMineMenuTableViewCell.m in Sources */,
187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */,
E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */,
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */,
18F403CB2758C66800A6C548 /* MessageContentText.m in Sources */,
E8232600274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m in Sources */,
@@ -3590,10 +3680,12 @@
E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */,
E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */,
E8788934273A53D700BF1D57 /* XPSendGiftView.m in Sources */,
E896EF9C2771AE6B00AD2CC1 /* XPMineFansViewController.m in Sources */,
E88B5CB826FB325200DA9178 /* XPMineTeenagerPwdPresenter.m in Sources */,
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */,
E838D9A0275E1BF60079E0B5 /* XPRoomAnimationView.m in Sources */,
E874B88827215D39003954B9 /* MicroStateModel.m in Sources */,
E896EF9F2771AE7B00AD2CC1 /* XPMineAttentionViewController.m in Sources */,
E89D60C1271D64B9001F8895 /* RoomInfoModel.m in Sources */,
E89DA66727006443008483C1 /* RechargeStorage.m in Sources */,
189DD53F26DE255600AB55B1 /* main.m in Sources */,
@@ -3603,6 +3695,7 @@
E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */,
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */,
189DD58F26DF97E700AB55B1 /* LoginPresenter.m in Sources */,
E896EFB22771C93B00AD2CC1 /* XPMineFriendNumberView.m in Sources */,
E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */,
189DD55026DE37F900AB55B1 /* MvpViewController.m in Sources */,
E81366F326F0B7C80076364C /* LoginFullInfoViewController.m in Sources */,

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_normal_my_level@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_normal_my_level@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -39,7 +39,9 @@ typedef NS_ENUM(NSUInteger, URLType) {
///用户等级
kUserLevelURL,
///平台榜单入口
kHomeRankURL
kHomeRankURL,
///房间礼物值 跳转
kRoomCharmRankUrl
};
NSString * const URLWithType(URLType type);

View File

@@ -32,6 +32,7 @@ NSString * const URLWithType(URLType type) {
@(kRoomRankURL) : @"modules/room_rank/index.html", //
@(kUserLevelURL) : @"modules/level/index.html",//
@(kHomeRankURL) : @"modules/rank/index.html#/rank", //
@(kRoomCharmRankUrl) : @"modules/charm/index.html",//
};
NSString * url = [dic objectForKey:@(type)];

View File

@@ -140,7 +140,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param complection 完成
/// @param uid 自己的uid
/// @param isLikeUid 要查询的那个人的uid
+ (void)attentionStatusComplection:(HttpRequestHelperCompletion)complection
+ (void)attentionStatusCompletion:(HttpRequestHelperCompletion)complection
uid:(NSString *)uid
isLikeUid:(NSString *)isLikeUid;
@@ -150,7 +150,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param likedUid 被关注的人
/// @param ticket ticket
/// @param type l类型默认1
+ (void)attentionComplection:(HttpRequestHelperCompletion)complection
+ (void)attentionCompletion:(HttpRequestHelperCompletion)complection
uid:(NSString *)uid
likedUid:(NSString *)likedUid
ticket:(NSString *)ticket
@@ -161,9 +161,21 @@ NS_ASSUME_NONNULL_BEGIN
/// @param uid 发起关注的人
/// @param page page
/// @param pageSize pagesize
+ (void)userDetailInfoComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize;
+ (void)userDetailInfoCompletion:(HttpRequestHelperCompletion)complection uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize;
/// 获取粉丝列表
/// @param completion 完成
/// @param uid 用户的uid
/// @param pageNo 当前页数
/// @param pageSize 一页多少个
+ (void)getFansListCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNo:(NSString *)pageNo pageSize:(NSString *)pageSize;
/// 获取关注列表
/// @param completion 完成
/// @param uid 用户的uid
/// @param pageNo 当前页数
/// @param pageSize 一页多少个
+ (void)getattentionListCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNo:(NSString *)pageNo pageSize:(NSString *)pageSize;
@end
NS_ASSUME_NONNULL_END

View File

@@ -11,158 +11,176 @@
///
/// @param complection
/// @param completion
/// @param feedbackDesc
/// @param contact
/// @param uid uid
/// @param ticket ticket
+ (void)saveFeedBackWith:(HttpRequestHelperCompletion)complection
+ (void)saveFeedBackWith:(HttpRequestHelperCompletion)completion
feedbackDesc:(NSString *)feedbackDesc
contact:(NSString *)contact
uid:(NSString *)uid
ticket:(NSString *)ticket {
[self makeRequest:@"feedback" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, feedbackDesc, contact, uid, ticket, nil];
[self makeRequest:@"feedback" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, feedbackDesc, contact, uid, ticket, nil];
}
///
/// @param complection
/// @param completion
/// @param uid uid
+ (void)requestUserInfoNotifyStatus:(HttpRequestHelperCompletion)complection uid:(NSString *)uid {
[self makeRequest:@"user/msgNotify" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, nil];
+ (void)requestUserInfoNotifyStatus:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
[self makeRequest:@"user/msgNotify" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
}
///
/// @param complection
/// @param completion
/// @param sysMsgNotify
/// @param uid uid
+ (void)updateUserInfoSystemNotifyWith:(HttpRequestHelperCompletion)complection sysMsgNotify:(NSString *)sysMsgNotify uid:(NSString *)uid {
[self makeRequest:@"user/sysMsgNotify" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, sysMsgNotify,uid, nil];
+ (void)updateUserInfoSystemNotifyWith:(HttpRequestHelperCompletion)completion sysMsgNotify:(NSString *)sysMsgNotify uid:(NSString *)uid {
[self makeRequest:@"user/sysMsgNotify" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, sysMsgNotify,uid, nil];
}
///
/// @param complection
/// @param completion
/// @param newPasswd
/// @param phone
/// @param code
/// @param uid uid
/// @param ticket ticket
+ (void)setPayPassword:(HttpRequestHelperCompletion)complection newPasswd:(NSString *)newPasswd phone:(NSString *)phone code:(NSString *)code uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"user/paymentPasswd/reset" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, newPasswd, phone, code,uid,ticket, nil];
+ (void)setPayPassword:(HttpRequestHelperCompletion)completion newPasswd:(NSString *)newPasswd phone:(NSString *)phone code:(NSString *)code uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"user/paymentPasswd/reset" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, newPasswd, phone, code,uid,ticket, nil];
}
///
/// @param complection
/// @param completion
/// @param newPasswd
/// @param oldPasswd
/// @param uid uid
/// @param ticket ticket
+ (void)modifPayPassword:(HttpRequestHelperCompletion)complection newPasswd:(NSString *)newPasswd oldPasswd:(NSString *)oldPasswd uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"user/paymentPasswd/modify" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, newPasswd,oldPasswd,uid,ticket, nil];
+ (void)modifPayPassword:(HttpRequestHelperCompletion)completion newPasswd:(NSString *)newPasswd oldPasswd:(NSString *)oldPasswd uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"user/paymentPasswd/modify" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, newPasswd,oldPasswd,uid,ticket, nil];
}
///
/// @param complection
/// @param completion
/// @param password
/// @param status 0 1
/// @param uid uid
+ (void)openOrCloseParentModel:(HttpRequestHelperCompletion)complection password:(NSString *)password status:(NSNumber *)status uid:(NSString *)uid {
[self makeRequest:@"user/openOrClose" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, password,status,uid, nil];
+ (void)openOrCloseParentModel:(HttpRequestHelperCompletion)completion password:(NSString *)password status:(NSNumber *)status uid:(NSString *)uid {
[self makeRequest:@"user/openOrClose" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, password,status,uid, nil];
}
/// token
/// @param complection
+ (void)qiniuUpLoadImage:(HttpRequestHelperCompletion)complection {
[self makeRequest:@"qiniu/upload/getUploadToken" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, nil];
/// @param completion
+ (void)qiniuUpLoadImage:(HttpRequestHelperCompletion)completion {
[self makeRequest:@"qiniu/upload/getUploadToken" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
}
///
/// @param complection
/// @param completion
/// @param photoStr
/// @param uid uid
/// @param ticket ticket
+ (void)uploadUserAlbum:(HttpRequestHelperCompletion)complection photoStr:(NSString *)photoStr uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"photo/v2/upload" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,photoStr, uid, ticket, nil];
+ (void)uploadUserAlbum:(HttpRequestHelperCompletion)completion photoStr:(NSString *)photoStr uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"photo/v2/upload" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,photoStr, uid, ticket, nil];
}
///
/// @param complection
/// @param completion
/// @param pid
/// @param uid uid
/// @param ticket ticket
+ (void)deleteImageFromServer:(HttpRequestHelperCompletion)complection pid:(NSString *)pid uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"photo/delPhoto" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,pid, uid, ticket, nil];
+ (void)deleteImageFromServer:(HttpRequestHelperCompletion)completion pid:(NSString *)pid uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"photo/delPhoto" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,pid, uid, ticket, nil];
}
///
/// @param complection
/// @param completion
/// @param channelType channel
+ (void)getRechargeList:(HttpRequestHelperCompletion)complection channelType:(NSString *)channelType {
[self makeRequest:@"chargeprod/list" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__,channelType, nil];
+ (void)getRechargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType {
[self makeRequest:@"chargeprod/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,channelType, nil];
}
///
/// @param complection
/// @param completion
/// @param chargeProdId id
/// @param uid uid
/// @param ticket ticket
/// @param deviceInfo uuid
/// @param clientIp ip
+ (void)requestIAPRecharge:(HttpRequestHelperCompletion)complection chargeProdId:(NSString *)chargeProdId uid:(NSString *)uid ticket:(NSString *)ticket deviceInfo:(NSString *)deviceInfo clientIp:(NSString *)clientIp {
[self makeRequest:@"order/placeV2" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,chargeProdId, uid, ticket, deviceInfo, clientIp, nil];
+ (void)requestIAPRecharge:(HttpRequestHelperCompletion)completion chargeProdId:(NSString *)chargeProdId uid:(NSString *)uid ticket:(NSString *)ticket deviceInfo:(NSString *)deviceInfo clientIp:(NSString *)clientIp {
[self makeRequest:@"order/placeV2" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,chargeProdId, uid, ticket, deviceInfo, clientIp, nil];
}
///
/// @param complection
/// @param completion
/// @param receipt base 64 recepit
/// @param chooseEnv @"true"
/// @param chargeRecordId
/// @param transcationId
/// @param uid uid
/// @param ticket ticket
+ (void)checkReceipt:(HttpRequestHelperCompletion)complection receipt:(NSString *)receipt chooseEnv:(NSString *)chooseEnv chargeRecordId:(NSString *)chargeRecordId transcationId:(NSString *)transcationId uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"verify/setiap" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,receipt, chooseEnv, chargeRecordId, transcationId, uid, ticket, nil];
+ (void)checkReceipt:(HttpRequestHelperCompletion)completion receipt:(NSString *)receipt chooseEnv:(NSString *)chooseEnv chargeRecordId:(NSString *)chargeRecordId transcationId:(NSString *)transcationId uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"verify/setiap" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,receipt, chooseEnv, chargeRecordId, transcationId, uid, ticket, nil];
}
/// 退
/// @param complection
/// @param completion
/// @param access_token token
+ (void)logoutCurrentAccount:(HttpRequestHelperCompletion)complection access_token:(NSString *)access_token {
[self makeRequest:@"acc/logout" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, access_token, nil];
+ (void)logoutCurrentAccount:(HttpRequestHelperCompletion)completion access_token:(NSString *)access_token {
[self makeRequest:@"acc/logout" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, access_token, nil];
}
///
/// @param complection
/// @param completion
/// @param uid uid
/// @param isLikeUid uid
+ (void)attentionStatusComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid isLikeUid:(NSString *)isLikeUid {
[self makeRequest:@"fans/islike" method:HttpRequestHelperMethodGET completion:complection,__FUNCTION__, uid, isLikeUid, nil];
+ (void)attentionStatusCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid isLikeUid:(NSString *)isLikeUid {
[self makeRequest:@"fans/islike" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, uid, isLikeUid, nil];
}
///
/// @param complection
/// @param completion
/// @param uid
/// @param likedUid
/// @param ticket ticket
/// @param type 1 2
+ (void)attentionComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid likedUid:(NSString *)likedUid ticket:(NSString *)ticket type:(NSString *)type {
[self makeRequest:@"fans/like" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, uid, likedUid, ticket, type, nil];
+ (void)attentionCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid likedUid:(NSString *)likedUid ticket:(NSString *)ticket type:(NSString *)type {
[self makeRequest:@"fans/like" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, likedUid, ticket, type, nil];
}
///
/// @param complection
/// @param completion
/// @param uid
/// @param page page
/// @param pageSize pagesize
+ (void)userDetailInfoComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize {
[self makeRequest:@"user/detail/get" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, page, pageSize, nil];
+ (void)userDetailInfoCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize {
[self makeRequest:@"user/detail/get" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, page, pageSize, nil];
}
///
/// @param completion
/// @param uid uid
/// @param pageNo
/// @param pageSize
+ (void)getFansListCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNo:(NSString *)pageNo pageSize:(NSString *)pageSize {
[self makeRequest:@"fans/fanslist" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, pageNo, pageSize, nil];
}
///
/// @param completion
/// @param uid uid
/// @param pageNo
/// @param pageSize
+ (void)getattentionListCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNo:(NSString *)pageNo pageSize:(NSString *)pageSize {
[self makeRequest:@"fans/following" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, pageNo, pageSize, nil];
}
@end

View File

@@ -0,0 +1,33 @@
//
// FansInfoModel.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <Foundation/Foundation.h>
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface FansInfoModel : NSObject
///头像
@property (nonatomic,copy) NSString *avatar;
///姓名
@property (nonatomic,copy) NSString *nick;
///uid
@property (nonatomic,copy) NSString *uid;
///性别
@property (nonatomic,assign) GenderType gender;
///类型
@property (nonatomic,assign) NSInteger defUser;
///魅力等级
@property (nonatomic,copy) NSString *charmUrl;
///等级
@property (nonatomic,copy) NSString *experUrl;
///签名
@property (nonatomic,copy) NSString *userDesc;
///是否有效
@property (nonatomic,assign) BOOL valid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,19 @@
//
// FansInfoModel.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "FansInfoModel.h"
@implementation FansInfoModel
/// id -> ID name -> other.name
+ (NSDictionary *)replacedKeyFromPropertyName {
return @{@"experUrl":@"userLevelVo.experUrl",
@"charmUrl":@"userLevelVo.charmUrl"
};
}
@end

View File

@@ -24,6 +24,9 @@ typedef NS_ENUM(NSInteger, XPMineItemType) {
XPMineItemType_Invite_Friend,///邀请好友
XPMineItemType_Personinfo,///个人中心
XPMineItemType_My_Dressup,///我的装扮
XPMineItemType_Attention_List,///关注列表
XPMineItemType_Fans_List,///粉丝列表
XPMineItemType_Fans_Level,///我的等级
};

View File

@@ -0,0 +1,19 @@
//
// XPMineAttentionPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineAttentionPresenter : BaseMvpPresenter
/// 用户关注列表
/// @param page 当前的页数
/// @param pageSize 一页多少个
- (void)getUserAttentionList:(int)page pageSize:(int)pageSize state:(int)state;;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,31 @@
//
// XPMineAttentionPresenter.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineAttentionPresenter.h"
#import "Api+Mine.h"
#import "AccountInfoStorage.h"
#import "XPMineAttentionProtocol.h"
#import "FansInfoModel.h"
@implementation XPMineAttentionPresenter
///
/// @param page
/// @param pageSize
- (void)getUserAttentionList:(int)page pageSize:(int)pageSize state:(int)state;{
NSString * uid= [AccountInfoStorage instance].getUid;
NSString * pageStr = [NSString stringWithFormat:@"%d", page];
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
[Api getattentionListCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
NSArray * array = [FansInfoModel modelsWithArray:data.data];
[[self getView] getUserAttentionListSuccess:array state:state];
}fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] getUserAttentionListFail:state];
}] uid:uid pageNo:pageStr pageSize:pageSizeStr];
}
@end

View File

@@ -0,0 +1,19 @@
//
// XPMineFansPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineFansPresenter : BaseMvpPresenter
/// 用户粉丝列表
/// @param page 当前的页数
/// @param pageSize 一页多少个
- (void)getUserFansList:(int)page pageSize:(int)pageSize state:(int)state;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,32 @@
//
// XPMineFansPresenter.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFansPresenter.h"
#import "Api+Mine.h"
#import "XPMineFansProtocol.h"
#import "AccountInfoStorage.h"
#import "FansInfoModel.h"
@implementation XPMineFansPresenter
///
/// @param page
/// @param pageSize
- (void)getUserFansList:(int)page pageSize:(int)pageSize state:(int)state {
NSString * uid= [AccountInfoStorage instance].getUid;
NSString * pageStr = [NSString stringWithFormat:@"%d", page];
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
[Api getFansListCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
NSArray * array = [FansInfoModel modelsWithArray:data.data[@"fansList"]];
[[self getView] getUserFansListSuccess:array state:state];
}fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] getUserFansListFail:state];
}] uid:uid pageNo:pageStr pageSize:pageSizeStr];
}
@end

View File

@@ -71,12 +71,17 @@
myDressUp.itmeImageName = @"mine_normal_my_dressup";
myDressUp.type = XPMineItemType_My_Dressup;
XPMineItemModel * mylevel = [[XPMineItemModel alloc] init];
mylevel.itmeName = @"我的等级";
mylevel.itmeImageName = @"mine_normal_my_level";
mylevel.type = XPMineItemType_My_Level;
XPMineItemModel * realNameItem = [[XPMineItemModel alloc] init];
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];
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, mylevel, realNameItem];
[[self getView] onGetNormalItemsSuccess:array];
}

View File

@@ -28,7 +28,7 @@
//
- (void)getUserDetailInfoWithUid:(NSString *)uid {
[Api userDetailInfoComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[Api userDetailInfoCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
[[self getView] ongetDetailInfoSuccess:infoModel];
}] uid:uid page:@"1" pageSize:@"20"];
@@ -38,7 +38,7 @@
/// @param targetUid uid
- (void)getUserAttentionState:(NSString *)targetUid; {
NSString * uid = [[AccountInfoStorage instance] getUid];
[Api attentionStatusComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[Api attentionStatusCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
BOOL isLike = ((NSNumber *)data.data).boolValue;
[[self getView] getAttentionStateSuccess:isLike];
}] uid:uid isLikeUid:targetUid];
@@ -52,7 +52,7 @@
NSString * uid = [[AccountInfoStorage instance] getUid];
NSString * ticket = [[AccountInfoStorage instance] getTicket];
NSString * type = state ? @"1" : @"2";
[Api attentionComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[Api attentionCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] attentionUserSuccess:state];
}] uid:uid likedUid:targetUid ticket:ticket type:type];
}

View File

@@ -0,0 +1,19 @@
//
// XPMineAttentionProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPMineAttentionProtocol <NSObject>
///获取用户关注列表
- (void)getUserAttentionListSuccess:(NSArray *)array state:(int)state;
///获取关注列表失败
- (void)getUserAttentionListFail:(int)state;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,21 @@
//
// XPMineFansProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPMineFansProtocol <NSObject>
///获取用户粉丝列表
- (void)getUserFansListSuccess:(NSArray *)array state:(int)state;
///获取粉丝列表失败
- (void)getUserFansListFail:(int)state;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,19 @@
//
// XPMineAttentionTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class FansInfoModel;
@interface XPMineAttentionTableViewCell : UITableViewCell
///粉丝信息
@property (nonatomic,strong) FansInfoModel *fansInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,194 @@
//
// XPMineAttentionTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineAttentionTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "NetImageView.h"
#import "ThemeColor.h"
#import "UIImage+Utils.h"
///Model
#import "FansInfoModel.h"
@interface XPMineAttentionTableViewCell ()
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) UIImageView *sexImageView;
///
@property (nonatomic,strong) NetImageView *experImageView;
///
@property (nonatomic,strong) NetImageView *charmImageView;
///
@property (nonatomic,strong) UILabel *signLabel;
@end
@implementation XPMineAttentionTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.stackView];
[self.contentView addSubview:self.signLabel];
[self.stackView addArrangedSubview:self.nickLabel];
[self.stackView addArrangedSubview:self.sexImageView];
[self.stackView addArrangedSubview:self.experImageView];
[self.stackView addArrangedSubview:self.charmImageView];
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(55, 55));
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView).offset(15);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(10);
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-2);
}];
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.stackView);
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(2);
}];
}
#pragma mark - Getters And Setters
- (void)setFansInfo:(FansInfoModel *)fansInfo {
_fansInfo = fansInfo;
if (_fansInfo) {
self.avatarImageView.imageUrl = _fansInfo.avatar;
self.experImageView.imageUrl = _fansInfo.experUrl;
self.charmImageView.imageUrl = _fansInfo.charmUrl;
self.nickLabel.text = _fansInfo.nick;
NSString *sexStr;
if (_fansInfo.gender == GenderType_Male) {
sexStr = @"common_male";
} else {
sexStr = @"common_female";
}
self.sexImageView.image = [UIImage imageNamed:sexStr];
self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : @"这个人很懒还没有签名";
UIImage* image = self.experImageView.image;
if (image) {
CGFloat scale = image.size.width / image.size.height;
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
} else {
NSURL *imgUrl = [NSURL URLWithString:_fansInfo.experUrl];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
CGFloat scale = myImage.size.width / myImage.size.height;
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
}
UIImage* charmImage = self.charmImageView.image;
if (image) {
CGFloat scale = charmImage.size.width / charmImage.size.height;
[self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
} else {
NSURL *imgUrl = [NSURL URLWithString:_fansInfo.charmUrl];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
CGFloat scale = myImage.size.width / myImage.size.height;
[self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
}
}
}
- (NetImageView *)avatarImageView {
if (!_avatarImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 55/2;
}
return _avatarImageView;
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisHorizontal;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentCenter;
_stackView.spacing = 2;
}
return _stackView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:15];
_nickLabel.textColor = [ThemeColor mainTextColor];
}
return _nickLabel;
}
- (UIImageView *)sexImageView {
if (!_sexImageView) {
_sexImageView = [[UIImageView alloc] init];
_sexImageView.userInteractionEnabled = YES;
}
return _sexImageView;
}
- (NetImageView *)experImageView {
if (!_experImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_experImageView = [[NetImageView alloc] initWithConfig:config];
_experImageView.layer.maskedCorners = YES;
_experImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _experImageView;
}
- (NetImageView *)charmImageView {
if (!_charmImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_charmImageView = [[NetImageView alloc] initWithConfig:config];
_charmImageView.layer.maskedCorners = YES;
_charmImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _charmImageView;
}
- (UILabel *)signLabel{
if (!_signLabel) {
_signLabel = [[UILabel alloc] init];
_signLabel.textColor = [ThemeColor secondTextColor];
_signLabel.font = [UIFont systemFontOfSize:12];
}
return _signLabel;
}
@end

View File

@@ -0,0 +1,18 @@
//
// XPMineFansTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class FansInfoModel;
@interface XPMineFansTableViewCell : UITableViewCell
///粉丝信息
@property (nonatomic,strong) FansInfoModel *fansInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,223 @@
//
// XPMineFansTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFansTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "NetImageView.h"
#import "ThemeColor.h"
#import "UIImage+Utils.h"
///Model
#import "FansInfoModel.h"
@interface XPMineFansTableViewCell ()
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) UIImageView *sexImageView;
///
@property (nonatomic,strong) NetImageView *experImageView;
///
@property (nonatomic,strong) NetImageView *charmImageView;
///
@property (nonatomic,strong) UILabel *signLabel;
///
@property (nonatomic,strong) UIButton *attentionButton;
@end
@implementation XPMineFansTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.stackView];
[self.contentView addSubview:self.signLabel];
[self.contentView addSubview:self.attentionButton];
[self.stackView addArrangedSubview:self.nickLabel];
[self.stackView addArrangedSubview:self.sexImageView];
[self.stackView addArrangedSubview:self.experImageView];
[self.stackView addArrangedSubview:self.charmImageView];
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(55, 55));
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView).offset(15);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(10);
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-2);
}];
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.stackView);
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(2);
}];
[self.attentionButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(65);
make.height.mas_equalTo(30);
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView).offset(-15);
}];
}
#pragma mark - Event Response
- (void)attentionButtonAction:(UIButton *)sender {
}
#pragma mark - Getters And Setters
- (void)setFansInfo:(FansInfoModel *)fansInfo {
_fansInfo = fansInfo;
if (_fansInfo) {
self.avatarImageView.imageUrl = _fansInfo.avatar;
self.experImageView.imageUrl = _fansInfo.experUrl;
self.charmImageView.imageUrl = _fansInfo.charmUrl;
self.nickLabel.text = _fansInfo.nick;
NSString *sexStr;
if (_fansInfo.gender == GenderType_Male) {
sexStr = @"common_male";
} else {
sexStr = @"common_female";
}
self.sexImageView.image = [UIImage imageNamed:sexStr];
self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : @"这个人很懒还没有签名";
UIImage* image = self.experImageView.image;
if (image) {
CGFloat scale = image.size.width / image.size.height;
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
} else {
NSURL *imgUrl = [NSURL URLWithString:_fansInfo.experUrl];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
CGFloat scale = myImage.size.width / myImage.size.height;
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
}
UIImage* charmImage = self.charmImageView.image;
if (image) {
CGFloat scale = charmImage.size.width / charmImage.size.height;
[self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
} else {
NSURL *imgUrl = [NSURL URLWithString:_fansInfo.charmUrl];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
CGFloat scale = myImage.size.width / myImage.size.height;
[self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
}
}
}
- (NetImageView *)avatarImageView {
if (!_avatarImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 55/2;
}
return _avatarImageView;
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisHorizontal;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentCenter;
_stackView.spacing = 2;
}
return _stackView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:15];
_nickLabel.textColor = [ThemeColor mainTextColor];
}
return _nickLabel;
}
- (UIImageView *)sexImageView {
if (!_sexImageView) {
_sexImageView = [[UIImageView alloc] init];
_sexImageView.userInteractionEnabled = YES;
}
return _sexImageView;
}
- (NetImageView *)experImageView {
if (!_experImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_experImageView = [[NetImageView alloc] initWithConfig:config];
}
return _experImageView;
}
- (NetImageView *)charmImageView {
if (!_charmImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_charmImageView = [[NetImageView alloc] initWithConfig:config];
}
return _charmImageView;
}
- (UILabel *)signLabel{
if (!_signLabel) {
_signLabel = [[UILabel alloc] init];
_signLabel.textColor = [ThemeColor secondTextColor];
_signLabel.font = [UIFont systemFontOfSize:12];
}
return _signLabel;
}
- (UIButton *)attentionButton {
if (!_attentionButton) {
_attentionButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_attentionButton setTitle:@"+关注" forState:UIControlStateNormal];
[_attentionButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
_attentionButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_attentionButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_attentionButton setTitle:@"取消关注" forState:UIControlStateSelected];
[_attentionButton setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateNormal];
[_attentionButton setBackgroundImage:[UIImage imageWithColor:[ThemeColor disableButtonColor]] forState:UIControlStateSelected];
_attentionButton.layer.masksToBounds = YES;
_attentionButton.layer.cornerRadius = 15;
[_attentionButton addTarget:self action:@selector(attentionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _attentionButton;
}
@end

View File

@@ -0,0 +1,17 @@
//
// XPMineFriendEmptyTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPMineFriendEmptyTableViewCell : UITableViewCell
///空白的文字
@property (nonatomic,copy) NSString *emptyTitle;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,81 @@
//
// XPMineFriendEmptyTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFriendEmptyTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "UIImageConstant.h"
@interface XPMineFriendEmptyTableViewCell ()
@property (nonatomic,strong) UIImageView *emptyImageView;
@property (nonatomic,strong) UILabel *titleLabel;
@end
@implementation XPMineFriendEmptyTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.emptyImageView];
[self.contentView addSubview:self.titleLabel];
}
- (void)initSubViewConstraints {
[self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.contentView);
make.top.mas_equalTo(self.contentView).offset(250);
make.size.mas_equalTo(CGSizeMake(100, 100));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.emptyImageView.mas_bottom).offset(20);
make.left.right.mas_equalTo(self.contentView);
}];
}
#pragma mark - Getters And Setters
- (void)setEmptyTitle:(NSString *)emptyTitle {
_emptyTitle = emptyTitle;
if (_emptyTitle.length > 0) {
self.titleLabel.text = _emptyTitle;
}
}
- (UIImageView *)emptyImageView {
if (!_emptyImageView) {
_emptyImageView = [[UIImageView alloc] init];
_emptyImageView.userInteractionEnabled = YES;
_emptyImageView.image = [UIImageConstant defalutEmptyPlaceholder];
_emptyImageView.layer.masksToBounds = YES;
_emptyImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _emptyImageView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"暂无数据";
_titleLabel.numberOfLines = 2;
_titleLabel.font = [UIFont systemFontOfSize:16];
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = [ThemeColor secondTextColor];
}
return _titleLabel;
}
@end

View File

@@ -0,0 +1,15 @@
//
// XPMineFriendTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPMineFriendTableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,137 @@
//
// XPMineFriendTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFriendTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "NetImageConfig.h"
#import "NetImageView.h"
#import "ThemeColor.h"
#import "UIImage+Utils.h"
@interface XPMineFriendTableViewCell ()
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) UIImageView *sexImageView;
///
@property (nonatomic,strong) NetImageView *experImageView;
///
@property (nonatomic,strong) NetImageView *charmImageView;
///
@property (nonatomic,strong) UILabel *signLabel;
@end
@implementation XPMineFriendTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.stackView];
[self.contentView addSubview:self.signLabel];
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(55, 55));
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView).offset(15);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(10);
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-2);
}];
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.stackView);
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(2);
}];
}
#pragma mark - Getters And Setters
- (NetImageView *)avatarImageView {
if (!_avatarImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 55/2;
}
return _avatarImageView;
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisHorizontal;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentCenter;
_stackView.spacing = 10;
}
return _stackView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:15];
_nickLabel.textColor = [ThemeColor mainTextColor];
}
return _nickLabel;
}
- (UIImageView *)sexImageView {
if (!_sexImageView) {
_sexImageView = [[UIImageView alloc] init];
_sexImageView.userInteractionEnabled = YES;
}
return _sexImageView;
}
- (NetImageView *)experImageView {
if (!_experImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_experImageView = [[NetImageView alloc] initWithConfig:config];
}
return _experImageView;
}
- (NetImageView *)charmImageView {
if (!_charmImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_charmImageView = [[NetImageView alloc] initWithConfig:config];
}
return _charmImageView;
}
- (UILabel *)signLabel{
if (!_signLabel) {
_signLabel = [[UILabel alloc] init];
_signLabel.textColor = [ThemeColor secondTextColor];
_signLabel.font = [UIFont systemFontOfSize:12];
}
return _signLabel;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPMineAttentionViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineAttentionViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,171 @@
//
// XPMineAttentionViewController.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineAttentionViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <MJRefresh/MJRefresh.h>
///Tool
#import "ThemeColor.h"
///View
#import "XPMineAttentionTableViewCell.h"
#import "XPMineFriendEmptyTableViewCell.h"
///View
#import "XPMineFriendEmptyTableViewCell.h"
#import "XPMineAttentionTableViewCell.h"
///P
#import "XPMineAttentionPresenter.h"
#import "XPMineAttentionProtocol.h"
@interface XPMineAttentionViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineAttentionProtocol>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSMutableArray *datasource;
///
@property (nonatomic,assign) int page;
///
@property (nonatomic,assign) BOOL hasNoMoreData;
@end
@implementation XPMineAttentionViewController
- (XPMineAttentionPresenter *)createPresenter {
return [[XPMineAttentionPresenter alloc] init];
}
- (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 getUserAttentionList:self.page pageSize:20 state:0];
}
- (void)footerRefresh {
if (self.hasNoMoreData) {
[self showErrorToast:@"没有更多数据了"];
return;
}
self.page++;
[self.presenter getUserAttentionList:self.page pageSize:20 state:1];
}
#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 - XPMineAttentionProtocol
- (void)getUserAttentionListSuccess:(NSArray *)array state:(int)state {
if (state == 0) {
[self.datasource removeAllObjects];
[self.tableView.mj_header endRefreshing];
} else {
[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)getUserAttentionListFail:(int)state {
if (state == 0) {
[self.tableView.mj_header endRefreshing];
} else {
[self.tableView.mj_footer endRefreshing];
}
}
#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) {
XPMineAttentionTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineAttentionTableViewCell class])];
if (cell == nil) {
cell = [[XPMineAttentionTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineAttentionTableViewCell class])];
}
cell.fansInfo = [self.datasource objectAtIndex:indexPath.row];
return cell;
}
XPMineFriendEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
if (cell == nil) {
cell = [[XPMineFriendEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
}
cell.emptyTitle = @"您还没有关注任何人";
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
#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:[XPMineFriendEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
[_tableView registerClass:[XPMineAttentionTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineAttentionTableViewCell class])];
}
return _tableView;
}
- (NSMutableArray *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPMineFansViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineFansViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,168 @@
//
// XPMineFansViewController.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFansViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <MJRefresh/MJRefresh.h>
///Tool
#import "ThemeColor.h"
///View
#import "XPMineFriendEmptyTableViewCell.h"
#import "XPMineFansTableViewCell.h"
///P
#import "XPMineFansPresenter.h"
#import "XPMineFansProtocol.h"
@interface XPMineFansViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineFansProtocol>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSMutableArray *datasource;
///
@property (nonatomic,assign) int page;
///
@property (nonatomic,assign) BOOL hasNoMoreData;
@end
@implementation XPMineFansViewController
- (XPMineFansPresenter *)createPresenter {
return [[XPMineFansPresenter alloc] init];
}
- (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 getUserFansList:self.page pageSize:20 state:0];
}
- (void)footerRefresh {
if (self.hasNoMoreData) {
[self showErrorToast:@"没有更多房间了"];
return;
}
self.page++;
[self.presenter getUserFansList:self.page pageSize:20 state:1];
}
#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 - XPMineFansProtocol
- (void)getUserFansListSuccess:(NSArray *)array state:(int)state {
if (state == 0) {
[self.datasource removeAllObjects];
[self.tableView.mj_header endRefreshing];
} else {
[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)getUserFansListFail:(int)state {
if (state == 0) {
[self.tableView.mj_header endRefreshing];
} else {
[self.tableView.mj_footer endRefreshing];
}
}
#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) {
XPMineFansTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFansTableViewCell class])];
if (cell == nil) {
cell = [[XPMineFansTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFansTableViewCell class])];
}
cell.fansInfo = [self.datasource objectAtIndex:indexPath.row];
return cell;
}
XPMineFriendEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
if (cell == nil) {
cell = [[XPMineFriendEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
}
cell.emptyTitle = @"您还没有任何粉丝";
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
#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:[XPMineFriendEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
[_tableView registerClass:[XPMineFansTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFansTableViewCell class])];
}
return _tableView;
}
- (NSMutableArray *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPMineFriendViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineFriendViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,93 @@
//
// XPMineFriendViewController.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFriendViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <MJRefresh/MJRefresh.h>
#import <NIMSDK/NIMSDK.h>
///Tool
#import "ThemeColor.h"
///View
#import "XPMineFriendEmptyTableViewCell.h"
#import "XPMineFriendTableViewCell.h"
@interface XPMineFriendViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSArray *datasource;
///
@property (nonatomic,assign) int page;
///
@property (nonatomic,assign) BOOL hasNoMoreData;
@end
@implementation XPMineFriendViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.datasource = [[NIMSDK sharedSDK].userManager myFriends];
[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 - 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) {
XPMineFriendTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendTableViewCell class])];
if (cell == nil) {
cell = [[XPMineFriendTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFriendTableViewCell class])];
}
return cell;
}
XPMineFriendEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
if (cell == nil) {
cell = [[XPMineFriendEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
}
cell.emptyTitle = @"您还没有任何好友";
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
#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:[XPMineFriendEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
[_tableView registerClass:[XPMineFriendTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFriendTableViewCell class])];
}
return _tableView;
}
@end

View File

@@ -10,6 +10,7 @@
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "UIImage+Utils.h"
@implementation XPMineAccountSubView
@@ -105,9 +106,9 @@
- (void)initSubViewConstraints {
[self.accountView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self).inset(15);
make.left.mas_equalTo(self).offset(15);
make.top.bottom.mas_equalTo(self);
make.right.mas_equalTo(self.recommendView.mas_left).offset(-15);;
make.width.mas_equalTo((KScreenWidth - 15 * 3) / 2);
}];
[self.recommendView mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -0,0 +1,21 @@
//
// XPMineFriendNumberView.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPMineFriendNumberView : UIView
///显示数量
@property (nonatomic,copy) NSString *number;
///显示标题
@property (nonatomic,copy) NSString *title;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,82 @@
//
// XPMineFriendNumberView.m
// xplan-ios
//
// Created by on 2021/12/21.
//
#import "XPMineFriendNumberView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
@interface XPMineFriendNumberView ()
///
@property (nonatomic,strong) UILabel *numberLabel;
///
@property (nonatomic,strong) UILabel *titleLabel;
@end
@implementation XPMineFriendNumberView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.numberLabel];
[self addSubview:self.titleLabel];
}
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.titleLabel.mas_bottom);
}];
[self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.numberLabel.mas_bottom).offset(8);
make.left.right.mas_equalTo(self);
}];
}
#pragma mark - Getters And Setters
- (void)setTitle:(NSString *)title {
self.titleLabel.text = title;
}
- (void)setNumber:(NSString *)number {
self.numberLabel.text = number;
}
- (UILabel *)numberLabel {
if (!_numberLabel) {
_numberLabel = [[UILabel alloc] init];
_numberLabel.font = [UIFont boldSystemFontOfSize:18];
_numberLabel.textAlignment = NSTextAlignmentCenter;
_numberLabel.textColor = [ThemeColor mainTextColor];
}
return _numberLabel;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.font = [UIFont systemFontOfSize:12];
_titleLabel.textColor = [ThemeColor secondTextColor];
_titleLabel.textAlignment = NSTextAlignmentCenter;
}
return _titleLabel;
}
@end

View File

@@ -16,6 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAccount:(UserInfoModel *)info;
//点击邀请好友
- (void)xPMineHeadView:(XPMineHeadView *)view didClickInviteFriend:(UserInfoModel *)info;
///点击了关注
- (void)xpMineHeadViewClickAttention;
///点击了粉丝
- (void)xpMineHeadViewClickFans;
@end
@interface XPMineHeadView : UIView
///用户信息

View File

@@ -8,14 +8,16 @@
#import "XPMineHeadView.h"
///Third
#import <Masonry/Masonry.h>
#import <YYText/YYLabel.h>
#import <YYText/YYText.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "UIImage+Utils.h"
///View
#import "XPMineAccountView.h"
#import "NetImageView.h"
#import "UIImage+Utils.h"
#import "XPMineFriendNumberView.h"
///Model
#import "UserInfoModel.h"
@@ -38,6 +40,12 @@
@property (nonatomic,strong) YYLabel *levelLabel;
///
@property (nonatomic,strong) XPMineAccountView *accountView;
///线
@property (nonatomic,strong) UIView * lineView;
///
@property (nonatomic,strong) XPMineFriendNumberView *attentionView;
///
@property (nonatomic,strong) XPMineFriendNumberView *fansView;
@end
@implementation XPMineHeadView
@@ -71,6 +79,18 @@
}
}
- (void)tapFansRecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(xpMineHeadViewClickFans)]) {
[self.delegate xpMineHeadViewClickFans];
}
}
- (void)tapAttentionRecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(xpMineHeadViewClickAttention)]) {
[self.delegate xpMineHeadViewClickAttention];
}
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
@@ -78,6 +98,9 @@
[self addSubview:self.nameStackView];
[self addSubview:self.idStackView];
[self addSubview:self.levelLabel];
[self addSubview:self.lineView];
[self addSubview:self.attentionView];
[self addSubview:self.fansView];
[self addSubview:self.accountView];
[self.nameStackView addArrangedSubview:self.nameLabel];
@@ -99,7 +122,7 @@
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(50, 50));
make.left.mas_equalTo(self).offset(20);
make.top.mas_equalTo(self).offset(50 + kSafeAreaTopHeight);
make.top.mas_equalTo(self).offset(30 + kSafeAreaTopHeight);
}];
[self.nameStackView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -117,13 +140,195 @@
make.top.mas_equalTo(self.idStackView.mas_bottom).offset(4);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(1, 30));
make.centerY.mas_equalTo(self.idLabel.mas_bottom).offset(2);
make.left.mas_equalTo(self.idLabel.mas_right).offset(30);
}];
[self.attentionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.lineView.mas_right);
make.centerY.mas_equalTo(self.lineView);
make.width.mas_equalTo(80);
}];
[self.fansView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.centerY.mas_equalTo(self.attentionView);
make.left.mas_equalTo(self.attentionView.mas_right);
}];
[self.accountView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self);
make.height.mas_equalTo(60);
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(30);
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(30 + 20);
}];
}
#pragma mark - NSMutableAttributedString
-(NSInteger) getMonth:(long )time
{
NSDate *date = [NSDate dateWithTimeIntervalSince1970:time/1000];
NSCalendar* calendar = [NSCalendar currentCalendar];
NSDateComponents* components = [calendar components:NSCalendarUnitMonth fromDate:date];
NSInteger month = components.month;
return month;
}
- (NSInteger) getDay:(long) time
{
NSDate *date = [NSDate dateWithTimeIntervalSince1970:time/1000];
NSCalendar* calendar = [NSCalendar currentCalendar];
NSDateComponents* components = [calendar components:NSCalendarUnitDay fromDate:date];
NSInteger day = components.day;
return day;
}
- (NSString *)calculateConstellationWithMonth:(long)time
{
NSString *astroString = @"魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯";
NSString *astroFormat = @"102123444543";
NSString *result;
NSInteger month = [self getMonth:time];
NSInteger day = [self getDay:time];
if (month<1 || month>12 || day<1 || day>31){
return @"错误日期格式!";
}
if(month==2 && day>29)
{
return @"错误日期格式!!";
}else if(month==4 || month==6 || month==9 || month==11) {
if (day>30) {
return @"错误日期格式!!!";
}
}
result=[NSString stringWithFormat:@"%@",[astroString substringWithRange:NSMakeRange(month*2-(day < [[astroFormat substringWithRange:NSMakeRange((month-1), 1)] intValue] - (-19))*2,2)]];
return [NSString stringWithFormat:@"%@座",result];
}
///
/// @param imageUrl
- (NSMutableAttributedString *)createUrlImageAttribute:(NSString *)imageUrl {
NetImageConfig *config = [[NetImageConfig alloc]init];
///
config.autoLoad = YES;
NetImageView *imageView = [[NetImageView alloc]initWithUrl:imageUrl config:config];
UIImage* image = imageView.image;
if (image) {
CGFloat scale = image.size.width / image.size.height;
imageView.bounds = CGRectMake(0, 0, 20 * scale, 20);
} else {
NSURL *imgUrl = [NSURL URLWithString:imageUrl];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
CGFloat scale = myImage.size.width / myImage.size.height;
imageView.bounds = CGRectMake(0, 0, 20 * scale, 20);
}
imageView.layer.masksToBounds = YES;
imageView.contentMode = UIViewContentModeScaleAspectFit;
NSMutableAttributedString * attrString = [NSMutableAttributedString yy_attachmentStringWithContent:imageView contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imageView.bounds.size.width, imageView.bounds.size.height) alignToFont:[UIFont systemFontOfSize:15.0] alignment:YYTextVerticalAlignmentCenter];
return attrString;
}
///
/// @param width
- (NSMutableAttributedString *)createSapceAttribute:(CGFloat)width {
UIView *spaceView = [[UIView alloc]init];
spaceView.backgroundColor = [UIColor clearColor];
spaceView.bounds = CGRectMake(0, 0, width, 10);
NSMutableAttributedString * attribute = [NSMutableAttributedString yy_attachmentStringWithContent:spaceView contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(spaceView.frame.size.width, spaceView.frame.size.height) alignToFont:[UIFont systemFontOfSize:15.0] alignment:YYTextVerticalAlignmentCenter];
return attribute;
}
//dateLabel
- (NSMutableAttributedString *)makeDateLabel:(long)birth{
NSString *dateStr = [NSString stringWithFormat:@" %@ ",[self calculateConstellationWithMonth:birth]];
UIButton *dataButton = [UIButton buttonWithType:UIButtonTypeCustom];
[dataButton setTitle:dateStr forState:UIControlStateNormal];
dataButton.titleLabel.font = [UIFont boldSystemFontOfSize:10];
[dataButton setTitleColor:UIColorFromRGB(0xFFFFFF) forState:UIControlStateNormal];
dataButton.frame = CGRectMake(0, 0, 45, 17);
dataButton.layer.masksToBounds = YES;
dataButton.layer.cornerRadius = 17/2;
[dataButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
NSMutableAttributedString * dateLabelString = [NSMutableAttributedString yy_attachmentStringWithContent:dataButton contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(dataButton.frame.size.width, dataButton.frame.size.height) alignToFont:[UIFont systemFontOfSize:11] alignment:YYTextVerticalAlignmentCenter];
return dateLabelString;
}
///
- (NSMutableAttributedString *)createNameplateAttibute:(NSString *)tagName image:(NSString *)imageName textFont:(UIFont *)textFont {
NetImageConfig *config = [[NetImageConfig alloc]init];
///
config.autoLoad = YES;
NetImageView *imageView = [[NetImageView alloc]initWithUrl:imageName config:config];
UIImage* image = imageView.image;
if (image) {
CGFloat scale = image.size.width / image.size.height;
imageView.bounds = CGRectMake(0, 0, 20 * scale, 20);
} else {
NSURL *imgUrl = [NSURL URLWithString:imageName];
UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]];
CGFloat scale = myImage.size.width / myImage.size.height;
if (scale == 0) {
imageView.bounds = CGRectMake(0, 0, 60, 20);
}else {
imageView.bounds = CGRectMake(0, 0, 20* scale, 20);
}
}
imageView.contentMode = UIViewContentModeScaleAspectFit;
//
UILabel *label = [[UILabel alloc] init];
label.textAlignment = NSTextAlignmentCenter;
label.font = [UIFont boldSystemFontOfSize:12];
label.adjustsFontSizeToFitWidth = YES;
label.textColor = UIColor.whiteColor;
label.text = tagName;
[imageView addSubview:label];
[label mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(27);
make.right.mas_equalTo(-8);
make.centerY.mas_equalTo(0);
}];
NSMutableAttributedString *string = [NSMutableAttributedString yy_attachmentStringWithContent:imageView contentMode:UIViewContentModeScaleAspectFit attachmentSize:imageView.bounds.size alignToFont:[UIFont boldSystemFontOfSize:12] alignment:YYTextVerticalAlignmentCenter];
return string;
}
///
- (NSMutableAttributedString *)creatNameplateLevleAttribute:(UserInfoModel *)userInfo {
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init];
if (!userInfo) {
return attributedString;
}
//
if (userInfo.nameplateWord.length > 0 && userInfo.nameplatePic.length>0) {
[self createNameplateAttibute:userInfo.nameplateWord image:userInfo.nameplatePic textFont:[UIFont systemFontOfSize:9]];
[attributedString appendAttributedString:[self createSapceAttribute:2]];
}
// userRank
if (userInfo.userLevelVo.experUrl) {
[attributedString appendAttributedString:[self createUrlImageAttribute:userInfo.userLevelVo.experUrl]];
[attributedString appendAttributedString:[self createSapceAttribute:2]];
}
//charmRank
if (userInfo.userLevelVo.charmUrl) {
[attributedString appendAttributedString:[self createUrlImageAttribute:userInfo.userLevelVo.charmUrl]];
[attributedString appendAttributedString:[self createSapceAttribute:2]];
}
// constellation
if (userInfo.birth) {
[attributedString appendAttributedString:[self makeDateLabel:userInfo.birth]];
}
return attributedString;
}
#pragma mark - Getters And Setters
- (void)setUserInfo:(UserInfoModel *)userInfo {
_userInfo = userInfo;
@@ -148,6 +353,9 @@
sexName = @"common_female";
}
self.sexImageView.image = [UIImage imageNamed:sexName];
self.levelLabel.attributedText = [self creatNameplateLevleAttribute:_userInfo];
self.fansView.number = [NSString stringWithFormat:@"%ld",_userInfo.fansNum];
self.attentionView.number = [NSString stringWithFormat:@"%ld",_userInfo.followNum];
}
}
- (NetImageView *)avatarImageView {
@@ -236,5 +444,33 @@
return _accountView;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
- (XPMineFriendNumberView *)attentionView {
if (!_attentionView) {
_attentionView = [[XPMineFriendNumberView alloc] init];
_attentionView.title = @"关注";
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAttentionRecognizer)];
[_attentionView addGestureRecognizer:tap];
}
return _attentionView;
}
- (XPMineFriendNumberView *)fansView {
if (!_fansView) {
_fansView = [[XPMineFriendNumberView alloc] init];
_fansView.title = @"粉丝";
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapFansRecognizer)];
[_fansView addGestureRecognizer:tap];
}
return _fansView;
}
@end

View File

@@ -31,6 +31,8 @@
#import "XPWebViewController.h"
#import "XPRoomViewController.h"
#import "XPMineDressUpViewController.h"
#import "XPMineFansViewController.h"
#import "XPMineAttentionViewController.h"
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineMatchTableViewCellDelegate, XPMineHeadViewDelegate>
@@ -154,6 +156,21 @@
[self.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case XPMineItemType_Fans_List:
{
XPMineFansViewController * fansVC = [[XPMineFansViewController alloc] init];
[self.navigationController pushViewController:fansVC animated:YES];
}
break;
case XPMineItemType_Attention_List:
{
XPMineAttentionViewController * attentionVC = [[XPMineAttentionViewController alloc] init];
[self.navigationController pushViewController:attentionVC animated:YES];
}
break;
case XPMineItemType_My_Level:
[self pushWebViewWIthUrl:URLWithType(kUserLevelURL)];
break;
default:
break;
}
@@ -242,6 +259,13 @@
[self pushViewControllerWithType:XPMineItemType_Invite_Friend];
}
- (void)xpMineHeadViewClickFans {
[self pushViewControllerWithType:XPMineItemType_Fans_List];
}
- (void)xpMineHeadViewClickAttention {
[self pushViewControllerWithType:XPMineItemType_Attention_List];
}
#pragma mark - XPMineProtocol
- (void)onGetNormalItemsSuccess:(NSArray<XPMineItemModel *> *)normalItems {
self.datasource = normalItems;