From 286d617fbaf9d52aaf3c483c468b1d38cecdf1a2 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Thu, 16 Dec 2021 19:02:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=A3=85=E6=89=AE=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 2 + Podfile.lock | 16 +- xplan-ios.xcodeproj/project.pbxproj | 53 +++- .../Mine/DressUp/Contents.json | 6 + .../Contents.json | 22 ++ .../mine_dressUp_exclusive@2x.png | Bin 0 -> 459 bytes .../mine_dressUp_exclusive@3x.png | Bin 0 -> 849 bytes .../mine_dressUp_limit.imageset/Contents.json | 22 ++ .../mine_dressUp_limit@2x.png | Bin 0 -> 488 bytes .../mine_dressUp_limit@3x.png | Bin 0 -> 995 bytes .../mine_dressUp_new.imageset/Contents.json | 22 ++ .../mine_dressUp_new@2x.png | Bin 0 -> 505 bytes .../mine_dressUp_new@3x.png | Bin 0 -> 964 bytes .../mine_dressup_give.imageset/Contents.json | 22 ++ .../mine_dressup_give@2x.png | Bin 0 -> 335 bytes .../mine_dressup_give@3x.png | Bin 0 -> 902 bytes .../mine_dressup_time.imageset/Contents.json | 22 ++ .../mine_dressup_time@2x.png | Bin 0 -> 367 bytes .../mine_dressup_time@3x.png | Bin 0 -> 610 bytes .../Contents.json | 22 ++ .../mine_normal_my_dressup@2x.png | Bin 0 -> 1948 bytes .../mine_normal_my_dressup@3x.png | Bin 0 -> 3873 bytes .../SpriteSheetImageManager.h | 16 ++ .../SpriteSheetImageManager.m | 156 +++++++++++ .../YYAnimatedImageView+ImageShow.h | 16 ++ .../YYAnimatedImageView+ImageShow.m | 34 +++ xplan-ios/Global/XPEnum.h | 7 +- xplan-ios/Main/Mine/Model/XPMineItemModel.h | 1 + xplan-ios/Main/Mine/Presenter/XPMinePresent.m | 7 +- .../Main/Mine/View/DressUp/Api/Api+DressUp.h | 4 +- .../Main/Mine/View/DressUp/Api/Api+DressUp.m | 4 +- .../Main/Mine/View/DressUp/Model/CarModel.h | 36 +++ .../Main/Mine/View/DressUp/Model/CarModel.m | 16 ++ .../Mine/View/DressUp/Model/HeadwearModel.h | 41 +++ .../Mine/View/DressUp/Model/HeadwearModel.m | 16 ++ .../Mine/View/DressUp/Model/NameplateModel.h | 27 ++ .../Mine/View/DressUp/Model/NameplateModel.m | 16 ++ .../Presenter/XPMineDressUpPresenter.h | 16 +- .../Presenter/XPMineDressUpPresenter.m | 68 +++++ .../DressUp/Protocol/XPMineDressUpProtocol.h | 12 + .../View/Cell/XPMineCarTableViewCell.h | 9 +- .../View/Cell/XPMineCarTableViewCell.m | 251 +++++++++++++++++- .../View/Cell/XPMineDressEmptyTableViewCell.h | 17 ++ .../View/Cell/XPMineDressEmptyTableViewCell.m | 80 ++++++ .../View/Cell/XPMineHeadwearTableViewCell.h | 10 +- .../View/Cell/XPMineHeadwearTableViewCell.m | 210 ++++++++++----- .../View/Cell/XPMineNameplateTableViewCell.h | 9 +- .../View/Cell/XPMineNameplateTableViewCell.m | 117 ++++---- .../View/XPMineDressUpListViewController.m | 144 +++++++++- .../View/XPMineDressUpViewController.m | 26 +- .../Main/Mine/View/XPMineViewController.m | 7 + 51 files changed, 1442 insertions(+), 140 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/mine_dressUp_exclusive@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/mine_dressUp_exclusive@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/mine_dressUp_limit@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/mine_dressUp_limit@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/mine_dressUp_new@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/mine_dressUp_new@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_give.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_give.imageset/mine_dressup_give@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_give.imageset/mine_dressup_give@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/mine_dressup_time@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/mine_dressup_time@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/mine_normal_my_dressup.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/mine_normal_my_dressup.imageset/mine_normal_my_dressup@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/mine_normal_my_dressup.imageset/mine_normal_my_dressup@3x.png create mode 100644 xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.h create mode 100644 xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.m create mode 100644 xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.h create mode 100644 xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.m create mode 100644 xplan-ios/Main/Mine/View/DressUp/Model/CarModel.h create mode 100644 xplan-ios/Main/Mine/View/DressUp/Model/CarModel.m create mode 100644 xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.h create mode 100644 xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.m create mode 100644 xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.h create mode 100644 xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.m create mode 100644 xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.h create mode 100644 xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.m diff --git a/Podfile b/Podfile index 1a658245..24b68af3 100644 --- a/Podfile +++ b/Podfile @@ -55,6 +55,8 @@ target 'xplan-ios' do #UM统计 pod 'UMCommon' pod 'UMDevice' + #头饰显示 + pod 'YYWebImage', '~> 1.0.5' #调试 pod 'LookinServer', :configurations => ['Debug'] diff --git a/Podfile.lock b/Podfile.lock index 882a2d57..9d03ab4b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -72,7 +72,14 @@ PODS: - UMCommon (7.3.5): - UMDevice - UMDevice (2.0.5) + - YYCache (1.0.4) + - YYImage (1.0.4): + - YYImage/Core (= 1.0.4) + - YYImage/Core (1.0.4) - YYText (1.0.7) + - YYWebImage (1.0.5): + - YYCache + - YYImage DEPENDENCIES: - AFNetworking @@ -107,6 +114,7 @@ DEPENDENCIES: - UMCommon - UMDevice - YYText + - YYWebImage (~> 1.0.5) SPEC REPOS: trunk: @@ -140,7 +148,10 @@ SPEC REPOS: - SZTextView - UMCommon - UMDevice + - YYCache + - YYImage - YYText + - YYWebImage EXTERNAL SOURCES: TXLiteAVSDK_TRTC: @@ -178,8 +189,11 @@ SPEC CHECKSUMS: TXLiteAVSDK_TRTC: e78365f430926a1064e175fd8d97601559e7d3d1 UMCommon: ab4d875ddefe1b06c60b577e4a58bc4d433ee067 UMDevice: c13bbb2e8ca6c67d1e23e03162553e3ec5a8b5b0 + YYCache: 8105b6638f5e849296c71f331ff83891a4942952 + YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54 YYText: 5c461d709e24d55a182d1441c41dc639a18a4849 + YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 -PODFILE CHECKSUM: 90bfc18d3332c11bf6da588fa02ae11025118de0 +PODFILE CHECKSUM: 0802f53f919b3aa40ea73b6ec4092d32b46b4b46 COCOAPODS: 1.10.1 diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index aa0c945a..96ca37c2 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -165,6 +165,12 @@ E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824546326F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m */; }; E824546626F5FF6000BE8163 /* XPMineResetPayPasswordProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */; }; E8252FEE27687DF1002B3164 /* ActivityInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8252FED27687DF1002B3164 /* ActivityInfoModel.m */; }; + E82D5C6D276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C6C276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m */; }; + E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C6F276AE60000858D6D /* HeadwearModel.m */; }; + E82D5C73276AE94800858D6D /* CarModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C72276AE94800858D6D /* CarModel.m */; }; + E82D5C76276AEB5100858D6D /* NameplateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C75276AEB5100858D6D /* NameplateModel.m */; }; + E82D5C7A276B25D100858D6D /* SpriteSheetImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C79276B25D100858D6D /* SpriteSheetImageManager.m */; }; + E82D5C7D276B343300858D6D /* YYAnimatedImageView+ImageShow.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C7C276B343300858D6D /* YYAnimatedImageView+ImageShow.m */; }; E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */ = {isa = PBXBuildFile; fileRef = E82EE0F7272FDDFA00D15DC1 /* UserPrivacyView.m */; }; E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E833ED0C274FAD1C00A2463B /* XPKickUserModel.m */; }; E838D9A0275E1BF60079E0B5 /* XPRoomAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = E838D99F275E1BF60079E0B5 /* XPRoomAnimationView.m */; }; @@ -664,6 +670,18 @@ E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPasswordProtocol.h; sourceTree = ""; }; E8252FEC27687DF1002B3164 /* ActivityInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActivityInfoModel.h; sourceTree = ""; }; E8252FED27687DF1002B3164 /* ActivityInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActivityInfoModel.m; sourceTree = ""; }; + E82D5C6B276ADCE700858D6D /* XPMineDressEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDressEmptyTableViewCell.h; sourceTree = ""; }; + E82D5C6C276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineDressEmptyTableViewCell.m; sourceTree = ""; }; + E82D5C6E276AE60000858D6D /* HeadwearModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HeadwearModel.h; sourceTree = ""; }; + E82D5C6F276AE60000858D6D /* HeadwearModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HeadwearModel.m; sourceTree = ""; }; + E82D5C71276AE94800858D6D /* CarModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CarModel.h; sourceTree = ""; }; + E82D5C72276AE94800858D6D /* CarModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CarModel.m; sourceTree = ""; }; + E82D5C74276AEB5100858D6D /* NameplateModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NameplateModel.h; sourceTree = ""; }; + E82D5C75276AEB5100858D6D /* NameplateModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NameplateModel.m; sourceTree = ""; }; + E82D5C78276B25D100858D6D /* SpriteSheetImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteSheetImageManager.h; sourceTree = ""; }; + E82D5C79276B25D100858D6D /* SpriteSheetImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpriteSheetImageManager.m; sourceTree = ""; }; + E82D5C7B276B343300858D6D /* YYAnimatedImageView+ImageShow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYAnimatedImageView+ImageShow.h"; sourceTree = ""; }; + E82D5C7C276B343300858D6D /* YYAnimatedImageView+ImageShow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYAnimatedImageView+ImageShow.m"; sourceTree = ""; }; E82EE0F6272FDDFA00D15DC1 /* UserPrivacyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserPrivacyView.h; sourceTree = ""; }; E82EE0F7272FDDFA00D15DC1 /* UserPrivacyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserPrivacyView.m; sourceTree = ""; }; E833ED0B274FAD1C00A2463B /* XPKickUserModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPKickUserModel.h; sourceTree = ""; }; @@ -1235,6 +1253,7 @@ 189DD52A26DE255300AB55B1 /* Products */, D09C770DC30B9BAAEAFC7945 /* Pods */, BFB922F5D81845AC32D1E1ED /* Frameworks */, + E8B35A5E27912E83005F8318 /* Recovered References */, ); sourceTree = ""; }; @@ -1459,6 +1478,7 @@ 189DD5A726DFA09700AB55B1 /* Tool */ = { isa = PBXGroup; children = ( + E82D5C77276B25B000858D6D /* SpriteSheetManager */, E865964E2701A1A900846EBD /* StatisticsService */, E89DA6612700590A008483C1 /* IAPHelper */, E8B846B926FD7BE600A777FE /* UploadImage */, @@ -1896,6 +1916,17 @@ path = Cell; sourceTree = ""; }; + E82D5C77276B25B000858D6D /* SpriteSheetManager */ = { + isa = PBXGroup; + children = ( + E82D5C78276B25D100858D6D /* SpriteSheetImageManager.h */, + E82D5C79276B25D100858D6D /* SpriteSheetImageManager.m */, + E82D5C7B276B343300858D6D /* YYAnimatedImageView+ImageShow.h */, + E82D5C7C276B343300858D6D /* YYAnimatedImageView+ImageShow.m */, + ); + path = SpriteSheetManager; + sourceTree = ""; + }; E838D99D275E1B6C0079E0B5 /* AnimationView */ = { isa = PBXGroup; children = ( @@ -1958,6 +1989,12 @@ E83953272769FFF100CF2F24 /* Model */ = { isa = PBXGroup; children = ( + E82D5C6E276AE60000858D6D /* HeadwearModel.h */, + E82D5C6F276AE60000858D6D /* HeadwearModel.m */, + E82D5C71276AE94800858D6D /* CarModel.h */, + E82D5C72276AE94800858D6D /* CarModel.m */, + E82D5C74276AEB5100858D6D /* NameplateModel.h */, + E82D5C75276AEB5100858D6D /* NameplateModel.m */, ); path = Model; sourceTree = ""; @@ -1980,6 +2017,8 @@ E839533B276A0CCD00CF2F24 /* XPMineCarTableViewCell.m */, E839533D276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.h */, E839533E276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.m */, + E82D5C6B276ADCE700858D6D /* XPMineDressEmptyTableViewCell.h */, + E82D5C6C276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m */, ); path = Cell; sourceTree = ""; @@ -2513,6 +2552,13 @@ path = StageView; sourceTree = ""; }; + E8B35A5E27912E83005F8318 /* Recovered References */ = { + isa = PBXGroup; + children = ( + ); + name = "Recovered References"; + sourceTree = ""; + }; E8B825BC26E9E520009E8E9F /* Model */ = { isa = PBXGroup; children = ( @@ -3081,6 +3127,7 @@ 18EE3FF12750D2AD00A452BF /* NIMTimeUtils.m in Sources */, E839532D276A030F00CF2F24 /* XPMineDressUpListViewController.m in Sources */, E8B846D826FDE17300A777FE /* XPMineRechargeProtocol.h in Sources */, + E82D5C7D276B343300858D6D /* YYAnimatedImageView+ImageShow.m in Sources */, E8B846C726FDB45000A777FE /* XPMineUserInfoAlbumProtocol.h in Sources */, E8DEC992276441AA0078CB70 /* XPCandyTreeAnimationModel.m in Sources */, E890BC07273CF1800007C46B /* XPGiftCountCollectionViewCell.m in Sources */, @@ -3192,6 +3239,7 @@ E8AC722726F482A4007D6E91 /* XPMineFeedbackPresenter.m in Sources */, E8C6FFCC27548120004DC9F0 /* Api+Home.m in Sources */, 186A534E26FC6ED900D67B2C /* TTPopupService.m in Sources */, + E82D5C6D276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m in Sources */, 18A61BD7274F7F6900A09A54 /* NetImageConfig.m in Sources */, E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */, E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */, @@ -3242,9 +3290,11 @@ 189DD67E26E1FD8900AB55B1 /* UIImage+Utils.m in Sources */, E824545626F5E51900BE8163 /* XPMineVerifIdentityViewController.m in Sources */, E8DEC98F27643EB30078CB70 /* XPCandyTreeAnimationManager.m in Sources */, + E82D5C73276AE94800858D6D /* CarModel.m in Sources */, 186A534726FC6ED900D67B2C /* TTAlertConfig.m in Sources */, 18F403EE2758CF2F00A6C548 /* MessageContentImage.m in Sources */, 18E7B31E26F0984C0064BC9B /* UserLevelVo.m in Sources */, + E82D5C7A276B25D100858D6D /* SpriteSheetImageManager.m in Sources */, E874B88B27215EAF003954B9 /* MicroQueueModel.m in Sources */, E8EE827D272B9A2300A17217 /* XPRoomSendTextView.m in Sources */, E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */, @@ -3257,6 +3307,7 @@ E8680718271967B00024F48F /* MicroView.m in Sources */, E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */, E88B5CBD26FB3BDF00DA9178 /* XPTeenagerAlertView.m in Sources */, + E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */, E8A03DEC276301EF0098D9EA /* XPCandyTreeRankView.m in Sources */, 18F404C3276098F100A6C548 /* Api+Message.m in Sources */, E8C6FFED27550CC2004DC9F0 /* HomeSearchResultModel.m in Sources */, @@ -3353,6 +3404,7 @@ 18EE3FDF2750C1F700A452BF /* SessionListCell.m in Sources */, E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */, 189DD75026E21D9000AB55B1 /* GCDHelper.m in Sources */, + E82D5C76276AEB5100858D6D /* NameplateModel.m in Sources */, E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */, E8C6FFDD2754CF5D004DC9F0 /* HomeRecommendRoomModel.m in Sources */, E890BC10273D23F00007C46B /* GiftInfoModel.m in Sources */, @@ -3364,7 +3416,6 @@ 18E7B29026EA0E6B0064BC9B /* FlutterBoost+Xplan.m in Sources */, E8B846DC26FDE24300A777FE /* RechargeListModel.m in Sources */, E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */, - E839531E2769CCCE00CF2F24 /* RoomRankModel.m in Sources */, E8395334276A03C300CF2F24 /* XPMineDressUpPresenter.m in Sources */, 189DD75926E6003C00AB55B1 /* Api.m in Sources */, E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/Contents.json b/xplan-ios/Assets.xcassets/Mine/DressUp/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/DressUp/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/Contents.json new file mode 100644 index 00000000..d82ae82e --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_dressUp_exclusive@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_dressUp_exclusive@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/mine_dressUp_exclusive@2x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/mine_dressUp_exclusive@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9bf6decb66db10a8205f3c6c41399f738199412f GIT binary patch literal 459 zcmV;+0W|)JP)zmZ^!?Mc{l%I7^6LHI%l*x${keerqfe>UW`6(x01tFhPE!Eb&HC-7 zn`v1@Ar%S7#LmK6qyPW`5lKWrR5;6()Z3DSFbDup8sjb165`#~|NqV1%{C0EJ8sXD z&Y&PdKyqbnY?fJ*mk!QV4-_8NNl1Oeom&lBQ{aiBkui6Jr_5c%$W%HdM>Q?}sZANV zo-@V!yHI+~sMRq@7u0q8vSJTWp(pPAbd~$;N#ouFI7|lrttX#g;-ExjUGSiUJY9zP z_}FUudpS@Y`y$SVK<002ovPDHLkV1mvT B-M#<- literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/mine_dressUp_exclusive@3x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_exclusive.imageset/mine_dressUp_exclusive@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..474c61308f58d0b882e3e974eab3f6426833c0cd GIT binary patch literal 849 zcmV-X1FrmuP)0W{E{C0lOOz& zAN`Xa{E;60lOOz)AN-OZ{gfX4k{|t&9r}?V`;r{|lOO$)Ap4RZ`;#C0l^^_*ApZXT z{qpMkoi_ZIDgD>C{Hf8O$qx`&j{IO~LsaO1?O8wctMD3;X0000YbW%=J0QTII842+E4F%%KcWx0^QoE^x zU(m6gW?MZkAL#0gLO~02(q{kw0xC&FK~zY`rPk|qqCgA);E`Jq6+!UQs@rYCMM1#3 zw)_6?wVq=4%s@uiJ@4#v@q2wxl|$-kxw;+ zx(3ivpRaF5<)ZTqxXvrk+VbsRVI!zpA9Em$e#&#GTfSl-x%bz5GV+KA`~x(lygjjt z(Ort$h$D3K`=ZA})HW^^n8uthKAm<88yZ3V~(QRzdK&`WE9UTXELFQFUhb zfU?JP1TsC1Eyx-B+TrHG?9G`YUUFEvBt;gAfa9}w;N)pgN)Q84n)Agmw{kX_fDdyS z`H6%9R~kWK1`sk#*6@JAB<+vkAw~^oj<^YVQ7vpqgl#K*+-2265-lOV%S){#E;NX? z7<_`rW$%qqMUp{<%7zV5XRJqoPk+i$xW1Qpz+yvu%H-fgaj@TJIlys`!G;_haZG=5 z1c=ElzWtoIZt!EuUJdG$*Tb&BTkJ8CJbBs}Na6K-LJZvww@M+lQ7sopJPOyL?mgi3NjW z_M6uk&nA|q!Lp%;1O3TWO=SDh3$%RVfLw)2hsdOOW{ah_Bg7C(FGbhpzUr1MwyXMc bjp)Q*=teQ(I`d#S00000NkvXXu0mjfzd^LH literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/Contents.json new file mode 100644 index 00000000..634583d6 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_dressUp_limit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_dressUp_limit@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/mine_dressUp_limit@2x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/mine_dressUp_limit@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f42e7833119ddc974e7aa977c09d3c17d48c2d3a GIT binary patch literal 488 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k3?#4J%UA`Z!UKFlT!Hle?QH+IAt4Z#6(qQw z{r`53|J#}WZ({%|`1kMM|2s?my}k1PROY{5U;cf2`S02O|3}0BeZ2qwfb+ix8~*Rs z`hR`;|H~c!&s7>P%3KOGnztm#FPP!@jdO38&d!W*`yL5#P1`w63XP$wg0l;qzT^6KRjBEnkFA*ymxfo873XQqf=)t z@tHE`s7rR%o^wk&7nw{lEZ@djW4v{_E}!uGRcDWFT4lZH%K2;Ob98DBL>G21tuv_e zU>1wj<8>*Ma@xAg-`!PYrpYSCi8pf_kN$l8`>#^X{-Edj>07*Hg5u8GN!*`5?{oi+ cmCrwjdz6{ox*Bys7#OY$p00i_>zopr0JSgfx&QzG literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/mine_dressUp_limit@3x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_limit.imageset/mine_dressUp_limit@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..794c0d01a95cbaecd54d5e95bb6acf4185c812b6 GIT binary patch literal 995 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL3?z5Yp7kC`T?+6CaRt);Ela62xWziEIbzV*B^+-~U6V|Gqr> z_xszwkGKC_%>DQC)Bha;|Ni{^e=_9Xx0nCE-v75p{{KF;f6sRRKV!A> zpix!y|NiIF(64S4CQo;MEYe=Zu&UzsrHU|cWsUcex8h9t8shlUA*&oa`;kFG@|D=caGH_eGy?or*m3FeF!Dakm$ubvriqoxpv?V`nq2TS~e3ChE?-P@2Qy zY`@pT(BHV=;Fe5%9;Mfl>y|_pO?l8|yN z_Wb30n%>=y1=beY@80=i?Vq&ZBdP|xHm7FIymji&LCM4&5NP?|3>=nM^7!mzW=M1X=_fk40sJp O*9@MnelF{r5}E)4=LFyY literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/Contents.json new file mode 100644 index 00000000..cbe423c0 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_dressUp_new@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_dressUp_new@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/mine_dressUp_new@2x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/mine_dressUp_new@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..8f0ddd3f52c3997d3235c6b659a88c12fcfeab10 GIT binary patch literal 505 zcmVOw{j(YixdH0Tb`Hgz`k9+xzd-#lc_>g<^kbeJ;diehS{>#Jr<>LLWq5AUh z{l2vOpN{#Kg!rbI`S|z#*wg&c%lqu<{omUBwyOF`raj64000eiQchC<#@Nj5rJHG4 zL?IOkIK2Vh0003*Nklox*+Wb9`tD?(?}=j*$75j#g+%vo^|fEc1M}#o-54j z_+Uv6_rIUt9M3=les{pmjzX-BDUUKlZsEpu1`*w4!$8T5H^TuPcKTxH+0Mm~7E3VTV2ni%tBIjpEGCUxB}d@q z7%IfJ@EAj#^Z1RST5K@-|4j2dLIl0UQE^jm7f$0xilI^*y50|n9d}G0LGSqZKC4Q( v2#HrJ{cR4^c?;H0f#p71k(nG00000NkvXXu0mjf1xfVN literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/mine_dressUp_new@3x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressUp_new.imageset/mine_dressUp_new@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..412343c5f319906015afbc55af344309383aa31c GIT binary patch literal 964 zcmV;#13UbQP)J1iF5djdisue_>Fn_j(Yiydiaic`Hgw_j(PcxdH9TZ`Hp$`jd}QudH9Wb z_>Ot`k9zoydH9WX_KS7*j(Yfxdijod_>Ow`{{H^Hv-36asrt>t`}Oqw%EJ4x zr1_|s`QF<6K?Ce{0000RbW%=J0QLvn4jGeK@X2>&KW|dyshYUZiGeR4>aV^@P~Kbs z00OW{L_t(Y$EB9(a;qQ|fWbBU)+W8}K`;h2iJE1(jvf~@L_22}H`Q=o$-E7X8TRghjX)*5 z1R+!iA74h_;SKa7Zgzz0(k40`?jH7Un^ljvDwdg|aF!ow5k2~>%t~J|)`@@>^eWfW zW?v8iEw&53QL-s5_f63fqOgqva=a#o;2i61EsO4}Hzf)b)@eXkmfoXMqq98Fh^}Q^ zjHduXOHI9EA*ZcpI-!YN=OoW+wYG~sFld~QTe;nVp2AuU&(NS!)^tJlVVLDb6oyjU zgf~E;i{7=m9vI8%g0USf7)#~>S+Z{;H8?a;wRlMsiYOot0(kI+Y`q;L!G23ma=nNG zEVy7x4xG=`$|1viiwR{gmq&r;76LsHTpsO11bSgV8Ck+X@kl< z5QyEFTq8)xAv9?=nmpfQ8C&?TgBj&u(!NBwb@ps8wP?qMx1)hk^N?TJj1exijOH1L z7TX)OZnc#+IgOec-n(WHD&5H#DbeWp8wp+cXIa!xlx}$SO5-@3= zRT&B^l4qqB@~i00$fRMvGJ@g-v zqP*3j1vSdGxehMnxG)8NsI4UgWJ mSnkaCCbuWH*PXeBO#B6TJ^gg(4r06j0000+i*Gp00004bW%=J?vVzGyWAdB0002KNkl9r+ibc5^hVNNnyE#g?{uG!Y}%g-0db$+b6O|v>_9v=7_NuX@yco@swhY zj5{+D7Zg@c7~^#e*{+t(#3e$M(~Qs|smw?kL$OXt1zO{bUY#h*tNuaCh{DgvQHBg+ z?64s^l7o&JJIdX@;+Q3?IU;J?e`%_T(S5^5{Q}Iwq_*GN-R#f>^Qu$9!{G_D*)YSj#>Hqrr{@~#HWn=nZ zUH|Xz{m#z*-QE11ocdc@{Ijz9XlMS~+WzF_`-zDBp`iPOg8Znc`fY6e(a`vZEmu<}6Yos)$O z!qipBgD|VqA^YY*mQLKA$?FDQ(ty+*ymSF6;>#>99)O+>T1+X$gp^*`?FlwnjC@j# zwjHqYkfLTd4Th3kdNM`d=0}saxG*|l5UjkQ?naTE>Yk%oa!CUk1k~kHPVskdmuj3( z+;>at^YVD`aZyz}-0rhm&k$Kz?|^ZAI5kQd6BX)?hkQ4>)>B-HldN@BbL#)<9dN*L z5ve+oG=JnNw~~2{^F4M;**~bqbyZpEkfRg-y}vzHWm(lN&bbki6u<9-V2pi2dSB6& z?Bn|$7v<-d&h1UQ9NqQu{%}r&)(BlMB!)2rKRkZS`!Y+>6iw00R88Hit-U%ic#rbF z${HToV-2ivR!s07*qoM6N<$f~(KgJOBUy literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/Contents.json new file mode 100644 index 00000000..30c46d43 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_dressup_time@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_dressup_time@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/mine_dressup_time@2x.png b/xplan-ios/Assets.xcassets/Mine/DressUp/mine_dressup_time.imageset/mine_dressup_time@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..155df507031aa897bc61e9284f99d0cdfe61c9b3 GIT binary patch literal 367 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 literal 0 HcmV?d00001 diff --git a/xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.h b/xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.h new file mode 100644 index 00000000..90c2fc8b --- /dev/null +++ b/xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.h @@ -0,0 +1,16 @@ +// +// SpriteSheetImageManager.h +// XChat +// +// Created by Macx on 2018/5/11. +// Copyright © 2018年 XC. All rights reserved. +// + +#import +#import + +@interface SpriteSheetImageManager : NSObject +- (void)loadSpriteSheetImageWithURL:(NSURL *_Nullable)url + completionBlock:(void ( ^ _Nonnull )(YYSpriteSheetImage * _Nullable sprit))completionBlock + failureBlock:(void ( ^ _Nullable)(NSError * _Nullable error))failureBlock; +@end diff --git a/xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.m b/xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.m new file mode 100644 index 00000000..61d8d52c --- /dev/null +++ b/xplan-ios/Base/Tool/SpriteSheetManager/SpriteSheetImageManager.m @@ -0,0 +1,156 @@ +// +// SpriteSheetImageManager.m +// XChat +// +// Created by Macx on 2018/5/11. +// Copyright © 2018年 XC. All rights reserved. +// + +#import "SpriteSheetImageManager.h" +#import +#import +#import "YYUtility.h" +#import "XPMacro.h" +#import "GCDHelper.h" +static NSInteger retryCount = 3; +static CGFloat kdeafultFrameDurations = 0.2; + +@interface SpriteSheetImageManager() +@property (nonatomic,strong) YYSpriteSheetImage *sprite; +@property (nonatomic,strong) NSMutableDictionary *parserQueue; +@property (nonatomic,strong) NSMutableDictionary *retryCache; +@property (nonatomic, strong) UIImageView *operationImageView;// +@end + +@implementation SpriteSheetImageManager + +- (void)loadSpriteSheetImageWithURL:(NSURL *_Nullable)url + completionBlock:(void ( ^ _Nonnull )(YYSpriteSheetImage * _Nullable sprit))completionBlock + failureBlock:(void ( ^ _Nullable)(NSError * _Nullable error))failureBlock { + if (!url) { + return; + } + @kWeakify(self); + NSString *key = [self cacheURL:url]; + + [self.operationImageView sd_setImageWithURL:url completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { + @kStrongify(self); + if (error) { + + if (error) { + if (![self.retryCache objectForKey:key]) { + [self.retryCache setObject:@(0) forKey:key]; + } + [self.retryCache setObject:@([[self.retryCache objectForKey:key] integerValue] + 1) forKey:key]; + if ([[self.retryCache objectForKey:key] integerValue] < retryCount) { + [self retryWithKey:key completionBlock:^(YYSpriteSheetImage * _Nullable sprit) { + completionBlock(sprit); + + } failureBlock:^(NSError * _Nullable error) { + failureBlock(error); + + }]; + } + } + return ; + } + + YYSpriteSheetImage *sheetImage = [SpriteSheetImageManager createSpriteSheet:image frameDurations:kdeafultFrameDurations]; + + dispatch_main_sync_safe(^{ + if (sheetImage) { + completionBlock(sheetImage); + [self removeCacheWithKey:key]; + [self.retryCache removeObjectForKey:key]; + completionBlock(sheetImage); + } + }); + + }]; + +} + + + + +- (void)retryWithKey:(NSString *)key + completionBlock:(void (^)(YYSpriteSheetImage * _Nullable))completionBlock + failureBlock:(void (^)(NSError * _Nullable))failureBlock { + if (key) { + NSURL *url = [self.parserQueue objectForKey:key]; + [self loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) { + completionBlock(sprit); + } failureBlock:^(NSError * _Nullable error) { + + }]; + } +} + +/** + * 这里与UI 协定 一张横向长图 每个帧 都是通过高度 来获取 正方形 + * frameDurations 帧长 + **/ + ++ (YYSpriteSheetImage *_Nullable)createSpriteSheet:(UIImage *_Nullable)image frameDurations:(CGFloat)frameDurations { + NSMutableArray *contentRects = [NSMutableArray new]; + NSMutableArray *durations = [NSMutableArray new]; + + CGFloat imageHeight = image.size.height; + NSInteger spriteCount = image.size.width/imageHeight; + + for (int i = 0; i < spriteCount; i++) { + CGRect rect; + rect.size = CGSizeMake(imageHeight, imageHeight); + rect.origin.x = imageHeight * i; + rect.origin.y = 0; + [contentRects addObject:[NSValue valueWithCGRect:rect]]; + if (!frameDurations) { + frameDurations = kdeafultFrameDurations; + } + [durations addObject:@(frameDurations)]; + } + YYSpriteSheetImage *sheetImage = [[YYSpriteSheetImage alloc] initWithSpriteSheetImage:image contentRects:contentRects frameDurations:durations loopCount:0]; + return sheetImage; +} + + + +- (NSString *)cacheURL:(NSURL *)url { + NSString *key = [self getUUid]; + [self.parserQueue setObject:url forKey:key]; + return key; +} + +- (void)removeCacheWithKey:(NSString *)key { + [self.parserQueue removeObjectForKey:key]; +} + +- (NSString *)getUUid { + return [UIDevice currentDevice].identifierForVendor.UUIDString; +} + + + +- (NSMutableDictionary *)parserQueue { + if (_parserQueue == nil) { + _parserQueue = [NSMutableDictionary dictionary]; + } + return _parserQueue; +} + +- (NSMutableDictionary *)retryCache { + if (_retryCache == nil) { + _retryCache = [NSMutableDictionary dictionary]; + } + return _retryCache; +} + + +- (UIImageView *)operationImageView { + if (!_operationImageView) { + _operationImageView = [[UIImageView alloc] init]; + } + return _operationImageView; +} + +@end diff --git a/xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.h b/xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.h new file mode 100644 index 00000000..40b8d9ce --- /dev/null +++ b/xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.h @@ -0,0 +1,16 @@ +// +// YYAnimatedImageView+ImageShow.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface YYAnimatedImageView (ImageShow) + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.m b/xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.m new file mode 100644 index 00000000..5fdde4ac --- /dev/null +++ b/xplan-ios/Base/Tool/SpriteSheetManager/YYAnimatedImageView+ImageShow.m @@ -0,0 +1,34 @@ +// +// YYAnimatedImageView+ImageShow.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import "YYAnimatedImageView+ImageShow.h" +#import + +@implementation YYAnimatedImageView (ImageShow) ++ (void)load{ + // 获取系统的方法 + Method displayLayerMethod = class_getInstanceMethod(self, @selector(displayLayer:)); + // 获取更新的方法 + Method displayLayerNewMethod = class_getInstanceMethod(self, @selector(displayLayerNew:)); + // 方法交换 + method_exchangeImplementations(displayLayerMethod, displayLayerNewMethod); + +} + + +- (void)displayLayerNew:(CALayer *)layer{ + Ivar imageIvar = class_getInstanceVariable([self class], "_curFrame"); + UIImage *image = object_getIvar(self, imageIvar); + if (image){ + layer.contents = (__bridge id)image.CGImage; + }else{ + if (@available(iOS 14.0, *)){ + [super displayLayer:layer]; + } + } +} +@end diff --git a/xplan-ios/Global/XPEnum.h b/xplan-ios/Global/XPEnum.h index af98daaf..3c9c6804 100644 --- a/xplan-ios/Global/XPEnum.h +++ b/xplan-ios/Global/XPEnum.h @@ -30,5 +30,10 @@ typedef NS_ENUM(NSInteger, GenderType) { GenderType_Female = 2,///女性 }; - +typedef NS_ENUM(NSInteger, DressUpLabelType) { + DressUpLabelType_New = 1, //新品 + DressUpLabelType_Discount = 2, //折扣 + DressUpLabelType_Limit = 3,//限定 + DressUpLabelType_Exclusive = 4//专属 +}; #endif /* XPEnum_h */ diff --git a/xplan-ios/Main/Mine/Model/XPMineItemModel.h b/xplan-ios/Main/Mine/Model/XPMineItemModel.h index 30ef432c..575893b2 100644 --- a/xplan-ios/Main/Mine/Model/XPMineItemModel.h +++ b/xplan-ios/Main/Mine/Model/XPMineItemModel.h @@ -23,6 +23,7 @@ typedef NS_ENUM(NSInteger, XPMineItemType) { XPMineItemType_Account,///我的账户 XPMineItemType_Invite_Friend,///邀请好友 XPMineItemType_Personinfo,///个人中心 + XPMineItemType_My_Dressup,///我的装扮 }; diff --git a/xplan-ios/Main/Mine/Presenter/XPMinePresent.m b/xplan-ios/Main/Mine/Presenter/XPMinePresent.m index 01a4eaca..2231222e 100644 --- a/xplan-ios/Main/Mine/Presenter/XPMinePresent.m +++ b/xplan-ios/Main/Mine/Presenter/XPMinePresent.m @@ -66,12 +66,17 @@ teenagerItem.itmeImageName = @"mine_normal_teenager"; teenagerItem.type = XPMineItemType_Teenager_Mode; + XPMineItemModel * myDressUp = [[XPMineItemModel alloc] init]; + myDressUp.itmeName = @"我的装扮"; + myDressUp.itmeImageName = @"mine_normal_my_dressup"; + myDressUp.type = XPMineItemType_My_Dressup; + 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, realNameItem]; + NSArray * array = @[myRoomItem,teenagerItem, myDressUp, realNameItem]; [[self getView] onGetNormalItemsSuccess:array]; } diff --git a/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.h b/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.h index 4b1b778c..14dc7ae3 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.h +++ b/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.h @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN /// @param completion 完成 /// @param ticket ticket /// @param uid uid -+ (void)nameplatList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize; ++ (void)nameplateList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize; /// 使用头饰 /// @param completion 完成 @@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN /// @param userNameplateId 座驾id 0 取消使用座驾 /// @param ticket ticket /// @param uid uid -+ (void)useNamePlate:(HttpRequestHelperCompletion)completion userNameplateId:(NSString *)userNameplateId ticket:(NSString *)ticket uid:(NSString *)uid; ++ (void)useNameplate:(HttpRequestHelperCompletion)completion userNameplateId:(NSString *)userNameplateId ticket:(NSString *)ticket uid:(NSString *)uid; /// 活动 /// @param completion 完成 diff --git a/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.m b/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.m index fe9d8ee6..e9c7c749 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.m +++ b/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.m @@ -29,7 +29,7 @@ /// @param completion 完成 /// @param ticket ticket /// @param uid uid -+ (void)nameplatList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize { ++ (void)nameplateList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize { [self makeRequest:@"nameplate/userNameplateList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, ticket, uid, page, pageSize, nil]; } @@ -56,7 +56,7 @@ /// @param userNameplateId 座驾id 0 取消使用座驾 /// @param ticket ticket /// @param uid uid -+ (void)useNamePlate:(HttpRequestHelperCompletion)completion userNameplateId:(NSString *)userNameplateId ticket:(NSString *)ticket uid:(NSString *)uid { ++ (void)useNameplate:(HttpRequestHelperCompletion)completion userNameplateId:(NSString *)userNameplateId ticket:(NSString *)ticket uid:(NSString *)uid { [self makeRequest:@"nameplate/useNameplate" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, userNameplateId, ticket, uid, nil]; } diff --git a/xplan-ios/Main/Mine/View/DressUp/Model/CarModel.h b/xplan-ios/Main/Mine/View/DressUp/Model/CarModel.h new file mode 100644 index 00000000..b792272d --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/Model/CarModel.h @@ -0,0 +1,36 @@ +// +// CarModel.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import +#import "XPEnum.h" +NS_ASSUME_NONNULL_BEGIN + +typedef enum { + Dressup_Car_Status_Down = 1, //已下架 + Dressup_Car_Status_Expire = 2, //已过期 + Dressup_Car_Status_Ok = 3 //正常 +}DressupCarStatus; + +@interface CarModel : NSObject +@property (nonatomic, assign) DressupCarStatus status; //状态 +///座驾图片 +@property (nonatomic, strong) NSString *pic; +///id +@property (nonatomic, strong) NSString *carID; +///座驾名称 +@property (nonatomic, strong) NSString *name; +///失效时间 +@property (nonatomic, assign) NSInteger expireDate; +///是否是赠送的 +@property (nonatomic, assign) BOOL isGive; +///是否正在使用 +@property (nonatomic, assign) BOOL isUsed; +///标签类型 +@property (nonatomic, assign) DressUpLabelType labelType; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/Model/CarModel.m b/xplan-ios/Main/Mine/View/DressUp/Model/CarModel.m new file mode 100644 index 00000000..6c89f190 --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/Model/CarModel.m @@ -0,0 +1,16 @@ +// +// CarModel.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import "CarModel.h" + +@implementation CarModel ++ (NSDictionary *)replacedKeyFromPropertyName { + return @{@"isUsed" : @"using", + @"carID" : @"id" + }; +} +@end diff --git a/xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.h b/xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.h new file mode 100644 index 00000000..608d7e06 --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.h @@ -0,0 +1,41 @@ +// +// HeadwearModel.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import +#import "XPEnum.h" +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, DressupHeadWearStatus) { + Dressup_Headwear_Status_Ok = 1, //有效 + Dressup_Headwear_Status_Expire = 2,//已过期 + Dressup_Headwear_Status_Down = 3//已下架 +}; + + +@interface HeadwearModel : NSObject +///头饰id +@property (nonatomic, strong) NSString *headwearId; +///是否是赠送 +@property (nonatomic, assign) BOOL isGive; +///是否正在使用 +@property (nonatomic, assign) BOOL isUsed; +///标签类型 +@property (nonatomic, assign) DressUpLabelType labelType; +///头饰的名字 +@property (nonatomic, strong) NSString *headwearName; +///预览图链接 +@property (nonatomic, strong) NSString *pic; +///效果 +@property (nonatomic, strong) NSString *effect; +///还有过期 +@property (nonatomic, strong) NSString *expireDays; +///状态 +@property (nonatomic, assign) DressupHeadWearStatus status; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.m b/xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.m new file mode 100644 index 00000000..c40045fa --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/Model/HeadwearModel.m @@ -0,0 +1,16 @@ +// +// HeadwearModel.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import "HeadwearModel.h" + +@implementation HeadwearModel ++ (NSDictionary *)replacedKeyFromPropertyName { + return @{@"isUsed" : @"used", + @"isGive" : @"give" + }; +} +@end diff --git a/xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.h b/xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.h new file mode 100644 index 00000000..1f8d3f20 --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.h @@ -0,0 +1,27 @@ +// +// NameplateModel.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import +#import "XPEnum.h" +NS_ASSUME_NONNULL_BEGIN + +@interface NameplateModel : NSObject +///是否正在使用 +@property (nonatomic, assign) BOOL isUsing; +///id +@property (nonatomic, copy) NSString * nId; +///名字 +@property (nonatomic, strong) NSString *nameplateName; +///铭牌的图片 +@property (nonatomic, strong) NSString *nameplateImage; +///是否过期 +@property (nonatomic, assign) BOOL isExpired; +///过期的天数 +@property (nonatomic,copy) NSString *expireDays; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.m b/xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.m new file mode 100644 index 00000000..43f6da49 --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/Model/NameplateModel.m @@ -0,0 +1,16 @@ +// +// NameplateModel.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import "NameplateModel.h" + +@implementation NameplateModel + ++ (NSDictionary *)replacedKeyFromPropertyName { + return @{@"nId": @"id"}; +} + +@end diff --git a/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.h b/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.h index e1b2990b..cfa2cf3e 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.h +++ b/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.h @@ -10,7 +10,21 @@ NS_ASSUME_NONNULL_BEGIN @interface XPMineDressUpPresenter : BaseMvpPresenter - +/// 获取用户头饰列表 +- (void)getUserHeadwearList; +/// 获取用户座驾列表 +- (void)getUserCarList; +/// 获取用户铭牌列表 +- (void)getUserNameplateList; +/// 使用头饰 +/// @param headwearId 头饰的id 不使用的时候传0 +- (void)useHeader:(NSString *)headwearId; +/// 使用座驾 +/// @param carId 座驾的id 不使用的时候传0 +- (void)useCar:(NSString *)carId; +/// 使用铭牌 +/// @param userNameplateId 铭牌的id 不使用的时候传0 +- (void)useNameplate:(NSString *)userNameplateId; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m b/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m index e822ed44..377d962f 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m +++ b/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m @@ -6,7 +6,75 @@ // #import "XPMineDressUpPresenter.h" +#import "Api+DressUp.h" +#import "XPMineDressUpProtocol.h" +#import "AccountInfoStorage.h" +///Model +#import "HeadwearModel.h" +#import "CarModel.h" +#import "NameplateModel.h" @implementation XPMineDressUpPresenter + +/// 获取用户头饰列表 +- (void)getUserHeadwearList { + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api headwearList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HeadwearModel modelsWithArray:data.data]; + [[self getView] getUserHeadwearListSuccess:array]; + }] ticket:ticket uid:uid]; +} + +/// 获取用户座驾列表 +- (void)getUserCarList { + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api carList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [CarModel modelsWithArray:data.data]; + [[self getView] getUserCarListSuccess:array]; + }] ticket:ticket uid:uid]; +} + +/// 获取用户铭牌列表 +- (void)getUserNameplateList { + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api nameplateList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [NameplateModel modelsWithArray:data.data[@"nameplateList"]]; + [[self getView] getUserNameplateListSuccess:array]; + }] ticket:ticket uid:uid page:@"1" pageSize:@"500"]; +} + +/// 使用头饰 +/// @param headwearId 头饰的id 不使用的时候传0 +- (void)useHeader:(NSString *)headwearId { + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api useHeadWear:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + [[self getView] useHeadwearSuccess:headwearId]; + } showLoading:YES] headwearId:headwearId ticket:ticket uid:uid]; +} + +/// 使用座驾 +/// @param carId 座驾的id 不使用的时候传0 +- (void)useCar:(NSString *)carId { + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api useCar:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + [[self getView] useCarSuccess:carId]; + } showLoading:YES] carId:carId ticket:ticket uid:uid]; +} + +/// 使用铭牌 +/// @param userNameplateId 铭牌的id 不使用的时候传0 +- (void)useNameplate:(NSString *)userNameplateId { + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api useNameplate:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + [[self getView] useNameplateSuccess:userNameplateId]; + } showLoading:YES] userNameplateId:userNameplateId ticket:ticket uid:uid]; +} + @end diff --git a/xplan-ios/Main/Mine/View/DressUp/Protocol/XPMineDressUpProtocol.h b/xplan-ios/Main/Mine/View/DressUp/Protocol/XPMineDressUpProtocol.h index 9ab53ba7..eb5e6420 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Protocol/XPMineDressUpProtocol.h +++ b/xplan-ios/Main/Mine/View/DressUp/Protocol/XPMineDressUpProtocol.h @@ -11,6 +11,18 @@ NS_ASSUME_NONNULL_BEGIN @protocol XPMineDressUpProtocol +///获取用户头饰列表成功 +- (void)getUserHeadwearListSuccess:(NSArray *)array; +///获取用户头饰列表成功 +- (void)getUserCarListSuccess:(NSArray *)array; +///获取用户头饰列表成功 +- (void)getUserNameplateListSuccess:(NSArray *)array; +///使用头饰成功 +- (void)useHeadwearSuccess:(NSString *)headWearId; +///使用座驾成功 +- (void)useCarSuccess:(NSString *)carId; +///使用铭牌成功 +- (void)useNameplateSuccess:(NSString *)nameplateId; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.h b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.h index b3dbd320..157ff952 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.h +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.h @@ -8,9 +8,16 @@ #import NS_ASSUME_NONNULL_BEGIN +@class CarModel,XPMineCarTableViewCell; +@protocol XPMineCarTableViewCellDelegate +///使用座驾 +- (void)xPMineCarTableViewCell:(XPMineCarTableViewCell *)cell carId:(NSString *)carId; +@end @interface XPMineCarTableViewCell : UITableViewCell - +@property (nonatomic,strong) CarModel *carInfo; +///代理 +@property (nonatomic,weak) id delegate; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.m b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.m index 87b93826..7fef63be 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineCarTableViewCell.m @@ -6,18 +6,257 @@ // #import "XPMineCarTableViewCell.h" +///Third +#import +///Tool +#import "XPMacro.h" +#import "ThemeColor.h" +#import "NetImageView.h" +#import "UIImage+Utils.h" +///Model +#import "CarModel.h" + +@interface XPMineCarTableViewCell () +///座驾 +@property (nonatomic,strong) NetImageView *carImageView; +///名字 +@property (nonatomic,strong) UIStackView *nameStackView; +///头饰名字 +@property (nonatomic, strong) UIImageView *giveImageView; +///名字 +@property (nonatomic, strong) UILabel *titleLabel; +///还有多少时间 +@property (nonatomic,strong) UIStackView *timeStackView; +///状态icon +@property (nonatomic, strong) UIImageView *timeImageView; +///剩余天数 +@property (nonatomic, strong) UILabel *timeLabel; +///使用 +@property (nonatomic,strong) UIButton *useButton; +///显示分割线 +@property (nonatomic,strong) UIView * lineView; +/// 限定 新 +@property (nonatomic,strong) UIImageView *limitImageView; +@end @implementation XPMineCarTableViewCell -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} +#pragma mark - Private Method +- (void)initSubViews { + self.backgroundColor = [UIColor clearColor];; + [self.contentView addSubview:self.carImageView]; + [self.contentView addSubview:self.nameStackView]; + [self.contentView addSubview:self.timeStackView]; + [self.contentView addSubview:self.useButton]; + [self.contentView addSubview:self.lineView]; + [self.contentView addSubview:self.limitImageView]; + + [self.nameStackView addArrangedSubview:self.giveImageView]; + [self.nameStackView addArrangedSubview:self.titleLabel]; + + [self.timeStackView addArrangedSubview:self.timeImageView]; + [self.timeStackView addArrangedSubview:self.timeLabel]; + } -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; +- (void)initSubViewConstraints { + [self.carImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(68); + make.width.mas_equalTo(102); + make.centerY.mas_equalTo(self.contentView); + make.left.mas_equalTo(self.contentView).offset(20); + }]; - // Configure the view for the selected state + + [self.nameStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.carImageView.mas_right).offset(10); + make.bottom.mas_equalTo(self.carImageView.mas_centerY).offset(-3); + }]; + + [self.giveImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(11, 11)); + }]; + + [self.timeImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.width.mas_equalTo(11); + }]; + + [self.timeStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.nameStackView); + make.top.mas_equalTo(self.carImageView.mas_centerY).offset(3); + make.height.mas_equalTo(13); + }]; + + [self.useButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self); + make.right.mas_equalTo(self.contentView).offset(-15); + make.height.mas_equalTo(33); + make.width.mas_equalTo(85); + }]; + + [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contentView).offset(105); + make.height.mas_equalTo(0.5); + make.bottom.mas_equalTo(self.contentView); + make.right.mas_equalTo(self.contentView).offset(-15); + }]; + + [self.limitImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.mas_equalTo(self.contentView).offset(20); + make.width.height.mas_equalTo(20); + }]; +} + +#pragma mark - private +- (void)setCarInfo:(CarModel *)carInfo { + _carInfo = carInfo; + if (_carInfo) { + self.titleLabel.text = _carInfo.name; + self.timeImageView.hidden = _carInfo.status != Dressup_Car_Status_Ok; + self.useButton.hidden = _carInfo.status != Dressup_Car_Status_Ok; + if (_carInfo.status == Dressup_Car_Status_Ok) { + self.timeLabel.text = [NSString stringWithFormat:@"剩余%ld天", _carInfo.expireDate]; + } else { + self.timeLabel.text = @"已过期"; + } + self.giveImageView.hidden =!_carInfo.isGive; + self.carImageView.imageUrl = _carInfo.pic; + if (_carInfo.isUsed) { + [_useButton setTitle:@"取消使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor cancelButtonTextColor] forState:UIControlStateNormal]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor cancelButtonGradientStartColor], [ThemeColor cancelButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } else { + [_useButton setTitle:@"使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } + + NSString * typeStr; + if (_carInfo.labelType == DressUpLabelType_New) { + typeStr = @"mine_dressUp_new"; + } else if(_carInfo.labelType == DressUpLabelType_Limit) { + typeStr = @"mine_dressUp_limit"; + } else if(_carInfo.labelType == DressUpLabelType_Exclusive) { + typeStr = @"mine_dressUp_exclusive"; + } + if (typeStr.length > 0) { + self.limitImageView.image = [UIImage imageNamed:typeStr]; + } + } +} +#pragma mark - Event Response +- (void)useButtonAction:(UIButton *)sender { + if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineCarTableViewCell:carId:)]) { + NSString * carId = self.carInfo.carID;; + if (self.carInfo.isUsed) { + carId = @"0"; + } + [self.delegate xPMineCarTableViewCell:self carId:carId]; + } +} + +#pragma mark - Getter && Setter +- (UIStackView *)nameStackView { + if (!_nameStackView) { + _nameStackView = [[UIStackView alloc] init]; + _nameStackView.axis = UILayoutConstraintAxisHorizontal; + _nameStackView.distribution = UIStackViewDistributionFill; + _nameStackView.alignment = UIStackViewAlignmentCenter; + _nameStackView.spacing = 2; + } + return _nameStackView; +} + +- (UIImageView *)giveImageView { + if (!_giveImageView) { + _giveImageView = [[UIImageView alloc] init]; + _giveImageView.userInteractionEnabled = YES; + _giveImageView.image = [UIImage imageNamed:@"mine_dressup_give"]; + } + return _giveImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.font = [UIFont systemFontOfSize:15]; + _titleLabel.textColor = [ThemeColor mainTextColor]; + } + return _titleLabel; +} + +- (UIButton *)useButton { + if (!_useButton) { + _useButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_useButton setTitle:@"使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal]; + [_useButton addTarget:self action:@selector(useButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + _useButton.layer.masksToBounds = YES; + _useButton.layer.cornerRadius = 33/2; + _useButton.titleLabel.font = [UIFont systemFontOfSize:14]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } + return _useButton; +} + +- (UIStackView *)timeStackView { + if (!_timeStackView) { + _timeStackView = [[UIStackView alloc] init]; + _timeStackView.axis = UILayoutConstraintAxisHorizontal; + _timeStackView.distribution = UIStackViewDistributionFill; + _timeStackView.alignment = UIStackViewAlignmentCenter; + _timeStackView.spacing = 2; + } + return _timeStackView; +} + +- (UIImageView *)timeImageView { + if (!_timeImageView) { + _timeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_dressup_time"]]; + } + return _timeImageView; +} + +- (UILabel *)timeLabel { + if (!_timeLabel) { + _timeLabel = [[UILabel alloc] init]; + _timeLabel.font = [UIFont systemFontOfSize:12]; + _timeLabel.textColor = [ThemeColor secondTextColor]; + } + return _timeLabel; +} + +- (UIView *)lineView { + if (!_lineView) { + _lineView = [[UIView alloc] init]; + _lineView.backgroundColor = [ThemeColor dividerColor]; + } + return _lineView; +} + +- (NetImageView *)carImageView { + if (!_carImageView) { + _carImageView = [[NetImageView alloc] init]; + _carImageView.backgroundColor = [ThemeColor appCellBackgroundColor]; + _carImageView.layer.masksToBounds = YES; + _carImageView.layer.cornerRadius = 12; + } + return _carImageView; +} + +- (UIImageView *)limitImageView { + if (!_limitImageView) { + _limitImageView = [[UIImageView alloc] init]; + } + return _limitImageView; } @end diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.h b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.h new file mode 100644 index 00000000..8eb5fcd4 --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.h @@ -0,0 +1,17 @@ +// +// XPMineDressEmptyTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPMineDressEmptyTableViewCell : UITableViewCell +///标题 +@property (nonatomic,copy) NSString *emptyTitle; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.m b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.m new file mode 100644 index 00000000..c0cb1f1e --- /dev/null +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineDressEmptyTableViewCell.m @@ -0,0 +1,80 @@ +// +// XPMineDressEmptyTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/16. +// + +#import "XPMineDressEmptyTableViewCell.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "UIImageConstant.h" + +@interface XPMineDressEmptyTableViewCell () +@property (nonatomic,strong) UIImageView *emptyImageView; +@property (nonatomic,strong) UILabel *titleLabel; +@end + +@implementation XPMineDressEmptyTableViewCell + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [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(150); + 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; + 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.font = [UIFont systemFontOfSize:16]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [ThemeColor secondTextColor]; + } + return _titleLabel; +} +@end diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.h b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.h index e1caef8e..98894de9 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.h +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.h @@ -8,9 +8,17 @@ #import NS_ASSUME_NONNULL_BEGIN +@class HeadwearModel, XPMineHeadwearTableViewCell; +@protocol XPMineHeadwearTableViewCellDelegate +///使用头饰 +- (void)xPMineHeadwearTableViewCell:(XPMineHeadwearTableViewCell *)view headwearId:(NSString *)headwearId; + +@end @interface XPMineHeadwearTableViewCell : UITableViewCell - +@property (nonatomic,strong) HeadwearModel *headwearModel; +///代理 +@property (nonatomic,weak) id delegate; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.m b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.m index 8ae77fbf..e816262b 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.m @@ -6,23 +6,27 @@ // #import "XPMineHeadwearTableViewCell.h" - ///Third #import +#import ///Tool +#import "XPMacro.h" #import "ThemeColor.h" #import "NetImageView.h" #import "UIImage+Utils.h" +#import "SpriteSheetImageManager.h" +///Model +#import "HeadwearModel.h" @interface XPMineHeadwearTableViewCell () -///赠送 +///名字 +@property (nonatomic,strong) UIStackView *nameStackView; +///头饰名字 @property (nonatomic, strong) UIImageView *giveImageView; -///铭牌图片的背景 -@property (nonatomic, strong) UIView *backView; -///铭牌 -@property (nonatomic, strong) NetImageView *namePlateImageView; ///名字 @property (nonatomic, strong) UILabel *titleLabel; +///还有多少时间 +@property (nonatomic,strong) UIStackView *timeStackView; ///状态icon @property (nonatomic, strong) UIImageView *timeImageView; ///剩余天数 @@ -31,6 +35,12 @@ @property (nonatomic,strong) UIButton *useButton; ///显示分割线 @property (nonatomic,strong) UIView * lineView; +///普通的 +@property (nonatomic,strong) YYAnimatedImageView *headWearImageView; +///头饰播放 +@property (nonatomic, strong) SpriteSheetImageManager *manager; +/// 限定 新 +@property (nonatomic,strong) UIImageView *limitImageView; @end @@ -47,39 +57,46 @@ #pragma mark - Private Method - (void)initSubViews { self.backgroundColor = [UIColor clearColor];; - [self.contentView addSubview:self.backView]; - [self.contentView addSubview:self.titleLabel]; - [self.contentView addSubview:self.timeImageView]; - [self.contentView addSubview:self.timeLabel]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.headWearImageView]; + [self.contentView addSubview:self.nameStackView]; + [self.contentView addSubview:self.timeStackView]; [self.contentView addSubview:self.useButton]; [self.contentView addSubview:self.lineView]; - [self.backView addSubview:self.namePlateImageView]; + [self.contentView addSubview:self.limitImageView]; + + [self.nameStackView addArrangedSubview:self.giveImageView]; + [self.nameStackView addArrangedSubview:self.titleLabel]; + + [self.timeStackView addArrangedSubview:self.timeImageView]; + [self.timeStackView addArrangedSubview:self.timeLabel]; } - (void)initSubViewConstraints { - [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { + [self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.height.width.mas_equalTo(80); make.centerY.mas_equalTo(self.contentView); make.left.mas_equalTo(self.contentView).offset(20); }]; - - [self.namePlateImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self.backView); + + [self.nameStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.headWearImageView.mas_right).offset(10); + make.bottom.mas_equalTo(self.headWearImageView.mas_centerY).offset(-3); }]; - [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.backView.mas_right).offset(10); - make.top.mas_equalTo(self.backView).offset(10); + [self.giveImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(11, 11)); }]; + [self.timeImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.titleLabel); make.height.width.mas_equalTo(11); - make.top.mas_equalTo(self.titleLabel.mas_bottom).inset(11); }]; - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.timeImageView.mas_right).offset(2); - make.centerY.mas_equalTo(self.timeImageView); + + [self.timeStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.nameStackView); + make.top.mas_equalTo(self.headWearImageView.mas_centerY).offset(3); + make.height.mas_equalTo(13); }]; [self.useButton mas_makeConstraints:^(MASConstraintMaker *make) { @@ -96,53 +113,103 @@ make.right.mas_equalTo(self.contentView).offset(-15); }]; + [self.limitImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.mas_equalTo(self.contentView).offset(20); + make.width.height.mas_equalTo(20); + }]; } #pragma mark - private - -//- (void)pricenamePlate:(UserNamePlateList *)namePlate{ -// -// self.namePlate = namePlate; -// -// [self.namePlateIcon qn_setImageImageWithUrl:namePlate.nameplateImage placeholderImage:@"dress_headwear_placehoder" type:ImageTypeRoomFace]; -// -// BOOL isUse = namePlate.isUsing; -// NSString *expireDays = [NSString stringWithFormat:@"%ld", namePlate.expireDays]; -// -// self.dressUpNameLabel.text = namePlate.nameplateName; -// self.giveIcon.hidden = YES; -// -// //是否已过期 -// BOOL isExpired = namePlate.isExpired; -// -// self.useBtn.hidden = isExpired || isUse;//已过期|使用中 不显示使用 -// self.cancelUseBtn.hidden = isExpired || !isUse;//已过期|未使用 不显示取消使用 -// -// self.timeLabel.text = isExpired ? @"已过期" : [NSString stringWithFormat:@"剩余%@天", expireDays]; -// -//} +- (void)setHeadwearModel:(HeadwearModel *)headwearModel { + _headwearModel = headwearModel; + if (_headwearModel) { + self.titleLabel.text = _headwearModel.headwearName; + self.timeImageView.hidden = _headwearModel.status != Dressup_Headwear_Status_Ok; + self.useButton.hidden = _headwearModel.status != Dressup_Headwear_Status_Ok; + if (_headwearModel.status == Dressup_Headwear_Status_Ok) { + self.timeLabel.text = [NSString stringWithFormat:@"剩余%@天", _headwearModel.expireDays]; + } else { + self.timeLabel.text = @"已过期"; + } + self.giveImageView.hidden =!_headwearModel.isGive; + NSString * headurl = _headwearModel.effect.length > 0 ? _headwearModel.effect : _headwearModel.pic; + if (headurl.length >0) { + self.headWearImageView.hidden = NO; + NSURL *url = [NSURL URLWithString:headurl]; + @kWeakify(self); + [self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) { + @kStrongify(self); + self.headWearImageView.image = sprit; + } failureBlock:^(NSError * _Nullable error) { + }]; + } else { + self.headWearImageView.hidden = YES; + } + + if (_headwearModel.isUsed) { + [_useButton setTitle:@"取消使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor cancelButtonTextColor] forState:UIControlStateNormal]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor cancelButtonGradientStartColor], [ThemeColor cancelButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } else { + [_useButton setTitle:@"使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } + + NSString * typeStr; + if (_headwearModel.labelType == DressUpLabelType_New) { + typeStr = @"mine_dressUp_new"; + } else if(_headwearModel.labelType == DressUpLabelType_Limit) { + typeStr = @"mine_dressUp_limit"; + } else if(_headwearModel.labelType == DressUpLabelType_Exclusive) { + typeStr = @"mine_dressUp_exclusive"; + } + if (typeStr.length > 0) { + self.limitImageView.image = [UIImage imageNamed:typeStr]; + } + } +} #pragma mark - Event Response - (void)useButtonAction:(UIButton *)sender { - + if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineHeadwearTableViewCell:headwearId:)]) { + NSString * headwearId = self.headwearModel.headwearId; + if (self.headwearModel.isUsed) { + headwearId = @"0"; + } + [self.delegate xPMineHeadwearTableViewCell:self headwearId:headwearId]; + } } #pragma mark - Getter && Setter -- (UIView *)backView { - if (!_backView) { - _backView = [[UIView alloc] init]; - _backView.backgroundColor = [ThemeColor appCellBackgroundColor]; - _backView.layer.masksToBounds = YES; - _backView.layer.cornerRadius = 10; +- (UIStackView *)nameStackView { + if (!_nameStackView) { + _nameStackView = [[UIStackView alloc] init]; + _nameStackView.axis = UILayoutConstraintAxisHorizontal; + _nameStackView.distribution = UIStackViewDistributionFill; + _nameStackView.alignment = UIStackViewAlignmentCenter; + _nameStackView.spacing = 2; } - return _backView; + return _nameStackView; } -- (NetImageView *)namePlateImageView { - if (!_namePlateImageView) { - _namePlateImageView = [[NetImageView alloc] init]; - _namePlateImageView.image = [UIImageConstant defaultAvatarPlaceholder]; +- (UIImageView *)giveImageView { + if (!_giveImageView) { + _giveImageView = [[UIImageView alloc] init]; + _giveImageView.userInteractionEnabled = YES; + _giveImageView.image = [UIImage imageNamed:@"mine_dressup_give"]; } - return _namePlateImageView;; + return _giveImageView; +} + +- (YYAnimatedImageView *)headWearImageView { + if (!_headWearImageView) { + _headWearImageView = [[YYAnimatedImageView alloc] init]; + _headWearImageView.backgroundColor = [ThemeColor appCellBackgroundColor]; + _headWearImageView.contentMode = UIViewContentModeScaleAspectFit; + _headWearImageView.layer.masksToBounds = YES; + _headWearImageView.layer.cornerRadius = 10; + } + return _headWearImageView; } - (UILabel *)titleLabel { @@ -168,11 +235,20 @@ return _useButton; } - +- (UIStackView *)timeStackView { + if (!_timeStackView) { + _timeStackView = [[UIStackView alloc] init]; + _timeStackView.axis = UILayoutConstraintAxisHorizontal; + _timeStackView.distribution = UIStackViewDistributionFill; + _timeStackView.alignment = UIStackViewAlignmentCenter; + _timeStackView.spacing = 2; + } + return _timeStackView; +} - (UIImageView *)timeImageView { if (!_timeImageView) { - _timeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"person_Dressup_time"]]; + _timeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_dressup_time"]]; } return _timeImageView; } @@ -194,5 +270,19 @@ return _lineView; } +- (SpriteSheetImageManager *)manager { + if (!_manager) { + _manager = [[SpriteSheetImageManager alloc] init]; + } + return _manager; +} + +- (UIImageView *)limitImageView { + if (!_limitImageView) { + _limitImageView = [[UIImageView alloc] init]; + } + return _limitImageView; +} + @end diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.h b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.h index f7e92047..a5d0d948 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.h +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.h @@ -8,9 +8,16 @@ #import NS_ASSUME_NONNULL_BEGIN +@class NameplateModel, XPMineNameplateTableViewCell; +@protocol XPMineNameplateTableViewCellDelegate +///使用铭牌 +- (void)xPMineNameplateTableViewCell:(XPMineNameplateTableViewCell *)view nameplateId:(NSString *)nameplateId; +@end @interface XPMineNameplateTableViewCell : UITableViewCell - +@property (nonatomic,strong) NameplateModel *nameplateModel; +///代理 +@property (nonatomic,weak) id delegate; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.m b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.m index 0597a7cd..11de59f6 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.m @@ -12,14 +12,16 @@ #import "ThemeColor.h" #import "NetImageView.h" #import "UIImage+Utils.h" +///Model +#import "NameplateModel.h" @interface XPMineNameplateTableViewCell () -///铭牌图片的背景 -@property (nonatomic, strong) UIView *backView; ///铭牌 @property (nonatomic, strong) NetImageView *namePlateImageView; ///名字 @property (nonatomic, strong) UILabel *titleLabel; +///还有多少时间 +@property (nonatomic,strong) UIStackView *timeStackView; ///状态icon @property (nonatomic, strong) UIImageView *timeImageView; ///剩余天数 @@ -44,39 +46,35 @@ #pragma mark - Private Method - (void)initSubViews { self.backgroundColor = [UIColor clearColor];; - [self.contentView addSubview:self.backView]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.namePlateImageView]; [self.contentView addSubview:self.titleLabel]; - [self.contentView addSubview:self.timeImageView]; - [self.contentView addSubview:self.timeLabel]; + [self.contentView addSubview:self.timeStackView]; [self.contentView addSubview:self.useButton]; [self.contentView addSubview:self.lineView]; - [self.backView addSubview:self.namePlateImageView]; + [self.timeStackView addArrangedSubview:self.timeImageView]; + [self.timeStackView addArrangedSubview:self.timeLabel]; } - (void)initSubViewConstraints { - [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.width.mas_equalTo(80); + [self.namePlateImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(60); + make.width.mas_equalTo(100); make.centerY.mas_equalTo(self.contentView); make.left.mas_equalTo(self.contentView).offset(20); }]; - [self.namePlateImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self.backView); - }]; - [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.backView.mas_right).offset(10); - make.top.mas_equalTo(self.backView).offset(10); + make.left.mas_equalTo(self.namePlateImageView.mas_right).offset(10); + make.bottom.mas_equalTo(self.namePlateImageView.mas_centerY).offset(-3); }]; [self.timeImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.titleLabel); make.height.width.mas_equalTo(11); - make.top.mas_equalTo(self.titleLabel.mas_bottom).inset(11); }]; - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.timeImageView.mas_right).offset(2); - make.centerY.mas_equalTo(self.timeImageView); + [self.timeStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.titleLabel); + make.top.mas_equalTo(self.namePlateImageView.mas_centerY).offset(3); }]; [self.useButton mas_makeConstraints:^(MASConstraintMaker *make) { @@ -97,51 +95,64 @@ #pragma mark - private -//- (void)pricenamePlate:(UserNamePlateList *)namePlate{ -// -// self.namePlate = namePlate; -// -// [self.namePlateIcon qn_setImageImageWithUrl:namePlate.nameplateImage placeholderImage:@"dress_headwear_placehoder" type:ImageTypeRoomFace]; -// -// BOOL isUse = namePlate.isUsing; -// NSString *expireDays = [NSString stringWithFormat:@"%ld", namePlate.expireDays]; -// -// self.dressUpNameLabel.text = namePlate.nameplateName; -// self.giveIcon.hidden = YES; -// -// //是否已过期 -// BOOL isExpired = namePlate.isExpired; -// -// self.useBtn.hidden = isExpired || isUse;//已过期|使用中 不显示使用 -// self.cancelUseBtn.hidden = isExpired || !isUse;//已过期|未使用 不显示取消使用 -// -// self.timeLabel.text = isExpired ? @"已过期" : [NSString stringWithFormat:@"剩余%@天", expireDays]; -// -//} +- (void)setNameplateModel:(NameplateModel *)nameplateModel { + _nameplateModel = nameplateModel; + if (_nameplateModel) { + self.titleLabel.text = _nameplateModel.nameplateName; + self.timeImageView.hidden = _nameplateModel.isExpired; + self.useButton.hidden = _nameplateModel.isExpired; + if (!_nameplateModel.isExpired) { + self.timeLabel.text = [NSString stringWithFormat:@"剩余%@天", _nameplateModel.expireDays]; + } else { + self.timeLabel.text = @"已过期"; + } + self.namePlateImageView.imageUrl = _nameplateModel.nameplateImage; + if (_nameplateModel.isUsing) { + [_useButton setTitle:@"取消使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor cancelButtonTextColor] forState:UIControlStateNormal]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor cancelButtonGradientStartColor], [ThemeColor cancelButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } else { + [_useButton setTitle:@"使用" forState:UIControlStateNormal]; + [_useButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal]; + [_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + } + } +} #pragma mark - Event Response - (void)useButtonAction:(UIButton *)sender { - + if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineNameplateTableViewCell:nameplateId:)]) { + NSString * nameplateId = self.nameplateModel.nId;; + if (self.nameplateModel.isUsing) { + nameplateId = @"0"; + } + [self.delegate xPMineNameplateTableViewCell:self nameplateId:nameplateId]; + } } #pragma mark - Getter && Setter -- (UIView *)backView { - if (!_backView) { - _backView = [[UIView alloc] init]; - _backView.backgroundColor = [ThemeColor appCellBackgroundColor]; - _backView.layer.masksToBounds = YES; - _backView.layer.cornerRadius = 10; - } - return _backView; -} - - (NetImageView *)namePlateImageView { if (!_namePlateImageView) { _namePlateImageView = [[NetImageView alloc] init]; _namePlateImageView.image = [UIImageConstant defaultAvatarPlaceholder]; + _namePlateImageView.contentMode = UIViewContentModeScaleAspectFit; + _namePlateImageView.backgroundColor = [ThemeColor appCellBackgroundColor]; + _namePlateImageView.layer.masksToBounds = YES; + _namePlateImageView.layer.cornerRadius = 12; } return _namePlateImageView;; } +- (UIStackView *)timeStackView { + if (!_timeStackView) { + _timeStackView = [[UIStackView alloc] init]; + _timeStackView.axis = UILayoutConstraintAxisHorizontal; + _timeStackView.distribution = UIStackViewDistributionFill; + _timeStackView.alignment = UIStackViewAlignmentCenter; + _timeStackView.spacing = 2; + } + return _timeStackView; +} + - (UILabel *)titleLabel { if (!_titleLabel) { _titleLabel = [[UILabel alloc] init]; @@ -165,11 +176,9 @@ return _useButton; } - - - (UIImageView *)timeImageView { if (!_timeImageView) { - _timeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"person_Dressup_time"]]; + _timeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_dressup_time"]]; } return _timeImageView; } diff --git a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m index 5913210d..2efabeed 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m @@ -6,32 +6,166 @@ // #import "XPMineDressUpListViewController.h" +///Third +#import +///Tool +#import "XPMacro.h" +///View +#import "XPMineHeadwearTableViewCell.h" +#import "XPMineCarTableViewCell.h" +#import "XPMineNameplateTableViewCell.h" +#import "XPMineDressEmptyTableViewCell.h" +///P +#import "XPMineDressUpPresenter.h" +#import "XPMineDressUpProtocol.h" -@interface XPMineDressUpListViewController () +@interface XPMineDressUpListViewController () ///列表 @property (nonatomic,strong) UITableView *tableView; +///数据源 +@property (nonatomic,strong) NSArray *datasource; @end @implementation XPMineDressUpListViewController +- (XPMineDressUpPresenter *)createPresenter { + return [[XPMineDressUpPresenter alloc] init]; +} + - (void)viewDidLoad { [super viewDidLoad]; + [self initSubViews]; + [self initSubViewConstraints]; +} +#pragma mark - Private Method +- (void)initSubViews { + [self.view addSubview:self.tableView]; +} + +- (void)initSubViewConstraints { + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.view); + }]; +} +#pragma mark - XPMineNameplateTableViewCellDelegate +- (void)xPMineNameplateTableViewCell:(XPMineNameplateTableViewCell *)view nameplateId:(NSString *)nameplateId { + [self.presenter useNameplate:nameplateId]; +} + +#pragma mark - XPMineHeadwearTableViewCellDelegate +- (void)xPMineHeadwearTableViewCell:(XPMineHeadwearTableViewCell *)view headwearId:(NSString *)headwearId { + [self.presenter useHeader:headwearId]; +} +#pragma mark - XPMineCarTableViewCellDelegate +- (void)xPMineCarTableViewCell:(XPMineCarTableViewCell *)cell carId:(NSString *)carId { + [self.presenter useCar:carId]; +} + +#pragma mark - XPMineDressUpProtocol +- (void)getUserHeadwearListSuccess:(NSArray *)array { + self.datasource = array; + [self.tableView reloadData]; +} + +- (void)getUserCarListSuccess:(NSArray *)array { + self.datasource = array; + [self.tableView reloadData]; +} + +- (void)getUserNameplateListSuccess:(NSArray *)array { + self.datasource = array; + [self.tableView reloadData]; +} + +- (void)useHeadwearSuccess:(NSString *)headWearId { + [self.presenter getUserHeadwearList]; + [self showSuccessToast:headWearId.integerValue == 0 ? @"取消使用头饰成功" : @"头饰使用成功"]; + +} + +- (void)useCarSuccess:(NSString *)carId { + [self.presenter getUserCarList]; + [self showSuccessToast:carId.integerValue == 0 ? @"取消使用座驾成功" : @"座驾使用成功"]; +} + +- (void)useNameplateSuccess:(NSString *)nameplateId { + [self.presenter getUserNameplateList]; + [self showSuccessToast:nameplateId.integerValue == 0 ? @"取消使用铭牌成功" : @"铭牌使用成功"]; } #pragma mark - JXCategoryListContentViewDelegate - (UIView *)listView { return self.view; } +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.datasource.count > 0 ? self.datasource.count : 1; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return self.datasource.count > 0 ? 120 : (KScreenHeight - kNavigationHeight - 100 -50); +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if (self.datasource.count > 0) { + if (self.type == DressUpListType_HeadWear) { + XPMineHeadwearTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])]; + if (cell == nil) { + cell = [[XPMineHeadwearTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])]; + } + cell.headwearModel = [self.datasource objectAtIndex:indexPath.row]; + cell.delegate = self; + return cell; + } else if(self.type == DressUpListType_Car) { + XPMineCarTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineCarTableViewCell class])]; + if (cell == nil) { + cell = [[XPMineCarTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])]; + } + cell.carInfo = [self.datasource objectAtIndex:indexPath.row]; + cell.delegate = self; + return cell; + } else { + XPMineNameplateTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])]; + if (cell == nil) { + cell = [[XPMineNameplateTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])]; + } + cell.nameplateModel = [self.datasource objectAtIndex:indexPath.row]; + cell.delegate = self; + return cell; + } + } + + XPMineDressEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])]; + if (cell == nil) { + cell = [[XPMineDressEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])]; + } + cell.emptyTitle = self.type == DressUpListType_HeadWear ? @"亲爱的用户,你还没有头饰噢!" : self.type == DressUpListType_Car ? @"亲爱的用户,你还没有座驾噢!" : @"亲爱的用户,你还没有铭牌噢!"; + return cell; +} + #pragma mark - Getters And Setters - (void)setType:(DressUpListType)type { _type = type; - + switch (type) { + case DressUpListType_HeadWear: + [self.presenter getUserHeadwearList]; + break; + case DressUpListType_Car: + [self.presenter getUserCarList]; + break; + case DressUpListType_Nameplate: + [self.presenter getUserNameplateList]; + break; + + default: + break; + } } - (UITableView *)tableView { if (!_tableView) { - _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; _tableView.delegate = self; _tableView.dataSource = self; _tableView.tableFooterView = [UIView new]; @@ -40,6 +174,10 @@ if (@available(iOS 11.0, *)) { _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } + [_tableView registerClass:[XPMineNameplateTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])]; + [_tableView registerClass:[XPMineCarTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])]; + [_tableView registerClass:[XPMineHeadwearTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])]; + [_tableView registerClass:[XPMineDressEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])]; } return _tableView; } diff --git a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m index 57d2bad3..d83dec9b 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m @@ -50,6 +50,7 @@ #pragma mark - Private Method - (void)initSubViews { + self.title = @"我的装扮"; [self.view addSubview:self.cycleScrollView]; [self.view addSubview:self.titleView]; [self.view addSubview:self.contentView]; @@ -79,6 +80,11 @@ [Api dressupBannerList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { if (code == 200) { NSArray * array = [ActivityInfoModel modelsWithArray:data.data]; + if (array.count <= 0) { + [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(0); + }]; + } if (array.count <=0) return; self.activityList = array; NSMutableArray * picList = [NSMutableArray array]; @@ -94,6 +100,10 @@ } else { [self.cycleScrollView setAutoScroll:NO]; } + } else { + [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(0); + }]; } } type:@"3"]; } @@ -112,6 +122,13 @@ return self.nameplateView; } +// 点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,不关心具体是点击还是滚动选中的。 +- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index { + // 侧滑手势处理 + self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0); +} + +#pragma mark - SDCycleScrollViewDelegate - (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { if (self.activityList.count > index) { ActivityInfoModel * info = [self.activityList objectAtIndex:index]; @@ -153,6 +170,7 @@ - (JXCategoryListContainerView *)contentView { if (!_contentView) { _contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self]; + _contentView.scrollView.backgroundColor = [UIColor clearColor]; _contentView.defaultSelectedIndex = 0; } return _contentView; @@ -192,12 +210,10 @@ _cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; _cycleScrollView.currentPageDotColor = [UIColor whiteColor]; _cycleScrollView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.15]; - _cycleScrollView.currentPageDotImage = [UIImage imageNamed:@"room_activity_banner_select"]; - _cycleScrollView.pageDotImage = [UIImage imageNamed:@"room_activity_banner_normal"]; _cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00]; - _cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit; - _cycleScrollView.pageControlBottomOffset = -20; - _cycleScrollView.hidden = YES; + _cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill; + _cycleScrollView.layer.masksToBounds = YES; + _cycleScrollView.layer.cornerRadius = 12; } return _cycleScrollView; } diff --git a/xplan-ios/Main/Mine/View/XPMineViewController.m b/xplan-ios/Main/Mine/View/XPMineViewController.m index c7be05bb..024f10fa 100644 --- a/xplan-ios/Main/Mine/View/XPMineViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineViewController.m @@ -30,6 +30,7 @@ #import "XPMineRechargeViewController.h" #import "XPWebViewController.h" #import "XPRoomViewController.h" +#import "XPMineDressUpViewController.h" @interface XPMineViewController () @@ -147,6 +148,12 @@ [XPRoomViewController openRoom:roomUid viewController:self]; } break; + case XPMineItemType_My_Dressup: + { + XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init]; + [self.navigationController pushViewController:dressUpVC animated:YES]; + } + break; default: break; }