diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index eab1da22..189d7f8c 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -169,10 +169,6 @@ 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 */; }; @@ -220,6 +216,10 @@ E87A26FD27587E17002DDC7A /* HomeTagModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26FC27587E17002DDC7A /* HomeTagModel.m */; }; E87A270027588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26FF27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m */; }; E87A27032758BC81002DDC7A /* XPRoomSearchContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A27022758BC81002DDC7A /* XPRoomSearchContainerViewController.m */; }; + E87E91492796674800A7B3F2 /* HeadwearModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E91452796674800A7B3F2 /* HeadwearModel.m */; }; + E87E914A2796674800A7B3F2 /* NameplateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E91472796674800A7B3F2 /* NameplateModel.m */; }; + E87E914B2796674800A7B3F2 /* CarModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E91482796674800A7B3F2 /* CarModel.m */; }; + E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E914D2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m */; }; E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E884C36B2743951B00E1EBED /* GiftReceiveInfoModel.m */; }; E884C36F2743AAC800E1EBED /* AttachmentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E884C36E2743AAC800E1EBED /* AttachmentModel.m */; }; E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = E884C3712743AEDE00E1EBED /* CustomAttachmentDecoder.m */; }; @@ -691,14 +691,6 @@ 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 = ""; }; @@ -798,6 +790,14 @@ E87A26FF27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeListEmptyCollectionViewCell.m; sourceTree = ""; }; E87A27012758BC81002DDC7A /* XPRoomSearchContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomSearchContainerViewController.h; sourceTree = ""; }; E87A27022758BC81002DDC7A /* XPRoomSearchContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomSearchContainerViewController.m; sourceTree = ""; }; + E87E91432796674800A7B3F2 /* HeadwearModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeadwearModel.h; sourceTree = ""; }; + E87E91442796674800A7B3F2 /* CarModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CarModel.h; sourceTree = ""; }; + E87E91452796674800A7B3F2 /* HeadwearModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeadwearModel.m; sourceTree = ""; }; + E87E91462796674800A7B3F2 /* NameplateModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NameplateModel.h; sourceTree = ""; }; + E87E91472796674800A7B3F2 /* NameplateModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NameplateModel.m; sourceTree = ""; }; + E87E91482796674800A7B3F2 /* CarModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CarModel.m; sourceTree = ""; }; + E87E914C2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineDressEmptyTableViewCell.h; sourceTree = ""; }; + E87E914D2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineDressEmptyTableViewCell.m; sourceTree = ""; }; E884C36A2743951B00E1EBED /* GiftReceiveInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftReceiveInfoModel.h; sourceTree = ""; }; E884C36B2743951B00E1EBED /* GiftReceiveInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftReceiveInfoModel.m; sourceTree = ""; }; E884C36D2743AAC800E1EBED /* AttachmentModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AttachmentModel.h; sourceTree = ""; }; @@ -1293,7 +1293,6 @@ 189DD52A26DE255300AB55B1 /* Products */, D09C770DC30B9BAAEAFC7945 /* Pods */, BFB922F5D81845AC32D1E1ED /* Frameworks */, - E8B35A5E27912E83005F8318 /* Recovered References */, ); sourceTree = ""; }; @@ -2032,12 +2031,12 @@ E83953272769FFF100CF2F24 /* Model */ = { isa = PBXGroup; children = ( - E82D5C6E276AE60000858D6D /* HeadwearModel.h */, - E82D5C6F276AE60000858D6D /* HeadwearModel.m */, - E82D5C71276AE94800858D6D /* CarModel.h */, - E82D5C72276AE94800858D6D /* CarModel.m */, - E82D5C74276AEB5100858D6D /* NameplateModel.h */, - E82D5C75276AEB5100858D6D /* NameplateModel.m */, + E87E91442796674800A7B3F2 /* CarModel.h */, + E87E91482796674800A7B3F2 /* CarModel.m */, + E87E91432796674800A7B3F2 /* HeadwearModel.h */, + E87E91452796674800A7B3F2 /* HeadwearModel.m */, + E87E91462796674800A7B3F2 /* NameplateModel.h */, + E87E91472796674800A7B3F2 /* NameplateModel.m */, ); path = Model; sourceTree = ""; @@ -2054,14 +2053,14 @@ E8395336276A0C9400CF2F24 /* Cell */ = { isa = PBXGroup; children = ( + E87E914C2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.h */, + E87E914D2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m */, E8395337276A0CC100CF2F24 /* XPMineHeadwearTableViewCell.h */, E8395338276A0CC100CF2F24 /* XPMineHeadwearTableViewCell.m */, E839533A276A0CCD00CF2F24 /* XPMineCarTableViewCell.h */, E839533B276A0CCD00CF2F24 /* XPMineCarTableViewCell.m */, E839533D276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.h */, E839533E276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.m */, - E82D5C6B276ADCE700858D6D /* XPMineDressEmptyTableViewCell.h */, - E82D5C6C276ADCE700858D6D /* XPMineDressEmptyTableViewCell.m */, ); path = Cell; sourceTree = ""; @@ -2610,13 +2609,6 @@ path = StageView; sourceTree = ""; }; - E8B35A5E27912E83005F8318 /* Recovered References */ = { - isa = PBXGroup; - children = ( - ); - name = "Recovered References"; - sourceTree = ""; - }; E8B825BC26E9E520009E8E9F /* Model */ = { isa = PBXGroup; children = ( @@ -3311,10 +3303,10 @@ 18AAF3F0279EA59300CD7DAD /* MessageContentTextClickable.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 */, + E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */, 9B7D804D27537950003DAC0C /* MessageCell.m in Sources */, 18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */, E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */, @@ -3326,6 +3318,7 @@ 18486235271EB794005FC5DC /* AgoraRtcImpl.m in Sources */, E8A1E454276208E500B294CA /* CandyTreeInfoModel.m in Sources */, 184862CE27213FD7005FC5DC /* ZegoRtcImpl.m in Sources */, + E87E914A2796674800A7B3F2 /* NameplateModel.m in Sources */, 9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */, E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */, E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */, @@ -3362,7 +3355,6 @@ 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 */, @@ -3379,7 +3371,6 @@ 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 */, @@ -3393,6 +3384,7 @@ E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */, E8E7DAEB2745158500C631CC /* XPGiftUserInfoModel.m in Sources */, E83DB487274670DA00D8CBD1 /* XPRoomGiftBroadCastModel.m in Sources */, + E87E914B2796674800A7B3F2 /* CarModel.m in Sources */, E8AC722C26F49580007D6E91 /* XPMineNotificaViewController.m in Sources */, 189DD52E26DE255300AB55B1 /* AppDelegate.m in Sources */, E83DB4842746661800D8CBD1 /* XPRoomGiftBroadcastView.m in Sources */, @@ -3462,6 +3454,7 @@ E8AEAEED27141AE20017FCE0 /* XPRoomBackContainerView.m in Sources */, E88B5CC126FB407B00DA9178 /* XPMineUserInfoViewController.m in Sources */, 18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */, + E87E91492796674800A7B3F2 /* HeadwearModel.m in Sources */, E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */, 189DD74026E21C3F00AB55B1 /* YYUtility+App.m in Sources */, 189DD74526E21CCC00AB55B1 /* YYReachability.m in Sources */, @@ -3477,7 +3470,6 @@ 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 */, 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 14dc7ae3..9bf76d72 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.h +++ b/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.h @@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN /// @param uid uid + (void)useCar:(HttpRequestHelperCompletion)completion carId:(NSString *)carId ticket:(NSString *)ticket uid:(NSString *)uid; -/// 使用座驾 +/// 使用铭牌 /// @param completion 完成 /// @param userNameplateId 座驾id 0 取消使用座驾 /// @param ticket ticket 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 e9c7c749..9cc190b0 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.m +++ b/xplan-ios/Main/Mine/View/DressUp/Api/Api+DressUp.m @@ -51,7 +51,7 @@ [self makeRequest:@"car/carport/use" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, carId, ticket, uid, nil]; } -/// 使用座驾 +/// 使用铭牌 /// @param completion 完成 /// @param userNameplateId 座驾id 0 取消使用座驾 /// @param ticket ticket diff --git a/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m b/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m index 377d962f..cbc19c99 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m +++ b/xplan-ios/Main/Mine/View/DressUp/Presenter/XPMineDressUpPresenter.m @@ -76,5 +76,4 @@ [[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 eb5e6420..95a094f3 100644 --- a/xplan-ios/Main/Mine/View/DressUp/Protocol/XPMineDressUpProtocol.h +++ b/xplan-ios/Main/Mine/View/DressUp/Protocol/XPMineDressUpProtocol.h @@ -10,7 +10,6 @@ NS_ASSUME_NONNULL_BEGIN @protocol XPMineDressUpProtocol - ///获取用户头饰列表成功 - (void)getUserHeadwearListSuccess:(NSArray *)array; ///获取用户头饰列表成功 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 e816262b..f06d5df2 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineHeadwearTableViewCell.m @@ -19,16 +19,20 @@ #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) UIStackView *nameStackView; ///名字 @property (nonatomic, strong) UILabel *titleLabel; -///还有多少时间 -@property (nonatomic,strong) UIStackView *timeStackView; ///状态icon @property (nonatomic, strong) UIImageView *timeImageView; +/// +@property (nonatomic,strong) UIStackView *timeStackView; ///剩余天数 @property (nonatomic, strong) UILabel *timeLabel; ///使用 @@ -74,6 +78,7 @@ } - (void)initSubViewConstraints { + [self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.height.width.mas_equalTo(80); make.centerY.mas_equalTo(self.contentView); @@ -212,6 +217,49 @@ return _headWearImageView; } +#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]; +// +//} + +#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]; + } + return _namePlateImageView;; +} + - (UILabel *)titleLabel { if (!_titleLabel) { _titleLabel = [[UILabel alloc] init]; 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 11de59f6..9473d536 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/Cell/XPMineNameplateTableViewCell.m @@ -16,6 +16,8 @@ #import "NameplateModel.h" @interface XPMineNameplateTableViewCell () +///铭牌图片的背景 +@property (nonatomic, strong) UIView *backView; ///铭牌 @property (nonatomic, strong) NetImageView *namePlateImageView; ///名字 @@ -54,10 +56,10 @@ [self.contentView addSubview:self.lineView]; [self.timeStackView addArrangedSubview:self.timeImageView]; [self.timeStackView addArrangedSubview:self.timeLabel]; - } - (void)initSubViewConstraints { + [self.namePlateImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(60); make.width.mas_equalTo(100); @@ -94,7 +96,6 @@ } #pragma mark - private - - (void)setNameplateModel:(NameplateModel *)nameplateModel { _nameplateModel = nameplateModel; if (_nameplateModel) { @@ -130,6 +131,39 @@ } #pragma mark - Getter && Setter +//- (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]; +// +//} + +#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]; diff --git a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m index 2efabeed..ecf20ec0 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpListViewController.m @@ -162,7 +162,6 @@ break; } } - - (UITableView *)tableView { if (!_tableView) { _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; diff --git a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m index 56a120be..25f067fb 100644 --- a/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m +++ b/xplan-ios/Main/Mine/View/DressUp/View/XPMineDressUpViewController.m @@ -84,8 +84,8 @@ [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(0); }]; + return; } - if (array.count <=0) return; self.activityList = array; NSMutableArray * picList = [NSMutableArray array]; [array enumerateObjectsUsingBlock:^(ActivityInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {