15 Commits

Author SHA1 Message Date
liyuhua
d253678194 图标更换 2024-02-04 20:18:50 +08:00
liyuhua
ec19603963 图标更换 2024-02-04 20:18:50 +08:00
liyuhua
75a9190038 更换图标 2024-02-04 20:18:50 +08:00
liyuhua
d93ba98ce6 修复bug 2024-02-04 20:18:50 +08:00
liyuhua
5e127155a1 图标更换 2024-02-04 20:18:50 +08:00
liyuhua
731d897985 图标更换 2024-02-04 20:18:49 +08:00
liyuhua
0a5c2f39d0 图标更换 2024-02-04 20:18:49 +08:00
liyuhua
804d865f4f 更换图标 2024-02-04 20:18:49 +08:00
liyuhua
5cdbcc4ebb 企业包发版 此commit置顶 2.1.0 2024-02-04 20:18:16 +08:00
liyuhua
d6e4ef4f1c 企业包发版 此commit置顶 2.1.0 2024-02-04 16:42:39 +08:00
liyuhua
c9f073f3ac 企业包发版 此commit置顶 2.1.0 2024-02-04 16:40:06 +08:00
liyuhua
aa6c0f03ec 修复bug 2024-02-04 11:56:45 +08:00
liyuhua
67ae3508fa 修复bug 2024-01-31 10:43:03 +08:00
liyuhua
910cb0ab0e 音萌。2.2.0版本开发 2024-01-30 16:46:31 +08:00
liyuhua
6d42c9bc74 房间 2024-01-12 21:27:28 +08:00
105 changed files with 2473 additions and 694 deletions

View File

@@ -131,6 +131,10 @@
18F404BB2760982000A6C548 /* ChatLimitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F404BA2760982000A6C548 /* ChatLimitModel.m */; };
18F404C3276098F100A6C548 /* Api+Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F404C2276098F100A6C548 /* Api+Message.m */; };
18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F404C827609A4300A6C548 /* MessagePresenter.m */; };
230017E72B6357F70034A86C /* MewUnlockGiftBroadcastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 230017E62B6357F70034A86C /* MewUnlockGiftBroadcastView.m */; };
230017EA2B635A790034A86C /* MewUnlockGiftBroadcastViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 230017E92B635A790034A86C /* MewUnlockGiftBroadcastViewCell.m */; };
230017ED2B639C8D0034A86C /* MewUnlockGiftModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 230017EC2B639C8D0034A86C /* MewUnlockGiftModel.m */; };
230017F02B639E730034A86C /* MewUnlockBaseGiftModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 230017EF2B639E730034A86C /* MewUnlockBaseGiftModel.m */; };
230496ED2A6E1EE0006D1F0C /* XPPrivilegeCardVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 230496EC2A6E1EE0006D1F0C /* XPPrivilegeCardVC.m */; };
230496F02A6E1F1F006D1F0C /* XPPrivilegeCardPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 230496EF2A6E1F1F006D1F0C /* XPPrivilegeCardPresenter.m */; };
230496F32A6E229B006D1F0C /* XPPrivilegeCardItemVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 230496F22A6E229B006D1F0C /* XPPrivilegeCardItemVC.m */; };
@@ -184,6 +188,8 @@
231EBB5D2B358C4C006F782E /* MewMainHomeGameTabModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 231EBB5C2B358C4C006F782E /* MewMainHomeGameTabModel.m */; };
232153DD2AF381E400B2FBC0 /* MovEncodeToMpegTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 232153DC2AF381E400B2FBC0 /* MovEncodeToMpegTool.m */; };
232153E02AF394BF00B2FBC0 /* XPPrivilegeCardVideoItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 232153DF2AF394BF00B2FBC0 /* XPPrivilegeCardVideoItemModel.m */; };
23494A012B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23494A002B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.m */; };
23494A042B68DCBC00655D8A /* XPMineDataGiftHeadCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23494A032B68DCBC00655D8A /* XPMineDataGiftHeadCell.m */; };
236FF06C2AF8892400BEB6EC /* XPClientH5UresModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 236FF06B2AF8892400BEB6EC /* XPClientH5UresModel.m */; };
237B89DC2A931479005DB380 /* XPMineUserGameVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B89DB2A931479005DB380 /* XPMineUserGameVC.m */; };
237B89DF2A933F52005DB380 /* XPMineUserGameCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B89DE2A933F52005DB380 /* XPMineUserGameCell.m */; };
@@ -1650,6 +1656,14 @@
18F404C6276099DF00A6C548 /* MessageProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageProtocol.h; sourceTree = "<group>"; };
18F404C727609A4300A6C548 /* MessagePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessagePresenter.h; sourceTree = "<group>"; };
18F404C827609A4300A6C548 /* MessagePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessagePresenter.m; sourceTree = "<group>"; };
230017E52B6357F70034A86C /* MewUnlockGiftBroadcastView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUnlockGiftBroadcastView.h; sourceTree = "<group>"; };
230017E62B6357F70034A86C /* MewUnlockGiftBroadcastView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUnlockGiftBroadcastView.m; sourceTree = "<group>"; };
230017E82B635A790034A86C /* MewUnlockGiftBroadcastViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUnlockGiftBroadcastViewCell.h; sourceTree = "<group>"; };
230017E92B635A790034A86C /* MewUnlockGiftBroadcastViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUnlockGiftBroadcastViewCell.m; sourceTree = "<group>"; };
230017EB2B639C8D0034A86C /* MewUnlockGiftModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUnlockGiftModel.h; sourceTree = "<group>"; };
230017EC2B639C8D0034A86C /* MewUnlockGiftModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUnlockGiftModel.m; sourceTree = "<group>"; };
230017EE2B639E730034A86C /* MewUnlockBaseGiftModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUnlockBaseGiftModel.h; sourceTree = "<group>"; };
230017EF2B639E730034A86C /* MewUnlockBaseGiftModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUnlockBaseGiftModel.m; sourceTree = "<group>"; };
230496EB2A6E1EE0006D1F0C /* XPPrivilegeCardVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardVC.h; sourceTree = "<group>"; };
230496EC2A6E1EE0006D1F0C /* XPPrivilegeCardVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardVC.m; sourceTree = "<group>"; };
230496EE2A6E1F1F006D1F0C /* XPPrivilegeCardPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardPresenter.h; sourceTree = "<group>"; };
@@ -1751,6 +1765,10 @@
232153DC2AF381E400B2FBC0 /* MovEncodeToMpegTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MovEncodeToMpegTool.m; sourceTree = "<group>"; };
232153DE2AF394BF00B2FBC0 /* XPPrivilegeCardVideoItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardVideoItemModel.h; sourceTree = "<group>"; };
232153DF2AF394BF00B2FBC0 /* XPPrivilegeCardVideoItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardVideoItemModel.m; sourceTree = "<group>"; };
234949FF2B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDataSkillCardCollectionViewCell.h; sourceTree = "<group>"; };
23494A002B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineDataSkillCardCollectionViewCell.m; sourceTree = "<group>"; };
23494A022B68DCBC00655D8A /* XPMineDataGiftHeadCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDataGiftHeadCell.h; sourceTree = "<group>"; };
23494A032B68DCBC00655D8A /* XPMineDataGiftHeadCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineDataGiftHeadCell.m; sourceTree = "<group>"; };
236FF06A2AF8892400BEB6EC /* XPClientH5UresModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPClientH5UresModel.h; sourceTree = "<group>"; };
236FF06B2AF8892400BEB6EC /* XPClientH5UresModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPClientH5UresModel.m; sourceTree = "<group>"; };
237B89DA2A931479005DB380 /* XPMineUserGameVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineUserGameVC.h; sourceTree = "<group>"; };
@@ -7760,6 +7778,10 @@
E8A3538428FD67320014A784 /* GiftLuckyBroadcastModel.m */,
E8D4DE452940473500EC788D /* GiftTwelveStarFirstModel.h */,
E8D4DE462940473500EC788D /* GiftTwelveStarFirstModel.m */,
230017EB2B639C8D0034A86C /* MewUnlockGiftModel.h */,
230017EC2B639C8D0034A86C /* MewUnlockGiftModel.m */,
230017EE2B639E730034A86C /* MewUnlockBaseGiftModel.h */,
230017EF2B639E730034A86C /* MewUnlockBaseGiftModel.m */,
);
path = Model;
sourceTree = "<group>";
@@ -7793,6 +7815,10 @@
E8901CF528B38D89001E9A92 /* XPGraffitiGiftView.m */,
9B4D449128F15765002572D5 /* XPGiftLuckyGiftBroadcastView.h */,
9B4D449228F15765002572D5 /* XPGiftLuckyGiftBroadcastView.m */,
230017E52B6357F70034A86C /* MewUnlockGiftBroadcastView.h */,
230017E62B6357F70034A86C /* MewUnlockGiftBroadcastView.m */,
230017E82B635A790034A86C /* MewUnlockGiftBroadcastViewCell.h */,
230017E92B635A790034A86C /* MewUnlockGiftBroadcastViewCell.m */,
9B4D449428F15EE7002572D5 /* XPGiftWeekStarBroadcastView.h */,
9B4D449528F15EE7002572D5 /* XPGiftWeekStarBroadcastView.m */,
E8D4DE422940462C00EC788D /* XPGiftTwelveStarBroadcastView.h */,
@@ -9994,12 +10020,16 @@
E8B846C126FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m */,
E8D34D4828080335009C4835 /* XPMineDataSkillCardTableViewCell.h */,
E8D34D4928080335009C4835 /* XPMineDataSkillCardTableViewCell.m */,
234949FF2B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.h */,
23494A002B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.m */,
E8D34D512808037E009C4835 /* XPMineDataSkillDataCollectionViewCell.h */,
E8D34D522808037E009C4835 /* XPMineDataSkillDataCollectionViewCell.m */,
E8D34D4B28080351009C4835 /* XPMineDataClanTableViewCell.h */,
E8D34D4C28080351009C4835 /* XPMineDataClanTableViewCell.m */,
E8D34D4E28080362009C4835 /* XPMineDataGiftTableViewCell.h */,
E8D34D4F28080362009C4835 /* XPMineDataGiftTableViewCell.m */,
23494A022B68DCBC00655D8A /* XPMineDataGiftHeadCell.h */,
23494A032B68DCBC00655D8A /* XPMineDataGiftHeadCell.m */,
E8D34D5428080393009C4835 /* XPMineDataGiftCollectionViewCell.h */,
E8D34D5528080393009C4835 /* XPMineDataGiftCollectionViewCell.m */,
E8D34D6528084E88009C4835 /* XPMineUserInfoGiftWallCollectionViewCell.h */,
@@ -10404,6 +10434,7 @@
E8E0DAE0285C20E500566A2F /* MessageContentFindNewGreetView.m in Sources */,
E8A3540128FEAC5E0014A784 /* XPWishGiftTableViewCell.m in Sources */,
E8A86E0427BA38DB001C21F9 /* SudCommon.m in Sources */,
230017ED2B639C8D0034A86C /* MewUnlockGiftModel.m in Sources */,
E8EEB90326FC31DC007C6EBA /* XPMineUserInfoProtocol.h in Sources */,
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */,
E8E859C228264C2300EE4857 /* HTTPErrorResponse.m in Sources */,
@@ -10429,6 +10460,7 @@
E824545E26F5EF2200BE8163 /* XPMineVerifIdentityProtocol.h in Sources */,
E824545326F5CEAD00BE8163 /* XPMineModifPayProtocol.h in Sources */,
E84BF7D7277C6E2100EF8877 /* XPRoomRoleViewController.m in Sources */,
230017E72B6357F70034A86C /* MewUnlockGiftBroadcastView.m in Sources */,
E8AB631328ADDCF20023B0D2 /* XPMonentsTopicHeaderView.m in Sources */,
9B86D886281942D200494FCD /* SocialMicroView.m in Sources */,
E8664ED027E42238000171BA /* XPRoomPKTimePickerView.m in Sources */,
@@ -10550,6 +10582,7 @@
9BEE3D0E27853BD000C83219 /* ThemeColor+NobleCenter.m in Sources */,
231EBB1A2B329B10006F782E /* MewHomeManager.m in Sources */,
E8998D7A2859784200C68558 /* XPSVGAPlayer.m in Sources */,
23494A012B68DA4B00655D8A /* XPMineDataSkillCardCollectionViewCell.m in Sources */,
9BD9A18427A0F128004186FE /* XPMineVisitorItemModel.m in Sources */,
E852D73E28631C18001465ED /* XPMonentsCommentTableViewCell.m in Sources */,
E80B0712280D0A6700A79F63 /* FansInfoModel.m in Sources */,
@@ -10998,6 +11031,7 @@
E8DAC5AC2858305A00012CFD /* XPRoomMessageBubbleView.m in Sources */,
E8A6C29F27CF5FE500AC7442 /* HomeLiveRoomModel.m in Sources */,
E8B9843028AB90200022D026 /* XPMoentsTopicListView.m in Sources */,
230017EA2B635A790034A86C /* MewUnlockGiftBroadcastViewCell.m in Sources */,
E84150B827747B8B00A7F548 /* XPFirstRechargeViewController.m in Sources */,
9BBC02872786D75C0007C24B /* XPNobleUpgradeLevelView.m in Sources */,
E8E20BDE28164D3A0033B688 /* SessionNavView.m in Sources */,
@@ -11387,6 +11421,7 @@
E84150BF27747BD300A7F548 /* Api+FirstRecharge.m in Sources */,
E8E859CF28264C2300EE4857 /* DDNumber.m in Sources */,
E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */,
23494A042B68DCBC00655D8A /* XPMineDataGiftHeadCell.m in Sources */,
E8C6FFDD2754CF5D004DC9F0 /* HomeRecommendRoomModel.m in Sources */,
E852D73B286317F0001465ED /* XPMonentsDetailViewController.m in Sources */,
14C1F15729B874FB000A960F /* XPMineMoreItemTableViewCell.m in Sources */,
@@ -11405,6 +11440,7 @@
E887531929BB26680017A41A /* CandyTreeMoreItemModel.m in Sources */,
E8E859C628264C2300EE4857 /* HTTPAsyncFileResponse.m in Sources */,
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */,
230017F02B639E730034A86C /* MewUnlockBaseGiftModel.m in Sources */,
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */,
9BD2ECDA288F867000F5CD9A /* XPMineFootPrintTableViewCell.m in Sources */,
E8001635280410BD00D6D17A /* XPGuildIncomeSectionView.m in Sources */,
@@ -11633,7 +11669,7 @@
CODE_SIGN_ENTITLEMENTS = "xplan-ios/xplan-ios.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 48UCG35Q9W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -11649,7 +11685,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -11896,7 +11932,7 @@
CODE_SIGN_ENTITLEMENTS = "xplan-ios/xplan-iosRelease.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 48UCG35Q9W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -11912,7 +11948,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",

View File

@@ -31,7 +31,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 433 B

View File

@@ -109,14 +109,14 @@
break;
case 10111: //
[self.view hideHUD];
[[self getView] showRealNameAuthenticationTipsAlertView];
[[self getView] showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n保护您和他人的财产安全\n请先进行实名认证" isShowRoom:NO];
if (fail) {
fail(code, msg);
}
return;
case 10108: //
[self.view hideHUD];
[[self getView] showRealNameAuthenticationTipsAlertView];
[[self getView] showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n保护您和他人的财产安全\n请先进行实名认证" isShowRoom:NO];
if (fail) {
fail(code, msg);
}

View File

@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)accountCanceled:(NSDictionary *)data;
///实名认证弹窗
- (void)showRealNameAuthenticationTipsAlertView;
- (void)showRealNameAuthenticationTipsAlertView:(NSString *)text isShowRoom:(BOOL)isShowRoom;
///封禁账号
- (void)accountBanned:(BaseModel *)data;

View File

@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
- (__kindof T)createPresenter;
///实名认证弹窗
- (void)showRealNameAuthenticationTipsAlertView;
- (void)showRealNameAuthenticationTipsAlertView:(NSString *)text isShowRoom:(BOOL)isShowRoom;
@end
NS_ASSUME_NONNULL_END

View File

@@ -78,18 +78,36 @@
}
///
- (void)showRealNameAuthenticationTipsAlertView {
- (void)showRealNameAuthenticationTipsAlertView:(NSString *)text isShowRoom:(BOOL)isShowRoom{
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.message = @"为了营造更安全的网络环境\n保护您和他人的财产安全\n请先进行实名认证";
config.title = @"提示";
config.message = text;
config.messageLineSpacing = 4;
config.confirmButtonConfig.title = @"前往认证";
config.confirmButtonConfig.titleColor = UIColor.whiteColor;
config.confirmButtonConfig.backgroundColor = [ThemeColor appMainColor];
NSArray *configList ;
TTAlertMessageAttributedConfig *roomAtt = [[TTAlertMessageAttributedConfig alloc] init];
roomAtt.text = @"开通个人房间前";
roomAtt.color = [ThemeColor appMainColor];
TTAlertMessageAttributedConfig *nameAttrConf = [[TTAlertMessageAttributedConfig alloc] init];
nameAttrConf.text = @"实名认证";
nameAttrConf.color = [ThemeColor appMainColor];
config.messageAttributedConfig = @[nameAttrConf];
if(isShowRoom){
configList = @[roomAtt,nameAttrConf];
}else{
configList = @[nameAttrConf];
}
config.messageAttributedConfig = configList;
@kWeakify(self);
[TTPopup alertWithConfig:config confirmHandler:^{

View File

@@ -86,6 +86,8 @@ typedef NS_ENUM(NSUInteger, URLType) {
kXinZuoStarURL,
///特权卡
kPrivilegeCardURL,
///礼物等级说明
kGiftLevelURL,
};
NSString * const URLWithType(URLType type);

View File

@@ -55,6 +55,7 @@ NSString * const URLWithType(URLType type) {
@(kRedPacketRuleURL) : @"modules/rule/red-packet-rule.html",///
@(kXinZuoStarURL) : @"activity/act-constellation/index.html",///
@(kPrivilegeCardURL) : @"modules/rule/privilegeCardRule.html",///
@(kGiftLevelURL) : @"modules/rule/giftWallRule.html",///
};
NSString * url = [dic objectForKey:@(type)];
return [NSString stringWithFormat:@"%@/%@",prefix, url];

View File

@@ -136,6 +136,8 @@
<false/>
<key>linkedme_key</key>
<dict>
<key>New item</key>
<string>“音萌”需要您的同意,才可以访问进行拍照并上传您的图片,然后展示在您的个人主页上,便于他人查看</string>
<key>live</key>
<string>4e75ead0ff84424339dc8b0616e7094c</string>
</dict>

View File

@@ -274,7 +274,7 @@
}
} else {
if(code == 10108){
[self showRealNameAuthenticationTipsAlertView];
[self showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n在 开通个人房间前\n需要先进行实名认证" isShowRoom:YES];
return;
}
[XCHUDTool showErrorWithMessage:msg];

View File

@@ -116,7 +116,7 @@
}
} else {
if(code == 10108){
[self showRealNameAuthenticationTipsAlertView];
[self showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n在 开通个人房间前\n需要先进行实名认证" isShowRoom:YES];
return;
}
[XCHUDTool showErrorWithMessage:msg];

View File

@@ -179,7 +179,7 @@
}
} else {
if(code == 10108){
[self showRealNameAuthenticationTipsAlertView];
[self showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n在 开通个人房间前\n需要先进行实名认证" isShowRoom:YES];
return;
}
[XCHUDTool showErrorWithMessage:msg];

View File

@@ -233,6 +233,10 @@
if (code == 200) {
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
if (roomInfo.isReselect) {
if(self.mewInfoModel.isCertified == NO && [ClientConfig shareConfig].configInfo.certificationType > 0){
[self showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n在 开通个人房间前\n需要先进行实名认证" isShowRoom:YES] ;
return;
}
XPLittleGameRoomOpenView * roomOpenView = [[XPLittleGameRoomOpenView alloc] init];
roomOpenView.roomInfo = roomInfo;
roomOpenView.currentVC = self;
@@ -243,7 +247,7 @@
} else {
if(code == 10108 && self.mewInfoModel){
if(self.mewInfoModel.isCertified == NO){
[self showRealNameAuthenticationTipsAlertView];
[self showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n在 开通个人房间前\n需要先进行实名认证" isShowRoom:YES];
}
return;
}

View File

@@ -104,6 +104,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
CustomMessageType_Starred_Kitchen = 96,
///小时榜更新
CustomMessageType_Hour_Update = 97,
///礼物升级更新
CustomMessageType_UnlockGift_Update = 98,
///特权卡
CustomMessageType_Privilege_Card = 102,
///发起邀请
@@ -555,6 +557,13 @@ typedef NS_ENUM(NSInteger, CustomMessageHourUpdate) {
Custom_Message_Sub_Hour_Update = 971,
};
//解锁礼物升级 CustomMessageType_UnlockGift_Update
typedef NS_ENUM(NSInteger, CustomMessageUnlockGiftUpdate) {
Custom_Message_Sub_UnlockGift = 981,
Custom_Message_Sub_DressUpGift = 982,
};
///发起邀请 CustomMessageType_Initiat_Invitation

View File

@@ -200,7 +200,7 @@ UIKIT_EXTERN NSString * kUserCompleteInfoFinishKey;
if ([self.presenter getThirdUserInfo] && [self.presenter getThirdUserInfo].avatarUrl.length > 0) {
avatar = [self.presenter getThirdUserInfo].avatarUrl;
} else {
avatar = @"https://image.nnbc123.cn/default_avatar.png";
avatar = @"https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/default_avatar.png";
}
return avatar;
}

View File

@@ -80,6 +80,11 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
[self setUpConstraints];
[self setEvents];
[self loginAnimation];
NTESQuickLoginManager *qlManager = [NTESQuickLoginManager sharedInstance];
BOOL shouldQL = [qlManager shouldQuickLogin];
if (!shouldQL) {
[_loginButton setTitle:@"手机号登录" forState:UIControlStateNormal];
}
}
- (void)viewWillAppear:(BOOL)animated {
@@ -168,6 +173,9 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
make.bottom.mas_equalTo(self.authBubbleView).mas_offset(-6);
}];
//#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
// [self.appleButton mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(50);
@@ -245,7 +253,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
}
- (void)phoneQuickLogin {
[self showLoading];
// 使shouldQuickLogin
@weakify(self)
NTESQuickLoginManager *qlManager = [NTESQuickLoginManager sharedInstance];
@@ -254,6 +262,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
[self phoneQuickLoginFail];
return;
}
[self showLoading];
[qlManager registerWithBusinessID:KeyWithType(KeyType_NTESQuickLoginBusinessId) configURL:nil extData:nil];
[qlManager getPhoneNumberCompletion:^(NSDictionary * _Nonnull resultDic) {
@strongify(self)
@@ -298,7 +307,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
}
- (void)phoneQuickLoginFail {
[self showErrorToast:@"一键登录失败,请检查手机网络状态。"];
// [self showErrorToast:@"一键登录失败,请检查手机网络状态。"];
LoginPhoneViewController *inputPhoneVC = [[LoginPhoneViewController alloc] init];
[self.navigationController pushViewController:inputPhoneVC animated:YES];
}

View File

@@ -90,7 +90,7 @@
CGFloat desHeight = [model.desc boundingRectWithSize:CGSizeMake(240, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin
attributes:[self messageTextAttibutes:[UIFont systemFontOfSize:13] color:[ThemeColor mainTextColor]] context:nil].size.height;
attributes:[self messageTextAttibutes:[UIFont systemFontOfSize:13] color:[ThemeColor mainTextColor]] context:nil].size.height + 10;
[self.subTitleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(desHeight);
}];

View File

@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *picUrl;
///个数
@property (nonatomic,assign) NSInteger reciveCount;
@property(nonatomic,assign) int giftLevel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -8,10 +8,11 @@
#import "XPMineUserInfoEditPresenter.h"
///Api
#import "Api+Mine.h"
#import "NSMutableDictionary+Saft.h"
///Tool
#import "AccountInfoStorage.h"
#import "UploadImage.h"
#import "NSMutableDictionary+Saft.h"
///Model
#import "XPMineUserInfoEditModel.h"
#import "UserInfoModel.h"

View File

@@ -22,6 +22,7 @@
@property (nonatomic,strong) NetImageView *giftImageView;
///
@property (nonatomic,strong) UILabel *giftNumberLabel;
@end
@implementation XPMineDataGiftCollectionViewCell

View File

@@ -0,0 +1,26 @@
//
// XPMineDataGiftHeadCell.h
// xplan-ios
//
// Created by duoban on 2024/1/30.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class XPMineDataGiftHeadCell, UserGiftWallInfoModel;
@protocol XPMineDataGiftHeadCellDelegate <NSObject>
- (void)xPMineDataGiftHeadCell:(XPMineDataGiftHeadCell *)view didClickMore:(UIButton *)sender;
- (void)xPMineDataGiftHeadCell:(XPMineDataGiftHeadCell *)view didClickNormal:(UIButton *)sender;
- (void)xPMineDataGiftHeadCell:(XPMineDataGiftHeadCell *)view didClickLucky:(UIButton *)sender;
@end
@interface XPMineDataGiftHeadCell : UICollectionViewCell
@property(nonatomic,copy) NSString *userId;
///代理
@property (nonatomic,weak) id<XPMineDataGiftHeadCellDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,198 @@
//
// XPMineDataGiftHeadCell.m
// xplan-ios
//
// Created by duoban on 2024/1/30.
//
#import "XPMineDataGiftHeadCell.h"
@interface XPMineDataGiftHeadCell ()
@property (nonatomic,strong) UIButton *arrowButton;
///
@property (nonatomic,strong) UILabel *titleLabel;
@property(nonatomic,strong) UIImageView *tipsView;
@property(nonatomic,strong) UILabel *levelTitelView;
@property(nonatomic,strong) UIButton *normalGiftBtn;
@property(nonatomic,strong) UIButton *luckyGiftBtn;
@property(nonatomic,strong) UIView *lineView;
@property(nonatomic,strong) UIView *bgView;
@end
@implementation XPMineDataGiftHeadCell
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
self.contentView.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:self.bgView];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.tipsView];
[self.contentView addSubview:self.levelTitelView];
[self.contentView addSubview:self.arrowButton];
[self.contentView addSubview:self.normalGiftBtn];
[self.contentView addSubview:self.luckyGiftBtn];
[self.contentView addSubview:self.lineView];
}
-(void)installConstraints{
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.right.equalTo(self.contentView);
make.height.mas_equalTo(10);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).offset(12);
make.top.mas_equalTo(self.contentView).offset(18);
}];
[self.levelTitelView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-13);
make.centerY.equalTo(self.titleLabel);
}];
[self.tipsView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.levelTitelView.mas_left).mas_offset(-4);
make.centerY.equalTo(self.levelTitelView);
make.width.height.mas_equalTo(12);
}];
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(12);
make.left.equalTo(self.tipsView);
make.right.equalTo(self.levelTitelView);
make.centerY.equalTo(self.titleLabel);
}];
[self.normalGiftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(62);
make.right.equalTo(self.contentView.mas_centerX).mas_offset(-20);
make.width.mas_equalTo(58);
make.height.mas_equalTo(20);
}];
[self.luckyGiftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(62);
make.left.equalTo(self.contentView.mas_centerX).mas_offset(20);
make.width.mas_equalTo(58);
make.height.mas_equalTo(20);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(13);
make.height.mas_equalTo(4);
make.top.equalTo(self.normalGiftBtn.mas_bottom).mas_offset(1);
make.centerX.equalTo(self.normalGiftBtn);
}];
}
-(void)didClickBtnAction:(UIButton *)sender{
if(sender == self.normalGiftBtn){
self.normalGiftBtn.selected = YES;
self.luckyGiftBtn.selected = NO;
self.normalGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
self.luckyGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
[self.lineView.superview layoutIfNeeded];
[UIView animateWithDuration:0.5 animations:^{
[self.lineView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(13);
make.height.mas_equalTo(4);
make.top.equalTo(self.normalGiftBtn.mas_bottom).mas_offset(1);
make.centerX.equalTo(self.normalGiftBtn);
}];
}];
if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineDataGiftHeadCell:didClickNormal:)]){
[self.delegate xPMineDataGiftHeadCell:self didClickNormal:sender];
}
return;
}
self.normalGiftBtn.selected = NO;
self.luckyGiftBtn.selected = YES;
self.luckyGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
self.normalGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
[self.lineView.superview layoutIfNeeded];
[UIView animateWithDuration:0.5 animations:^{
[self.lineView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(13);
make.height.mas_equalTo(4);
make.top.equalTo(self.normalGiftBtn.mas_bottom).mas_offset(1);
make.centerX.equalTo(self.luckyGiftBtn);
}];
}];
if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineDataGiftHeadCell:didClickLucky:)]){
[self.delegate xPMineDataGiftHeadCell:self didClickLucky:sender];
}
}
-(void)arrowButtonAction:(UIButton *)sender{
if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineDataGiftHeadCell:didClickMore:)]){
[self.delegate xPMineDataGiftHeadCell:self didClickMore:sender];
}
}
#pragma mark -
- (UIButton *)normalGiftBtn{
if(!_normalGiftBtn){
_normalGiftBtn = [UIButton new];
[_normalGiftBtn setTitle:@"普通礼物" forState:UIControlStateNormal];
[_normalGiftBtn setTitleColor:UIColorFromRGB(0x2B2D33) forState:UIControlStateSelected];
[_normalGiftBtn setTitleColor:UIColorFromRGB(0xA2A7B8) forState:UIControlStateNormal];
_normalGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_normalGiftBtn.selected = YES;
[_normalGiftBtn addTarget:self action:@selector(didClickBtnAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _normalGiftBtn;
}
- (UIButton *)luckyGiftBtn{
if(!_luckyGiftBtn){
_luckyGiftBtn = [UIButton new];
[_luckyGiftBtn setTitle:@"幸运礼物" forState:UIControlStateNormal];
[_luckyGiftBtn setTitleColor:UIColorFromRGB(0x2B2D33) forState:UIControlStateSelected];
[_luckyGiftBtn setTitleColor:UIColorFromRGB(0xA2A7B8) forState:UIControlStateNormal];
_luckyGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
[_luckyGiftBtn addTarget:self action:@selector(didClickBtnAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _luckyGiftBtn;
}
- (UIImageView *)tipsView{
if(!_tipsView){
_tipsView = [UIImageView new];
_tipsView.image = kImage(@"mine_user_info_gift_tip_icon");
}
return _tipsView;
}
- (UILabel *)levelTitelView{
if(!_levelTitelView){
_levelTitelView = [UILabel labelInitWithText:@"礼物等级说明" font:[UIFont systemFontOfSize:11 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0xA2A7B8)];
}
return _levelTitelView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"礼物墙";
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
_titleLabel.textColor = [ThemeColor mainTextColor];
}
return _titleLabel;
}
- (UIButton *)arrowButton {
if (!_arrowButton) {
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_arrowButton addTarget:self action:@selector(arrowButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[_arrowButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
}
return _arrowButton;
}
- (UIView *)lineView{
if(!_lineView){
_lineView = [UIView new];
_lineView.backgroundColor = UIColorFromRGB(0xFFDA24);
_lineView.layer.cornerRadius = 2;
_lineView.layer.masksToBounds = YES;
}
return _lineView;
}
- (UIView *)bgView{
if(!_bgView){
_bgView = [UIView new];
_bgView.backgroundColor = UIColorFromRGB(0xF8F8FB);
}
return _bgView;
}
@end

View File

@@ -15,10 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface XPMineDataGiftTableViewCell : UITableViewCell
///礼物墙中的礼物
@property (nonatomic,strong) NSArray<UserGiftWallInfoModel *> *userGiftWall;
///礼物墙中的幸运礼物礼物
@property (nonatomic,strong) NSArray<UserGiftWallInfoModel *> *userLuckyBagGiftWall;
@property(nonatomic,copy) NSString *userId;
///代理
@property (nonatomic,weak) id<XPMineDataGiftTableViewCellDelegate> delegate;
@end

View File

@@ -25,6 +25,9 @@
@property (nonatomic,strong) UIImageView * backImageView;
///
@property (nonatomic,strong) UIButton *arrowButton;
@property(nonatomic,strong) UIImageView *tipsView;
@property(nonatomic,strong) UILabel *levelTitelView;
///
@property (nonatomic,strong) UILabel *titleLabel;
///
@@ -56,6 +59,8 @@
[self.contentView addSubview:self.backImageView];
[self.backImageView addSubview:self.titleLabel];
[self.backImageView addSubview:self.tipsView];
[self.backImageView addSubview:self.levelTitelView];
[self.backImageView addSubview:self.arrowButton];
[self.backImageView addSubview:self.titleView];
[self.backImageView addSubview:self.containerView];
@@ -72,11 +77,20 @@
make.left.mas_equalTo(self.backImageView).offset(15);
make.top.mas_equalTo(self.backImageView).offset(12);
}];
[self.levelTitelView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-13);
make.centerY.equalTo(self.titleLabel);
}];
[self.tipsView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.levelTitelView.mas_left).mas_offset(-4);
make.centerY.equalTo(self.levelTitelView);
make.width.height.mas_equalTo(12);
}];
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(13, 22));
make.centerY.mas_equalTo(self.titleView);
make.right.mas_equalTo(self.backImageView).offset(-15);
make.height.mas_equalTo(12);
make.left.equalTo(self.tipsView);
make.right.equalTo(self.levelTitelView);
make.centerY.equalTo(self.titleLabel);
}];
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -111,23 +125,10 @@
}
}
#pragma mark - Getters And Setters
- (void)setUserGiftWall:(NSArray<UserGiftWallInfoModel *> *)userGiftWall {
_userGiftWall = userGiftWall;
if (_userGiftWall.count > 12) {
NSMutableArray * array = [_userGiftWall mutableCopy];
_userGiftWall = [array subarrayWithRange:NSMakeRange(0, 12)];
}
self.normalGiftView.datasource = _userGiftWall;
}
- (void)setUserLuckyBagGiftWall:(NSArray<UserGiftWallInfoModel *> *)userLuckyBagGiftWall {
_userLuckyBagGiftWall = userLuckyBagGiftWall;
if (_userLuckyBagGiftWall.count > 12) {
NSMutableArray * array = [_userLuckyBagGiftWall mutableCopy];
_userLuckyBagGiftWall = [array subarrayWithRange:NSMakeRange(0, 12)];
}
self.luckyGiftView.datasource = _userLuckyBagGiftWall;
-(void)setUserId:(NSString *)userId{
_userId = userId;
self.normalGiftView.userId = _userId;
self.luckyGiftView.userId = _userId;
}
- (UIImageView *)backImageView {
@@ -152,8 +153,6 @@
- (UIButton *)arrowButton {
if (!_arrowButton) {
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
[_arrowButton addTarget:self action:@selector(arrowButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[_arrowButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
}
@@ -205,16 +204,28 @@
- (XPMineUserInfoGiftView *)normalGiftView {
if (!_normalGiftView) {
_normalGiftView = [[XPMineUserInfoGiftView alloc] init];
_normalGiftView = [[XPMineUserInfoGiftView alloc] initWithFrame:CGRectZero type:@"1"];
}
return _normalGiftView;
}
- (XPMineUserInfoGiftView *)luckyGiftView {
if (!_luckyGiftView) {
_luckyGiftView = [[XPMineUserInfoGiftView alloc] init];
_luckyGiftView = [[XPMineUserInfoGiftView alloc] initWithFrame:CGRectZero type:@"2"];;
}
return _luckyGiftView;
}
- (UIImageView *)tipsView{
if(!_tipsView){
_tipsView = [UIImageView new];
_tipsView.image = kImage(@"mine_user_info_gift_tip_icon");
}
return _tipsView;
}
- (UILabel *)levelTitelView{
if(!_levelTitelView){
_levelTitelView = [UILabel labelInitWithText:@"礼物等级说明" font:[UIFont systemFontOfSize:11 weight:UIFontWeightMedium] textColor:UIColorFromRGB(0xA2A7B8)];
}
return _levelTitelView;
}
@end

View File

@@ -0,0 +1,25 @@
//
// XPMineDataSkillCardCollectionViewCell.h
// xplan-ios
//
// Created by duoban on 2024/1/30.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class XPMineDataSkillCardCollectionViewCell, MineSkillCardListInfoModel;
@protocol XPMineDataSkillCardCollectionViewCell <NSObject>
- (void)xPMineDataSkillCardTableViewCell:(XPMineDataSkillCardCollectionViewCell *)view didSelectItem:(nullable MineSkillCardListInfoModel *)skillInfo;
@end
@interface XPMineDataSkillCardCollectionViewCell : UICollectionViewCell
@property (nonatomic,strong) NSArray *datasourece;
///代理
@property (nonatomic,weak) id<XPMineDataSkillCardCollectionViewCell> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,216 @@
//
// XPMineDataSkillCardCollectionViewCell.m
// xplan-ios
//
// Created by duoban on 2024/1/30.
//
#import "XPMineDataSkillCardCollectionViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "NSArray+Safe.h"
///View
#import "XPMineDataSkillDataCollectionViewCell.h"
@interface XPMineDataSkillCardCollectionViewCell()<UICollectionViewDelegate, UICollectionViewDataSource>
///
@property (nonatomic,strong) UIImageView * backImageView;
///
@property (nonatomic,strong) UILabel *titleLabel;
///
@property (nonatomic,strong) UICollectionView *collectionView;
///
@property (nonatomic,strong) UIView *emptyView;
///
@property (nonatomic,strong) UILabel *emptyLabel;
///
@property (nonatomic,strong) UIImageView *arrowImageView;
@property(nonatomic,strong) UIView *bgView;
@end
@implementation XPMineDataSkillCardCollectionViewCell
-(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.contentView addSubview:self.bgView];
[self.contentView addSubview:self.backImageView];
[self.backImageView addSubview:self.titleLabel];
[self.backImageView addSubview:self.collectionView];
[self.backImageView addSubview:self.emptyView];
[self.emptyView addSubview:self.emptyLabel];
[self.emptyView addSubview:self.arrowImageView];
}
- (void)initSubViewConstraints {
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self.contentView);
make.height.mas_equalTo(10);
}];
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.contentView).inset(0);
make.top.mas_equalTo(self.contentView).offset(22);
make.bottom.mas_equalTo(self.contentView);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.backImageView).offset(15);
make.top.mas_equalTo(self.backImageView).offset(12);
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.titleLabel);
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(18);
make.height.mas_equalTo(47);
make.right.mas_equalTo(self.backImageView).offset(-6);
}];
[self.emptyView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backImageView).inset(18);
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(12);
make.height.mas_equalTo(47);
}];
[self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(6.5, 11));
make.centerY.mas_equalTo(self.emptyView);
make.right.mas_equalTo(self.emptyView).offset(-12);
}];
[self.emptyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.emptyView);
make.centerX.mas_equalTo(self.emptyView);
}];
}
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.datasourece.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPMineDataSkillDataCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineDataSkillDataCollectionViewCell class]) forIndexPath:indexPath];
cell.skillInfo = [self.datasourece safeObjectAtIndex1:indexPath.row];
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
if (self.datasourece.count > 0) {
MineSkillCardListInfoModel * skillInfo = [self.datasourece safeObjectAtIndex1:indexPath.row];
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineDataSkillCardTableViewCell:didSelectItem:)]) {
[self.delegate xPMineDataSkillCardTableViewCell:self didSelectItem:skillInfo];
}
}
}
- (void)tapEmptySkillCard {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineDataSkillCardTableViewCell:didSelectItem:)]) {
[self.delegate xPMineDataSkillCardTableViewCell:self didSelectItem:nil];
}
}
#pragma mark - Getters And Setters
- (void)setDatasourece:(NSArray *)datasourece {
_datasourece = datasourece;
if (_datasourece.count > 0) {
self.emptyView.hidden = YES;
self.collectionView.hidden = NO;
} else {
self.emptyView.hidden = NO;
self.collectionView.hidden = YES;
}
[self.collectionView reloadData];
}
- (UIImageView *)backImageView {
if (!_backImageView) {
_backImageView = [[UIImageView alloc] init];
_backImageView.userInteractionEnabled = YES;
_backImageView.backgroundColor =[ThemeColor appCellBackgroundColor];
}
return _backImageView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"技能卡";
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
_titleLabel.textColor = [ThemeColor mainTextColor];
}
return _titleLabel;
}
- (UICollectionView *)collectionView{
if (!_collectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
layout.itemSize = CGSizeMake(142, 47);
layout.minimumLineSpacing = 10;
layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.dataSource = self;
_collectionView.showsHorizontalScrollIndicator = NO;
_collectionView.delegate = self;
_collectionView.tag = 1005;
_collectionView.backgroundColor = [UIColor clearColor];
[_collectionView registerClass:[XPMineDataSkillDataCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineDataSkillDataCollectionViewCell class])];
}
return _collectionView;
}
- (UIView *)emptyView {
if (!_emptyView) {
_emptyView = [[UIView alloc] init];
_emptyView.backgroundColor = UIColorFromRGB(0xF4F7FF);
_emptyView.layer.masksToBounds = YES;
_emptyView.layer.cornerRadius = 8;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapEmptySkillCard)];
[_emptyView addGestureRecognizer:tap];
}
return _emptyView;
}
- (UIImageView *)arrowImageView {
if (!_arrowImageView) {
_arrowImageView = [[UIImageView alloc] init];
_arrowImageView.userInteractionEnabled = YES;
_arrowImageView.image = [UIImage imageNamed:@"common_right_arrow"];
}
return _arrowImageView;
}
- (UILabel *)emptyLabel {
if (!_emptyLabel) {
_emptyLabel = [[UILabel alloc] init];
_emptyLabel.text = @"还未添加技能卡喔";
_emptyLabel.font = [UIFont systemFontOfSize:12];
_emptyLabel.textAlignment = NSTextAlignmentCenter;
_emptyLabel.textColor = [ThemeColor secondTextColor];
_emptyLabel.userInteractionEnabled = YES;
}
return _emptyLabel;
}
- (UIView *)bgView{
if(!_bgView){
_bgView = [UIView new];
_bgView.backgroundColor = UIColorFromRGB(0xF8F8FB);
}
return _bgView;
}
@end

View File

@@ -16,10 +16,11 @@
#import "UserGiftWallInfoModel.h"
@interface XPMineUserInfoGiftWallCollectionViewCell ()
@property(nonatomic,strong) UIImageView *bgImageView;
///
@property (nonatomic,strong) NetImageView *giftImageView;
///
@property (nonatomic,strong) UIButton *numberButton;
@property (nonatomic,strong) UILabel *numberButton;
///
@property (nonatomic,strong) UILabel *giftNameLabel;
///
@@ -43,6 +44,7 @@
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:self.bgImageView];
[self.contentView addSubview:self.giftImageView];
[self.contentView addSubview:self.numberButton];
[self.contentView addSubview:self.giftNameLabel];
@@ -53,21 +55,25 @@
}
- (void)initSubViewConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
}];
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.contentView).inset(5);
make.top.mas_equalTo(self.contentView);
make.height.mas_equalTo(self.giftImageView.mas_width);
make.centerX.equalTo(self.contentView);
make.top.mas_equalTo(8);
make.height.width.mas_equalTo(56);
}];
[self.numberButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(55, 15));
make.height.mas_equalTo(14);
make.centerX.mas_equalTo(self.contentView);
make.top.mas_equalTo(self.giftImageView.mas_bottom).offset(2);
make.top.mas_equalTo(self.giftImageView.mas_bottom).offset(1);
}];
[self.giftNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.contentView);
make.top.mas_equalTo(self.numberButton.mas_bottom).offset(10);
make.top.mas_equalTo(self.numberButton.mas_bottom).offset(1);
make.height.mas_equalTo(17);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -76,8 +82,12 @@
}];
[self.diamondImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(13, 13));
make.size.mas_equalTo(CGSizeMake(10, 8));
}];
self.numberButton.textColor = UIColorFromRGB(0x7F8494);
self.giftNameLabel.textColor = UIColorFromRGB(0x696D7A);
self.giftPriceLabel.textColor = UIColorFromRGB(0x7F8494);
}
#pragma mark - Getters And Setters
@@ -87,7 +97,17 @@
self.giftImageView.imageUrl = _giftInfo.picUrl;
self.giftNameLabel.text = _giftInfo.giftName;
self.giftPriceLabel.text = [NSString stringWithFormat:@"%ld", _giftInfo.giftPrice];
[self.numberButton setTitle:[NSString stringWithFormat:@"X%ld", _giftInfo.reciveCount] forState:UIControlStateNormal];
self.numberButton.text = [NSString stringWithFormat:@"x%ld", _giftInfo.reciveCount];
_bgImageView.layer.cornerRadius = _giftInfo.giftLevel == 1 ? 5 : 0;
_bgImageView.backgroundColor = _giftInfo.giftLevel == 1 ? UIColorFromRGB(0xE6E8F0) : [UIColor clearColor];
if(_giftInfo.giftLevel > 1){
NSString *image = [NSString stringWithFormat:@"mine_user_infi_gift_bg%d",_giftInfo.giftLevel];
_bgImageView.image = kImage(image);
self.numberButton.textColor = _giftInfo.giftLevel == 1 ? UIColorFromRGB(0x7F8494):UIColorFromRGB(0xF5F6FA);
self.giftNameLabel.textColor = _giftInfo.giftLevel == 1 ? UIColorFromRGB(0x696D7A):UIColorFromRGB(0xFFFFFF);
self.giftPriceLabel.textColor = _giftInfo.giftLevel == 1 ? UIColorFromRGB(0x7F8494):UIColorFromRGB(0xF5F6FA);
}
}
}
@@ -103,14 +123,12 @@
return _giftImageView;
}
- (UIButton *)numberButton {
- (UILabel *)numberButton {
if (!_numberButton) {
_numberButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_numberButton setBackgroundColor:[ThemeColor appCellBackgroundColor]];
[_numberButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal];
_numberButton.titleLabel.font = [UIFont systemFontOfSize:10];
_numberButton.layer.masksToBounds = YES;
[_numberButton setCornerWithLeftTopCorner:2 rightTopCorner:6 bottomLeftCorner:6 bottomRightCorner:2 size:CGSizeMake(55, 15)];
_numberButton = [UILabel new];
_numberButton.text = @"0";
_numberButton.font = [UIFont systemFontOfSize:10 weight:UIFontWeightRegular];
_numberButton.textAlignment = NSTextAlignmentCenter;
}
return _numberButton;
}
@@ -118,8 +136,7 @@
- (UILabel *)giftNameLabel {
if (!_giftNameLabel) {
_giftNameLabel = [[UILabel alloc] init];
_giftNameLabel.font = [UIFont systemFontOfSize:13];
_giftNameLabel.textColor = [ThemeColor mainTextColor];
_giftNameLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
_giftNameLabel.textAlignment = NSTextAlignmentCenter;
}
return _giftNameLabel;
@@ -148,11 +165,19 @@
- (UILabel *)giftPriceLabel {
if (!_giftPriceLabel) {
_giftPriceLabel = [[UILabel alloc] init];
_giftPriceLabel.font = [UIFont systemFontOfSize:11];
_giftPriceLabel.font = [UIFont systemFontOfSize:9 weight:UIFontWeightRegular];
_giftPriceLabel.textColor = [ThemeColor secondTextColor];
}
return _giftPriceLabel;
}
- (UIImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [UIImageView new];
_bgImageView.layer.masksToBounds = YES;
}
return _bgImageView;
}
@end

View File

@@ -90,7 +90,7 @@
if (_userInfo) {
self.nameLabel.text = _userInfo.nick;
self.idLabel.text = [NSString stringWithFormat:@"%@号:%ld",AppName, (long)_userInfo.erbanNo];
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : @"我是个默认签名";
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : @"他还没有写个人介绍~";
NSString * sexStr;
if (_userInfo.gender == GenderType_Male) {
sexStr = @"common_male";

View File

@@ -31,6 +31,9 @@ typedef enum {
@property (nonatomic, assign) BOOL isUsed;
///标签类型
@property (nonatomic, assign) DressUpLabelType labelType;
@property(nonatomic,assign) float expireDays;
@property(nonatomic,assign)float expireHour;
@property(nonatomic,assign) float expireMinute;
@end
NS_ASSUME_NONNULL_END

View File

@@ -17,8 +17,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) NSString *bubbleUrl;
///来源
@property (nonatomic, assign) NSInteger comeFrom;
///过期天数
@property (nonatomic, assign) NSInteger expireDays;
@property(nonatomic,assign) float expireDays;
@property(nonatomic,assign)float expireHour;
@property(nonatomic,assign) float expireMinute;
///气泡名称
@property (nonatomic, copy) NSString *name;
///是否使用

View File

@@ -31,11 +31,13 @@ typedef NS_ENUM(NSInteger, DressupHeadWearStatus) {
@property (nonatomic, strong) NSString *pic;
///效果
@property (nonatomic, strong) NSString *effect;
///还有过期
@property (nonatomic, strong) NSString *expireDays;
///状态
@property (nonatomic, assign) DressupHeadWearStatus status;
@property(nonatomic,assign) float expireDays;
@property(nonatomic,assign)float expireHour;
@property(nonatomic,assign) float expireMinute;
@end
NS_ASSUME_NONNULL_END

View File

@@ -21,7 +21,10 @@ NS_ASSUME_NONNULL_BEGIN
///是否过期
@property (nonatomic, assign) BOOL isExpired;
///过期的天数
@property (nonatomic,copy) NSString *expireDays;
@property(nonatomic,assign) float expireDays;
@property(nonatomic,assign)float expireHour;
@property(nonatomic,assign) float expireMinute;
@end
NS_ASSUME_NONNULL_END

View File

@@ -15,8 +15,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *cardId;
///来源1购买 2官方赠送
@property (nonatomic, assign) NSInteger comeFrom;
///过期时间(天)
@property (nonatomic, assign) NSInteger expireDays;
///过期时间
@property (nonatomic, strong) NSString *expireTime;
///是否过期
@@ -28,6 +26,9 @@ NS_ASSUME_NONNULL_BEGIN
///是否使用中
@property (nonatomic, assign) BOOL used;
@property(nonatomic,assign) float expireDays;
@property(nonatomic,assign)float expireHour;
@property(nonatomic,assign) float expireMinute;
@end
NS_ASSUME_NONNULL_END

View File

@@ -115,7 +115,13 @@
self.titleLabel.text = _carInfo.name;
self.useButton.hidden = _carInfo.status != Dressup_Car_Status_Ok;
if (_carInfo.status == Dressup_Car_Status_Ok) {
self.timeLabel.text = [NSString stringWithFormat:@"剩余%ld天", _carInfo.expireDate];
if(_carInfo.expireDays < 1 && _carInfo.expireDays > 0){
self.timeLabel.text = [NSString stringWithFormat:@"剩余 %.1f 天 %.0f 小时 %.0f 分钟", _carInfo.expireDays,_carInfo.expireHour,_carInfo.expireMinute];
}else{
self.timeLabel.text = [NSString stringWithFormat:@"剩余 %.0f 天 %.0f 小时 %.0f 分钟", _carInfo.expireDays,_carInfo.expireHour,_carInfo.expireMinute];
}
} else {
self.timeLabel.text = @"已过期";
}

View File

@@ -107,7 +107,13 @@
self.titleLabel.text = bubbleModel.name;
self.useButton.hidden = bubbleModel.hasExpired;
if (!bubbleModel.hasExpired) {
self.timeLabel.text = [NSString stringWithFormat:@"剩余%zd天", bubbleModel.expireDays];
NSString *text ;
if(bubbleModel.expireDays < 1 && bubbleModel.expireDays > 0){
text = [NSString stringWithFormat:@"剩余 %.1f 天 %.0f 小时 %.0f 分钟", bubbleModel.expireDays,bubbleModel.expireHour,bubbleModel.expireMinute];
}else{
text = [NSString stringWithFormat:@"剩余 %.0f 天 %.0f 小时 %.0f 分钟", bubbleModel.expireDays,bubbleModel.expireHour,bubbleModel.expireMinute];
}
self.timeLabel.text = text;
} else {
self.timeLabel.text = @"已过期";
}

View File

@@ -119,7 +119,13 @@
self.titleLabel.text = _headwearModel.headwearName;
self.useButton.hidden = _headwearModel.status != Dressup_Headwear_Status_Ok;
if (_headwearModel.status == Dressup_Headwear_Status_Ok) {
self.timeLabel.text = [NSString stringWithFormat:@"剩余%@天", _headwearModel.expireDays];
NSString *time;
if(_headwearModel.expireDays < 1 && _headwearModel.expireDays > 0){
time = [NSString stringWithFormat:@"剩余 %.1f 天 %.0f 小时 %.0f 分钟", _headwearModel.expireDays,_headwearModel.expireHour,_headwearModel.expireMinute];
}else{
time = [NSString stringWithFormat:@"剩余 %.0f 天 %.0f 小时 %.0f 分钟", _headwearModel.expireDays,_headwearModel.expireHour,_headwearModel.expireMinute];
}
self.timeLabel.text = time;
} else {
self.timeLabel.text = @"已过期";
}

View File

@@ -90,7 +90,12 @@
self.titleLabel.text = _nameplateModel.nameplateName;
self.useButton.hidden = _nameplateModel.isExpired;
if (!_nameplateModel.isExpired) {
self.timeLabel.text = [NSString stringWithFormat:@"剩余%@天", _nameplateModel.expireDays];
if(_nameplateModel.expireDays < 1 && _nameplateModel.expireDays > 0){
self.timeLabel.text = [NSString stringWithFormat:@"剩余 %.1f 天 %.0f 小时 %.0f 分钟", _nameplateModel.expireDays,_nameplateModel.expireHour,_nameplateModel.expireMinute];
}else{
self.timeLabel.text = [NSString stringWithFormat:@"剩余 %.0f 天 %.0f 小时 %.0f 分钟", _nameplateModel.expireDays,_nameplateModel.expireHour,_nameplateModel.expireMinute];
}
} else {
self.timeLabel.text = @"已过期";
}

View File

@@ -108,7 +108,14 @@
self.titleLabel.text = nobleCardModel.name;
self.useButton.hidden = nobleCardModel.hasExpired;
if (!nobleCardModel.hasExpired) {
self.timeLabel.text = [NSString stringWithFormat:@"剩余%zd天", nobleCardModel.expireDays];
NSString *text ;
if(nobleCardModel.expireDays < 1 && nobleCardModel.expireDays > 0){
text = [NSString stringWithFormat:@"剩余 %.1f 天 %.0f 小时 %.0f 分钟", nobleCardModel.expireDays,nobleCardModel.expireHour,nobleCardModel.expireMinute];
}else{
text = [NSString stringWithFormat:@"剩余 %.0f 天 %.0f 小时 %.0f 分钟", nobleCardModel.expireDays,nobleCardModel.expireHour,nobleCardModel.expireMinute];
}
self.timeLabel.text = text;
} else {
self.timeLabel.text = @"已过期";
}

View File

@@ -11,9 +11,10 @@
///Tool
#import "AccountInfoStorage.h"
#import "XPMacro.h"
#import "XPWebViewController.h"
///View
#import "XPMineDataSkillCardTableViewCell.h"
#import "XPMineDataGiftTableViewCell.h"
#import "XPMineDataSkillCardCollectionViewCell.h"
#import "XPMineDataGiftHeadCell.h"
///Model
#import "ClanDetailInfoModel.h"
#import "UserInfoModel.h"
@@ -21,25 +22,28 @@
///P
#import "XPMineUserDataPresenter.h"
#import "XPMineUserDataProtocol.h"
#import "Api+Mine.h"
///View
#import "XPSkillCardViewController.h"
#import "XPMineUserInfoGiftWallViewController.h"
#import "XPMineClanViewController.h"
#import "XPMineGuildViewController.h"
@interface XPMineUserDataViewController ()<XPMineUserDataProtocol, UITableViewDelegate, UITableViewDataSource, XPMineDataGiftTableViewCellDelegate, XPMineDataSkillCardTableViewCellDelegate>
#import "XPMineUserInfoGiftWallCollectionViewCell.h"
#import "XPMineUserInfoEmptyCollectionViewCell.h"
@interface XPMineUserDataViewController ()<XPMineUserDataProtocol, UICollectionViewDelegate, UICollectionViewDataSource,UICollectionViewDelegateFlowLayout, XPMineDataGiftHeadCellDelegate, XPMineDataSkillCardCollectionViewCell>
///
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) UICollectionView *collectionView;
///
@property (nonatomic,strong) ClanDetailInfoModel *clanDetailInfo;
///
@property (nonatomic,strong) NSArray *skillArray;
///
@property (nonatomic,assign) BOOL isFold;
@property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView);
///
@property (nonatomic,assign) BOOL isShowEnterClan;
@property (nonatomic, strong) XPMineDataGiftTableViewCell *giftCell;
@property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView);
@property (nonatomic,copy) NSArray *datasource;
@property (nonatomic,copy) NSArray *normalSource;
@property (nonatomic,copy) NSArray *luckySource;
@end
@@ -61,80 +65,99 @@
}
#pragma mark - Http
- (void)initHettpRequest {
self.isFold = YES;
self.isShowEnterClan = NO;
[self.presenter getUserSkillCardList:self.userUid];
// [self.presenter getClanDetailInfo:self.userUid currentUserUid:[AccountInfoStorage instance].getUid];
[Api getUserGiftWall:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(data.code == 200){
NSArray * array= [UserGiftWallInfoModel modelsWithArray:data.data];
self.datasource = [NSMutableArray arrayWithArray:array];
self.normalSource = [NSMutableArray arrayWithArray:array];
[self.collectionView reloadData];
}
} uid:self.userUid giftType:@"1"];
[Api getUserGiftWall:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(data.code == 200){
NSArray * array= [UserGiftWallInfoModel modelsWithArray:data.data];
self.luckySource = [NSMutableArray arrayWithArray:array];
}
} uid:self.userUid giftType:@"2"];
}
#pragma mark - Private Method
- (void)initSubViews {
[self.view addSubview:self.tableView];
[self.view addSubview:self.collectionView];
}
- (void)initSubViewConstraints {
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if(section == 0) {
return (self.userUid.integerValue == [AccountInfoStorage instance].getUid.integerValue || self.skillArray.count > 0);
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
return 3;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
if(section == 0) {
return (self.userUid.integerValue == [AccountInfoStorage instance].getUid.integerValue || self.skillArray.count > 0);
}else if (section == 1) {
return 1;
}
return 0;
return self.datasource.count > 0 ? self.datasource.count : 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 133;
} else if(indexPath.section == 1) {
CGFloat itemWidth = (CGRectGetWidth(self.view.frame) - 20*2 - 16*3)/4.0;
CGFloat itemHeight = 82.0/72.0*itemWidth;
CGFloat topHeight = 100;
return itemHeight * 3 + 14 * 2 + topHeight + 25+20;
} else {
return 0;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
return CGSizeMake(KScreenWidth, 143);
} else if(indexPath.section == 1) {
return CGSizeMake(KScreenWidth,103);
} else {
return self.datasource.count > 0? CGSizeMake(84, 122) : collectionView.bounds.size;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
XPMineDataSkillCardTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDataSkillCardTableViewCell class])];
if (cell == nil) {
cell = [[XPMineDataSkillCardTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineDataSkillCardTableViewCell class])];
}
cell.delegate = self;
cell.datasourece = self.skillArray;
return cell;
} else {
///cell
if (self.giftCell == nil) {
XPMineDataGiftTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDataGiftTableViewCell class])];
cell.delegate = self;
self.giftCell = cell;
}
self.giftCell.userGiftWall = self.userInfo.userGiftWall;
self.giftCell.userLuckyBagGiftWall = self.userInfo.userLuckyBagGiftWall;
return self.giftCell;
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{
CGFloat x = (KScreenWidth - 84 * 4 - 1)/5;
return section == 2 ? UIEdgeInsetsMake(0, x, 100, x) : UIEdgeInsetsMake(0, 12, 0, 12);;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == 0){
XPMineDataSkillCardCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineDataSkillCardCollectionViewCell class]) forIndexPath:indexPath];
cell.delegate = self;
cell.datasourece = self.skillArray;
return cell;
}else if(indexPath.section == 1){
XPMineDataGiftHeadCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineDataGiftHeadCell class]) forIndexPath:indexPath];
cell.delegate = self;
return cell;
}
if (self.datasource.count > 0) {
XPMineUserInfoGiftWallCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoGiftWallCollectionViewCell class]) forIndexPath:indexPath];
cell.giftInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
return cell;
}
XPMineUserInfoEmptyCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoEmptyCollectionViewCell class]) forIndexPath:indexPath];
cell.isGiftWall = YES;
return cell;
}
#pragma mark - XPMineDataGiftTableViewCellDelegate
- (void)xPMineDataGiftTableViewCell:(XPMineDataGiftTableViewCell *)view didClickMore:(UIButton *)sender {
XPMineUserInfoGiftWallViewController * giftWallVC = [[XPMineUserInfoGiftWallViewController alloc] init];
giftWallVC.userUid = self.userUid;
[self.navigationController pushViewController:giftWallVC animated:YES];
- (void)xPMineDataGiftHeadCell:(XPMineDataGiftHeadCell *)view didClickMore:(UIButton *)sender {
XPWebViewController * webVC =[[XPWebViewController alloc] init];
webVC.url = URLWithType(kGiftLevelURL);
[self.navigationController pushViewController:webVC animated:YES];
}
- (void)xPMineDataGiftHeadCell:(XPMineDataGiftHeadCell *)view didClickNormal:(UIButton *)sender{
self.datasource = self.normalSource;
[self.collectionView reloadData];
}
- (void)xPMineDataGiftHeadCell:(XPMineDataGiftHeadCell *)view didClickLucky:(UIButton *)sender{
self.datasource = self.luckySource;
[self.collectionView reloadData];
}
#pragma mark - XPMineDataSkillCardTableViewCell
- (void)xPMineDataSkillCardTableViewCell:(XPMineDataSkillCardTableViewCell *)view didSelectItem:(MineSkillCardListInfoModel *)skillInfo {
- (void)xPMineDataSkillCardTableViewCell:(XPMineDataSkillCardCollectionViewCell *)view didSelectItem:(nullable MineSkillCardListInfoModel *)skillInfo {
XPSkillCardViewController *skillCardVC = [[XPSkillCardViewController alloc] init];
skillCardVC.uid = self.userUid.integerValue;
[self.navigationController pushViewController:skillCardVC animated:YES];
@@ -146,7 +169,7 @@
}
- (UIScrollView *)listScrollView {
return self.tableView;
return self.collectionView;
}
- (void)listViewDidScrollCallback:(void (^)(UIScrollView *))callback {
@@ -174,31 +197,35 @@
[self.delegate xPMineUserDataViewController:self didGetVoiceSuccess:voiceCard];
}
self.skillArray = [array copy];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
[self.collectionView reloadData];
// [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
}
#pragma mark - Getters And Setters
- (void)setUserInfo:(UserInfoModel *)userInfo {
_userInfo = userInfo;
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone];
[self.collectionView reloadData];
// [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone];
}
- (UICollectionView *)collectionView{
if(!_collectionView){
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumInteritemSpacing = (KScreenWidth - 84 * 4 - 1) / 5;
layout.minimumLineSpacing = 8;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.dataSource = self;
_collectionView.delegate = self;
_collectionView.backgroundColor = [UIColor whiteColor];
[_collectionView registerClass:[XPMineDataSkillCardCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineDataSkillCardCollectionViewCell class])];
[_collectionView registerClass:[XPMineDataGiftHeadCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineDataGiftHeadCell class])];
[_collectionView registerClass:[XPMineUserInfoGiftWallCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoGiftWallCollectionViewCell class])];
[_collectionView registerClass:[XPMineUserInfoEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoEmptyCollectionViewCell class])];
}
return _collectionView;
}
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor clearColor];
if (@available(iOS 11.0, *)) {
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
[_tableView registerClass:[XPMineDataSkillCardTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataSkillCardTableViewCell class])];
[_tableView registerClass:[XPMineDataGiftTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataGiftTableViewCell class])];
}
return _tableView;
}
@end

View File

@@ -230,10 +230,8 @@
}
#pragma mark - XPMineUserInfoNickViewControllerDelegate
- (void)xPMineUserInfoNickViewController:(XPMineUserInfoNickViewController *)viewController updateNick:(NSString *)nick {
if (nick.length > 0) {
[self.presenter complectionInfoWithAvatar:nil nick:nick birth:nil userDesc:nil];
}
- (void)xPMineUserInfoNickViewController:(XPMineUserInfoNickViewController *)viewController updateUser:(UserInfoModel *)user {
[self completeUserInfoSuccess:user];
}
#pragma mark - XPMineUserInfoDesViewControllerDelegate
- (void)xPMineUserInfoDesViewController:(XPMineUserInfoDesViewController *)viewController updateUserDes:(NSString *)userDes {

View File

@@ -8,10 +8,10 @@
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class XPMineUserInfoNickViewController;
@class XPMineUserInfoNickViewController,UserInfoModel;
@protocol XPMineUserInfoNickViewControllerDelegate <NSObject>
///更新用户名
- (void)xPMineUserInfoNickViewController:(XPMineUserInfoNickViewController *)viewController updateNick:(NSString *)nick;
- (void)xPMineUserInfoNickViewController:(XPMineUserInfoNickViewController *)viewController updateUser:(UserInfoModel *)user;
@end
@interface XPMineUserInfoNickViewController : BaseViewController

View File

@@ -14,7 +14,8 @@
#import "UIImage+Utils.h"
///Tool
#import "UserInfoModel.h"
#import "Api+Mine.h"
#import "NSMutableDictionary+Saft.h"
static NSInteger maxCount = 15;
@interface XPMineUserInfoNickViewController ()
@@ -112,10 +113,32 @@ static NSInteger maxCount = 15;
}
#pragma mark - Event Response
- (void)completionBtnAction:(UIButton *)sender {
[self.navigationController popViewControllerAnimated:YES];
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoNickViewController:updateNick:)]) {
[self.delegate xPMineUserInfoNickViewController:self updateNick:self.nickTextField.text];
}
if(self.nickTextField.text.length == 0){
[self showErrorToast:@"请输入昵称"];
return;
}
[self showLoading];
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [[AccountInfoStorage instance] getTicket];
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic safeSetObject:self.nickTextField.text forKey:@"nick"];
[dic safeSetObject:uid forKey:@"uid"];
[dic safeSetObject:ticket forKey:@"ticket"];
[Api completeUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self hideHUD];
if (data.code == 200){
[self.navigationController popViewControllerAnimated:YES];
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoNickViewController:updateUser:)]){
[self.delegate xPMineUserInfoNickViewController:self updateUser:infoModel];
}
return;
}
[self showErrorToast:msg];
} userInfo:dic];
}
#pragma mark - getter && setter
- (UIView *)containView {

View File

@@ -11,7 +11,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface XPMineUserInfoGiftView : UIView<JXCategoryListContentViewDelegate>
@property (nonatomic,strong) NSArray *datasource;
@property(nonatomic,copy) NSString *userId;
- (instancetype)initWithFrame:(CGRect)frame type:(NSString *)type;
@end
NS_ASSUME_NONNULL_END

View File

@@ -12,43 +12,60 @@
#import "XPMacro.h"
#import "NSArray+Safe.h"
///View
#import "XPMineDataGiftCollectionViewCell.h"
#import "XPMineUserInfoGiftWallCollectionViewCell.h"
#import "XPMineUserInfoEmptyCollectionViewCell.h"
#import "Api+Mine.h"
#import "UserGiftWallInfoModel.h"
@interface XPMineUserInfoGiftView ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
///
@property (nonatomic,strong) UICollectionView *collectionView;
@property (nonatomic,strong) NSArray *datasource;
@property(nonatomic,copy) NSString *type;
@end
@implementation XPMineUserInfoGiftView
- (instancetype)initWithFrame:(CGRect)frame {
- (instancetype)initWithFrame:(CGRect)frame type:(NSString *)type{
self = [super initWithFrame:frame];
if (self) {
self.type = type;
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
-(void)setUserId:(NSString *)userId{
_userId = userId;
[Api getUserGiftWall:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(data.code == 200){
NSArray * array= [UserGiftWallInfoModel modelsWithArray:data.data];
NSMutableArray *a = [NSMutableArray arrayWithArray:array];
NSMutableArray *b = [NSMutableArray arrayWithArray:a];
self.datasource = [NSMutableArray arrayWithArray:b];
[self.collectionView reloadData];
}
} uid:_userId giftType:self.type];
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
[self addSubview:self.collectionView];
}
- (void)initSubViewConstraints {
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(20);
make.right.mas_equalTo(-20);
make.left.mas_equalTo(0);
make.right.mas_equalTo(0);
make.top.bottom.mas_equalTo(0);
}];
}
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
CGFloat width = (CGRectGetWidth(collectionView.frame) - 16*3)/4.0;
CGFloat height = 82.0/72.0*width;
return self.datasource.count > 0? CGSizeMake(width, height) : collectionView.bounds.size;
return self.datasource.count > 0? CGSizeMake(84, 122) : collectionView.bounds.size;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
@@ -57,7 +74,7 @@
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
XPMineDataGiftCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineDataGiftCollectionViewCell class]) forIndexPath:indexPath];
XPMineUserInfoGiftWallCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoGiftWallCollectionViewCell class]) forIndexPath:indexPath];
cell.giftInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
return cell;
}
@@ -71,24 +88,20 @@
return self;
}
#pragma mark - Getters And Setters
- (void)setDatasource:(NSArray *)datasource {
_datasource = datasource;
[self.collectionView reloadData];
}
- (UICollectionView *)collectionView{
if (!_collectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumInteritemSpacing = 16;
layout.minimumLineSpacing = 14;
// layout.sectionInset = UIEdgeInsetsMake(0, 10, 0, 10);
layout.minimumInteritemSpacing = 5;
layout.minimumLineSpacing = 8;
layout.sectionInset = UIEdgeInsetsMake(0, 12, 0, 12);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.dataSource = self;
_collectionView.delegate = self;
_collectionView.scrollEnabled = NO;
_collectionView.backgroundColor = [UIColor clearColor];
[_collectionView registerClass:[XPMineDataGiftCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineDataGiftCollectionViewCell class])];
[_collectionView registerClass:[XPMineUserInfoGiftWallCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoGiftWallCollectionViewCell class])];
[_collectionView registerClass:[XPMineUserInfoEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMineUserInfoEmptyCollectionViewCell class])];
}

View File

@@ -449,7 +449,7 @@
}
self.idLabel.text = [NSString stringWithFormat:@"ID%ld", (long)_userInfo.erbanNo];
self.copysIdImageView.hidden = NO;
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : @"我是个默认签名";
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : @"他还没有写个人介绍~";
NSString *fansNum = [NSString stringWithFormat:@"%ld",_userInfo.fansNum];

View File

@@ -202,15 +202,16 @@
case XPMineItemType_My_Room:
{
if(self.userInfo.isCertified == NO){
[self showRealNameAuthenticationTipsAlertView];
return;
}
NSString* roomUid = [NSString stringWithFormat:@"%ld", (long)self.userInfo.uid];
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200) {
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
if (roomInfo.isReselect) {
if(self.userInfo.isCertified == NO && [ClientConfig shareConfig].configInfo.certificationType > 0){
[self showRealNameAuthenticationTipsAlertView:@"为了营造更安全的网络环境\n在 开通个人房间前\n需要先进行实名认证" isShowRoom:YES];
return;
}
XPLittleGameRoomOpenView * roomOpenView = [[XPLittleGameRoomOpenView alloc] init];
roomOpenView.roomInfo = roomInfo;
roomOpenView.currentVC = self;

View File

@@ -22,7 +22,7 @@
/// @param complection
/// @param roomUid roomuid
+ (void)requestNormalGiftList:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid {
[self makeRequest:@"gift/listV4" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, roomUid, nil];
[self makeRequest:@"gift/listV5" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, roomUid, nil];
}
///

View File

@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#import "GiftNobleInfoModel.h"
#import "XPWeekStarRankUserModel.h"
#import "MewUnlockGiftModel.h"
NS_ASSUME_NONNULL_BEGIN
//礼物类型
typedef NS_ENUM(NSUInteger, GiftType) {
@@ -21,6 +21,8 @@ typedef NS_ENUM(NSUInteger, GiftType) {
GiftType_Anchor = 11, //个播礼物
GiftType_Punish = 12, //惩罚礼物
GiftType_Twelve_Star = 13, //星座礼物
GiftType_Unlock = 16, //解锁礼物
GiftType_DressUp = 17, //解锁礼物
};
//礼物类型
@@ -115,6 +117,14 @@ typedef NS_ENUM(NSUInteger, RoomSendGiftType) {
@property (nonatomic, strong) XPWeekStarRankUserModel *firstCharmRankUser;
///上周对应礼物豪气榜第一
@property (nonatomic, strong) XPWeekStarRankUserModel *firstLevelRankUser;
@property(nonatomic,strong) MewUnlockBaseGiftModel *baseGift;/// 解锁基础礼物
@property(nonatomic,assign) BOOL unlocked;///是否解锁
@property(nonatomic,copy) NSArray <MewUnlockGiftModel *>* unlockGiftList;
@property(nonatomic,copy) NSString *giftTag;///礼物标签
@property(nonatomic,copy) NSString *bannerUrl;
@property(nonatomic,copy) NSString *bannerSkipUrl;
@end

View File

@@ -9,4 +9,10 @@
#import "MJExtension.h"
@implementation GiftInfoModel
MJCodingImplementation
+ (NSDictionary *)objectClassInArray {
return @{@"unlockGiftList":MewUnlockGiftModel.class
};
}
@end

View File

@@ -88,6 +88,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign) BOOL isBatch;
///播放哪个动画
@property (nonatomic, assign) BOOL isShowAnimation;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,30 @@
//
// MewUnlockBaseGiftModel.h
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MewUnlockBaseGiftModel : NSObject
@property(nonatomic,copy) NSString *uid;
@property(nonatomic,copy) NSString *nick;
///礼物id
@property (nonatomic, assign)NSInteger giftId;
///礼物名字
@property (nonatomic, strong)NSString *giftName;
///价格
@property (nonatomic, assign)double goldPrice;
///礼物url
@property (nonatomic, copy)NSString *giftUrl;
@property(nonatomic,assign) CGFloat width;
@property(nonatomic,assign) BOOL isSelect;
@property(nonatomic,copy) NSString *dressName;
@property(nonatomic,copy) NSString *dressUrl;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// MewUnlockBaseGiftModel.m
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import "MewUnlockBaseGiftModel.h"
@implementation MewUnlockBaseGiftModel
@end

View File

@@ -0,0 +1,22 @@
//
// MewUnlockGiftModel.h
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import <Foundation/Foundation.h>
#import "MewUnlockBaseGiftModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MewUnlockGiftModel : NSObject
@property(nonatomic,assign) int condition;
@property(nonatomic,assign) int process;
@property(nonatomic,strong) MewUnlockBaseGiftModel *targetGift;
@property(nonatomic,assign) BOOL unlocked;
@property(nonatomic,assign) CGFloat width;
@property(nonatomic,assign) BOOL isSelect;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// MewUnlockGiftModel.m
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import "MewUnlockGiftModel.h"
@implementation MewUnlockGiftModel
@end

View File

@@ -60,7 +60,7 @@
}
[Api requestNormalGiftList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
NSArray *luckyBagGift = [GiftInfoModel modelsWithArray:data.data[@"luckyBagGift"]]; //
NSArray *luckyBagGift = [GiftInfoModel modelsWithArray:data.data[@"interestGift"]]; //
NSArray *vipGift = [GiftInfoModel modelsWithArray:data.data[@"vipGift"]]; //
NSArray *luckyPoolGift = [GiftInfoModel modelsWithArray:data.data[@"luckyPoolGift"]];//
NSArray *normalGift = [GiftInfoModel modelsWithArray:data.data[@"normalGift"]]; //

View File

@@ -7,6 +7,7 @@
#import <UIKit/UIKit.h>
#import "XPSendGiftView.h"
#import "XPGiftInfoView.h"
NS_ASSUME_NONNULL_BEGIN
@class GiftInfoModel;
@interface XPGiftItemCollectionViewCell : UICollectionViewCell
@@ -16,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) NSInteger curUserNobleLevel;
///使用的地方
@property (nonatomic,assign) SendGiftType usingplaceType;
///当前展示的数据的类型
@property (nonatomic,assign) GiftSegmentType segmentType;
@end
NS_ASSUME_NONNULL_END

View File

@@ -44,6 +44,8 @@
///
@property (nonatomic, strong) UIImageView *lockImageView;
@property(nonatomic,strong) NetImageView *tagImageView;
@end
@implementation XPGiftItemCollectionViewCell
@@ -67,18 +69,21 @@
[self.contentView addSubview:self.giftNumLabel];
[self.contentView addSubview:self.nobleIconImageView];
[self.contentView addSubview:self.lockImageView];
[self.contentView addSubview:self.tagImageView];
[self.tagStackView addArrangedSubview:self.exclusiveImageView];
[self.tagStackView addArrangedSubview:self.giftNewImageView];
[self.tagStackView addArrangedSubview:self.limitImageView];
[self.tagStackView addArrangedSubview:self.specialImageView];
[self.priceStackView addArrangedSubview:self.logoImageView];
[self.priceStackView addArrangedSubview:self.priceLabel];
[self.priceStackView addArrangedSubview:self.logoImageView];
}
- (void)initSubViewConstraints {
[self.tagStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.top.mas_equalTo(self.contentView).inset(3);
make.height.mas_equalTo(14);
@@ -121,11 +126,31 @@
make.centerY.mas_equalTo(self.tagStackView);
}];
[self.lockImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.bottom.mas_equalTo(self.contentView).mas_offset(-4);
make.width.height.mas_equalTo(16);
make.left.mas_equalTo(18);
make.top.mas_equalTo(7);
make.width.height.mas_equalTo(9);
}];
[self.tagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(18);
make.top.mas_equalTo(47);
make.height.mas_equalTo(12);
make.width.mas_equalTo(29);
}];
}
-(void)setVeiwLucency:(CGFloat)alpha{
self.giftImageView.alpha = alpha;
self.giftNameLabel.alpha = alpha;
self.giftNumLabel.alpha = alpha;
self.nobleIconImageView.alpha = alpha;
self.tagImageView.alpha = alpha;
self.exclusiveImageView.alpha = alpha;
self.giftNewImageView.alpha = alpha;
self.limitImageView.alpha = alpha;
self.specialImageView.alpha = alpha;
self.priceLabel.alpha = alpha;
self.logoImageView.alpha = alpha;
}
- (UIImageView *)createImageView:(NSString *)imageName {
UIImageView * imageView = [[UIImageView alloc] init];
imageView.userInteractionEnabled = YES;
@@ -138,6 +163,17 @@
_giftInfo = giftInfo;
if (_giftInfo) {
self.giftImageView.imageUrl = giftInfo.giftUrl;
self.tagImageView.image = nil;
[self.tagImageView loadImageWithUrl:giftInfo.giftTag completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
CGFloat height = image.size.height > 0 ? image.size.height : 1;
CGFloat width = image.size.width * 12 / height;
[self.tagImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(18);
make.top.mas_equalTo(47);
make.height.mas_equalTo(12);
make.width.mas_equalTo(width);
}];
}];
self.giftNameLabel.text = _giftInfo.giftName.length > 0 ? _giftInfo.giftName : @"";
self.coverView.hidden = !giftInfo.isSelected;
NSString *strr = [NSString stringWithFormat:@"%ld",(long)_giftInfo.goldPrice];
@@ -169,12 +205,27 @@
self.coverView.layer.masksToBounds = YES;
self.coverView.layer.cornerRadius = 0;
}
[self setVeiwLucency:1];
if (giftInfo.giftType == GiftType_Noble && giftInfo.giftVipInfo) {
self.nobleIconImageView.hidden = NO;
self.nobleIconImageView.imageUrl = giftInfo.giftVipInfo.vipIcon;
self.lockImageView.hidden = self.curUserNobleLevel >= giftInfo.giftVipInfo.vipLevel;
} else {
self.lockImageView.hidden = self.curUserNobleLevel >= giftInfo.giftVipInfo.vipLevel;
[self setVeiwLucency:!self.lockImageView.hidden ? 0.5 : 1];
}else if(giftInfo.giftType == GiftType_Unlock && self.segmentType != GiftSegmentType_Pack){
self.lockImageView.hidden = YES;
for (int i = 0 ; i < giftInfo.unlockGiftList.count; i++) {
MewUnlockGiftModel *model = giftInfo.unlockGiftList[i];
if (model.targetGift.giftId == giftInfo.giftId){
if (model.process < model.condition){
self.lockImageView.hidden = NO;
[self setVeiwLucency:0.5];
model.unlocked = NO;
}else{
model.unlocked = YES;
}
}
}
}else {
self.nobleIconImageView.hidden = YES;
self.lockImageView.hidden = YES;
}
@@ -308,5 +359,10 @@
}
return _lockImageView;
}
- (NetImageView *)tagImageView{
if(!_tagImageView){
_tagImageView = [NetImageView new];
}
return _tagImageView;
}
@end

View File

@@ -125,7 +125,7 @@
XPGiftCollectionViewFlowLayout *layout = [[XPGiftCollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 5;
layout.minimumInteritemSpacing = 5;
layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.dataSource = self;
_collectionView.delegate = self;

View File

@@ -0,0 +1,28 @@
//
// MewUnlockGiftBroadcastView.h
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import <UIKit/UIKit.h>
#import "GiftInfoModel.h"
@class MewUnlockGiftModel;
NS_ASSUME_NONNULL_BEGIN
@protocol MewUnlockGiftBroadcastViewDelegate <NSObject>
-(void)mewUnlockGiftBroadcastViewDidChooseUnlockGift:(MewUnlockGiftModel * _Nullable)giftModel;
-(void)mewUnlockGiftBroadcastViewDidChooseDressUpGift:(GiftInfoModel *_Nullable)giftModel;
@end
@interface MewUnlockGiftBroadcastView : UIView
@property(nonatomic,strong)GiftInfoModel *giftModel;/// 解锁基础礼物
@property(nonatomic,weak) id<MewUnlockGiftBroadcastViewDelegate>delegate;
@property(nonatomic,assign) BOOL isDressUpGift;
-(void)updateGiftInfo:(GiftInfoModel *)giftModel count:(int)count;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,190 @@
//
// MewUnlockGiftBroadcastView.m
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import "MewUnlockGiftBroadcastView.h"
#import "MewUnlockGiftBroadcastViewCell.h"
@interface MewUnlockGiftBroadcastView()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,MewUnlockGiftBroadcastViewCellDelegate>
@property(nonatomic,strong) UICollectionView *collectionView;
@property(nonatomic,strong) NetImageView *dressUpView;
@end
@implementation MewUnlockGiftBroadcastView
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
self.backgroundColor = UIColorRGBAlpha(0x0A0A0A , 1);
self.layer.cornerRadius = 10;
self.layer.masksToBounds = YES;
[self addSubview:self.collectionView];
[self addSubview:self.dressUpView];
}
-(void)installConstraints{
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
[self.dressUpView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
}
-(void)setGiftModel:(GiftInfoModel *)giftModel{
_giftModel = giftModel;
self.dressUpView.image = nil;
if (_giftModel.bannerUrl.length > 0){
[self.dressUpView loadImageWithUrl:_giftModel.bannerUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.dressUpView.image = image;
}];
}
[self.collectionView reloadData];
if(_giftModel.baseGift.isSelect == YES){
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
});
}else{
int j = 0;
for (int i = 0; i < _giftModel.unlockGiftList.count ; i++) {
MewUnlockGiftModel *model = self.giftModel.unlockGiftList[i];
if(model.isSelect){
j = i;
break;
}
}
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
if (self.giftModel.unlockGiftList.count > j){
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:j + 1 inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
}
});
}
}
-(void)setIsDressUpGift:(BOOL)isDressUpGift{
_isDressUpGift = isDressUpGift;
_dressUpView.hidden = !_isDressUpGift;
}
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.giftModel.unlockGiftList.count + 1;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0){
return CGSizeMake(self.giftModel.baseGift.width, 32);
}
MewUnlockGiftModel *model = self.giftModel.unlockGiftList[indexPath.row - 1];
return CGSizeMake(model.width, 32);
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
MewUnlockGiftBroadcastViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MewUnlockGiftBroadcastViewCell class]) forIndexPath:indexPath];
cell.isBaseGift = indexPath.row == 0;
cell.baseModel = self.giftModel.baseGift;
if (indexPath.row > 0){
cell.unlockModel = [self.giftModel.unlockGiftList safeObjectAtIndex1:indexPath.row - 1];
}
cell.path = indexPath;
cell.delegate = self;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
for (int i = 0 ; i < self.giftModel.unlockGiftList.count; i++) {
MewUnlockGiftModel *model = self.giftModel.unlockGiftList[i];
if (indexPath.row == 0){
model.isSelect = NO;
self.giftModel.baseGift.isSelect = YES;
}else{
model.isSelect = i == indexPath.row-1;
self.giftModel.baseGift.isSelect = NO;
}
}
if (indexPath.row == 0){
MewUnlockGiftModel *model = [MewUnlockGiftModel new];
model.targetGift = self.giftModel.baseGift;
if (self.delegate && [self.delegate respondsToSelector:@selector(mewUnlockGiftBroadcastViewDidChooseUnlockGift:)]){
[self.delegate mewUnlockGiftBroadcastViewDidChooseUnlockGift:model];
}
}else{
if (self.delegate && [self.delegate respondsToSelector:@selector(mewUnlockGiftBroadcastViewDidChooseUnlockGift:)]){
[self.delegate mewUnlockGiftBroadcastViewDidChooseUnlockGift:self.giftModel.unlockGiftList[indexPath.row-1]];
}
}
[self.collectionView reloadData];
}
-(void)updateGiftInfo:(GiftInfoModel *)giftModel count:(int)count{
// MewUnlockGiftModel *model1 = self.giftModel.unlockGiftList[2];
// if (giftModel.giftId == self.giftModel.baseGift.giftId){
// for (int i = 0 ; i < self.giftModel.unlockGiftList.count; i++) {
// MewUnlockGiftModel *model = self.giftModel.unlockGiftList[i];
// int num = model.condition - model.process;
// if (count > num){
// model.process = model.condition;
// count = count - num;
// }else{
// model.process = model.process + count;
// }
//
// }
// }
// MewUnlockGiftModel *model2 = self.giftModel.unlockGiftList[2];
[self.collectionView reloadData];
}
#pragma mark - MewUnlockGiftBroadcastViewCellDelegate
- (void)didSelectItemAtIndexPath:(NSIndexPath *)path{
[self.collectionView scrollToItemAtIndexPath:path atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
}
-(void)clickDressUpGiftAction{
if(self.delegate && [self.delegate respondsToSelector:@selector(mewUnlockGiftBroadcastViewDidChooseDressUpGift:)]){
[self.delegate mewUnlockGiftBroadcastViewDidChooseDressUpGift:self.giftModel];
}
}
#pragma mark -
- (UICollectionView *)collectionView{
if(!_collectionView){
UICollectionViewFlowLayout *layout = [UICollectionViewFlowLayout new];
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 4;
layout.sectionInset = UIEdgeInsetsMake(0, 6, 0, 6);
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
_collectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.showsVerticalScrollIndicator = NO;
_collectionView.showsHorizontalScrollIndicator = NO;
_collectionView.backgroundColor = [UIColor clearColor];
[_collectionView registerClass:[MewUnlockGiftBroadcastViewCell class] forCellWithReuseIdentifier:NSStringFromClass([MewUnlockGiftBroadcastViewCell class])];
}
return _collectionView;
}
- (NetImageView *)dressUpView{
if(!_dressUpView){
_dressUpView = [[NetImageView alloc]init];
_dressUpView.hidden = YES;
_dressUpView.userInteractionEnabled = YES;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickDressUpGiftAction)];
[_dressUpView addGestureRecognizer:tap];
}
return _dressUpView;
}
@end

View File

@@ -0,0 +1,29 @@
//
// MewUnlockGiftBroadcastViewCell.h
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import <UIKit/UIKit.h>
#import "MewUnlockBaseGiftModel.h"
#import "MewUnlockGiftModel.h"
@protocol MewUnlockGiftBroadcastViewCellDelegate <NSObject>
-(void)didSelectItemAtIndexPath:(NSIndexPath *_Nullable)path;
@end
NS_ASSUME_NONNULL_BEGIN
@interface MewUnlockGiftBroadcastViewCell : UICollectionViewCell
@property(nonatomic,assign) BOOL isBaseGift;
@property(nonatomic,strong) MewUnlockBaseGiftModel *baseModel;
@property(nonatomic,strong) MewUnlockGiftModel *unlockModel;
@property(nonatomic,strong) NSIndexPath *path;
@property(nonatomic,weak) id<MewUnlockGiftBroadcastViewCellDelegate>delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,255 @@
//
// MewUnlockGiftBroadcastViewCell.m
// xplan-ios
//
// Created by duoban on 2024/1/26.
//
#import "MewUnlockGiftBroadcastViewCell.h"
@interface MewUnlockGiftBroadcastViewCell()
@property(nonatomic,strong) NetImageView *giftImageView;
@property(nonatomic,strong) UILabel *giftNameView;
@property(nonatomic,strong) UILabel *giftPriceView;
@property(nonatomic,strong) UIImageView *unlockIconView;
@property(nonatomic,strong) NetImageView *unlockGiftImageView;
@property(nonatomic,strong) UILabel *unlockTitleView;
@property(nonatomic,strong) UILabel *unlockNumView;
@property(nonatomic,strong) UIView *unlockBgView;
@property(nonatomic,strong) UIView *unlockProgressView;
@end
@implementation MewUnlockGiftBroadcastViewCell
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
self.contentView.layer.cornerRadius = 4;
self.contentView.layer.masksToBounds = YES;
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 1).CGColor;
self.contentView.layer.borderWidth = 0;
self.contentView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.08];
[self.contentView addSubview:self.giftImageView];
[self.contentView addSubview:self.giftNameView];
[self.contentView addSubview:self.giftPriceView];
[self.contentView addSubview:self.unlockGiftImageView];
[self.contentView addSubview:self.unlockTitleView];
[self.contentView addSubview:self.unlockBgView];
[self.unlockBgView addSubview:self.unlockProgressView];
[self.contentView addSubview:self.unlockNumView];
[self.contentView addSubview:self.unlockIconView];
}
-(void)setIsBaseGift:(BOOL)isBaseGift{
_isBaseGift = isBaseGift;
self.giftImageView.hidden = !isBaseGift;
self.giftNameView.hidden = !isBaseGift;
self.giftPriceView.hidden = !isBaseGift;
self.unlockGiftImageView.hidden = isBaseGift;
self.unlockTitleView.hidden = isBaseGift;
self.unlockBgView.hidden = isBaseGift;
self.unlockNumView.hidden = isBaseGift;
self.unlockIconView.hidden = isBaseGift;
}
-(void)installConstraints{
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(3);
make.centerY.equalTo(self.contentView);
make.width.height.mas_equalTo(28);
}];
[self.giftNameView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(33);
make.top.mas_equalTo(3);
make.height.mas_equalTo(14);
}];
[self.giftPriceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(14);
make.left.mas_equalTo(33);
make.height.mas_equalTo(13);
}];
[self.unlockIconView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(8);
make.left.mas_equalTo(3);
make.top.mas_equalTo(2);
}];
[self.unlockGiftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(28);
make.left.mas_equalTo(3);
make.centerY.equalTo(self.contentView);
}];
[self.unlockTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(33);
make.top.mas_equalTo(3);
make.height.mas_equalTo(14);
}];
[self.unlockNumView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.unlockTitleView.mas_right).mas_offset(3);
make.height.mas_equalTo(13);
make.width.mas_greaterThanOrEqualTo(10);
make.top.mas_equalTo(17);
}];
[self.unlockBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(33);
make.right.equalTo(self.unlockNumView.mas_left).mas_offset(-2);
make.height.mas_equalTo(6);
make.centerY.equalTo(self.unlockNumView);
}];
[self.unlockProgressView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.equalTo(self.unlockBgView);
make.width.mas_equalTo(0);
}];
}
-(void)setBaseModel:(MewUnlockBaseGiftModel *)baseModel{
_baseModel = baseModel;
UIFont *font = [UIFont systemFontOfSize:9 weight:UIFontWeightRegular];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:@(_baseModel.goldPrice).stringValue attributes:@{NSFontAttributeName:font,NSForegroundColorAttributeName:UIColorFromRGB(0xCED1DB)}];
UIImage *iconImage = kImage(@"gift_diamond");
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
attachment.bounds = CGRectMake(0, roundf(font.capHeight - iconImage.size.height)/2.f, iconImage.size.width, iconImage.size.height);;
attachment.image = iconImage;
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment] atIndex:0];
_giftPriceView.attributedText = textAtt;
_giftImageView.image = nil;
[_giftImageView loadImageWithUrl:_baseModel.giftUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.giftImageView.image = image;
}];
_giftNameView.text = _baseModel.giftName;
self.contentView.layer.borderWidth = _baseModel.isSelect ? 1 : 0;
}
- (void)setUnlockModel:(MewUnlockGiftModel *)unlockModel{
_unlockModel = unlockModel;
_unlockGiftImageView.image = nil;
[_unlockGiftImageView loadImageWithUrl:_unlockModel.targetGift.giftUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.unlockGiftImageView.image = image;
}];
NSMutableAttributedString *numAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%d/%d",_unlockModel.process,_unlockModel.condition] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xCED1DB),NSFontAttributeName:[UIFont systemFontOfSize:9 weight:UIFontWeightRegular]}];
_unlockNumView.attributedText = numAtt;
if(_unlockModel.condition > 0){
CGFloat value = _unlockModel.process / (CGFloat)_unlockModel.condition;
[self.unlockProgressView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.equalTo(self.unlockBgView);
make.width.equalTo(self.unlockBgView).multipliedBy(value);
}];
}
[self setVeiwLucency:1];
if (_unlockModel.process < _unlockModel.condition){
_unlockIconView.hidden = NO;
[self setVeiwLucency:0.5];
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 0.5).CGColor ;
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@可解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
}else{
_unlockIconView.hidden = YES;
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 1).CGColor ;
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@已解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
}
if (!_baseModel.isSelect){
self.contentView.layer.borderWidth = _unlockModel.isSelect ? 1 : 0;
}else{
self.contentView.layer.borderWidth = 0;
}
}
-(void)setVeiwLucency:(CGFloat)alpha{
self.unlockGiftImageView.alpha = alpha;
self.unlockTitleView.alpha = alpha;
self.unlockBgView.alpha = alpha;
self.unlockNumView.alpha = alpha;
self.unlockProgressView.alpha = alpha;
}
#pragma mark -
- (NetImageView *)giftImageView{
if(!_giftImageView){
_giftImageView = [NetImageView new];
}
return _giftImageView;
}
- (UILabel *)giftNameView{
if(!_giftNameView){
_giftNameView = [UILabel labelInitWithText:@"甜心草莓" font:[UIFont systemFontOfSize:10 weight:UIFontWeightRegular] textColor:[UIColor whiteColor]];
}
return _giftNameView;
}
- (UILabel *)giftPriceView{
if(!_giftPriceView){
_giftPriceView = [UILabel new];
UIFont *font = [UIFont systemFontOfSize:9 weight:UIFontWeightRegular];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSFontAttributeName:font,NSForegroundColorAttributeName:UIColorFromRGB(0xCED1DB)}];
UIImage *iconImage = kImage(@"gift_diamond");
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
attachment.bounds = CGRectMake(0, roundf(font.capHeight - iconImage.size.height)/2.f, iconImage.size.width, iconImage.size.height);;
attachment.image = iconImage;
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment] atIndex:0];
_giftPriceView.attributedText = textAtt;
}
return _giftPriceView;
}
- (UIImageView *)unlockIconView{
if(!_unlockIconView){
_unlockIconView = [UIImageView new];
_unlockIconView.image = kImage(@"room_gift_noble_lock");
}
return _unlockIconView;
}
- (NetImageView *)unlockGiftImageView{
if(!_unlockGiftImageView){
_unlockGiftImageView = [NetImageView new];
}
return _unlockGiftImageView;
}
-(UILabel *)unlockTitleView{
if(!_unlockTitleView){
_unlockTitleView = [UILabel new];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:@"送出 5个 甜心草莓可解锁" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[@"送出 5个 甜心草莓可解锁" rangeOfString:@"5个"]];
_unlockTitleView.attributedText = textAtt;
}
return _unlockTitleView;
}
- (UIView *)unlockBgView{
if(!_unlockBgView){
_unlockBgView = [UIView new];
_unlockBgView.backgroundColor = UIColorFromRGB(0x696D7A);
_unlockBgView.layer.cornerRadius = 3;
_unlockBgView.layer.masksToBounds = YES;
}
return _unlockBgView;
}
- (UIView *)unlockProgressView{
if(!_unlockProgressView){
_unlockProgressView = [UIView new];
_unlockProgressView.backgroundColor = UIColorFromRGB(0xFFDA24);
}
return _unlockProgressView;
}
- (UILabel *)unlockNumView{
if(!_unlockNumView){
_unlockNumView = [UILabel new];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:@"0/0" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:9 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:9 weight:UIFontWeightRegular]} range:[@"0/0" rangeOfString:@"0"]];
_unlockNumView.attributedText = textAtt;
}
return _unlockNumView;
}
@end

View File

@@ -105,11 +105,7 @@
}];
}
[self updateCountStatus];
if (self.arrowButton.isSelected) {
self.arrowButton.transform = CGAffineTransformMakeRotation(M_PI);
} else {
self.arrowButton.transform = CGAffineTransformIdentity;;
}
}
- (void)sureButtonAction:(UIButton *)sender {
@@ -500,6 +496,7 @@
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_arrowButton setImage:[UIImage imageNamed:@"gift_bar_count_arrow"] forState:UIControlStateNormal];
[_arrowButton addTarget:self action:@selector(arrowButtonAction:) forControlEvents:UIControlEventTouchUpInside];
self.arrowButton.transform = CGAffineTransformMakeRotation(M_PI);
}
return _arrowButton;
}

View File

@@ -9,6 +9,7 @@
#import "XPSendGiftView.h"
///Model
#import "RoomInfoModel.h"
#import "MewUnlockGiftModel.h"
#import "XPPrivilegeCardItemModel.h"
NS_ASSUME_NONNULL_BEGIN
@@ -64,10 +65,12 @@ typedef NS_ENUM(NSInteger, GiftSegmentType) {
@property (nonatomic,assign) RoomType roomType;
///房间数据
@property(nonatomic,strong) RoomInfoModel *roomInfo;
///解锁礼物
@property(nonatomic,strong) MewUnlockGiftModel *unlockGiftModel;
///头部礼物类型变更
/// - Parameter headType: 1礼物 2互动
- (void)giftHeadTypeHadChange:(NSInteger)headType;
-(void)updateGiftInfo:(GiftInfoModel *)giftModel count:(int)count;
@end
NS_ASSUME_NONNULL_END

View File

@@ -38,6 +38,8 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
@property (nonatomic,strong) UIButton *packGiftButton;
///
@property (nonatomic,strong) UIButton *luckyGiftButton;
@property(nonatomic,strong) UILabel *spiceTipsView;
///
@property (nonatomic,strong) UIButton *nobleGiftButton;
///
@@ -121,6 +123,14 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
self.privilegeBtton.selected = NO;
sender.selected = !sender.selected;
self.segmentType = sender.tag;
if(sender == self.luckyGiftButton){
self.spiceTipsView.hidden = YES;
NSString *isHaveTips = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsHaveSpiceGiftTips"];
if(isHaveTips == nil){
[[NSUserDefaults standardUserDefaults] setValue:@"YES" forKey:@"kIsHaveSpiceGiftTips"];
[[NSUserDefaults standardUserDefaults]synchronize];
}
}
}
#pragma mark - Public Method
@@ -140,8 +150,9 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
[self.freshIconImage removeFromSuperview];
self.freshIconImage = nil;
[self.segmentStackView addArrangedSubview:self.normalGiftButton];
[self.segmentStackView addArrangedSubview:self.nobleGiftButton];
[self.segmentStackView addArrangedSubview:self.luckyGiftButton];
[self.segmentStackView addArrangedSubview:self.nobleGiftButton];
[self.segmentStackView addArrangedSubview:self.weekStarButton];
[self.segmentStackView addArrangedSubview:self.privilegeBtton];
@@ -187,8 +198,8 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
[self.scrollView addSubview:self.segmentStackView];
///
[self.segmentStackView addArrangedSubview:self.normalGiftButton];
[self.segmentStackView addArrangedSubview:self.nobleGiftButton];
[self.segmentStackView addArrangedSubview:self.luckyGiftButton];
[self.segmentStackView addArrangedSubview:self.nobleGiftButton];
[self.segmentStackView addArrangedSubview:self.weekStarButton];
[self.segmentStackView addArrangedSubview:self.privilegeBtton];
[self.segmentStackView addArrangedSubview:self.anchorButton];
@@ -196,6 +207,9 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
///
[self.giftStackView addArrangedSubview:self.giftcollectionView];
[self.luckyGiftButton addSubview:self.spiceTipsView];
// [self.giftStackView addArrangedSubview:self.pageController];
}
@@ -232,6 +246,19 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
// [self.pageController mas_makeConstraints:^(MASConstraintMaker *make) {
// make.height.mas_equalTo(10);
// }];
[self.spiceTipsView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(24);
make.height.mas_equalTo(12);
make.centerX.equalTo(self.luckyGiftButton.mas_right).mas_offset(-5);
make.top.mas_equalTo(1);
}];
NSString *isHaveTips = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsHaveSpiceGiftTips"];
if (isHaveTips == nil){
self.spiceTipsView.hidden = NO;
}
}
- (void)resetSelectPrivilege:(NSArray<XPPrivilegeCardItemModel *> *)array {
for (XPPrivilegeCardItemModel * gift in array) {
@@ -386,6 +413,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
}
XPGiftItemCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGiftItemCollectionViewCell class]) forIndexPath:indexPath];
cell.segmentType = self.segmentType;
GiftInfoModel * giftInfo;
giftInfo= [self.datasource safeObjectAtIndex1:indexPath.item];
cell.curUserNobleLevel = self.curUserNobleLevel;
@@ -417,6 +445,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftInfoView:didClickItem:type:)]) {
[self.delegate xPGiftInfoView:self didClickItem:giftInfo type:self.segmentType];
}
}
}
@@ -443,7 +472,51 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
_roomInfo = roomInfo;
}
- (void)setUnlockGiftModel:(MewUnlockGiftModel *)unlockGiftModel{
_unlockGiftModel = unlockGiftModel;
NSInteger item = 0;
for (GiftInfoModel *model in self.datasource) {
if (model.giftId == unlockGiftModel.targetGift.giftId){
item = [self.datasource indexOfObject:model];
break;
}
}
if (self.datasource.count > 0) {
[self resetSelectGift:self.datasource];
GiftInfoModel * giftInfo = [self.datasource safeObjectAtIndex1:item];
[self dealSelectGift:giftInfo];
[self.giftcollectionView reloadData];
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
[self.giftcollectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:item inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
});
if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftInfoView:didClickItem:type:)]) {
[self.delegate xPGiftInfoView:self didClickItem:giftInfo type:self.segmentType];
}
}
}
-(void)updateGiftInfo:(GiftInfoModel *)giftModel count:(int)count{
for (GiftInfoModel *obj in self.datasource) {
if (obj.baseGift.giftId == giftModel.giftId){
for (int i = 0 ; i < obj.unlockGiftList.count; i++) {
MewUnlockGiftModel *model = obj.unlockGiftList[i];
int num = count + model.process;
if (num > model.condition){
model.process = model.condition;
}else{
model.process = num;
}
}
}
}
[self.giftcollectionView reloadData];
}
- (void)setSegmentType:(GiftSegmentType)segmentType {
if (segmentType == _segmentType) {
return;
@@ -583,7 +656,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
NSMutableArray * anchor = [NSMutableArray array];
NSMutableArray * punishArray = [NSMutableArray array];
[_normalOriginArray enumerateObjectsUsingBlock:^(GiftInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.giftType == GiftType_Lucky) {
if (obj.giftType == GiftType_Lucky || obj.giftType == GiftType_Unlock || obj.giftType == GiftType_DressUp) {
[luckyArray addObject:obj];
} else if(obj.giftType == GiftType_Game) {
[normaleArray addObject:obj];
@@ -763,7 +836,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
- (UIButton *)normalGiftButton {
if (!_normalGiftButton) {
_normalGiftButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_normalGiftButton setTitle:@"礼物" forState:UIControlStateNormal];
[_normalGiftButton setTitle:@"普通" forState:UIControlStateNormal];
[_normalGiftButton setTitleColor:[ThemeColor giftSegmentSelectTitleColor] forState:UIControlStateSelected];
[_normalGiftButton setTitleColor:[ThemeColor giftSegmentNormalTitleColor] forState:UIControlStateNormal];
_normalGiftButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
@@ -777,7 +850,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
- (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:13 weight:UIFontWeightSemibold];
@@ -787,7 +860,17 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
}
return _luckyGiftButton;
}
- (UILabel *)spiceTipsView{
if(!_spiceTipsView){
_spiceTipsView = [UILabel labelInitWithText:@"New" font:[UIFont systemFontOfSize:8 weight:UIFontWeightMedium] textColor:[UIColor whiteColor]];
_spiceTipsView.textAlignment = NSTextAlignmentCenter;
_spiceTipsView.hidden = YES;
_spiceTipsView.layer.cornerRadius = 12/2;
_spiceTipsView.layer.masksToBounds = YES;
_spiceTipsView.backgroundColor = UIColorFromRGB(0xFF425B);
}
return _spiceTipsView;
}
- (UIButton *)nobleGiftButton {
if (!_nobleGiftButton) {
_nobleGiftButton = [UIButton buttonWithType:UIButtonTypeCustom];
@@ -805,7 +888,7 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
- (UIButton *)weekStarButton {
if (!_weekStarButton) {
_weekStarButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_weekStarButton setTitle:@"星座礼物" forState:UIControlStateNormal];
[_weekStarButton setTitle:@"星座" forState:UIControlStateNormal];
[_weekStarButton setTitleColor:[ThemeColor giftSegmentSelectTitleColor] forState:UIControlStateSelected];
[_weekStarButton setTitleColor:[ThemeColor giftSegmentNormalTitleColor] forState:UIControlStateNormal];
_weekStarButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];

View File

@@ -118,7 +118,7 @@
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(0);
make.left.right.mas_equalTo(self).inset(10);
make.height.mas_equalTo(37);
make.height.mas_equalTo(40);
}];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -10,8 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
@class XPGraffitiGiftView;
@protocol XPGraffitiGiftViewDelegate <NSObject>
///点击切换
- (void)xPGraffitiGiftView:(XPGraffitiGiftView *)view didClickChange:(UILabel *)sender;
///点击了关闭
- (void)xPGraffitiGiftView:(XPGraffitiGiftView *)view didClickClose:(UIButton *)sender;
///绘画完成了

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More