From c4c9b1871f8c79d8e147d39d14d92d3b13b1d0cf Mon Sep 17 00:00:00 2001 From: chenguilong <598604202@qq.com> Date: Sat, 7 May 2022 17:58:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BC=E7=89=A9=E9=9D=A2=E6=9D=BF=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=91=A8=E6=98=9F=E7=A4=BC=E7=89=A9tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xplan-ios.xcodeproj/project.pbxproj | 12 ++ .../Contents.json | 22 +++ .../gift_bar_weekStar_arrow@2x.png | Bin 0 -> 366 bytes .../gift_bar_weekStar_arrow@3x.png | Bin 0 -> 466 bytes .../Contents.json | 22 +++ .../gift_bar_weekStar_button@2x.png | Bin 0 -> 3042 bytes .../gift_bar_weekStar_button@3x.png | Bin 0 -> 4978 bytes xplan-ios/Global/XPHtmlUrl.h | 2 + xplan-ios/Global/XPHtmlUrl.m | 3 +- .../SendGiftView/Model/GiftInfoModel.h | 10 + .../Model/XPWeekStarRankUserModel.h | 29 +++ .../Model/XPWeekStarRankUserModel.m | 12 ++ .../SendGiftView/Presenter/XPGiftPresenter.m | 2 + .../SendGiftView/ThemeColor+SendGift.h | 4 +- .../SendGiftView/ThemeColor+SendGift.m | 8 +- .../SendGiftView/View/XPGiftInfoView.h | 4 + .../SendGiftView/View/XPGiftInfoView.m | 87 +++++++-- .../SendGiftView/View/XPSendGiftView.m | 9 + .../SendGiftView/View/XPWeekStarInfoView.h | 32 ++++ .../SendGiftView/View/XPWeekStarInfoView.m | 178 ++++++++++++++++++ .../Main/Room/Presenter/XPRoomPresenter.m | 2 + 21 files changed, 419 insertions(+), 19 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/gift_bar_weekStar_arrow@2x.png create mode 100644 xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/gift_bar_weekStar_arrow@3x.png create mode 100644 xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_button.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_button.imageset/gift_bar_weekStar_button@2x.png create mode 100644 xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_button.imageset/gift_bar_weekStar_button@3x.png create mode 100644 xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.h create mode 100644 xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.m create mode 100644 xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.h create mode 100644 xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.m diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 3622168c..9ba372fd 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -151,6 +151,8 @@ 9B33E3CE27D8540C003B0E62 /* XPVoiceCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B33E3CD27D8540C003B0E62 /* XPVoiceCardViewController.m */; }; 9B33E3D427D8A1A4003B0E62 /* XPSkillCardPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B33E3D327D8A1A4003B0E62 /* XPSkillCardPlayerManager.m */; }; 9B3A1DF4280571000058E2DD /* XPAnchorPKInviteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B3A1DF3280571000058E2DD /* XPAnchorPKInviteView.m */; }; + 9B41D36E282649230048C588 /* XPWeekStarRankUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B41D36D282649230048C588 /* XPWeekStarRankUserModel.m */; }; + 9B41D37128264E320048C588 /* XPWeekStarInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B41D37028264E320048C588 /* XPWeekStarInfoView.m */; }; 9B4D148127E485EB000AA0C1 /* XPRoomTrumpetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B4D148027E485EB000AA0C1 /* XPRoomTrumpetView.m */; }; 9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B5BF8A727E1BED1005DD346 /* Api+RoomTrumpet.m */; }; 9B5F1503280FF02600C3C2B1 /* anchorPk_crossPking.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9B5F1502280FF02600C3C2B1 /* anchorPk_crossPking.svga */; }; @@ -1016,6 +1018,10 @@ 9B33E3D327D8A1A4003B0E62 /* XPSkillCardPlayerManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardPlayerManager.m; sourceTree = ""; }; 9B3A1DF2280571000058E2DD /* XPAnchorPKInviteView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorPKInviteView.h; sourceTree = ""; }; 9B3A1DF3280571000058E2DD /* XPAnchorPKInviteView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorPKInviteView.m; sourceTree = ""; }; + 9B41D36C282649230048C588 /* XPWeekStarRankUserModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPWeekStarRankUserModel.h; sourceTree = ""; }; + 9B41D36D282649230048C588 /* XPWeekStarRankUserModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPWeekStarRankUserModel.m; sourceTree = ""; }; + 9B41D36F28264E320048C588 /* XPWeekStarInfoView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPWeekStarInfoView.h; sourceTree = ""; }; + 9B41D37028264E320048C588 /* XPWeekStarInfoView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPWeekStarInfoView.m; sourceTree = ""; }; 9B4D147F27E485EB000AA0C1 /* XPRoomTrumpetView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTrumpetView.h; sourceTree = ""; }; 9B4D148027E485EB000AA0C1 /* XPRoomTrumpetView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomTrumpetView.m; sourceTree = ""; }; 9B5BF8A627E1BED1005DD346 /* Api+RoomTrumpet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+RoomTrumpet.h"; sourceTree = ""; }; @@ -4511,6 +4517,8 @@ E8DACCFD27673F870052092C /* GiftValueInfoModel.m */, 9B208A342779B50100F9E54A /* GiftNobleInfoModel.h */, 9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */, + 9B41D36C282649230048C588 /* XPWeekStarRankUserModel.h */, + 9B41D36D282649230048C588 /* XPWeekStarRankUserModel.m */, ); path = Model; sourceTree = ""; @@ -4538,6 +4546,8 @@ E8788947273A55D000BF1D57 /* XPGiftBarView.m */, E890BC0B273D09A50007C46B /* XPGiftCountView.h */, E890BC0C273D09A50007C46B /* XPGiftCountView.m */, + 9B41D36F28264E320048C588 /* XPWeekStarInfoView.h */, + 9B41D37028264E320048C588 /* XPWeekStarInfoView.m */, ); path = View; sourceTree = ""; @@ -6646,6 +6656,7 @@ E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */, E877A7EE278428FB00EFACED /* MicroDatingProgressView.m in Sources */, E8C6FFE32754F349004DC9F0 /* XPSearchListTableViewCell.m in Sources */, + 9B41D37128264E320048C588 /* XPWeekStarInfoView.m in Sources */, E87A27032758BC81002DDC7A /* XPRoomSearchContainerViewController.m in Sources */, E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */, 18EE3FEE2750CE6D00A452BF /* NIMMessageUtils.m in Sources */, @@ -6673,6 +6684,7 @@ E8C1CD7627D8AE3D00376F83 /* XPRoomFacePresenter.m in Sources */, 18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */, E8899C7F27853B6A007944BE /* DatingMicroView.m in Sources */, + 9B41D36E282649230048C588 /* XPWeekStarRankUserModel.m in Sources */, E8E5E19A27C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m in Sources */, E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */, 9BCE6147277D665600CC0358 /* XPReleaseRadioCellModel.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/Contents.json b/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/Contents.json new file mode 100644 index 00000000..02803230 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gift_bar_weekStar_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gift_bar_weekStar_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/gift_bar_weekStar_arrow@2x.png b/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_arrow.imageset/gift_bar_weekStar_arrow@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e565cc5d31e634e652fb0cc61edc396bd746c95b GIT binary patch literal 366 zcmeAS@N?(olHy`uVBq!ia0vp^d_XM1!3-q3ZvT-3QWXI{A+A9B_pQF~H+z3v>-}@P z|M$(_pEr8HU+MjHyzke|zMnUGzF+V8dA%2?=FhD@Ao=rV->(}$H9bJ}zpevO&ySnk zK#hNH^#aBJfV6;g{Q?{K>t@f_YdzmC_kO$6`{imE(1ic@C;q+N_y6t$wPfk{K)Y2+ zg8YIRUYRQX`F&S~WnV)S&$oM*XHKbhx7QbVckjsd)r+#T;{&W@C34f}i38O)db&7< zNL((R5GmAbz~e0J6r_=@S#n?d_V@jY_7hmrKHQhS`N_j;ri*KGOqB++TEeM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C! z-MxGF7NV#K?zs4f&wM24jW(lP=1aA%1du*c5M>e4D%=aBV;2xiRV|2=rt}~C^zdST zAtN29 zf|)SSC!bL+94*zYoshCJ>9L-|uVESVMx*hu9-wrH@kS8vthCh1W^>`fxds-G-y4eu zL3(XYh>g|Ns0gW!8ay5e2!$*m zz*VD=qtXfBGC0yr;lCrmwhVs&e184=DU%!6y=FRKZ)enXuflj!qzg-(O zC=GVV9U?+O$+(ZGG`b1Nd=Q9OWvYY#p@1tu2crNkL2B`+df1!-g7*Rhb-Lca>?K>Ms-j3kH#A15|(|NyCOCl9bUo9GFd`z4V*t8t^rwD*Rt+q z_XzDag-5&^ej2NPd^D_(&v|*D@7~QbS_qc>O&)^m=-(5=Ix%F)tF_vWAPAT|70!sU zf#h?>(Dn*Kv<*(YsCFn-|1rc*6Mji5V3@bsCT(LJy=f(kUGHf#vz zP$MCmrY;=i1A>yLG8)^i(^awm0y;oY+YJ_CtuSd!TH4HZjEdw%LJpo91_GZo6}UJT zFW!S;yFPy_D%y$tLzgw0{C5wt2Se-NyLZ>JuA_qn$okFu_wU}lLx*};{)ezNInIk= zPSfsnCR5zVhA4s!<*@5$2EeTj$p(7-D+nC00%Z!_%YX)T{}1GH1^lu3in`$gTC^BH zq(zG%@ScqpAM|De!L88%%>gR*FI31E=z)3-N$Pna8=gKY`4b;1HINz}PW1^7_h}s- kz6T8oy@Px7XpRQ>2^;^s)UBCO5C8xG07*qoM6N<$f=kAB7ytkO literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_button.imageset/gift_bar_weekStar_button@3x.png b/xplan-ios/Assets.xcassets/Gift/gift_bar_weekStar_button.imageset/gift_bar_weekStar_button@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..7b83356ba421400abf28f103a4e6217dc5b95828 GIT binary patch literal 4978 zcmV-&6OHVNP)0O)dTNv9?Vx`})WJ`?C1%yZ`*$w@fhp_^tl? zvj6(9|NgfB`?Bf7i~aiT|NXN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x6Yr&||^ zg(4s6H3&$xSS~O;0!Mb*8e3Qr=RF~GTQdFuyfSlg2&?DtwXy^TYBGynZ})UmRkeG1 zdORJ~h^jkr_u#_mWzj-jYwwax8BUH=2SQZsqN(puG6^Bo`BG@q#|=6{C{Pg%2S>yG zpT2(m4;Z9(fY84aJRjcOw6^ZqTN)pUcj2|mujqx%NyHh#Y@&X2CNPImS%j=HsnUf8>*{_xD22zInr%(djx98+! z2jks2#k-3CA3S)EMRj5p{C`4v<}N4|v(lkjj7}VjmjapaN6a|T3XlTa^-tn4`H|@S`1rTev*UAs^lW(Ll#uv# zP7Zvg;1;75;0ZG0XJH3sHoTz8&W5}F7egWuL;U~19Eur&egg#dh6acPhT;?83zHc+ w3K+s1H7YTZISRIkiK7B-kUb7akHmNQ3n$P;0> #import "GiftNobleInfoModel.h" +#import "XPWeekStarRankUserModel.h" NS_ASSUME_NONNULL_BEGIN //礼物类型 @@ -15,6 +16,7 @@ typedef NS_ENUM(NSUInteger, GiftType) { GiftType_Lucky = 3, // 福袋礼物 GiftType_LuckyPool = 5, //福袋奖池礼物 GiftType_Noble = 7, // 贵族礼物 + GiftType_WeekStar = 8, //周星礼物 }; //礼物类型 @@ -102,6 +104,14 @@ typedef NS_ENUM(NSUInteger, RoomSendGiftType) { ///贵族礼物专属信息 @property (nonatomic, strong) GiftNobleInfoModel *giftVipInfo; +/*----------周星礼物--------*/ +///上周周星礼物ID +@property (nonatomic, assign) NSInteger lastGiftId; +///上周对应礼物的魅力榜第一 +@property (nonatomic, strong) XPWeekStarRankUserModel *firstCharmRankUser; +///上周对应礼物豪气榜第一 +@property (nonatomic, strong) XPWeekStarRankUserModel *firstLevelRankUser; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.h b/xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.h new file mode 100644 index 00000000..75aa03f1 --- /dev/null +++ b/xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.h @@ -0,0 +1,29 @@ +// +// XPCharmRankUserModel.h +// xplan-ios +// +// Created by GreenLand on 2022/5/7. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPWeekStarRankUserModel : NSObject + +///头像 +@property (nonatomic, copy) NSString *avatar; +///榜单值 +@property (nonatomic, assign) NSInteger amount; +///uid +@property (nonatomic, assign) NSInteger uid; +///二般号 +@property (nonatomic, assign) NSInteger erbanNo; +///昵称 +@property (nonatomic, copy) NSString *nick; +///礼物id +@property (nonatomic, assign) NSInteger giftId; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.m b/xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.m new file mode 100644 index 00000000..80f601c9 --- /dev/null +++ b/xplan-ios/Main/ModuleKit/SendGiftView/Model/XPWeekStarRankUserModel.m @@ -0,0 +1,12 @@ +// +// XPCharmRankUserModel.m +// xplan-ios +// +// Created by GreenLand on 2022/5/7. +// + +#import "XPWeekStarRankUserModel.h" + +@implementation XPWeekStarRankUserModel + +@end diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/Presenter/XPGiftPresenter.m b/xplan-ios/Main/ModuleKit/SendGiftView/Presenter/XPGiftPresenter.m index a04dd2e3..95d48a27 100644 --- a/xplan-ios/Main/ModuleKit/SendGiftView/Presenter/XPGiftPresenter.m +++ b/xplan-ios/Main/ModuleKit/SendGiftView/Presenter/XPGiftPresenter.m @@ -48,11 +48,13 @@ NSArray *vipGift = [GiftInfoModel modelsWithArray:data.data[@"vipGift"]]; // 贵族礼物 NSArray *luckyPoolGift = [GiftInfoModel modelsWithArray:data.data[@"luckyPoolGift"]];// 福袋奖池礼物 NSArray *normalGift = [GiftInfoModel modelsWithArray:data.data[@"normalGift"]]; // 普通面板礼物 + NSArray *weekStarGift = [GiftInfoModel modelsWithArray:data.data[@"weekStarGift"]]; // 周星礼物 NSMutableArray *info = [NSMutableArray array]; NSMutableArray *totalInfo = [NSMutableArray array]; [info addObjectsFromArray:luckyBagGift]; [info addObjectsFromArray:vipGift]; [info addObjectsFromArray:normalGift]; + [info addObjectsFromArray:weekStarGift]; [totalInfo addObjectsFromArray:info]; [totalInfo addObjectsFromArray:luckyPoolGift]; ///把礼物信息保存一下 diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.h b/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.h index 9ac789dc..c6e50d8d 100644 --- a/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.h +++ b/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.h @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN + (UIColor *)giftBalanceColor; /// 送礼物 分页指示器的颜色 + (UIColor *)giftPageIndicatorColor; -/// 分段控制器文字默认的颜色 #0C0B0C +/// 分段控制器文字默认的颜色 #999999 + (UIColor *)giftSegmentNormalTitleColor; -/// 分段控制器文字选中的颜色 #FFFFFF +/// 分段控制器文字选中的颜色 #FFBC51 + (UIColor *)giftSegmentSelectTitleColor; /// 礼物选中的时候的颜色 0xFF903E + (UIColor *)giftNameSelectColor; diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.m b/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.m index 32db6ef6..95ed9da5 100644 --- a/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.m +++ b/xplan-ios/Main/ModuleKit/SendGiftView/ThemeColor+SendGift.m @@ -32,13 +32,13 @@ + (UIColor *)giftPageIndicatorColor { return [UIColor whiteColor]; } -/// 分段控制器文字默认的颜色 #0C0B0C +/// 分段控制器文字默认的颜色 #999999 + (UIColor *)giftSegmentNormalTitleColor { - return UIColorRGBAlpha(0xFFFFFF, 0.3); + return UIColorRGBAlpha(0x999999, 1); } -/// 分段控制器文字选中的颜色 #FFFFFF +/// 分段控制器文字选中的颜色 #FFBC51 + (UIColor *)giftSegmentSelectTitleColor { - return UIColorRGBAlpha(0xFFFFFF, 1); + return UIColorRGBAlpha(0xFFBC51, 1); } /// 礼物选中的时候的颜色 0xFF903E + (UIColor *)giftNameSelectColor { diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.h b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.h index 6b29ddac..c8559a6b 100644 --- a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.h +++ b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.h @@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, GiftSegmentType) { GiftSegmentType_Normal = 1, ///普通的礼物 GiftSegmentType_Lucky,///幸运礼物 GiftSegmentType_Noble,///贵族礼物 + GiftSegmentType_WeekStar, ///周星礼物 GiftSegmentType_Pack,///背包礼物 }; @@ -30,6 +31,9 @@ typedef NS_ENUM(NSInteger, GiftSegmentType) { ///点击了贵族特权 - (void)xPGiftInfoViewDidClickNobleEntrance:(XPGiftInfoView *)view; +///点击了周星榜 +- (void)xpGiftInfoViewDidClickWeekStarRank:(XPGiftInfoView *)view; + @end @interface XPGiftInfoView : UIView diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.m b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.m index 21529f89..566fa769 100644 --- a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.m +++ b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPGiftInfoView.m @@ -18,7 +18,9 @@ #import "XPGiftItemCollectionViewCell.h" #import "XPGiftEmptyCollectionViewCell.h" #import "XPGiftCollectionViewFlowLayout.h" -@interface XPGiftInfoView () +#import "XPWeekStarInfoView.h" + +@interface XPGiftInfoView () /// @property (nonatomic,strong) UIStackView *segmentStackView; ///普通礼物 @@ -29,6 +31,8 @@ @property (nonatomic,strong) UIButton *luckyGiftButton; ///贵族礼物 @property (nonatomic,strong) UIButton *nobleGiftButton; +///周星礼物 +@property (nonatomic, strong) UIButton *weekStarButton; ///占位的 @property (nonatomic,strong) UIView * segmentPlaceView; ///玩法规则的 @@ -39,6 +43,8 @@ @property (nonatomic, strong) UIButton *nobleButton; /// @property (nonatomic,strong) UIStackView *giftStackView; +///周星榜用户信息 +@property (nonatomic, strong) XPWeekStarInfoView *weekStarView; ///l礼物列表 @property (nonatomic,strong) UICollectionView *giftcollectionView; ///分页控件 @@ -51,6 +57,8 @@ @property (nonatomic,strong) NSArray *giftLuckyArray; ///贵族礼物的数据源 @property (nonatomic, strong) NSArray *giftNobleArray; +///周星礼物的数据源 +@property (nonatomic, strong) NSArray *giftWeekStarArray; /////背包礼物的数据源 @property (nonatomic,strong) NSArray *giftPackArray; ///总的价值 @@ -79,6 +87,7 @@ self.luckyGiftButton.selected = NO; self.nobleGiftButton.selected = NO; self.packGiftButton.selected = NO; + self.weekStarButton.selected = NO; sender.selected = !sender.selected; self.segmentType = sender.tag; } @@ -113,11 +122,14 @@ [self.segmentStackView addArrangedSubview:self.normalGiftButton]; [self.segmentStackView addArrangedSubview:self.luckyGiftButton]; [self.segmentStackView addArrangedSubview:self.nobleGiftButton]; + [self.segmentStackView addArrangedSubview:self.weekStarButton]; [self.segmentStackView addArrangedSubview:self.packGiftButton]; [self.segmentStackView addArrangedSubview:self.segmentPlaceView]; [self.segmentStackView addArrangedSubview:self.playRuleButton]; [self.segmentStackView addArrangedSubview:self.totalValueLabel]; [self.segmentStackView addArrangedSubview:self.nobleButton]; + ///周星榜信息 + [self addSubview:self.weekStarView]; ///礼物 [self.giftStackView addArrangedSubview:self.giftcollectionView]; [self.giftStackView addArrangedSubview:self.pageController]; @@ -125,18 +137,24 @@ - (void)initSubViewConstraints { [self mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.mas_equalTo(40 + 108 * 2 + 10 + 10); + make.height.mas_equalTo(30 + 108 * 2 + 10 + 10 + 25); }]; - - [self.segmentStackView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.mas_equalTo(self).inset(15); - make.top.mas_equalTo(self); - make.height.mas_equalTo(40); - }]; + + [self.segmentStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self).inset(15); + make.top.mas_equalTo(self); + make.height.mas_equalTo(30); + }]; + + [self.weekStarView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self).inset(15); + make.top.mas_equalTo(self.segmentStackView.mas_bottom); + make.height.mas_equalTo(25); + }]; [self.giftStackView mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.segmentStackView.mas_bottom); + make.top.mas_equalTo(self.weekStarView.mas_bottom); make.left.right.mas_equalTo(self); make.height.mas_equalTo(108 * 2 + 20); }]; @@ -191,6 +209,10 @@ } self.playRuleButton.hidden = giftInfo.giftExplainUrl.length <= 0; giftInfo.isSelected = YES; + if (self.segmentType == GiftSegmentType_WeekStar) { + self.weekStarView.firstCharmRankUser = giftInfo.firstCharmRankUser; + self.weekStarView.firstLevelRankUser = giftInfo.firstLevelRankUser; + } } // 根据礼物id查找 @@ -252,6 +274,13 @@ } } +#pragma mark - XPWeekStarInfoViewDelegate +- (void)xPWeekStarInfoViewRankButtonClick { + if (self.delegate && [self.delegate respondsToSelector:@selector(xpGiftInfoViewDidClickWeekStarRank:)]) { + [self.delegate xpGiftInfoViewDidClickWeekStarRank:self]; + } +} + #pragma mark - Getters And Setters - (void)setSegmentType:(GiftSegmentType)segmentType { if (segmentType == _segmentType) { @@ -263,8 +292,10 @@ [self resetSelectGift:self.packOriginArray]; [self resetSelectGift:self.giftLuckyArray]; [self resetSelectGift:self.giftNobleArray]; + [self resetSelectGift:self.giftWeekStarArray]; self.totalValueLabel.hidden = YES; self.nobleButton.hidden = YES; + self.weekStarView.hidden = YES; switch (_segmentType) { case GiftSegmentType_Normal: [self.datasource addObjectsFromArray:self.giftArray]; @@ -272,9 +303,15 @@ case GiftSegmentType_Lucky: [self.datasource addObjectsFromArray:self.giftLuckyArray]; break; - case GiftSegmentType_Noble: + case GiftSegmentType_Noble: { [self.datasource addObjectsFromArray:self.giftNobleArray]; self.nobleButton.hidden = NO; + } + break; + case GiftSegmentType_WeekStar: { + [self.datasource addObjectsFromArray:self.giftWeekStarArray]; + self.weekStarView.hidden = NO; + } break; case GiftSegmentType_Pack: { @@ -314,6 +351,7 @@ NSMutableArray * luckyArray = [NSMutableArray array]; NSMutableArray * normaleArray = [NSMutableArray array]; NSMutableArray * nobleArray = [NSMutableArray array]; + NSMutableArray * weekStarArray = [NSMutableArray array]; [_normalOriginArray enumerateObjectsUsingBlock:^(GiftInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { if (obj.giftType == GiftType_Lucky) { [luckyArray addObject:obj]; @@ -321,11 +359,14 @@ [normaleArray addObject:obj]; } else if (obj.giftType == GiftType_Noble) { [nobleArray addObject:obj]; + } else if (obj.giftType == GiftType_WeekStar) { + [weekStarArray addObject:obj]; } }]; self.giftArray = normaleArray; self.giftLuckyArray = luckyArray; self.giftNobleArray = nobleArray; + self.giftWeekStarArray = weekStarArray; self.segmentType = GiftSegmentType_Normal; } @@ -362,6 +403,14 @@ return _giftStackView; } +- (XPWeekStarInfoView *)weekStarView { + if (!_weekStarView) { + _weekStarView = [[XPWeekStarInfoView alloc] init]; + _weekStarView.delegate = self; + } + return _weekStarView; +} + - (UIButton *)normalGiftButton { if (!_normalGiftButton) { _normalGiftButton = [UIButton buttonWithType:UIButtonTypeCustom]; @@ -379,7 +428,7 @@ - (UIButton *)luckyGiftButton { if (!_luckyGiftButton) { _luckyGiftButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_luckyGiftButton setTitle:@"幸运礼物" forState:UIControlStateNormal]; + [_luckyGiftButton setTitle:@"幸运" forState:UIControlStateNormal]; [_luckyGiftButton setTitleColor:[ThemeColor giftSegmentSelectTitleColor] forState:UIControlStateSelected]; [_luckyGiftButton setTitleColor:[ThemeColor giftSegmentNormalTitleColor] forState:UIControlStateNormal]; _luckyGiftButton.titleLabel.font = [UIFont systemFontOfSize:14]; @@ -393,7 +442,7 @@ - (UIButton *)nobleGiftButton { if (!_nobleGiftButton) { _nobleGiftButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_nobleGiftButton setTitle:@"贵族礼物" forState:UIControlStateNormal]; + [_nobleGiftButton setTitle:@"贵族" forState:UIControlStateNormal]; [_nobleGiftButton setTitleColor:[ThemeColor giftSegmentSelectTitleColor] forState:UIControlStateSelected]; [_nobleGiftButton setTitleColor:[ThemeColor giftSegmentNormalTitleColor] forState:UIControlStateNormal]; _nobleGiftButton.titleLabel.font = [UIFont systemFontOfSize:14]; @@ -404,6 +453,20 @@ return _nobleGiftButton; } +- (UIButton *)weekStarButton { + if (!_weekStarButton) { + _weekStarButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_weekStarButton setTitle:@"周星" forState:UIControlStateNormal]; + [_weekStarButton setTitleColor:[ThemeColor giftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_weekStarButton setTitleColor:[ThemeColor giftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _weekStarButton.titleLabel.font = [UIFont systemFontOfSize:14]; + _weekStarButton.tag = GiftSegmentType_WeekStar; + _weekStarButton.selected = NO; + [_weekStarButton addTarget:self action:@selector(didClickGiftSegmentAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _weekStarButton; +} + - (UIButton *)packGiftButton { if (!_packGiftButton) { _packGiftButton = [UIButton buttonWithType:UIButtonTypeCustom]; diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPSendGiftView.m b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPSendGiftView.m index 2aaf33a9..bced12f8 100644 --- a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPSendGiftView.m +++ b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPSendGiftView.m @@ -15,6 +15,7 @@ #import "TTPopup.h" #import "ThemeColor+SendGift.h" #import "StatisticsServiceHelper.h" +#import "XPHtmlUrl.h" ///Model #import "GiftInfoModel.h" #import "XPGiftCountModel.h" @@ -358,6 +359,14 @@ [self.delegate.getCurrentNav pushViewController:nobleVC animated:YES]; } +- (void)xpGiftInfoViewDidClickWeekStarRank:(XPGiftInfoView *)view { + [self dismissViewControllerAnimated:YES completion:nil]; + XPWebViewController * webVC = [[XPWebViewController alloc] init]; + webVC.roomUid = self.roomUid; + webVC.url = URLWithType(kNewWeekStarURL); + [self.delegate.getCurrentNav pushViewController:webVC animated:YES]; +} + #pragma mark - XPGiftProtocol - (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo { self.giftBarView.walletInfoModel = balanceInfo; diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.h b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.h new file mode 100644 index 00000000..a5b6bfc9 --- /dev/null +++ b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.h @@ -0,0 +1,32 @@ +// +// XPWeekStarInfoView.h +// xplan-ios +// +// Created by GreenLand on 2022/5/7. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class XPWeekStarRankUserModel; + +@protocol XPWeekStarInfoViewDelegate + +///周星榜点击 +- (void)xPWeekStarInfoViewRankButtonClick; + +@end + +@interface XPWeekStarInfoView : UIView + +///上周对应礼物的魅力榜第一 +@property (nonatomic, strong) XPWeekStarRankUserModel *firstCharmRankUser; +///上周对应礼物豪气榜第一 +@property (nonatomic, strong) XPWeekStarRankUserModel *firstLevelRankUser; + +@property (nonatomic, weak) id delegate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.m b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.m new file mode 100644 index 00000000..01363d90 --- /dev/null +++ b/xplan-ios/Main/ModuleKit/SendGiftView/View/XPWeekStarInfoView.m @@ -0,0 +1,178 @@ +// +// XPWeekStarInfoView.m +// xplan-ios +// +// Created by GreenLand on 2022/5/7. +// + +#import "XPWeekStarInfoView.h" +///Third +#import +///Tool +#import "XPMacro.h" +#import "ThemeColor+SendGift.h" +///Model +#import "XPWeekStarRankUserModel.h" + +@interface XPWeekStarInfoView() + +///冠名者标题 +@property (nonatomic, strong) UILabel *charmTitleLabel; +///神豪标题 +@property (nonatomic, strong) UILabel *contributeTitleLabel; +///冠名者 +@property (nonatomic, strong) UILabel *charmLabel; +///神豪 +@property (nonatomic, strong) UILabel *contributeLabel; +///周星版入口 +@property (nonatomic, strong) UIButton *entranceButton; +///箭头 +@property (nonatomic, strong) UIImageView *arrowImageView; + +@end + +@implementation XPWeekStarInfoView + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.charmTitleLabel]; + [self addSubview:self.contributeTitleLabel]; + [self addSubview:self.charmLabel]; + [self addSubview:self.contributeLabel]; + [self addSubview:self.entranceButton]; + [self addSubview:self.arrowImageView]; +} + +- (void)initSubViewConstraints { + [self.charmTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.mas_equalTo(0); + make.height.mas_equalTo(14); + }]; + [self.charmLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.charmTitleLabel.mas_right); + make.centerY.mas_equalTo(self.charmTitleLabel); + }]; + + [self.contributeTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.charmLabel.mas_right).mas_offset(16); + make.centerY.mas_equalTo(self.charmTitleLabel); + }]; + + [self.contributeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contributeTitleLabel.mas_right); + make.centerY.mas_equalTo(self.charmTitleLabel); + }]; + + [self.entranceButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.arrowImageView.mas_left).mas_offset(-4); + make.width.mas_equalTo(48); + make.height.mas_equalTo(14); + make.centerY.mas_equalTo(self.charmTitleLabel); + }]; + [self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(0); + make.width.mas_equalTo(7); + make.height.mas_equalTo(10); + make.centerY.mas_equalTo(self.charmTitleLabel); + }]; +} + +#pragma mark - events +- (void)didClickWeekStarRank:(UIButton *)sender { + if (self.delegate && [self.delegate respondsToSelector:@selector(xPWeekStarInfoViewRankButtonClick)]) { + [self.delegate xPWeekStarInfoViewRankButtonClick]; + } +} + +#pragma mark - getter and setter +- (void)setFirstCharmRankUser:(XPWeekStarRankUserModel *)firstCharmRankUser { + NSString *nickStr = firstCharmRankUser.nick; + if (firstCharmRankUser.nick.length > 5) { + nickStr = [NSString stringWithFormat:@"%@…", [firstCharmRankUser.nick substringToIndex:5]]; + } else if(!firstCharmRankUser.nick.length) { + nickStr = @""; + } + self.charmLabel.text = nickStr; +} + +- (void)setFirstLevelRankUser:(XPWeekStarRankUserModel *)firstLevelRankUser { + NSString *nickStr = firstLevelRankUser.nick; + if (firstLevelRankUser.nick.length > 5) { + nickStr = [NSString stringWithFormat:@"%@…", [firstLevelRankUser.nick substringToIndex:5]]; + } else if(!firstLevelRankUser.nick.length) { + nickStr = @""; + } + self.contributeLabel.text = nickStr; +} + +- (UILabel *)charmTitleLabel { + if (!_charmTitleLabel) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [ThemeColor giftSegmentNormalTitleColor]; + label.text = @"本周冠名者:"; + _charmTitleLabel = label; + } + return _charmTitleLabel; +} + +- (UILabel *)contributeTitleLabel { + if (!_contributeTitleLabel) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [ThemeColor giftSegmentNormalTitleColor]; + label.text = @"周星神豪:"; + _contributeTitleLabel = label; + } + return _contributeTitleLabel; +} + +- (UILabel *)charmLabel { + if (!_charmLabel) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [ThemeColor giftSegmentSelectTitleColor]; + _charmLabel = label; + } + return _charmLabel; +} + +- (UILabel *)contributeLabel { + if (!_contributeLabel) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [ThemeColor giftSegmentSelectTitleColor]; + _contributeLabel = label; + } + return _contributeLabel; +} + +- (UIButton *)entranceButton { + if (!_entranceButton) { + _entranceButton = [UIButton buttonWithType:UIButtonTypeCustom]; + _entranceButton.adjustsImageWhenHighlighted = NO; + [_entranceButton setBackgroundImage:[UIImage imageNamed:@"gift_bar_weekStar_button"] forState:UIControlStateNormal]; + [_entranceButton addTarget:self action:@selector(didClickWeekStarRank:) forControlEvents:UIControlEventTouchUpInside]; + } + return _entranceButton; +} + +- (UIImageView *)arrowImageView { + if (!_arrowImageView) { + _arrowImageView = [[UIImageView alloc] init]; + _arrowImageView.image = [UIImage imageNamed:@"gift_bar_weekStar_arrow"]; + } + return _arrowImageView; +} + +@end diff --git a/xplan-ios/Main/Room/Presenter/XPRoomPresenter.m b/xplan-ios/Main/Room/Presenter/XPRoomPresenter.m index 63dbecc3..8c452c4a 100644 --- a/xplan-ios/Main/Room/Presenter/XPRoomPresenter.m +++ b/xplan-ios/Main/Room/Presenter/XPRoomPresenter.m @@ -152,12 +152,14 @@ NSArray *vipGift = [GiftInfoModel modelsWithArray:data.data[@"vipGift"]]; // 贵族礼物 NSArray *luckyPoolGift = [GiftInfoModel modelsWithArray:data.data[@"luckyPoolGift"]];// 福袋奖池礼物 NSArray *normalGift = [GiftInfoModel modelsWithArray:data.data[@"normalGift"]]; // 普通面板礼物 + NSArray *weekStarGift = [GiftInfoModel modelsWithArray:data.data[@"weekStarGift"]]; // 周星礼物 //TODO: luckyPoolGift 这个就是福袋礼物的所有的数据 只要保存这个就行了吧 以后需要改 NSMutableArray *info = [NSMutableArray array]; NSMutableArray *totalInfo = [NSMutableArray array]; [info addObjectsFromArray:luckyBagGift]; [info addObjectsFromArray:vipGift]; [info addObjectsFromArray:normalGift]; + [info addObjectsFromArray:weekStarGift]; [totalInfo addObjectsFromArray:info]; [totalInfo addObjectsFromArray:luckyPoolGift]; ///把礼物信息保存一下