房内发送红包

This commit is contained in:
chenguilong
2022-09-01 19:05:09 +08:00
parent 8161494d4b
commit aff335cf1b
23 changed files with 1227 additions and 12 deletions

View File

@@ -221,4 +221,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 034aba5260596f012774aa92cf2207105b5af99f PODFILE CHECKSUM: 034aba5260596f012774aa92cf2207105b5af99f
COCOAPODS: 1.11.3 COCOAPODS: 1.11.2

View File

@@ -221,6 +221,11 @@
9B9EEF4E27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF4D27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m */; }; 9B9EEF4E27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF4D27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m */; };
9B9EEF5427C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF5327C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m */; }; 9B9EEF5427C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF5327C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m */; };
9BA708A12823D4C900C474A2 /* LittleGameScrollStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA708A02823D4C900C474A2 /* LittleGameScrollStageView.m */; }; 9BA708A12823D4C900C474A2 /* LittleGameScrollStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA708A02823D4C900C474A2 /* LittleGameScrollStageView.m */; };
9BA812D228BF145700783EA7 /* ClientRedPacketModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA812D128BF145700783EA7 /* ClientRedPacketModel.m */; };
9BA812D628BF52E100783EA7 /* XPRoomSendRedPacketViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA812D528BF52E100783EA7 /* XPRoomSendRedPacketViewController.m */; };
9BA812DD28BF6A7300783EA7 /* XPRoomRedPacketPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA812DC28BF6A7300783EA7 /* XPRoomRedPacketPresenter.m */; };
9BA812E028BF6ABB00783EA7 /* Api+RedPacket.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA812DF28BF6ABB00783EA7 /* Api+RedPacket.m */; };
9BA812E428BF70A600783EA7 /* XPRoomRedPacketPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA812E328BF70A600783EA7 /* XPRoomRedPacketPwdView.m */; };
9BA8A47227C5D590000365A3 /* XPVoiceCardCircleLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA8A47127C5D590000365A3 /* XPVoiceCardCircleLayer.m */; }; 9BA8A47227C5D590000365A3 /* XPVoiceCardCircleLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA8A47127C5D590000365A3 /* XPVoiceCardCircleLayer.m */; };
9BA8A47527C60D9F000365A3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BA8A47427C60D9F000365A3 /* AudioToolbox.framework */; }; 9BA8A47527C60D9F000365A3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BA8A47427C60D9F000365A3 /* AudioToolbox.framework */; };
9BA8A47727C60DF7000365A3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BA8A47627C60DF7000365A3 /* AVFoundation.framework */; }; 9BA8A47727C60DF7000365A3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BA8A47627C60DF7000365A3 /* AVFoundation.framework */; };
@@ -932,8 +937,6 @@
E8A88D3027E85EEA00CA8837 /* RoomPKInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A88D2F27E85EEA00CA8837 /* RoomPKInfoModel.m */; }; E8A88D3027E85EEA00CA8837 /* RoomPKInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A88D2F27E85EEA00CA8837 /* RoomPKInfoModel.m */; };
E8AA6EEF27DF1E6B009B4C2B /* XPRoomTopicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AA6EEE27DF1E6B009B4C2B /* XPRoomTopicViewController.m */; }; E8AA6EEF27DF1E6B009B4C2B /* XPRoomTopicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AA6EEE27DF1E6B009B4C2B /* XPRoomTopicViewController.m */; };
E8AA6EF227DF1E97009B4C2B /* XPRoomTopicPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AA6EF127DF1E97009B4C2B /* XPRoomTopicPresenter.m */; }; E8AA6EF227DF1E97009B4C2B /* XPRoomTopicPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AA6EF127DF1E97009B4C2B /* XPRoomTopicPresenter.m */; };
E8AB633328AE51470023B0D2 /* XPSailingPrizeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB633228AE51470023B0D2 /* XPSailingPrizeView.m */; };
E8AB633628AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB633528AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.m */; };
E8AB630D28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB630C28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m */; }; E8AB630D28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB630C28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m */; };
E8AB631028ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB630F28ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.m */; }; E8AB631028ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB630F28ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.m */; };
E8AB631328ADDCF20023B0D2 /* XPMonentsTopicHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB631228ADDCF20023B0D2 /* XPMonentsTopicHeaderView.m */; }; E8AB631328ADDCF20023B0D2 /* XPMonentsTopicHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB631228ADDCF20023B0D2 /* XPMonentsTopicHeaderView.m */; };
@@ -944,6 +947,8 @@
E8AB632728AE13210023B0D2 /* XPMonentsTopicListPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB632628AE13210023B0D2 /* XPMonentsTopicListPresenter.m */; }; E8AB632728AE13210023B0D2 /* XPMonentsTopicListPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB632628AE13210023B0D2 /* XPMonentsTopicListPresenter.m */; };
E8AB632C28AE19600023B0D2 /* XPMonentsMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB632B28AE19600023B0D2 /* XPMonentsMineViewController.m */; }; E8AB632C28AE19600023B0D2 /* XPMonentsMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB632B28AE19600023B0D2 /* XPMonentsMineViewController.m */; };
E8AB632F28AE19DE0023B0D2 /* XPMonentMinePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB632E28AE19DE0023B0D2 /* XPMonentMinePresenter.m */; }; E8AB632F28AE19DE0023B0D2 /* XPMonentMinePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB632E28AE19DE0023B0D2 /* XPMonentMinePresenter.m */; };
E8AB633328AE51470023B0D2 /* XPSailingPrizeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB633228AE51470023B0D2 /* XPSailingPrizeView.m */; };
E8AB633628AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AB633528AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.m */; };
E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC720F26F43955007D6E91 /* UIImageConstant.m */; }; E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC720F26F43955007D6E91 /* UIImageConstant.m */; };
E8AC721326F46ADD007D6E91 /* XPMineSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721226F46ADD007D6E91 /* XPMineSettingViewController.m */; }; E8AC721326F46ADD007D6E91 /* XPMineSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721226F46ADD007D6E91 /* XPMineSettingViewController.m */; };
E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721526F46B06007D6E91 /* XPMineSettingTableViewCell.m */; }; E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721526F46B06007D6E91 /* XPMineSettingTableViewCell.m */; };
@@ -1589,6 +1594,17 @@
9B9EEF5327C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardRecordPropModel.m; sourceTree = "<group>"; }; 9B9EEF5327C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardRecordPropModel.m; sourceTree = "<group>"; };
9BA7089F2823D4C900C474A2 /* LittleGameScrollStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LittleGameScrollStageView.h; sourceTree = "<group>"; }; 9BA7089F2823D4C900C474A2 /* LittleGameScrollStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LittleGameScrollStageView.h; sourceTree = "<group>"; };
9BA708A02823D4C900C474A2 /* LittleGameScrollStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LittleGameScrollStageView.m; sourceTree = "<group>"; }; 9BA708A02823D4C900C474A2 /* LittleGameScrollStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LittleGameScrollStageView.m; sourceTree = "<group>"; };
9BA812D028BF145700783EA7 /* ClientRedPacketModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ClientRedPacketModel.h; sourceTree = "<group>"; };
9BA812D128BF145700783EA7 /* ClientRedPacketModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ClientRedPacketModel.m; sourceTree = "<group>"; };
9BA812D428BF52E100783EA7 /* XPRoomSendRedPacketViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomSendRedPacketViewController.h; sourceTree = "<group>"; };
9BA812D528BF52E100783EA7 /* XPRoomSendRedPacketViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomSendRedPacketViewController.m; sourceTree = "<group>"; };
9BA812DB28BF6A7300783EA7 /* XPRoomRedPacketPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomRedPacketPresenter.h; sourceTree = "<group>"; };
9BA812DC28BF6A7300783EA7 /* XPRoomRedPacketPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomRedPacketPresenter.m; sourceTree = "<group>"; };
9BA812DE28BF6ABB00783EA7 /* Api+RedPacket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+RedPacket.h"; sourceTree = "<group>"; };
9BA812DF28BF6ABB00783EA7 /* Api+RedPacket.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+RedPacket.m"; sourceTree = "<group>"; };
9BA812E128BF6AFB00783EA7 /* XPRoomRedPacketProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomRedPacketProtocol.h; sourceTree = "<group>"; };
9BA812E228BF70A600783EA7 /* XPRoomRedPacketPwdView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomRedPacketPwdView.h; sourceTree = "<group>"; };
9BA812E328BF70A600783EA7 /* XPRoomRedPacketPwdView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomRedPacketPwdView.m; sourceTree = "<group>"; };
9BA8A47027C5D590000365A3 /* XPVoiceCardCircleLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPVoiceCardCircleLayer.h; sourceTree = "<group>"; }; 9BA8A47027C5D590000365A3 /* XPVoiceCardCircleLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPVoiceCardCircleLayer.h; sourceTree = "<group>"; };
9BA8A47127C5D590000365A3 /* XPVoiceCardCircleLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPVoiceCardCircleLayer.m; sourceTree = "<group>"; }; 9BA8A47127C5D590000365A3 /* XPVoiceCardCircleLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPVoiceCardCircleLayer.m; sourceTree = "<group>"; };
9BA8A47427C60D9F000365A3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 9BA8A47427C60D9F000365A3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
@@ -2865,10 +2881,6 @@
E8AA6EF027DF1E97009B4C2B /* XPRoomTopicPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTopicPresenter.h; sourceTree = "<group>"; }; E8AA6EF027DF1E97009B4C2B /* XPRoomTopicPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTopicPresenter.h; sourceTree = "<group>"; };
E8AA6EF127DF1E97009B4C2B /* XPRoomTopicPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomTopicPresenter.m; sourceTree = "<group>"; }; E8AA6EF127DF1E97009B4C2B /* XPRoomTopicPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomTopicPresenter.m; sourceTree = "<group>"; };
E8AA6EF327DF1EB6009B4C2B /* XPRoomTopicProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTopicProtocol.h; sourceTree = "<group>"; }; E8AA6EF327DF1EB6009B4C2B /* XPRoomTopicProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTopicProtocol.h; sourceTree = "<group>"; };
E8AB633128AE51470023B0D2 /* XPSailingPrizeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingPrizeView.h; sourceTree = "<group>"; };
E8AB633228AE51470023B0D2 /* XPSailingPrizeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingPrizeView.m; sourceTree = "<group>"; };
E8AB633428AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingPrizeCollectionViewCell.h; sourceTree = "<group>"; };
E8AB633528AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingPrizeCollectionViewCell.m; sourceTree = "<group>"; };
E8AB630B28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentTopicContainerViewController.h; sourceTree = "<group>"; }; E8AB630B28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentTopicContainerViewController.h; sourceTree = "<group>"; };
E8AB630C28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentTopicContainerViewController.m; sourceTree = "<group>"; }; E8AB630C28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentTopicContainerViewController.m; sourceTree = "<group>"; };
E8AB630E28ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsTopicRecommondViewController.h; sourceTree = "<group>"; }; E8AB630E28ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsTopicRecommondViewController.h; sourceTree = "<group>"; };
@@ -2893,6 +2905,10 @@
E8AB632D28AE19DE0023B0D2 /* XPMonentMinePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentMinePresenter.h; sourceTree = "<group>"; }; E8AB632D28AE19DE0023B0D2 /* XPMonentMinePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentMinePresenter.h; sourceTree = "<group>"; };
E8AB632E28AE19DE0023B0D2 /* XPMonentMinePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentMinePresenter.m; sourceTree = "<group>"; }; E8AB632E28AE19DE0023B0D2 /* XPMonentMinePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentMinePresenter.m; sourceTree = "<group>"; };
E8AB633028AE19FA0023B0D2 /* XPMonentsMineProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsMineProtocol.h; sourceTree = "<group>"; }; E8AB633028AE19FA0023B0D2 /* XPMonentsMineProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsMineProtocol.h; sourceTree = "<group>"; };
E8AB633128AE51470023B0D2 /* XPSailingPrizeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingPrizeView.h; sourceTree = "<group>"; };
E8AB633228AE51470023B0D2 /* XPSailingPrizeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingPrizeView.m; sourceTree = "<group>"; };
E8AB633428AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingPrizeCollectionViewCell.h; sourceTree = "<group>"; };
E8AB633528AE54A40023B0D2 /* XPSailingPrizeCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingPrizeCollectionViewCell.m; sourceTree = "<group>"; };
E8AC720E26F43955007D6E91 /* UIImageConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIImageConstant.h; sourceTree = "<group>"; }; E8AC720E26F43955007D6E91 /* UIImageConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIImageConstant.h; sourceTree = "<group>"; };
E8AC720F26F43955007D6E91 /* UIImageConstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageConstant.m; sourceTree = "<group>"; }; E8AC720F26F43955007D6E91 /* UIImageConstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageConstant.m; sourceTree = "<group>"; };
E8AC721126F46ADD007D6E91 /* XPMineSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingViewController.h; sourceTree = "<group>"; }; E8AC721126F46ADD007D6E91 /* XPMineSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingViewController.h; sourceTree = "<group>"; };
@@ -3881,6 +3897,8 @@
E8DEC99427648FA50078CB70 /* ClientConfig.m */, E8DEC99427648FA50078CB70 /* ClientConfig.m */,
E875FA8527D619820086ED04 /* ClientDataModel.h */, E875FA8527D619820086ED04 /* ClientDataModel.h */,
E875FA8627D619820086ED04 /* ClientDataModel.m */, E875FA8627D619820086ED04 /* ClientDataModel.m */,
9BA812D028BF145700783EA7 /* ClientRedPacketModel.h */,
9BA812D128BF145700783EA7 /* ClientRedPacketModel.m */,
); );
path = Tabbar; path = Tabbar;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -4530,6 +4548,46 @@
name = "Recovered References"; name = "Recovered References";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
9BA812D328BF52A500783EA7 /* SendRedPacket */ = {
isa = PBXGroup;
children = (
9BA812D928BF53DD00783EA7 /* Api */,
9BA812D828BF539300783EA7 /* Protocol */,
9BA812D728BF538E00783EA7 /* Presenter */,
9BA812D428BF52E100783EA7 /* XPRoomSendRedPacketViewController.h */,
9BA812D528BF52E100783EA7 /* XPRoomSendRedPacketViewController.m */,
9BA812E228BF70A600783EA7 /* XPRoomRedPacketPwdView.h */,
9BA812E328BF70A600783EA7 /* XPRoomRedPacketPwdView.m */,
);
path = SendRedPacket;
sourceTree = "<group>";
};
9BA812D728BF538E00783EA7 /* Presenter */ = {
isa = PBXGroup;
children = (
9BA812DB28BF6A7300783EA7 /* XPRoomRedPacketPresenter.h */,
9BA812DC28BF6A7300783EA7 /* XPRoomRedPacketPresenter.m */,
);
path = Presenter;
sourceTree = "<group>";
};
9BA812D828BF539300783EA7 /* Protocol */ = {
isa = PBXGroup;
children = (
9BA812E128BF6AFB00783EA7 /* XPRoomRedPacketProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
};
9BA812D928BF53DD00783EA7 /* Api */ = {
isa = PBXGroup;
children = (
9BA812DE28BF6ABB00783EA7 /* Api+RedPacket.h */,
9BA812DF28BF6ABB00783EA7 /* Api+RedPacket.m */,
);
path = Api;
sourceTree = "<group>";
};
9BB549632782F96F0090CD26 /* SubViews */ = { 9BB549632782F96F0090CD26 /* SubViews */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -7093,6 +7151,7 @@
E8AEAED8271413530017FCE0 /* View */ = { E8AEAED8271413530017FCE0 /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
9BA812D328BF52A500783EA7 /* SendRedPacket */,
E8751E5128A629EB0056EF44 /* Sailing */, E8751E5128A629EB0056EF44 /* Sailing */,
9BFE0D8F289903F600F53C24 /* TaskTip */, 9BFE0D8F289903F600F53C24 /* TaskTip */,
9B9BBF80288FBF93004E2E74 /* NewUserGift */, 9B9BBF80288FBF93004E2E74 /* NewUserGift */,
@@ -8878,6 +8937,7 @@
E86596512701A1C000846EBD /* StatisticsService.m in Sources */, E86596512701A1C000846EBD /* StatisticsService.m in Sources */,
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */, E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */,
9BE01AED2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m in Sources */, 9BE01AED2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m in Sources */,
9BA812D228BF145700783EA7 /* ClientRedPacketModel.m in Sources */,
E8C1670928067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.m in Sources */, E8C1670928067DAA00ECB15C /* XPMineGuildSuperAdminSetViewController.m in Sources */,
E8E859DA28264C2300EE4857 /* SJXCSMIPHelper.m in Sources */, E8E859DA28264C2300EE4857 /* SJXCSMIPHelper.m in Sources */,
E890BC04273CF0500007C46B /* XPGiftCountModel.m in Sources */, E890BC04273CF0500007C46B /* XPGiftCountModel.m in Sources */,
@@ -8926,6 +8986,7 @@
E82E74FD2828B23D00C25EF7 /* xplan-ios.xcdatamodeld in Sources */, E82E74FD2828B23D00C25EF7 /* xplan-ios.xcdatamodeld in Sources */,
18EE3FE22750C29D00A452BF /* NIMBadgeView.m in Sources */, 18EE3FE22750C29D00A452BF /* NIMBadgeView.m in Sources */,
E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */, E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */,
9BA812E428BF70A600783EA7 /* XPRoomRedPacketPwdView.m in Sources */,
E8998D8B2859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.m in Sources */, E8998D8B2859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.m in Sources */,
E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */, E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */,
9B2A12D82783F42300CED41B /* XPNoblePrivilegeContentCell.m in Sources */, 9B2A12D82783F42300CED41B /* XPNoblePrivilegeContentCell.m in Sources */,
@@ -8956,6 +9017,7 @@
E800162C2803FE4900D6D17A /* GuildIncomeRecordModel.m in Sources */, E800162C2803FE4900D6D17A /* GuildIncomeRecordModel.m in Sources */,
9BE01ACE28925F7D00B50299 /* XPMineNewUserRechargeView.m in Sources */, 9BE01ACE28925F7D00B50299 /* XPMineNewUserRechargeView.m in Sources */,
E83ABF03280EC90C00322EE4 /* ContentApplicationShareModel.m in Sources */, E83ABF03280EC90C00322EE4 /* ContentApplicationShareModel.m in Sources */,
9BA812E028BF6ABB00783EA7 /* Api+RedPacket.m in Sources */,
E81A654928351B9500F55894 /* XPMonentsRecommendHeaderView.m in Sources */, E81A654928351B9500F55894 /* XPMonentsRecommendHeaderView.m in Sources */,
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */, E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */,
E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */, E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */,
@@ -9158,6 +9220,7 @@
186A534B26FC6ED900D67B2C /* TTPopupManagerService.m in Sources */, 186A534B26FC6ED900D67B2C /* TTPopupManagerService.m in Sources */,
E8BD0F8B28A9EB0A00DE050D /* RoomSailingPrizeListModel.m in Sources */, E8BD0F8B28A9EB0A00DE050D /* RoomSailingPrizeListModel.m in Sources */,
E8834E35280009090029CCC1 /* XPMineGuildSearchMemberTableViewCell.m in Sources */, E8834E35280009090029CCC1 /* XPMineGuildSearchMemberTableViewCell.m in Sources */,
9BA812DD28BF6A7300783EA7 /* XPRoomRedPacketPresenter.m in Sources */,
18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */, 18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */,
E81366F626F0C0DF0076364C /* LoginFullInfoPresenter.m in Sources */, E81366F626F0C0DF0076364C /* LoginFullInfoPresenter.m in Sources */,
E8A30BEE28534AB1003B4873 /* XPSessionFindNewPresenter.m in Sources */, E8A30BEE28534AB1003B4873 /* XPSessionFindNewPresenter.m in Sources */,
@@ -9561,6 +9624,7 @@
E8E859C328264C2300EE4857 /* HTTPDataResponse.m in Sources */, E8E859C328264C2300EE4857 /* HTTPDataResponse.m in Sources */,
E87C0A9D27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m in Sources */, E87C0A9D27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m in Sources */,
9B92A37027981F5B00AD168F /* XPSkillCardEditViewController.m in Sources */, 9B92A37027981F5B00AD168F /* XPSkillCardEditViewController.m in Sources */,
9BA812D628BF52E100783EA7 /* XPRoomSendRedPacketViewController.m in Sources */,
E86E79D328A4E94E006DAF48 /* SessionRiskView.m in Sources */, E86E79D328A4E94E006DAF48 /* SessionRiskView.m in Sources */,
E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */, E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */,
E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */, E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */,

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

View File

@@ -56,6 +56,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
CustomMessageType_Monents = 52, CustomMessageType_Monents = 52,
///收藏房间 ///收藏房间
CustomMessageType_Collection_Room = 59, CustomMessageType_Collection_Room = 59,
///收藏房间
CustomMessageType_Collection_RedPacket = 60,
///福袋消息 ///福袋消息
CustomMessageType_LuckyBag = 61, CustomMessageType_LuckyBag = 61,
///发现萌新 ///发现萌新
@@ -314,6 +316,13 @@ typedef NS_ENUM(NSUInteger, Custom_Noti_Sub_Dynamic) {
/// app内分享动态 /// app内分享动态
Custom_Message_Sub_Monents_Share = 524, Custom_Message_Sub_Monents_Share = 524,
}; };
///first = CustomMessageType_Collection_RedPacket
typedef NS_ENUM(NSUInteger, CustomMessageSubRedPacket) {
/// 福袋礼物房间飘屏通知
Custom_Message_Sub_SingleRoom_RedPacket = 601,
/// 福袋礼物全服飘屏通知
Custom_Message_Sub_AllRoom_RedPacket = 602,
};
///first = CustomMessageType_Collection_Room ///first = CustomMessageType_Collection_Room
typedef NS_ENUM(NSUInteger, CustomMessageSubCollectRoom) { typedef NS_ENUM(NSUInteger, CustomMessageSubCollectRoom) {

View File

@@ -56,7 +56,7 @@
if (textField.text.length > self.lableArray.count) { if (textField.text.length > self.lableArray.count) {
textField.text = [textField.text substringToIndex:self.lableArray.count]; textField.text = [textField.text substringToIndex:self.lableArray.count];
} }
if (textField.text.length >= 5) { if (textField.text.length >= self.number) {
[textField resignFirstResponder]; [textField resignFirstResponder];
if (_textFieldChangeBlock) { if (_textFieldChangeBlock) {
_textFieldChangeBlock(textField.text); _textFieldChangeBlock(textField.text);

View File

@@ -48,6 +48,8 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
RoomMoreMenuType_Room_PK_Open = 18, RoomMoreMenuType_Room_PK_Open = 18,
///关闭房间pk ///关闭房间pk
RoomMoreMenuType_Room_PK_Close = 19, RoomMoreMenuType_Room_PK_Close = 19,
///发红包
RoomMoreMenuType_Room_redPacket = 20,
}; };
@interface XPRoomMoreItemModel : NSObject @interface XPRoomMoreItemModel : NSObject

View File

@@ -10,6 +10,7 @@
#import "Api+MoreMenu.h" #import "Api+MoreMenu.h"
#import "ThemeColor+Room.h" #import "ThemeColor+Room.h"
#import "AccountInfoStorage.h" #import "AccountInfoStorage.h"
#import "ClientConfig.h"
///Model ///Model
#import "XPRoomMoreItemModel.h" #import "XPRoomMoreItemModel.h"
#import "RoomInfoModel.h" #import "RoomInfoModel.h"
@@ -106,6 +107,12 @@
trumpet.type = RoomMoreMenuType_Room_trumpet; trumpet.type = RoomMoreMenuType_Room_trumpet;
trumpet.titleColor = [ThemeColor roomMoreMenuTextColor]; trumpet.titleColor = [ThemeColor roomMoreMenuTextColor];
XPRoomMoreItemModel * redPacket = [[XPRoomMoreItemModel alloc] init];
redPacket.title = @"红包";
redPacket.imageName = @"room_more_menu_trumpet";
redPacket.type = RoomMoreMenuType_Room_redPacket;
redPacket.titleColor = [ThemeColor roomMoreMenuTextColor];
NSString * uid = [AccountInfoStorage instance].getUid; NSString * uid = [AccountInfoStorage instance].getUid;
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId]; NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
@@ -147,6 +154,9 @@
[array addObject:trumpet]; [array addObject:trumpet];
[array addObject:giftEffect]; [array addObject:giftEffect];
} }
if ([ClientConfig shareConfig].configInfo.redEnvelopeConfig.open && roomInfo.redEnvelopeOpen) {
[array addObject:redPacket];
}
} else { } else {
[array addObject:giftEffect]; [array addObject:giftEffect];
} }

View File

@@ -29,6 +29,8 @@
#import "XPReleaseRadioViewController.h" #import "XPReleaseRadioViewController.h"
#import "XPRoomTrumpetViewController.h" #import "XPRoomTrumpetViewController.h"
#import "XPRoomPKViewController.h" #import "XPRoomPKViewController.h"
#import "XPRoomSendRedPacketViewController.h"
#import "BaseNavigationController.h"
///P ///P
#import "XPMoreMenuPresenter.h" #import "XPMoreMenuPresenter.h"
#import "XPMoreMenuProtocol.h" #import "XPMoreMenuProtocol.h"
@@ -409,6 +411,17 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES]; [self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
} }
break; break;
case RoomMoreMenuType_Room_redPacket:
{
[self dismissViewControllerAnimated:YES completion:nil];
XPRoomSendRedPacketViewController *sendRedPacketVC = [[XPRoomSendRedPacketViewController alloc] initWithDelegate:self.hostDelegate];
sendRedPacketVC.roomUid = roomUid;
sendRedPacketVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:sendRedPacketVC];
nav.modalPresentationStyle = UIModalPresentationOverFullScreen;
[self.hostDelegate.getCurrentNav presentViewController:nav animated:YES completion:nil];
}
break;
default: default:
break; break;
} }

View File

@@ -0,0 +1,18 @@
//
// Api+RedPacket.h
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "Api.h"
NS_ASSUME_NONNULL_BEGIN
@interface Api (RedPacket)
+ (void)sendRedPacket:(HttpRequestHelperCompletion)completion num:(NSString *)num goldNum:(NSString *)goldNum roomUid:(NSString *)roomUid type:(NSNumber *)type password:(NSString *)password message:(NSString *)message;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// Api+RedPacket.m
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "Api+RedPacket.h"
@implementation Api (RedPacket)
+ (void)sendRedPacket:(HttpRequestHelperCompletion)completion num:(NSString *)num goldNum:(NSString *)goldNum roomUid:(NSString *)roomUid type:(NSNumber *)type password:(NSString *)password message:(NSString *)message {
[self makeRequest:@"red-envelope" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, num, goldNum, roomUid, type, password, message, nil];
}
@end

View File

@@ -0,0 +1,24 @@
//
// XPRoomRedPacketPresenter.h
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomRedPacketPresenter : BaseMvpPresenter
/// 获取钱包信息
- (void)getUserWalletInfo;
///获取当前用户信息
- (void)getUserModel;
- (void)sendRedPacketWithNum:(NSString *)num goldNum:(NSString *)goldNum roomUid:(NSString *)roomUid type:(NSNumber *)type password:(NSString *)pwd message:(NSString *)message;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,48 @@
//
// XPRoomRedPacketPresenter.m
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "XPRoomRedPacketPresenter.h"
#import "XPRoomRedPacketProtocol.h"
#import "Api+RedPacket.h"
#import "AccountInfoStorage.h"
#import "WalletInfoModel.h"
#import "UserInfoModel.h"
#import "DESEncrypt.h"
#import "XPConstant.h"
@implementation XPRoomRedPacketPresenter
///
- (void)getUserWalletInfo {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
if (!uid.length) {
return;
}
[Api getUserWalletInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
[[self getView] getUserWalletInfo:model];
}] uid:uid ticket:ticket];
}
///
- (void)getUserModel {
NSString * uid = [[AccountInfoStorage instance] getUid];
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
UserInfoModel *userInfo = [UserInfoModel modelWithDictionary:data.data];
[[self getView] onGetUserInfoSuccess:userInfo];
} showLoading:NO] uid:uid];
}
- (void)sendRedPacketWithNum:(NSString *)num goldNum:(NSString *)goldNum roomUid:(NSString *)roomUid type:(NSNumber *)type password:(NSString *)pwd message:(NSString *)message {
NSString *password = [DESEncrypt encryptUseDES:pwd key:KeyWithType(KeyType_PasswordEncode)];
[Api sendRedPacket:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] sendRedPacketSuccess];
}] num:num goldNum:goldNum roomUid:roomUid type:type password:password message:message];
}
@end

View File

@@ -0,0 +1,25 @@
//
// XPRoomRedPacketProtocol.h
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class WalletInfoModel, UserInfoModel;
@protocol XPRoomRedPacketProtocol <NSObject>
///获取用户钱包信息成功
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo;
///获取用户信息成功
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo;
- (void)sendRedPacketSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,26 @@
//
// XPRoomRedPacketPwdView.h
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPRoomRedPacketPwdViewDelegate <NSObject>
- (void)xPRoomRedPacketPwdViewPwdComplete:(NSString *)pwd;
@end
@interface XPRoomRedPacketPwdView : UIView
@property (nonatomic, copy) NSString *diamonCount;
@property (nonatomic, weak) id<XPRoomRedPacketPwdViewDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,162 @@
//
// XPRoomRedPacketPwdView.m
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "XPRoomRedPacketPwdView.h"
#import "LoginVerifCodeView.h"
#import "ThemeColor.h"
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
@interface XPRoomRedPacketPwdView()
@property (nonatomic, strong) UIView *diamondContentView;
@property (nonatomic, strong) UIButton *closeBtn;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *diamondImage;
@property (nonatomic, strong) UILabel *diamondLabel;
@property (nonatomic, strong) LoginVerifCodeView *codeView;
@end
@implementation XPRoomRedPacketPwdView
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self initSubViews];
[self initSubViewConstraints];
[self initEvents];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [ThemeColor appBackgroundColor];
self.layer.cornerRadius = 8;
self.layer.masksToBounds = YES;
[self addSubview:self.closeBtn];
[self addSubview:self.titleLabel];
[self addSubview:self.diamondContentView];
[self.diamondContentView addSubview:self.diamondImage];
[self.diamondContentView addSubview:self.diamondLabel];
[self addSubview:self.codeView];
}
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(360);
make.height.mas_equalTo(200);
}];
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(10);
make.top.mas_equalTo(10);
make.height.width.mas_equalTo(44);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.top.mas_equalTo(10);
make.height.mas_equalTo(21);
}];
[self.diamondContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(16);
make.height.mas_equalTo(30);
}];
[self.diamondImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.centerY.mas_equalTo(self.diamondContentView);
make.width.height.mas_equalTo(20);
}];
[self.diamondLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.diamondImage.mas_right).mas_offset(4);
make.centerY.mas_equalTo(self.diamondContentView);
make.right.mas_equalTo(0);
}];
[self.codeView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.top.mas_equalTo(self.diamondContentView.mas_bottom).mas_offset(16);
}];
}
- (void)initEvents {
@weakify(self);
self.codeView.textFieldChangeBlock = ^(NSString * _Nonnull code) {
@strongify(self);
if (code.length == 6) {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomRedPacketPwdViewPwdComplete:)]) {
[self.delegate xPRoomRedPacketPwdViewPwdComplete:code];
}
}
// if (self.phone.length > 0 && code.length == 5) {
// if (self.type == VerifCodeType_Regist) {
// [self.presenter loginWithPhone:self.phone code:code];
// } else if(self.type == VerifCodeType_BindPhone) {
// [self.presenter bindWithPhone:self.phone code:code];
// }
// }
};
}
- (void)setDiamonCount:(NSString *)diamonCount {
self.diamondLabel.text = diamonCount;
}
- (UIView *)diamondContentView {
if (!_diamondContentView) {
_diamondContentView = [[UIView alloc] init];
}
return _diamondContentView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
UILabel *label = [[UILabel alloc] init];
label.text = @"请输入支付密码";
label.font = [UIFont systemFontOfSize:10];
label.textColor = [ThemeColor mainTextColor];
_titleLabel = label;
}
return _titleLabel;
}
- (UIImageView *)diamondImage {
if (!_diamondImage) {
_diamondImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"common_diamond"]];
}
return _diamondImage;
}
- (UILabel *)diamondLabel {
if (!_diamondLabel) {
UILabel *label = [[UILabel alloc] init];
label.text = @"";
label.font = [UIFont systemFontOfSize:10];
label.textColor = [ThemeColor mainTextColor];
_diamondLabel = label;
}
return _diamondLabel;
}
- (UIButton *)closeBtn {
if (!_closeBtn) {
_closeBtn = [[UIButton alloc] init];
}
return _closeBtn;
}
- (LoginVerifCodeView *)codeView {
if (!_codeView) {
_codeView= [[LoginVerifCodeView alloc] init];
_codeView.number = 6;
}
return _codeView;
}
@end

View File

@@ -0,0 +1,21 @@
//
// XPRoomSendRedPacketViewController.h
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "MvpViewController.h"
#import "RoomHostDelegate.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomSendRedPacketViewController : MvpViewController
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
@property (nonatomic, copy) NSString *roomUid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,679 @@
//
// XPRoomSendRedPacketViewController.m
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "XPRoomSendRedPacketViewController.h"
///tool
#import <YYText/YYText.h>
#import "ThemeColor.h"
#import "ThemeColor+NobleCenter.h"
#import "XPMacro.h"
#import "XCHUDTool.h"
#import "TTPopUp.h"
///Third
#import <Masonry/Masonry.h>
#import "UIImage+Utils.h"
///view
#import "XPRoomRedPacketPwdView.h"
#import "XPMinePayPwdViewController.h"
#import "BaseNavigationController.h"
#import "XPMineRechargeViewController.h"
///P
#import "XPRoomRedPacketPresenter.h"
#import "XPRoomRedPacketProtocol.h"
///model
#import "WalletInfoModel.h"
#import "RoomInfoModel.h"
#import "UserInfoModel.h"
@interface XPRoomSendRedPacketViewController ()<YYTextViewDelegate, XPRoomRedPacketProtocol, XPRoomRedPacketPwdViewDelegate>
///host
@property (nonatomic,weak) id<RoomHostDelegate>hostDelegate;
///view
@property (nonatomic,strong) UIView *topTapView;
///view
@property (nonatomic,strong) UIView *bottomTapView;
///
@property (nonatomic,strong) UIImageView *backView;
///
@property (nonatomic, strong) UIButton *roomButton;
///
@property (nonatomic, strong) UIButton *allServerButton;
///
@property (nonatomic, strong) UIView *typeView;
///
@property (nonatomic, strong) UIView *packetContentView;
///
@property (nonatomic, strong) UILabel *packetTitle;
///
@property (nonatomic, strong) UITextField *packetTextField;
///
@property (nonatomic, strong) UILabel *packetUnit;
///
@property (nonatomic, strong) UIView *diamondContentView;
///
@property (nonatomic, strong) UILabel *diamondTitle;
///
@property (nonatomic, strong) UITextField *diamondTextField;
///
@property (nonatomic, strong) UILabel *diamondUnit;
///
@property (nonatomic,strong) UILabel *countDesc;
///
@property (nonatomic, strong) UIView *descContentView;
///广
@property (nonatomic,strong) UITextView *wishTextView;
///palceHolder
@property (nonatomic, strong) UILabel *wishPlaceHolderLabel;
///
@property (nonatomic,strong) UILabel *wishCountLabel;
///
@property (nonatomic, strong) UILabel *wishDesc;
///
@property (nonatomic, strong) UIButton *releaseButton;
///
@property (nonatomic, strong) UIImageView *diamondImage;
///
@property (nonatomic,strong) UILabel *walletDiamondLabel;
///
@property (nonatomic, strong) UIButton *rechargeButton;
@end
@implementation XPRoomSendRedPacketViewController
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
if (self = [super init]) {
self.hostDelegate = delegate;
}
return self;
}
- (XPRoomRedPacketPresenter *)createPresenter {
return [[XPRoomRedPacketPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor clearColor];
self.navigationController.view.backgroundColor = [UIColor clearColor];
[self.navigationController setNavigationBarHidden:YES];
[self initSubViews];
[self initSubViewConstraints];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onTextViewChange:) name:UITextViewTextDidChangeNotification object:nil];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.presenter getUserWalletInfo];
}
- (BOOL)isHiddenNavBar {
return YES;
}
#pragma mark - Private Method
- (void)initSubViews {
self.view.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.topTapView];
[self.view addSubview:self.backView];
[self.view addSubview:self.bottomTapView];
[self.backView addSubview:self.roomButton];
[self.backView addSubview:self.allServerButton];
[self.backView addSubview:self.typeView];
[self.backView addSubview:self.packetContentView];
[self.packetContentView addSubview:self.packetTitle];
[self.packetContentView addSubview:self.packetTextField];
[self.packetContentView addSubview:self.packetUnit];
[self.backView addSubview:self.diamondContentView];
[self.diamondContentView addSubview:self.diamondTitle];
[self.diamondContentView addSubview:self.diamondTextField];
[self.diamondContentView addSubview:self.diamondUnit];
[self.backView addSubview:self.countDesc];
[self.backView addSubview:self.descContentView];
[self.backView addSubview:self.wishTextView];
[self.backView addSubview:self.wishPlaceHolderLabel];
[self.backView addSubview:self.wishCountLabel];
[self.backView addSubview:self.wishDesc];
[self.backView addSubview:self.releaseButton];
[self.backView addSubview:self.diamondImage];
[self.backView addSubview:self.walletDiamondLabel];
[self.backView addSubview:self.rechargeButton];
}
- (void)initSubViewConstraints {
[self.topTapView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.right.mas_equalTo(self.view);
make.bottom.mas_equalTo(self.backView.mas_top);
}];
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(310);
make.height.mas_equalTo(450);
make.centerY.centerX.mas_equalTo(self.view);
}];
[self.bottomTapView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.view);
make.top.mas_equalTo(self.backView.mas_bottom);
make.bottom.mas_equalTo(self.view);
}];
[self.roomButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.backView.mas_centerX).mas_offset(-8);
make.top.mas_equalTo(self.backView).offset(60);
make.height.mas_equalTo(24);
make.width.mas_equalTo(90);
}];
[self.allServerButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.roomButton);
make.height.mas_equalTo(24);
make.width.mas_equalTo(90);
make.left.mas_equalTo(self.backView.mas_centerX).mas_offset(8);
}];
[self.typeView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.roomButton);
make.top.mas_equalTo(self.roomButton.mas_bottom).mas_offset(4);
make.width.mas_equalTo(8);
make.height.mas_equalTo(2);
}];
[self.packetContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.roomButton.mas_bottom).mas_offset(25);
make.centerX.mas_equalTo(self.backView);
make.left.mas_equalTo(self.backView).mas_offset(40);
make.height.mas_equalTo(30);
}];
[self.packetTitle mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerY.mas_equalTo(self.packetContentView);
make.left.mas_equalTo(12);
}];
[self.packetTitle setContentHuggingPriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
[self.packetTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerY.mas_equalTo(self.packetContentView);
make.left.mas_equalTo(self.packetTitle.mas_right).mas_offset(4);
make.right.mas_equalTo(self.packetUnit.mas_left).mas_offset(-8);
}];
[self.packetUnit mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerY.mas_equalTo(self.packetContentView);
make.right.mas_equalTo(self.packetContentView).mas_offset(-12);
}];
[self.packetUnit setContentHuggingPriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
[self.diamondContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.packetContentView.mas_bottom).mas_offset(16);
make.centerX.mas_equalTo(self.backView);
make.left.mas_equalTo(self.packetContentView);
make.height.mas_equalTo(30);
}];
[self.diamondTitle mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerY.mas_equalTo(self.diamondContentView);
make.left.mas_equalTo(12);
}];
[self.diamondTitle setContentHuggingPriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
[self.diamondTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerY.mas_equalTo(self.diamondContentView);
make.left.mas_equalTo(self.diamondTitle.mas_right).mas_offset(4);
make.right.mas_equalTo(self.diamondUnit.mas_left).mas_offset(-8);
}];
[self.diamondUnit mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerY.mas_equalTo(self.diamondContentView);
make.right.mas_equalTo(self.diamondContentView).mas_offset(-12);
}];
[self.diamondUnit setContentHuggingPriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
[self.countDesc mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.backView);
make.top.mas_equalTo(self.diamondContentView.mas_bottom).mas_offset(8);
make.height.mas_equalTo(11);
}];
[self.descContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backView).inset(40);
make.top.mas_equalTo(self.countDesc.mas_bottom).mas_offset(20);
make.height.mas_equalTo(80);
}];
[self.wishTextView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backView).inset(60);
make.centerY.mas_equalTo(self.descContentView);
make.height.mas_equalTo(30);
}];
[self.wishPlaceHolderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.mas_equalTo(self.descContentView);
}];
[self.wishCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.bottom.mas_equalTo(self.descContentView).inset(3);
make.height.mas_equalTo(12);
}];
[self.wishDesc mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.backView);
make.top.mas_equalTo(self.descContentView.mas_bottom).mas_offset(4);
make.height.mas_equalTo(11);
}];
[self.releaseButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.wishDesc.mas_bottom).mas_offset(16);
make.centerX.mas_equalTo(self.backView);
make.width.mas_equalTo(160);
make.height.mas_equalTo(44);
}];
[self.diamondImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.releaseButton.mas_bottom).mas_offset(16);
make.left.mas_equalTo(self.descContentView);
make.width.height.mas_equalTo(20);
}];
[self.walletDiamondLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.diamondImage.mas_right).mas_offset(2);
make.centerY.mas_equalTo(self.diamondImage);
}];
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.descContentView).mas_offset(-4);
make.centerY.mas_equalTo(self.diamondImage);
}];
}
- (void)onReleaseButtonClick:(UIButton *)button {
//
NSInteger packetCount = [self.packetTextField.text integerValue];
if (packetCount > 100 || packetCount < 1) {
[self showErrorToast:@"红包数量不能小于1或大于100"];
return;
}
//
NSInteger diamonCount = [self.diamondTextField.text integerValue];
if (diamonCount > 999999 || diamonCount < 100) {
[self showErrorToast:@"钻石数量不能小于100或大于999999"];
return;
}
if (diamonCount % 10 != 0) {
[self showErrorToast:@"钻石数必须为10的倍数"];
return;
}
[self.presenter getUserModel];
}
#pragma mark - XPRoomRedPacketProtocol
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES];
}
///
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
self.walletDiamondLabel.text = balanceInfo.diamonds;
}
///
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
if (userInfo.isBindPaymentPwd) {
XPRoomRedPacketPwdView *pwdView = [[XPRoomRedPacketPwdView alloc] init];
pwdView.diamonCount = self.diamondTextField.text;
pwdView.delegate = self;
[TTPopup popupView:pwdView style:TTPopupStyleAlert];
} else {
XPMinePayPwdViewController *vc = [[XPMinePayPwdViewController alloc] init];
vc.userInfo = userInfo;
[self.navigationController pushViewController:vc animated:YES];
}
}
///
- (void)sendRedPacketSuccess {
[self showSuccessToast:@"发送成功"];
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - XPRoomRedPacketPwdViewDelegate
- (void)xPRoomRedPacketPwdViewPwdComplete:(NSString *)pwd {
[TTPopup dismiss];
NSString *roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
NSNumber *type = self.roomButton.isSelected ? @(1) : @(2);
NSString *message = self.wishTextView.text.length ? self.wishTextView.text : @"恭喜发财,大吉大利!";
[self.presenter sendRedPacketWithNum:self.packetTextField.text goldNum:self.diamondTextField.text roomUid:roomUid type:type password:pwd message:message];
}
#pragma mark - Event Response
- (void)dismissTapRecognizer:(UITapGestureRecognizer *)tap {
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - private
- (void)onRoomButtonClick:(UIButton *)sender {
self.roomButton.selected = YES;
self.allServerButton.selected = NO;
[self.typeView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.roomButton);
make.top.mas_equalTo(self.roomButton.mas_bottom).mas_offset(4);
make.width.mas_equalTo(8);
make.height.mas_equalTo(2);
}];
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]initWithString:@"1-100" attributes:@{NSForegroundColorAttributeName: UIColorRGBAlpha(0xffffff, 0.3)}];
self.packetTextField.attributedPlaceholder = attrString;
self.countDesc.text = @"红包总金额不低于100钻石且必须为10的倍数";
}
- (void)onAllServerButtonClick:(UIButton *)sender {
self.allServerButton.selected = YES;
self.roomButton.selected = NO;
[self.typeView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.allServerButton);
make.top.mas_equalTo(self.roomButton.mas_bottom).mas_offset(4);
make.width.mas_equalTo(8);
make.height.mas_equalTo(2);
}];
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]initWithString:@"2-500" attributes:@{NSForegroundColorAttributeName: UIColorRGBAlpha(0xffffff, 0.3)}];
self.packetTextField.attributedPlaceholder = attrString;
self.countDesc.text = @"红包总金额不低于1000钻石且必须为100的倍数";
}
- (void)onRechargeButtonClick:(UIButton *)sender {
XPMineRechargeViewController *rechargeVC = [[XPMineRechargeViewController alloc] init];
[self.navigationController pushViewController:rechargeVC animated:YES];
}
#pragma mark - YYTextViewDelegate
- (void)textViewDidChange:(YYTextView *)textView {
NSInteger maxLength = 20;
if (textView.text.length > maxLength) {
textView.text = [textView.text substringToIndex:maxLength];
}
self.wishCountLabel.text = [NSString stringWithFormat:@"%zd/%ld", textView.text.length, maxLength];
}
- (void)onTextViewChange:(NSNotification *)noti {
NSInteger maxLength = 20;
if (self.wishTextView.text.length > maxLength) {
self.wishTextView.text = [self.wishTextView.text substringToIndex:maxLength];
}
if (self.wishTextView.text.length > 0) {
self.wishPlaceHolderLabel.hidden = YES;
[self.wishTextView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backView).inset(60);
make.centerY.mas_equalTo(self.descContentView);
make.height.mas_equalTo(42);
}];
} else {
self.wishPlaceHolderLabel.hidden = NO;
[self.wishTextView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backView).inset(60);
make.centerY.mas_equalTo(self.descContentView);
make.height.mas_equalTo(30);
}];
}
self.wishCountLabel.text = [NSString stringWithFormat:@"%zd/%ld", self.wishTextView.text.length, maxLength];
}
#pragma mark - Getters And Setters
- (UIView *)topTapView {
if (!_topTapView) {
_topTapView = [[UIView alloc] init];
_topTapView.backgroundColor = [UIColor clearColor];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissTapRecognizer:)];
[_topTapView addGestureRecognizer:tap];
}
return _topTapView;
}
- (UIView *)bottomTapView {
if (!_bottomTapView) {
_bottomTapView = [[UIView alloc] init];
_bottomTapView.backgroundColor = [UIColor clearColor];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissTapRecognizer:)];
[_bottomTapView addGestureRecognizer:tap];
}
return _bottomTapView;
}
- (UIImageView *)backView {
if (!_backView) {
_backView = [[UIImageView alloc] init];
_backView.userInteractionEnabled = YES;
_backView.image = [UIImage imageNamed:@"send_redpacket_bg"];
}
return _backView;
}
- (UIButton *)roomButton {
if (!_roomButton) {
_roomButton = [[UIButton alloc] init];
[_roomButton setTitle:@"厅内红包" forState:UIControlStateNormal];
[_roomButton setTitleColor:UIColorRGBAlpha(0xffffff, 0.6) forState:UIControlStateNormal];
[_roomButton setTitleColor:UIColorRGBAlpha(0xffffff, 1) forState:UIControlStateSelected];
[_roomButton addTarget:self action:@selector(onRoomButtonClick:) forControlEvents:UIControlEventTouchUpInside];
_roomButton.selected = YES;
}
return _roomButton;
}
- (UIButton *)allServerButton {
if (!_allServerButton) {
_allServerButton = [[UIButton alloc] init];
[_allServerButton setTitle:@"全服红包" forState:UIControlStateNormal];
[_allServerButton setTitleColor:UIColorRGBAlpha(0xffffff, 0.6) forState:UIControlStateNormal];
[_allServerButton setTitleColor:UIColorRGBAlpha(0xffffff, 1) forState:UIControlStateSelected];
[_allServerButton addTarget:self action:@selector(onAllServerButtonClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _allServerButton;
}
- (UIView *)typeView {
if (!_typeView) {
_typeView = [[UIView alloc] init];
_typeView.backgroundColor = [UIColor whiteColor];
_typeView.layer.cornerRadius = 1;
_typeView.layer.masksToBounds = YES;
}
return _typeView;
}
- (UIView *)packetContentView {
if (!_packetContentView) {
_packetContentView = [[UIView alloc] init];
_packetContentView.backgroundColor = UIColorRGBAlpha(0xffffff, 0.3);
_packetContentView.layer.cornerRadius = 15;
_packetContentView.layer.masksToBounds = YES;
}
return _packetContentView;
}
- (UILabel *)packetTitle {
if (!_packetTitle) {
UILabel *label = [[UILabel alloc] init];
label.text = @"红包个数";
label.font = [UIFont systemFontOfSize:13];
label.textColor = [UIColor whiteColor];
_packetTitle = label;
}
return _packetTitle;
}
- (UITextField *)packetTextField {
if (!_packetTextField) {
UITextField *label = [[UITextField alloc] init];
label.keyboardType = UIKeyboardTypeNumberPad;
label.textAlignment = NSTextAlignmentRight;
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]initWithString:@"1-100" attributes:@{NSForegroundColorAttributeName: UIColorRGBAlpha(0xffffff, 0.3)}];
label.attributedPlaceholder = attrString;
label.textColor = [UIColor whiteColor];
_packetTextField = label;
}
return _packetTextField;
}
- (UILabel *)packetUnit {
if (!_packetUnit) {
UILabel *label = [[UILabel alloc] init];
label.text = @"个";
label.font = [UIFont systemFontOfSize:13];
label.textColor = [UIColor whiteColor];
_packetUnit = label;
}
return _packetUnit;
}
- (UIView *)diamondContentView {
if (!_diamondContentView) {
_diamondContentView = [[UIView alloc] init];
_diamondContentView.backgroundColor = UIColorRGBAlpha(0xffffff, 0.3);
_diamondContentView.layer.cornerRadius = 15;
_diamondContentView.layer.masksToBounds = YES;
}
return _diamondContentView;
}
- (UILabel *)diamondTitle {
if (!_diamondTitle) {
UILabel *label = [[UILabel alloc] init];
label.text = @"总钻石数";
label.font = [UIFont systemFontOfSize:13];
label.textColor = [UIColor whiteColor];
_diamondTitle = label;
}
return _diamondTitle;
}
- (UITextField *)diamondTextField {
if (!_diamondTextField) {
UITextField *label = [[UITextField alloc] init];
label.keyboardType = UIKeyboardTypeNumberPad;
label.textAlignment = NSTextAlignmentRight;
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSForegroundColorAttributeName: UIColorRGBAlpha(0xffffff, 0.3)}];
label.attributedPlaceholder = attrString;
label.textColor = [UIColor whiteColor];
_diamondTextField = label;
}
return _diamondTextField;
}
- (UILabel *)diamondUnit {
if (!_diamondUnit) {
UILabel *label = [[UILabel alloc] init];
label.text = @"钻石";
label.font = [UIFont systemFontOfSize:13];
label.textColor = [UIColor whiteColor];
_diamondUnit = label;
}
return _diamondUnit;
}
- (UILabel *)countDesc {
if (!_countDesc) {
UILabel *label = [[UILabel alloc] init];
label.text = @"红包总金额不低于100钻石且必须为10的倍数";
label.font = [UIFont systemFontOfSize:12];
label.textColor = UIColorRGBAlpha(0xffffff, 0.6);
_countDesc = label;
}
return _countDesc;
}
- (UIView *)descContentView {
if (!_descContentView) {
_descContentView = [[UIView alloc] init];
_descContentView.backgroundColor = UIColorRGBAlpha(0x000000, 0.3);
_descContentView.layer.cornerRadius = 8;
_descContentView.layer.masksToBounds = YES;
}
return _descContentView;
}
- (UITextView *)wishTextView {
if (!_wishTextView) {
_wishTextView = [[UITextView alloc] init];
_wishTextView.layer.cornerRadius = 8;
_wishTextView.layer.masksToBounds = YES;
_wishTextView.backgroundColor = [UIColor clearColor];
_wishTextView.showsVerticalScrollIndicator = NO;
// _wishTextView.placeholderText = @"恭喜发财,大吉大利!";
// _wishTextView.placeholderTextColor = [ThemeColor noContainDescTextColor];
// _wishTextView.placeholderFont = [UIFont systemFontOfSize:12];
_wishTextView.font = [UIFont systemFontOfSize:16];
_wishTextView.textColor = [UIColor whiteColor];
// _wishTextView.delegate = self;
_wishTextView.textAlignment = NSTextAlignmentCenter;
// _wishTextView.textVerticalAlignment = YYTextVerticalAlignmentCenter;
}
return _wishTextView;
}
- (UIButton *)releaseButton {
if (!_releaseButton) {
_releaseButton = [[UIButton alloc] init];
[_releaseButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_releaseButton setBackgroundImage:[UIImage imageNamed:@"rooom_trumpet_send"] forState:UIControlStateNormal];
[_releaseButton addTarget:self action:@selector(onReleaseButtonClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _releaseButton;
}
- (UILabel *)wishDesc {
if (!_wishDesc) {
_wishDesc = [[UILabel alloc] init];
_wishDesc.text = @"未抢完的红包将在30分钟后返还你的钱包";
_wishDesc.font = [UIFont systemFontOfSize:10];
_wishDesc.textColor = UIColorRGBAlpha(0xffffff, 0.6);
}
return _wishDesc;
}
- (UILabel *)wishCountLabel {
if (!_wishCountLabel) {
UILabel *label = [[UILabel alloc] init];
label.text = @"0/20";
label.font = [UIFont systemFontOfSize:12];
label.textColor = UIColorRGBAlpha(0xffffff, 0.6);
_wishCountLabel = label;
}
return _wishCountLabel;
}
- (UIImageView *)diamondImage {
if (!_diamondImage) {
_diamondImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"common_diamond"]];
}
return _diamondImage;
}
- (UILabel *)walletDiamondLabel {
if (!_walletDiamondLabel) {
_walletDiamondLabel = [[UILabel alloc] init];
_walletDiamondLabel.textColor = [UIColor whiteColor];
_walletDiamondLabel.font = [UIFont systemFontOfSize:13];
}
return _walletDiamondLabel;
}
- (UILabel *)wishPlaceHolderLabel {
if (!_wishPlaceHolderLabel) {
UILabel *label = [[UILabel alloc] init];
label.text = @"恭喜发财,大吉大利!";
label.font = [UIFont systemFontOfSize:16];
label.textColor = UIColorRGBAlpha(0xffffff, 0.3);
_wishPlaceHolderLabel = label;
}
return _wishPlaceHolderLabel;
}
- (UIButton *)rechargeButton {
if (!_rechargeButton) {
_rechargeButton = [[UIButton alloc] init];
[_rechargeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_rechargeButton addTarget:self action:@selector(onRechargeButtonClick:) forControlEvents:UIControlEventTouchUpInside];
NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithString:@"充值钻石"];
NSRange titleRange = {0,[title length]};
[title addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:titleRange];
[_rechargeButton setAttributedTitle:title forState:UIControlStateNormal];
_rechargeButton.titleLabel.font = [UIFont systemFontOfSize:13];
}
return _rechargeButton;
}
@end

View File

@@ -6,6 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "ClientRedPacketModel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -24,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign) double hideCarEffectGiftPrice; @property (nonatomic,assign) double hideCarEffectGiftPrice;
//航海等级限制 //航海等级限制
@property (nonatomic, assign) NSInteger linearlyPoolOpenLevel; @property (nonatomic, assign) NSInteger linearlyPoolOpenLevel;
///红包配置
@property (nonatomic, strong) ClientRedPacketModel *redEnvelopeConfig;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,50 @@
//
// ClientRedPacketModel.h
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
//@class
@interface ClientRedPacketModel : NSObject
///红包开关
@property (nonatomic, assign) BOOL open;
///红包推送id
@property (nonatomic, assign) long long pushUserId;
///厅内红包个数最大值
@property (nonatomic, strong) NSNumber *roomRedEnvelopeMaxNum;
///厅内红包数额最小值
@property (nonatomic, strong) NSNumber *roomRedEnvelopeMinAmount;
///厅内红包个数最小值
@property (nonatomic, strong) NSNumber *roomRedEnvelopeMinNum;
///全服红包个数最大值
@property (nonatomic, strong) NSNumber *serverRedEnvelopeMaxNum;
///全服红包数额最小值
@property (nonatomic, strong) NSNumber *serverRedEnvelopeMinAmount;
///全服红包个数最小值
@property (nonatomic, strong) NSNumber *serverRedEnvelopeMinNum;
///厅内红包数额最大值
@property (nonatomic, strong) NSNumber *roomRedEnvelopeMaxAmount;
///全服红包数额最大值
@property (nonatomic, strong) NSNumber *serverRedEnvelopeMaxAmount;
///默认红包位置1厅内 2全服
@property (nonatomic, strong) NSNumber *redEnvelopedPosition;
///默认红包类型1 钻石 2礼物
@property (nonatomic, strong) NSNumber *redEnvelopeType;
///钻石红包比例
@property (nonatomic, strong) NSNumber *exchangeDiamondsRate;
///版本
@property (nonatomic, copy) NSString *serverAppVersion;
//@property (nonatomic, strong) NSArray<> *gold2GiftIds;
@property (nonatomic, strong) NSArray *openRooms;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// ClientRedPacketModel.m
// xplan-ios
//
// Created by GreenLand on 2022/8/31.
//
#import "ClientRedPacketModel.h"
@implementation ClientRedPacketModel
//+ (NSDictionary *)objectClassInArray {
// return @{@"contents":GuildMessageLayoutInfoModel.class};
//}
@end