From ac2e53ad276c001c6bb0f74e9622fbdc9eeaaecc Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Tue, 21 Dec 2021 18:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=B2=89=E4=B8=9D?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8=E6=88=91=E7=9A=84?= =?UTF-8?q?=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xplan-ios.xcodeproj/project.pbxproj | 95 ++++++- .../Contents.json | 22 ++ .../mine_normal_my_level@2x.png | Bin 0 -> 1974 bytes .../mine_normal_my_level@3x.png | Bin 0 -> 3936 bytes xplan-ios/Global/XPHtmlUrl.h | 4 +- xplan-ios/Global/XPHtmlUrl.m | 1 + xplan-ios/Main/Mine/Api/Api+Mine.h | 18 +- xplan-ios/Main/Mine/Api/Api+Mine.m | 114 +++++---- .../Main/Mine/Model/Friend/FansInfoModel.h | 33 +++ .../Main/Mine/Model/Friend/FansInfoModel.m | 19 ++ xplan-ios/Main/Mine/Model/XPMineItemModel.h | 3 + .../Mine/Presenter/XPMineAttentionPresenter.h | 19 ++ .../Mine/Presenter/XPMineAttentionPresenter.m | 31 +++ .../Main/Mine/Presenter/XPMineFansPresenter.h | 19 ++ .../Main/Mine/Presenter/XPMineFansPresenter.m | 32 +++ xplan-ios/Main/Mine/Presenter/XPMinePresent.m | 7 +- .../Mine/Presenter/XPMineUserInfoPresenter.m | 6 +- .../Mine/Protocol/XPMineAttentionProtocol.h | 19 ++ .../Main/Mine/Protocol/XPMineFansProtocol.h | 21 ++ .../Friend/XPMineAttentionTableViewCell.h | 19 ++ .../Friend/XPMineAttentionTableViewCell.m | 194 ++++++++++++++ .../Cell/Friend/XPMineFansTableViewCell.h | 18 ++ .../Cell/Friend/XPMineFansTableViewCell.m | 223 ++++++++++++++++ .../Friend/XPMineFriendEmptyTableViewCell.h | 17 ++ .../Friend/XPMineFriendEmptyTableViewCell.m | 81 ++++++ .../Cell/Friend/XPMineFriendTableViewCell.h | 15 ++ .../Cell/Friend/XPMineFriendTableViewCell.m | 137 ++++++++++ .../Friend/XPMineAttentionViewController.h | 16 ++ .../Friend/XPMineAttentionViewController.m | 171 +++++++++++++ .../View/Friend/XPMineFansViewController.h | 16 ++ .../View/Friend/XPMineFansViewController.m | 168 ++++++++++++ .../View/Friend/XPMineFriendViewController.h | 16 ++ .../View/Friend/XPMineFriendViewController.m | 93 +++++++ .../Mine/View/SubViews/XPMineAccountView.m | 5 +- .../View/SubViews/XPMineFriendNumberView.h | 21 ++ .../View/SubViews/XPMineFriendNumberView.m | 82 ++++++ .../Main/Mine/View/SubViews/XPMineHeadView.h | 4 + .../Main/Mine/View/SubViews/XPMineHeadView.m | 242 +++++++++++++++++- .../Main/Mine/View/XPMineViewController.m | 24 ++ 39 files changed, 1963 insertions(+), 62 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/mine_normal_my_level@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/mine_normal_my_level@3x.png create mode 100644 xplan-ios/Main/Mine/Model/Friend/FansInfoModel.h create mode 100644 xplan-ios/Main/Mine/Model/Friend/FansInfoModel.m create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.h create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.m create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.h create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.m create mode 100644 xplan-ios/Main/Mine/Protocol/XPMineAttentionProtocol.h create mode 100644 xplan-ios/Main/Mine/Protocol/XPMineFansProtocol.h create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.h create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.m create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.h create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.m create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.h create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.m create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.h create mode 100644 xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.m create mode 100644 xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.h create mode 100644 xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.m create mode 100644 xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.h create mode 100644 xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.m create mode 100644 xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.h create mode 100644 xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.m create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.h create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.m diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 64f95c92..31f1a2a5 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -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 = ""; }; E8937AC6276C3EDE00B2C7E1 /* svga_member_in_lv30.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = svga_member_in_lv30.svga; sourceTree = ""; }; E8937ACE276C99C300B2C7E1 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; + E896EF922771AAC100AD2CC1 /* XPMineFansPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansPresenter.h; sourceTree = ""; }; + E896EF932771AAC100AD2CC1 /* XPMineFansPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansPresenter.m; sourceTree = ""; }; + E896EF952771AAE400AD2CC1 /* XPMineAttentionPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionPresenter.h; sourceTree = ""; }; + E896EF962771AAE400AD2CC1 /* XPMineAttentionPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAttentionPresenter.m; sourceTree = ""; }; + E896EF982771AB0000AD2CC1 /* XPMineFansProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansProtocol.h; sourceTree = ""; }; + E896EF992771AB1800AD2CC1 /* XPMineAttentionProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionProtocol.h; sourceTree = ""; }; + E896EF9A2771AE6B00AD2CC1 /* XPMineFansViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansViewController.h; sourceTree = ""; }; + E896EF9B2771AE6B00AD2CC1 /* XPMineFansViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansViewController.m; sourceTree = ""; }; + E896EF9D2771AE7B00AD2CC1 /* XPMineAttentionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionViewController.h; sourceTree = ""; }; + E896EF9E2771AE7B00AD2CC1 /* XPMineAttentionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAttentionViewController.m; sourceTree = ""; }; + E896EFA02771AE9400AD2CC1 /* XPMineFriendViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendViewController.h; sourceTree = ""; }; + E896EFA12771AE9400AD2CC1 /* XPMineFriendViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendViewController.m; sourceTree = ""; }; + E896EFA42771AEDD00AD2CC1 /* XPMineFansTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFansTableViewCell.h; sourceTree = ""; }; + E896EFA52771AEDD00AD2CC1 /* XPMineFansTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFansTableViewCell.m; sourceTree = ""; }; + E896EFA72771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAttentionTableViewCell.h; sourceTree = ""; }; + E896EFA82771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAttentionTableViewCell.m; sourceTree = ""; }; + E896EFAA2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendTableViewCell.h; sourceTree = ""; }; + E896EFAB2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendTableViewCell.m; sourceTree = ""; }; + E896EFAD2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendEmptyTableViewCell.h; sourceTree = ""; }; + E896EFAE2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendEmptyTableViewCell.m; sourceTree = ""; }; + E896EFB02771C93B00AD2CC1 /* XPMineFriendNumberView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendNumberView.h; sourceTree = ""; }; + E896EFB12771C93B00AD2CC1 /* XPMineFriendNumberView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendNumberView.m; sourceTree = ""; }; + E896EFB42771D55500AD2CC1 /* FansInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FansInfoModel.h; sourceTree = ""; }; + E896EFB52771D55500AD2CC1 /* FansInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FansInfoModel.m; sourceTree = ""; }; E899C68727508F4E00E189E5 /* XPUserCardInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardInfoModel.h; sourceTree = ""; }; E899C68827508F4E00E189E5 /* XPUserCardInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardInfoModel.m; sourceTree = ""; }; E899C68A275093B700E189E5 /* XPUserCardMicroItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardMicroItemModel.h; sourceTree = ""; }; @@ -2458,6 +2493,43 @@ path = enterroom; sourceTree = ""; }; + 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 = ""; + }; + 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 = ""; + }; + E896EFB32771D53500AD2CC1 /* Friend */ = { + isa = PBXGroup; + children = ( + E896EFB42771D55500AD2CC1 /* FansInfoModel.h */, + E896EFB52771D55500AD2CC1 /* FansInfoModel.m */, + ); + path = Friend; + sourceTree = ""; + }; 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 = ""; @@ -3059,6 +3136,8 @@ E8EEB91026FC6AD3007C6EBA /* XPMineUserInfoEditProtocol.h */, E8B846C626FDB44100A777FE /* XPMineUserInfoAlbumProtocol.h */, E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */, + E896EF982771AB0000AD2CC1 /* XPMineFansProtocol.h */, + E896EF992771AB1800AD2CC1 /* XPMineAttentionProtocol.h */, ); path = Protocol; sourceTree = ""; @@ -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 */, diff --git a/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/Contents.json new file mode 100644 index 00000000..1328ba1a --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/Contents.json @@ -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 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/mine_normal_my_level@2x.png b/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/mine_normal_my_level@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..cd2771e08e7bbf9bb2ef663202674990ab967923 GIT binary patch literal 1974 zcmV;n2TAyeP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91FrWhf1ONa40RR91FaQ7m0NXcg3;+NJAW1|)RA>e5SZin;RTMsFW_D&a zo3u?+OD$C~b$zx9D)rGyTOZU~-!(q)g%m_le+Z)ZOaJ)(BPjl_=r11#z7ULQsiK0Q zKdg^5*ix&uwx(5+?Cj3YT)%T?W_M?HH`yfpBkYCQd+)jD^__dpnMsJcqZ@&41iBIE zMxYyk|8WF(Hoi}d-Et}0%bz8~UQbFS^-pFN8XgtT6vpS6HBI)}bxfncV^w;^GsmA> zbjs&P!8qeEX5@$&O8c%mmF*LsBEwnVkxVT#$s(B(X#toW>?(2|c7lZus@+3&_O#W$ zBLM2B>-)%9@i-ao6=@||r_!f$+i{-A*;cXt+1!czi~w-!TymCdBQD$lg=TA|?SYs* z7m|@*)mkh?ZM+dRc2>Sf*5dnMHGB81 z^ng|e!MWvRExb0(hZM^7-8@kAXQ6|hg%d?#<$wxHy8&o7DgO^mt7}zcE!YAv*lII! z{kK!Ov>T^oJh-*^g~vvL40J5BckQI%o{d&&NOnZG&z6H=Iz*2*X>AK2IP|K+1NR+d zd)czO6yqg)65~ONTuov1s8Sxll)k61JcgV<6~(%~&fa3h)(HT)nW}%khe-D!%9jxL zTtucjh}W@px{wi5s(Roz|BsjUXXtv{9zbc=vEbm|akdA0&HU=J;hq~B&WgpzjoQ1w zu=<&L*CA@_pe(>6L2FrS+F0^qExG{#xF$}s8h=AQDpHmG6T!qzBbeNEM0tBh*bM(k zwj%EW2=~jSiI+o5vpMS^lLGPJY1w z9_1fI?t32cUx4j&Py1{Wb3>#zyNs&GJ_Kt8#{j6G_$xE}6^bmB4i}WZrC{Q7I9!VO71B__`OvGG zfQ6x+;_%xwLT1sBcbSuT>yrHlwEn6c@_)gUL`Iy%7RHqSCl)Ye=CPklKfzSImpNLq z)vx(g`2d`4=tiQu!FdGj_34}!`!fRI;>S`vXzZv`RVAwI)l2-uBgDJm2nBkj z;fQ7c);A&9w-lg%humK{iUNUrhmOg*2-ChOcy&^%)rGB`icqdzkzXFKievR}pp5f+%ebK&(rugq|8PhG zq6ShF($}uP$Wutm%cGl3m^z>53_wiCzdk%?{9X9GrE`-hP9F|zb&H?9pQ6rUGcN#Q zNBw$9-t+PwW4V47c7?UVinqF_4}UOAxfJ`HYM@aApY&zPt%TQt_GKe|hP8)YfBk%& z7aQ}wfy7a@cZ2Iy&5v*=8xvZa8GYBdE?@j~N1O9mk&hbyu^JWj(d}q8ceeI||HPGV zbc(}2v_79bb>1n|Xj0zR?rH1pA+n!Glv8~YA3&oNm=_;U=f(DMy@3Rb8rfi#PVO1P zd-oZ<07*qo IM6N<$g2<+tSO5S3 literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/mine_normal_my_level@3x.png b/xplan-ios/Assets.xcassets/Mine/mine_normal_my_level.imageset/mine_normal_my_level@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..d55848aebbb383694833f0830601dea828c27db7 GIT binary patch literal 3936 zcmYjU=OYvVAHK8KnTI-LhErs7#w8r55FMfBMy?duAT8N4ATsjI+*4 zgow~vU*7lq@cf?fd;WnZ&d5*~!~kIc001C8r1rhPjQj^Wn!nd{r$+ZL0ln|(Y62=o zcsKtVZF_S)2Ll6u#9vJZ0LC~2sQy*{0`eCC03{v>p#00ge;Jze zd7}R-KSV=B=Om^ml~pS-l~qO*5_ni=#HkOJXNdaX1`WQ&?_<;a_4jEj_J==tf$)32 zxiZMV;UUNOcZ)ewSUJZR-sEh#ar-jd7Tp9}k+6|29;3k*rb6LM^}nF~&t;0|W&5ws z{d=3xB?_Cvuifm*IGNJB4oo=boANLh?0Ut3EGKNV(R>{td-gJiC~{lCUj=%wTXpnY zX?-*%3O5__aW>{<@}~goCe;12L)Tg+?6~5NeE0H@a@IW{Nc?MwO9HuqsfsD%8eB`j ztiB(~1Mpg@(weCq@!s@xF#i>>pE66|S@TOLqn9cLR#PjJ^VDj@Zjh#zV^BHshh=>c z+tXoc69LQOTywvl%bjjtoYN^Ik&m!+@%D^5@8-kM>tl(Gm&b?N;^n;0!k6bAN6Lb$ z>wccVrHf!m5PZbl(PT%d>koSoPttATc<|FG1813(E~)7Ya8$|lW|g&Hu65@1oKuDx zMtP@302pKd$XXjK2hWiq%yKLcOp^U4zkNLQZQaiZRsNEuL!Bb?5V4p$MfRR)#8&qv z0UXUdqoN2qwz}*QLyOjt2I5PURj2eSO~MDY=rw^Lmf$eJe=uN*qR4?w~y@jz-$2ePYB4ExxWM6={A+);&1! z_q7o|%P*FtFBK^5nB863;tEP@om#LmA@rh&)B4XklDH2D;6AI-7VqjKZsBN(z;|GXDdWVJQ;p- z{Z8eYU++gfaSr5n9-n#}2xvxlB+3bGS#dyUfbJFtI&4ptOg&N%^owYCQRaJPr5F?~ zcE1Z%i`lUz<|WXRq-VNY^xk$5VrO)|8#r2Vw10?h)81e(U4Ms|zR^u(3zze%o7|6X zZT=%y{(#05Xs0suY;(oGHmYn*R0`#yoPHo3cIj5PdR;WsQ9$43SRR zm6ps{kx%b01&%cV(WI+b*H-H7+qt8J{fz(#-E9O{gu-P?#PZm)7sBi0@!Xp$O|4Uk zL()NQYb>voKO1ps;1>O^F?HwcnU_k}&us9ndQs>$5|#xhnkqEE(}BMYG4YnG-qtP6 zW_HZCxyn16(Q{IzqaqyU6H>(D^;QCDG%G;U4fHFN|whrZQ0O+q#FW*VtUIkHgKQ z)h@bxaaN*NBo#t?T-i1doR-+9S{wUVilF3+>*sIQIffrwDSkq!$=H=J2$1XiPEfli z;d>iW@l-o9Tf7=7`KI6TW;04xQR*8J)$jAI%auy567Eo|&Rx7t>7Pg%OIbU2(|Xys z82xp~fy?jD6|fI2j|9Qs9smL0y}Z}m(xP9!Z+FHaLvC17oY2-b=#8A(>ke1ntMWDuxaE6@Ts>cp`nN(5ehUZr!V(Y>nc1g&GgKob2^Pu!yHGP$96x2vC7mYQ%l ztwye!V|Znn;}sexiQ=}h6a5+mDq4*L$%QSMD`-;Ay(tV7s=J<2{3g_qC()a!pitza zB*~VKyI-LuD--t%-%{9O215n9R~I~6+_&@cRT9mTO#z?|lv@m9&R_R;X!9A1hG-X^ z8Rtg$!x){@1q4Iu=$U&WbUgGt4SnMhbX-0~oOy~vUGb(|fG$mO*MYt1x$MyT0MLCe zw#SKlFNJ9%m*S2WHtjs?G4?TOc@m+W-v(2MB4dQ$y~hzE=HU^mf?rSN+1rG$85N;alAwd0FTgk#EqJ zA{<)GQobbiyk{e&hpqD`a&0pQKW3B!KVS4s1D2b_a-Y3DFg;BY7E-L4axs6|E!9DL z_n^^LG=)})$;b`(JFJG~p*OW3JOP#2V_Pzn{kf?K06G*~>|x4tGX!3(jrZJs?_5K( zC=GGcr0xq}S+hJf<%!{8{&DGbZLlx5fP6dXIxh zl75|Zmz*^2GIk^Mc7t&I+f5nRRoFWR#4iKwR9h`B+z^&jWz2oyg7^JgG@eU5%?7KK zW;pLXKQIlkT4(I)M{#QS41eOY3b}@3#dXdYil;9Ry^YhNVR7yR2zrRGigekPT31uI zPF0yRun^VwEvutBob-dGFGSVKO`hEV%*13)tqepuS~q)NAq3GeQb-2Bt+5<=E?4I< zg%%#ZgYD{wil4B_1(4%A7;&)`<5h8$(g5a15`D_du zu4G=Mj@%dx0B0{qaU7lVz?T8t{S+)}THc=`gh4C!m$Q&`uSPff&_9N_;Op;glDR=8 z^!USE1Mfy=Tq@4I1RO>M3Tt)%Z)6C$G@~}O4BdR_5%R7peA7(%KlY11m9pjBAy_Vxn zWDHDp`TDog(`3KbHKPf+_H-5G@YjURTOA%ItqL2@G+08T=Lya}4Qx&7mIs?&pP$_W+ z9Sa^Jc!LBA^=AyQM)}-mW!!*{XayD{l~c%vyKOAjsNRQ^ae1`k2c%z#3q!j&+J+r} z`ejWp0B>1%fHjFVRCO>tXV!37QBy~?tOTt`6>=N*h;FitPIZzwsh*9cq)RNefI){&a_X3xWe3O^)7g{3RP{wM@79M( zrZvAzMH#w7sLkOdbVpUd&du2bKm=F6Z$9pzIj8E$#{bb2us7M|hBvQhBN+1|(UFhp zXdnwCt&mxl7|ISJp+$P&BCWbwF^=561I#oEYC#H@`+K2D#Y}FYrQ89L@y@*Ev}nf1 z_`PPb{F6|p0?Lo;Z$HI+TW1HP!ahLN;;2cNMHtdRH{<&fg`DG)U8%m&5RnvlukT+^ zdtkHa*}cKWs%!QWtdNG`4oEpiRp}YKX-Y;1=(-$ud%Q*FG4vABZ1Q|;pL{uTXSs)vN|zRr;0}0^k#)~3rhXLYHZ`3 z9?jcAE3fApT3fu)5!B{~@PcMjKZ(bL%_QBt*XVwl7n0h>-(UhCZ>+X2Yj7EV(%;!8 zz=dUxL=5A_SYVu--4wHM3~A?;rA77Pnu)JHMMTS`8OiPHfv9(TLT~N|A@Hqf<{y4r z2kuV0aDxQccQmJ(hH<2jc8FMqmk>;#$P!z^_C7lr<9R9TT=ekiU8z~WcWEmD6Mg5g zh^X6=8)vE)v70f{+1PuDc4+>r`u+T#2$w!u5StPVs41veeYfl5^ig&=To1NWJ3IdNBMEm!VX9Fzb-XkB77e|4LpE?)h1%GYvXw5FNqVQBrXF)>Vy?tX*osE=Y z$5C*LIeIP^#Qt1UrRLkF(3+6(9PyzO~j&%Qusle)b*3RTgm z=?vLd$Horw{~&z*fsw6t?o{|Bd4qT{$6VebdD1e6QH|Xf;ttA#PD63Vf+3eeKKzKd z17z+u7UWVeuza?+E$Qg1HC{S^Y$A;8zjN+zn}l09Nis`F@-rChy&+SpdSaX9H`DlJ z8s=(f;WOaltjfJWTgodbip!~PQdT^VX`MniY@R-}wHcHd`LkMa@pM{ONp~W+Uuh>l m;YIM;|F6XV&PIJ!ia(S~B$n7e$ +#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 diff --git a/xplan-ios/Main/Mine/Model/Friend/FansInfoModel.m b/xplan-ios/Main/Mine/Model/Friend/FansInfoModel.m new file mode 100644 index 00000000..b0cf7b66 --- /dev/null +++ b/xplan-ios/Main/Mine/Model/Friend/FansInfoModel.m @@ -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 diff --git a/xplan-ios/Main/Mine/Model/XPMineItemModel.h b/xplan-ios/Main/Mine/Model/XPMineItemModel.h index 575893b2..819fe5d1 100644 --- a/xplan-ios/Main/Mine/Model/XPMineItemModel.h +++ b/xplan-ios/Main/Mine/Model/XPMineItemModel.h @@ -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,///我的等级 }; diff --git a/xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.h b/xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.h new file mode 100644 index 00000000..3fa65e39 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.h @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.m new file mode 100644 index 00000000..91922e53 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineAttentionPresenter.m @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.h b/xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.h new file mode 100644 index 00000000..d3fc0d13 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.h @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.m new file mode 100644 index 00000000..8bbeccd6 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineFansPresenter.m @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMinePresent.m b/xplan-ios/Main/Mine/Presenter/XPMinePresent.m index 2231222e..066a455d 100644 --- a/xplan-ios/Main/Mine/Presenter/XPMinePresent.m +++ b/xplan-ios/Main/Mine/Presenter/XPMinePresent.m @@ -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]; } diff --git a/xplan-ios/Main/Mine/Presenter/XPMineUserInfoPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMineUserInfoPresenter.m index 3d5a348d..417d46c4 100644 --- a/xplan-ios/Main/Mine/Presenter/XPMineUserInfoPresenter.m +++ b/xplan-ios/Main/Mine/Presenter/XPMineUserInfoPresenter.m @@ -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]; } diff --git a/xplan-ios/Main/Mine/Protocol/XPMineAttentionProtocol.h b/xplan-ios/Main/Mine/Protocol/XPMineAttentionProtocol.h new file mode 100644 index 00000000..4edcd00a --- /dev/null +++ b/xplan-ios/Main/Mine/Protocol/XPMineAttentionProtocol.h @@ -0,0 +1,19 @@ +// +// XPMineAttentionProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPMineAttentionProtocol +///获取用户关注列表 +- (void)getUserAttentionListSuccess:(NSArray *)array state:(int)state; +///获取关注列表失败 +- (void)getUserAttentionListFail:(int)state; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/Protocol/XPMineFansProtocol.h b/xplan-ios/Main/Mine/Protocol/XPMineFansProtocol.h new file mode 100644 index 00000000..c13d9982 --- /dev/null +++ b/xplan-ios/Main/Mine/Protocol/XPMineFansProtocol.h @@ -0,0 +1,21 @@ +// +// XPMineFansProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPMineFansProtocol + +///获取用户粉丝列表 +- (void)getUserFansListSuccess:(NSArray *)array state:(int)state; +///获取粉丝列表失败 +- (void)getUserFansListFail:(int)state; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.h b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.h new file mode 100644 index 00000000..b9f4d149 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.h @@ -0,0 +1,19 @@ +// +// XPMineAttentionTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class FansInfoModel; +@interface XPMineAttentionTableViewCell : UITableViewCell + +///粉丝信息 +@property (nonatomic,strong) FansInfoModel *fansInfo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.m b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.m new file mode 100644 index 00000000..489e97f4 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineAttentionTableViewCell.m @@ -0,0 +1,194 @@ +// +// XPMineAttentionTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineAttentionTableViewCell.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.h b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.h new file mode 100644 index 00000000..9755f449 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.h @@ -0,0 +1,18 @@ +// +// XPMineFansTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class FansInfoModel; +@interface XPMineFansTableViewCell : UITableViewCell +///粉丝信息 +@property (nonatomic,strong) FansInfoModel *fansInfo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.m b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.m new file mode 100644 index 00000000..bce9399c --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFansTableViewCell.m @@ -0,0 +1,223 @@ +// +// XPMineFansTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineFansTableViewCell.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.h b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.h new file mode 100644 index 00000000..06f753c9 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.h @@ -0,0 +1,17 @@ +// +// XPMineFriendEmptyTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPMineFriendEmptyTableViewCell : UITableViewCell +///空白的文字 +@property (nonatomic,copy) NSString *emptyTitle; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.m b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.m new file mode 100644 index 00000000..3ac8fc38 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendEmptyTableViewCell.m @@ -0,0 +1,81 @@ +// +// XPMineFriendEmptyTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineFriendEmptyTableViewCell.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.h b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.h new file mode 100644 index 00000000..97bd2895 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.h @@ -0,0 +1,15 @@ +// +// XPMineFriendTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPMineFriendTableViewCell : UITableViewCell +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.m b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.m new file mode 100644 index 00000000..0ed5e4fa --- /dev/null +++ b/xplan-ios/Main/Mine/View/Cell/Friend/XPMineFriendTableViewCell.m @@ -0,0 +1,137 @@ +// +// XPMineFriendTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineFriendTableViewCell.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.h b/xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.h new file mode 100644 index 00000000..6432e7fc --- /dev/null +++ b/xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.m b/xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.m new file mode 100644 index 00000000..5533da8a --- /dev/null +++ b/xplan-ios/Main/Mine/View/Friend/XPMineAttentionViewController.m @@ -0,0 +1,171 @@ +// +// XPMineAttentionViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineAttentionViewController.h" +///Third +#import +#import +///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 () +///列表 +@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 diff --git a/xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.h b/xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.h new file mode 100644 index 00000000..f61cf75c --- /dev/null +++ b/xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.m b/xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.m new file mode 100644 index 00000000..e1843259 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Friend/XPMineFansViewController.m @@ -0,0 +1,168 @@ +// +// XPMineFansViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineFansViewController.h" +///Third +#import +#import +///Tool +#import "ThemeColor.h" +///View +#import "XPMineFriendEmptyTableViewCell.h" +#import "XPMineFansTableViewCell.h" +///P +#import "XPMineFansPresenter.h" +#import "XPMineFansProtocol.h" + +@interface XPMineFansViewController () +///列表 +@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 diff --git a/xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.h b/xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.h new file mode 100644 index 00000000..f3283f1a --- /dev/null +++ b/xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.m b/xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.m new file mode 100644 index 00000000..ffb34323 --- /dev/null +++ b/xplan-ios/Main/Mine/View/Friend/XPMineFriendViewController.m @@ -0,0 +1,93 @@ +// +// XPMineFriendViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineFriendViewController.h" +///Third +#import +#import +#import +///Tool +#import "ThemeColor.h" +///View +#import "XPMineFriendEmptyTableViewCell.h" +#import "XPMineFriendTableViewCell.h" + +@interface XPMineFriendViewController () +///列表 +@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 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineAccountView.m b/xplan-ios/Main/Mine/View/SubViews/XPMineAccountView.m index 578aac78..44b027a1 100644 --- a/xplan-ios/Main/Mine/View/SubViews/XPMineAccountView.m +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineAccountView.m @@ -10,6 +10,7 @@ #import ///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) { diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.h b/xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.h new file mode 100644 index 00000000..1efac8f7 --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.h @@ -0,0 +1,21 @@ +// +// XPMineFriendNumberView.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPMineFriendNumberView : UIView + +///显示数量 +@property (nonatomic,copy) NSString *number; +///显示标题 +@property (nonatomic,copy) NSString *title; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.m b/xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.m new file mode 100644 index 00000000..aacd4a7f --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineFriendNumberView.m @@ -0,0 +1,82 @@ +// +// XPMineFriendNumberView.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/21. +// + +#import "XPMineFriendNumberView.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.h b/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.h index bec6ebab..02774120 100644 --- a/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.h +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.h @@ -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 ///用户信息 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m b/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m index 698d005f..5532852b 100644 --- a/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m @@ -8,14 +8,16 @@ #import "XPMineHeadView.h" ///Third #import -#import +#import ///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 diff --git a/xplan-ios/Main/Mine/View/XPMineViewController.m b/xplan-ios/Main/Mine/View/XPMineViewController.m index 024f10fa..d2ac79b6 100644 --- a/xplan-ios/Main/Mine/View/XPMineViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineViewController.m @@ -31,6 +31,8 @@ #import "XPWebViewController.h" #import "XPRoomViewController.h" #import "XPMineDressUpViewController.h" +#import "XPMineFansViewController.h" +#import "XPMineAttentionViewController.h" @interface XPMineViewController () @@ -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 *)normalItems { self.datasource = normalItems;