diff --git a/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj b/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj index 6e7c9a8..04efeec 100644 --- a/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj +++ b/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj @@ -9,6 +9,13 @@ /* Begin PBXBuildFile section */ 23270C292B0E037300B9303B /* MewMessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C272B0E037300B9303B /* MewMessageConentAudioView.m */; }; 23270C2C2B0E041300B9303B /* MewMessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2B2B0E041300B9303B /* MewMessageAudioCenter.m */; }; + 2329AE832B50D67300BDCF22 /* MewSendGiftManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE822B50D67300BDCF22 /* MewSendGiftManager.m */; }; + 2329AE862B50D76000BDCF22 /* Api+MewSendGfit.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE852B50D76000BDCF22 /* Api+MewSendGfit.m */; }; + 2329AE892B50DEED00BDCF22 /* MewGiftCacheManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE882B50DEED00BDCF22 /* MewGiftCacheManager.m */; }; + 2329AE8C2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE8B2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.m */; }; + 2329AE8F2B51202300BDCF22 /* MewUserAddModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE8E2B51202300BDCF22 /* MewUserAddModel.m */; }; + 2329AE922B51208B00BDCF22 /* MewUserPictureModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE912B51208B00BDCF22 /* MewUserPictureModel.m */; }; + 2329AE962B5125BC00BDCF22 /* MewRechargeStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 2329AE942B5125BC00BDCF22 /* MewRechargeStorage.m */; }; 233757562B0CB577001D0B7F /* MewMessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757262B0CB577001D0B7F /* MewMessagePresenter.m */; }; 233757572B0CB577001D0B7F /* MewMessageMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572C2B0CB577001D0B7F /* MewMessageMenuModel.m */; }; 233757582B0CB577001D0B7F /* MewChatLimitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572D2B0CB577001D0B7F /* MewChatLimitModel.m */; }; @@ -45,6 +52,11 @@ 2365578C2B4BD54D008915E2 /* MewEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2365578B2B4BD54D008915E2 /* MewEmptyTableViewCell.m */; }; 2365578F2B4BD628008915E2 /* MewEmptyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2365578E2B4BD628008915E2 /* MewEmptyCollectionViewCell.m */; }; 2365579A2B4BFCE1008915E2 /* MewThemeColor+MewRoom.m in Sources */ = {isa = PBXBuildFile; fileRef = 236557982B4BFCE1008915E2 /* MewThemeColor+MewRoom.m */; }; + 23692DAE2B4FC7550011797F /* MewGiftBottomBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23692DAD2B4FC7550011797F /* MewGiftBottomBarView.m */; }; + 23692DB12B4FC7AD0011797F /* MewGiftBottomBarCountModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23692DB02B4FC7AD0011797F /* MewGiftBottomBarCountModel.m */; }; + 23692DB42B4FC9B90011797F /* MewGiftNumView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23692DB32B4FC9B90011797F /* MewGiftNumView.m */; }; + 23692DB72B4FCBEC0011797F /* MewGiftBottomBarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23692DB62B4FCBEC0011797F /* MewGiftBottomBarCell.m */; }; + 23692DBA2B4FE12E0011797F /* MedDrawGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23692DB92B4FE12E0011797F /* MedDrawGiftView.m */; }; 237053142B1F3A3D00F5DE14 /* MewClientConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053132B1F3A3D00F5DE14 /* MewClientConfig.m */; }; 237053172B1F3A5300F5DE14 /* Api+MewMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053152B1F3A5300F5DE14 /* Api+MewMain.m */; }; 2370531A2B1F3A5D00F5DE14 /* MewClientDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237053192B1F3A5D00F5DE14 /* MewClientDataModel.m */; }; @@ -117,7 +129,6 @@ 237054A92B1F3B3200F5DE14 /* MewEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054642B1F3B3200F5DE14 /* MewEncryptTool.m */; }; 237054AA2B1F3B3200F5DE14 /* MewGCDHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054682B1F3B3200F5DE14 /* MewGCDHelper.m */; }; 237054AB2B1F3B3200F5DE14 /* MewThemeColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370546B2B1F3B3200F5DE14 /* MewThemeColor.m */; }; - 237054AC2B1F3B3200F5DE14 /* MewRechargeStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 2370546E2B1F3B3200F5DE14 /* MewRechargeStorage.m */; }; 237054AD2B1F3B3200F5DE14 /* YYReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054722B1F3B3200F5DE14 /* YYReachability.m */; }; 237054AE2B1F3B3200F5DE14 /* NSObject+MEWExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 237054742B1F3B3200F5DE14 /* NSObject+MEWExtension.m */; }; 237054AF2B1F3B3200F5DE14 /* MewPaymentAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 237054772B1F3B3200F5DE14 /* MewPaymentAction.swift */; }; @@ -142,6 +153,47 @@ 237ACD852B4D6A2E00BA20B3 /* MewRoomPublishNoticeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACD842B4D6A2E00BA20B3 /* MewRoomPublishNoticeView.m */; }; 237ACD882B4E38C200BA20B3 /* MewRoomHourListEnterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACD872B4E38C200BA20B3 /* MewRoomHourListEnterView.m */; }; 237ACD8B2B4E393900BA20B3 /* MewRoomHourListEnterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACD8A2B4E393900BA20B3 /* MewRoomHourListEnterCell.m */; }; + 237ACD9C2B4E440500BA20B3 /* MewMainSendGiftVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACD9B2B4E440500BA20B3 /* MewMainSendGiftVC.m */; }; + 237ACD9F2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACD9E2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.m */; }; + 237ACDA22B4E457A00BA20B3 /* MewGoodGiftBroadcastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDA12B4E457A00BA20B3 /* MewGoodGiftBroadcastView.m */; }; + 237ACDA52B4E471200BA20B3 /* MewGoodGiftBroadcastModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDA42B4E471200BA20B3 /* MewGoodGiftBroadcastModel.m */; }; + 237ACDA82B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDA72B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.m */; }; + 237ACDAB2B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDAA2B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.m */; }; + 237ACDAE2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDAD2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.m */; }; + 237ACDB12B4E737300BA20B3 /* MewGiftSlideshowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDB02B4E737300BA20B3 /* MewGiftSlideshowView.m */; }; + 237ACDB42B4E7B0100BA20B3 /* MewSendGiftPersonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDB32B4E7B0100BA20B3 /* MewSendGiftPersonView.m */; }; + 237ACDB72B4E7F9300BA20B3 /* MewSendGiftPersonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDB62B4E7F9300BA20B3 /* MewSendGiftPersonCell.m */; }; + 237ACDBA2B4E870700BA20B3 /* MewGiftDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDB92B4E870700BA20B3 /* MewGiftDataView.m */; }; + 237ACDBD2B4E879400BA20B3 /* MewGiftDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDBC2B4E879400BA20B3 /* MewGiftDataModel.m */; }; + 237ACDC02B4E897400BA20B3 /* MewWeekChampionListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDBF2B4E897400BA20B3 /* MewWeekChampionListModel.m */; }; + 237ACDC32B4E8A0000BA20B3 /* MewReceiveGiftDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDC22B4E8A0000BA20B3 /* MewReceiveGiftDataModel.m */; }; + 237ACDC62B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDC52B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.m */; }; + 237ACDC92B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDC82B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.m */; }; + 237ACDCC2B4E8C6000BA20B3 /* MewGiftGoodPersonData.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDCB2B4E8C6000BA20B3 /* MewGiftGoodPersonData.m */; }; + 237ACDCF2B4E8CE100BA20B3 /* MewGiftDataListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDCE2B4E8CE100BA20B3 /* MewGiftDataListModel.m */; }; + 237ACDD22B4E8D5B00BA20B3 /* MewGiftNumDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDD12B4E8D5B00BA20B3 /* MewGiftNumDataModel.m */; }; + 237ACDD52B4E8DA100BA20B3 /* MewGiftNumDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDD42B4E8DA100BA20B3 /* MewGiftNumDetailModel.m */; }; + 237ACDF62B4E994700BA20B3 /* XPPrivilegeCardPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDD92B4E994700BA20B3 /* XPPrivilegeCardPresenter.m */; }; + 237ACDF72B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDDD2B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.m */; }; + 237ACDF82B4E994700BA20B3 /* XPPrivilegeCardProduceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDDF2B4E994700BA20B3 /* XPPrivilegeCardProduceCell.m */; }; + 237ACDF92B4E994700BA20B3 /* XPPrivilegeCardProduceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDE02B4E994700BA20B3 /* XPPrivilegeCardProduceView.m */; }; + 237ACDFA2B4E994700BA20B3 /* XPPrivilegeCardConfirmView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDE22B4E994700BA20B3 /* XPPrivilegeCardConfirmView.m */; }; + 237ACDFB2B4E994700BA20B3 /* XPPrivilegeCardItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDE42B4E994700BA20B3 /* XPPrivilegeCardItemCell.m */; }; + 237ACDFC2B4E994700BA20B3 /* XPPrivilegeCardTitlView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDE72B4E994700BA20B3 /* XPPrivilegeCardTitlView.m */; }; + 237ACDFD2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDEA2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.m */; }; + 237ACDFE2B4E994700BA20B3 /* XPPrivilegeCardItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDED2B4E994700BA20B3 /* XPPrivilegeCardItemModel.m */; }; + 237ACDFF2B4E994700BA20B3 /* XPPrivilegeCardItemVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDF02B4E994700BA20B3 /* XPPrivilegeCardItemVC.m */; }; + 237ACE002B4E994700BA20B3 /* XPPrivilegeCardVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDF22B4E994700BA20B3 /* XPPrivilegeCardVC.m */; }; + 237ACE012B4E994700BA20B3 /* Api+PrivilegeCard.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACDF52B4E994700BA20B3 /* Api+PrivilegeCard.m */; }; + 237ACE052B4E9A0500BA20B3 /* UILabel+Factory.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE032B4E9A0500BA20B3 /* UILabel+Factory.m */; }; + 237ACE092B4E9DDC00BA20B3 /* MovEncodeToMpegTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE082B4E9DDC00BA20B3 /* MovEncodeToMpegTool.m */; }; + 237ACE0D2B4E9E8900BA20B3 /* MewUploadPhoto.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE0C2B4E9E8900BA20B3 /* MewUploadPhoto.m */; }; + 237ACE102B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE0F2B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.m */; }; + 237ACE132B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE122B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.m */; }; + 237ACE162B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE152B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.m */; }; + 237ACE192B4F890200BA20B3 /* MewThemeColor+MewGift.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE182B4F890200BA20B3 /* MewThemeColor+MewGift.m */; }; + 237ACE1C2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE1B2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.m */; }; + 237ACE1F2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 237ACE1D2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.m */; }; 23E3FCF22B493C0F00D0B664 /* MewRoomBgImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E3FCF12B493C0F00D0B664 /* MewRoomBgImageView.m */; }; 23E3FCF62B493F3700D0B664 /* MewSVGAParserTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E3FCF52B493F3700D0B664 /* MewSVGAParserTool.m */; }; 23E3FCF92B4946AE00D0B664 /* MewRoomBgImageItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E3FCF82B4946AE00D0B664 /* MewRoomBgImageItemModel.m */; }; @@ -208,13 +260,9 @@ 8C9C84572B0C697A00A601BC /* Api+Login.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83AA2B0C697A00A601BC /* Api+Login.m */; }; 8C9C847D2B0C6A6400A601BC /* TXFFmpeg.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C847C2B0C6A6400A601BC /* TXFFmpeg.xcframework */; }; 8C9C847F2B0C6A6A00A601BC /* TXSoundTouch.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C847E2B0C6A6A00A601BC /* TXSoundTouch.xcframework */; }; - 8C9C84842B0D25EF00A601BC /* MewGiftInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84832B0D25EF00A601BC /* MewGiftInfoModel.m */; }; - 8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84882B0D286F00A601BC /* Api+Gift.m */; }; - 8C9C848C2B0D2B8500A601BC /* MewGiftReceiveInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C848B2B0D2B8500A601BC /* MewGiftReceiveInfoModel.m */; }; 8C9C84902B0D439800A601BC /* MewRoomMessageFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C848F2B0D439800A601BC /* MewRoomMessageFilter.m */; }; 8C9C84942B0D65C300A601BC /* MewRoomAnimationHitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84932B0D65C300A601BC /* MewRoomAnimationHitView.m */; }; 8C9C84972B0D65E200A601BC /* MewRoomAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84962B0D65E200A601BC /* MewRoomAnimationView.m */; }; - 8C9C849E2B0D6A5C00A601BC /* MewGiftStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C849D2B0D6A5C00A601BC /* MewGiftStorage.m */; }; 8C9C84AD2B0D9AB900A601BC /* MewRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84AC2B0D9AB900A601BC /* MewRoomMessageHeaderView.m */; }; 8C9C84B42B0E951200A601BC /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C84B32B0E951200A601BC /* StoreKit.framework */; }; 8C9C84BA2B0ECD2100A601BC /* MewMineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B92B0ECD2100A601BC /* MewMineRechargePresenter.m */; }; @@ -549,6 +597,20 @@ 23270C282B0E037300B9303B /* MewMessageConentAudioView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewMessageConentAudioView.h; sourceTree = ""; }; 23270C2A2B0E041300B9303B /* MewMessageAudioCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewMessageAudioCenter.h; sourceTree = ""; }; 23270C2B2B0E041300B9303B /* MewMessageAudioCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewMessageAudioCenter.m; sourceTree = ""; }; + 2329AE812B50D67300BDCF22 /* MewSendGiftManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewSendGiftManager.h; sourceTree = ""; }; + 2329AE822B50D67300BDCF22 /* MewSendGiftManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewSendGiftManager.m; sourceTree = ""; }; + 2329AE842B50D76000BDCF22 /* Api+MewSendGfit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+MewSendGfit.h"; sourceTree = ""; }; + 2329AE852B50D76000BDCF22 /* Api+MewSendGfit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+MewSendGfit.m"; sourceTree = ""; }; + 2329AE872B50DEED00BDCF22 /* MewGiftCacheManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftCacheManager.h; sourceTree = ""; }; + 2329AE882B50DEED00BDCF22 /* MewGiftCacheManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftCacheManager.m; sourceTree = ""; }; + 2329AE8A2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftWeekFirstPlaceBroadcastView.h; sourceTree = ""; }; + 2329AE8B2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftWeekFirstPlaceBroadcastView.m; sourceTree = ""; }; + 2329AE8D2B51202300BDCF22 /* MewUserAddModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUserAddModel.h; sourceTree = ""; }; + 2329AE8E2B51202300BDCF22 /* MewUserAddModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUserAddModel.m; sourceTree = ""; }; + 2329AE902B51208B00BDCF22 /* MewUserPictureModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUserPictureModel.h; sourceTree = ""; }; + 2329AE912B51208B00BDCF22 /* MewUserPictureModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUserPictureModel.m; sourceTree = ""; }; + 2329AE942B5125BC00BDCF22 /* MewRechargeStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewRechargeStorage.m; sourceTree = ""; }; + 2329AE952B5125BC00BDCF22 /* MewRechargeStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewRechargeStorage.h; sourceTree = ""; }; 233757262B0CB577001D0B7F /* MewMessagePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewMessagePresenter.m; sourceTree = ""; }; 233757272B0CB577001D0B7F /* MewMessagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewMessagePresenter.h; sourceTree = ""; }; 233757292B0CB577001D0B7F /* MewMessageProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewMessageProtocol.h; sourceTree = ""; }; @@ -623,6 +685,17 @@ 2365578E2B4BD628008915E2 /* MewEmptyCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewEmptyCollectionViewCell.m; sourceTree = ""; }; 236557982B4BFCE1008915E2 /* MewThemeColor+MewRoom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MewThemeColor+MewRoom.m"; sourceTree = ""; }; 236557992B4BFCE1008915E2 /* MewThemeColor+MewRoom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MewThemeColor+MewRoom.h"; sourceTree = ""; }; + 23692DAC2B4FC7550011797F /* MewGiftBottomBarView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftBottomBarView.h; sourceTree = ""; }; + 23692DAD2B4FC7550011797F /* MewGiftBottomBarView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftBottomBarView.m; sourceTree = ""; }; + 23692DAF2B4FC7AD0011797F /* MewGiftBottomBarCountModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftBottomBarCountModel.h; sourceTree = ""; }; + 23692DB02B4FC7AD0011797F /* MewGiftBottomBarCountModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftBottomBarCountModel.m; sourceTree = ""; }; + 23692DB22B4FC9B90011797F /* MewGiftNumView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftNumView.h; sourceTree = ""; }; + 23692DB32B4FC9B90011797F /* MewGiftNumView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftNumView.m; sourceTree = ""; }; + 23692DB52B4FCBEC0011797F /* MewGiftBottomBarCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftBottomBarCell.h; sourceTree = ""; }; + 23692DB62B4FCBEC0011797F /* MewGiftBottomBarCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftBottomBarCell.m; sourceTree = ""; }; + 23692DB82B4FE12E0011797F /* MedDrawGiftView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MedDrawGiftView.h; sourceTree = ""; }; + 23692DB92B4FE12E0011797F /* MedDrawGiftView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MedDrawGiftView.m; sourceTree = ""; }; + 23692DBB2B4FFE8D0011797F /* MewSendGiftManagerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewSendGiftManagerProtocol.h; sourceTree = ""; }; 237053122B1F3A3D00F5DE14 /* MewClientConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewClientConfig.h; sourceTree = ""; }; 237053132B1F3A3D00F5DE14 /* MewClientConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewClientConfig.m; sourceTree = ""; }; 237053152B1F3A5300F5DE14 /* Api+MewMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+MewMain.m"; sourceTree = ""; }; @@ -774,8 +847,6 @@ 237054692B1F3B3200F5DE14 /* MewGCDHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewGCDHelper.h; sourceTree = ""; }; 2370546B2B1F3B3200F5DE14 /* MewThemeColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewThemeColor.m; sourceTree = ""; }; 2370546C2B1F3B3200F5DE14 /* MewThemeColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewThemeColor.h; sourceTree = ""; }; - 2370546E2B1F3B3200F5DE14 /* MewRechargeStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewRechargeStorage.m; sourceTree = ""; }; - 2370546F2B1F3B3200F5DE14 /* MewRechargeStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewRechargeStorage.h; sourceTree = ""; }; 237054712B1F3B3200F5DE14 /* YYReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YYReachability.h; sourceTree = ""; }; 237054722B1F3B3200F5DE14 /* YYReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YYReachability.m; sourceTree = ""; }; 237054732B1F3B3200F5DE14 /* MewHUDTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewHUDTool.h; sourceTree = ""; }; @@ -828,6 +899,89 @@ 237ACD872B4E38C200BA20B3 /* MewRoomHourListEnterView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomHourListEnterView.m; sourceTree = ""; }; 237ACD892B4E393900BA20B3 /* MewRoomHourListEnterCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomHourListEnterCell.h; sourceTree = ""; }; 237ACD8A2B4E393900BA20B3 /* MewRoomHourListEnterCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomHourListEnterCell.m; sourceTree = ""; }; + 237ACD9A2B4E440500BA20B3 /* MewMainSendGiftVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewMainSendGiftVC.h; sourceTree = ""; }; + 237ACD9B2B4E440500BA20B3 /* MewMainSendGiftVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewMainSendGiftVC.m; sourceTree = ""; }; + 237ACD9D2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewSendGiftPersonDataModel.h; sourceTree = ""; }; + 237ACD9E2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewSendGiftPersonDataModel.m; sourceTree = ""; }; + 237ACDA02B4E457A00BA20B3 /* MewGoodGiftBroadcastView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGoodGiftBroadcastView.h; sourceTree = ""; }; + 237ACDA12B4E457A00BA20B3 /* MewGoodGiftBroadcastView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGoodGiftBroadcastView.m; sourceTree = ""; }; + 237ACDA32B4E471200BA20B3 /* MewGoodGiftBroadcastModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGoodGiftBroadcastModel.h; sourceTree = ""; }; + 237ACDA42B4E471200BA20B3 /* MewGoodGiftBroadcastModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGoodGiftBroadcastModel.m; sourceTree = ""; }; + 237ACDA62B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGoodGiftBroadcastCell.h; sourceTree = ""; }; + 237ACDA72B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGoodGiftBroadcastCell.m; sourceTree = ""; }; + 237ACDA92B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewWeekChampionBroadcastView.h; sourceTree = ""; }; + 237ACDAA2B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewWeekChampionBroadcastView.m; sourceTree = ""; }; + 237ACDAC2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewWeekChampionBroadcastModel.h; sourceTree = ""; }; + 237ACDAD2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewWeekChampionBroadcastModel.m; sourceTree = ""; }; + 237ACDAF2B4E737300BA20B3 /* MewGiftSlideshowView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftSlideshowView.h; sourceTree = ""; }; + 237ACDB02B4E737300BA20B3 /* MewGiftSlideshowView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftSlideshowView.m; sourceTree = ""; }; + 237ACDB22B4E7B0100BA20B3 /* MewSendGiftPersonView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewSendGiftPersonView.h; sourceTree = ""; }; + 237ACDB32B4E7B0100BA20B3 /* MewSendGiftPersonView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewSendGiftPersonView.m; sourceTree = ""; }; + 237ACDB52B4E7F9300BA20B3 /* MewSendGiftPersonCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewSendGiftPersonCell.h; sourceTree = ""; }; + 237ACDB62B4E7F9300BA20B3 /* MewSendGiftPersonCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewSendGiftPersonCell.m; sourceTree = ""; }; + 237ACDB82B4E870700BA20B3 /* MewGiftDataView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftDataView.h; sourceTree = ""; }; + 237ACDB92B4E870700BA20B3 /* MewGiftDataView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftDataView.m; sourceTree = ""; }; + 237ACDBB2B4E879400BA20B3 /* MewGiftDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftDataModel.h; sourceTree = ""; }; + 237ACDBC2B4E879400BA20B3 /* MewGiftDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftDataModel.m; sourceTree = ""; }; + 237ACDBE2B4E897400BA20B3 /* MewWeekChampionListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewWeekChampionListModel.h; sourceTree = ""; }; + 237ACDBF2B4E897400BA20B3 /* MewWeekChampionListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewWeekChampionListModel.m; sourceTree = ""; }; + 237ACDC12B4E8A0000BA20B3 /* MewReceiveGiftDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewReceiveGiftDataModel.h; sourceTree = ""; }; + 237ACDC22B4E8A0000BA20B3 /* MewReceiveGiftDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewReceiveGiftDataModel.m; sourceTree = ""; }; + 237ACDC42B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewReceiveGiftPersonDataModel.h; sourceTree = ""; }; + 237ACDC52B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewReceiveGiftPersonDataModel.m; sourceTree = ""; }; + 237ACDC72B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftGoodPackListDataModel.h; sourceTree = ""; }; + 237ACDC82B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftGoodPackListDataModel.m; sourceTree = ""; }; + 237ACDCA2B4E8C6000BA20B3 /* MewGiftGoodPersonData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftGoodPersonData.h; sourceTree = ""; }; + 237ACDCB2B4E8C6000BA20B3 /* MewGiftGoodPersonData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftGoodPersonData.m; sourceTree = ""; }; + 237ACDCD2B4E8CE100BA20B3 /* MewGiftDataListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftDataListModel.h; sourceTree = ""; }; + 237ACDCE2B4E8CE100BA20B3 /* MewGiftDataListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftDataListModel.m; sourceTree = ""; }; + 237ACDD02B4E8D5B00BA20B3 /* MewGiftNumDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftNumDataModel.h; sourceTree = ""; }; + 237ACDD12B4E8D5B00BA20B3 /* MewGiftNumDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftNumDataModel.m; sourceTree = ""; }; + 237ACDD32B4E8DA100BA20B3 /* MewGiftNumDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftNumDetailModel.h; sourceTree = ""; }; + 237ACDD42B4E8DA100BA20B3 /* MewGiftNumDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftNumDetailModel.m; sourceTree = ""; }; + 237ACDD82B4E994700BA20B3 /* XPPrivilegeCardPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardPresenter.h; sourceTree = ""; }; + 237ACDD92B4E994700BA20B3 /* XPPrivilegeCardPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardPresenter.m; sourceTree = ""; }; + 237ACDDB2B4E994700BA20B3 /* XPPrivilegeCardProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardProtocol.h; sourceTree = ""; }; + 237ACDDD2B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardProduceFooterView.m; sourceTree = ""; }; + 237ACDDE2B4E994700BA20B3 /* XPPrivilegeCardItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardItemCell.h; sourceTree = ""; }; + 237ACDDF2B4E994700BA20B3 /* XPPrivilegeCardProduceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardProduceCell.m; sourceTree = ""; }; + 237ACDE02B4E994700BA20B3 /* XPPrivilegeCardProduceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardProduceView.m; sourceTree = ""; }; + 237ACDE12B4E994700BA20B3 /* XPPrivilegeCardTitlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardTitlView.h; sourceTree = ""; }; + 237ACDE22B4E994700BA20B3 /* XPPrivilegeCardConfirmView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardConfirmView.m; sourceTree = ""; }; + 237ACDE32B4E994700BA20B3 /* XPPrivilegeCardProduceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardProduceCell.h; sourceTree = ""; }; + 237ACDE42B4E994700BA20B3 /* XPPrivilegeCardItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardItemCell.m; sourceTree = ""; }; + 237ACDE52B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardProduceFooterView.h; sourceTree = ""; }; + 237ACDE62B4E994700BA20B3 /* XPPrivilegeCardConfirmView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardConfirmView.h; sourceTree = ""; }; + 237ACDE72B4E994700BA20B3 /* XPPrivilegeCardTitlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardTitlView.m; sourceTree = ""; }; + 237ACDE82B4E994700BA20B3 /* XPPrivilegeCardProduceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardProduceView.h; sourceTree = ""; }; + 237ACDEA2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardVideoItemModel.m; sourceTree = ""; }; + 237ACDEB2B4E994700BA20B3 /* XPPrivilegeCardItemModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardItemModel.h; sourceTree = ""; }; + 237ACDEC2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardVideoItemModel.h; sourceTree = ""; }; + 237ACDED2B4E994700BA20B3 /* XPPrivilegeCardItemModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardItemModel.m; sourceTree = ""; }; + 237ACDEF2B4E994700BA20B3 /* XPPrivilegeCardVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardVC.h; sourceTree = ""; }; + 237ACDF02B4E994700BA20B3 /* XPPrivilegeCardItemVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardItemVC.m; sourceTree = ""; }; + 237ACDF12B4E994700BA20B3 /* XPPrivilegeCardItemVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardItemVC.h; sourceTree = ""; }; + 237ACDF22B4E994700BA20B3 /* XPPrivilegeCardVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardVC.m; sourceTree = ""; }; + 237ACDF42B4E994700BA20B3 /* Api+PrivilegeCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+PrivilegeCard.h"; sourceTree = ""; }; + 237ACDF52B4E994700BA20B3 /* Api+PrivilegeCard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+PrivilegeCard.m"; sourceTree = ""; }; + 237ACE032B4E9A0500BA20B3 /* UILabel+Factory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+Factory.m"; sourceTree = ""; }; + 237ACE042B4E9A0500BA20B3 /* UILabel+Factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+Factory.h"; sourceTree = ""; }; + 237ACE072B4E9DDC00BA20B3 /* MovEncodeToMpegTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MovEncodeToMpegTool.h; sourceTree = ""; }; + 237ACE082B4E9DDC00BA20B3 /* MovEncodeToMpegTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MovEncodeToMpegTool.m; sourceTree = ""; }; + 237ACE0B2B4E9E8900BA20B3 /* MewUploadPhoto.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewUploadPhoto.h; sourceTree = ""; }; + 237ACE0C2B4E9E8900BA20B3 /* MewUploadPhoto.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewUploadPhoto.m; sourceTree = ""; }; + 237ACE0E2B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftWeekChampionCell.h; sourceTree = ""; }; + 237ACE0F2B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftWeekChampionCell.m; sourceTree = ""; }; + 237ACE112B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftWeekChampionFlowLayout.h; sourceTree = ""; }; + 237ACE122B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftWeekChampionFlowLayout.m; sourceTree = ""; }; + 237ACE142B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftWeekChampionItemCell.h; sourceTree = ""; }; + 237ACE152B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftWeekChampionItemCell.m; sourceTree = ""; }; + 237ACE172B4F890200BA20B3 /* MewThemeColor+MewGift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MewThemeColor+MewGift.h"; sourceTree = ""; }; + 237ACE182B4F890200BA20B3 /* MewThemeColor+MewGift.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MewThemeColor+MewGift.m"; sourceTree = ""; }; + 237ACE1A2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewNobleGiftDataModel.h; sourceTree = ""; }; + 237ACE1B2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewNobleGiftDataModel.m; sourceTree = ""; }; + 237ACE1D2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPPrivilegeCardGiftCell.m; sourceTree = ""; }; + 237ACE1E2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPPrivilegeCardGiftCell.h; sourceTree = ""; }; 23E3FCF02B493C0F00D0B664 /* MewRoomBgImageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomBgImageView.h; sourceTree = ""; }; 23E3FCF12B493C0F00D0B664 /* MewRoomBgImageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomBgImageView.m; sourceTree = ""; }; 23E3FCF42B493F3700D0B664 /* MewSVGAParserTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewSVGAParserTool.h; sourceTree = ""; }; @@ -973,20 +1127,12 @@ 8C9C83AA2B0C697A00A601BC /* Api+Login.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Login.m"; sourceTree = ""; }; 8C9C847C2B0C6A6400A601BC /* TXFFmpeg.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXFFmpeg.xcframework; path = Pods/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC/TXFFmpeg.xcframework; sourceTree = ""; }; 8C9C847E2B0C6A6A00A601BC /* TXSoundTouch.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXSoundTouch.xcframework; path = Pods/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC/TXSoundTouch.xcframework; sourceTree = ""; }; - 8C9C84822B0D25EF00A601BC /* MewGiftInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftInfoModel.h; sourceTree = ""; }; - 8C9C84832B0D25EF00A601BC /* MewGiftInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftInfoModel.m; sourceTree = ""; }; - 8C9C84872B0D286F00A601BC /* Api+Gift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Gift.h"; sourceTree = ""; }; - 8C9C84882B0D286F00A601BC /* Api+Gift.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Gift.m"; sourceTree = ""; }; - 8C9C848A2B0D2B8500A601BC /* MewGiftReceiveInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftReceiveInfoModel.h; sourceTree = ""; }; - 8C9C848B2B0D2B8500A601BC /* MewGiftReceiveInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftReceiveInfoModel.m; sourceTree = ""; }; 8C9C848E2B0D439800A601BC /* MewRoomMessageFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomMessageFilter.h; sourceTree = ""; }; 8C9C848F2B0D439800A601BC /* MewRoomMessageFilter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomMessageFilter.m; sourceTree = ""; }; 8C9C84922B0D65C300A601BC /* MewRoomAnimationHitView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomAnimationHitView.h; sourceTree = ""; }; 8C9C84932B0D65C300A601BC /* MewRoomAnimationHitView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomAnimationHitView.m; sourceTree = ""; }; 8C9C84952B0D65E200A601BC /* MewRoomAnimationView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomAnimationView.h; sourceTree = ""; }; 8C9C84962B0D65E200A601BC /* MewRoomAnimationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomAnimationView.m; sourceTree = ""; }; - 8C9C849C2B0D6A5C00A601BC /* MewGiftStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewGiftStorage.h; sourceTree = ""; }; - 8C9C849D2B0D6A5C00A601BC /* MewGiftStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewGiftStorage.m; sourceTree = ""; }; 8C9C849F2B0D6BCF00A601BC /* MewRoomAnimationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomAnimationProtocol.h; sourceTree = ""; }; 8C9C84AB2B0D9AB900A601BC /* MewRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MewRoomMessageHeaderView.h; sourceTree = ""; }; 8C9C84AC2B0D9AB900A601BC /* MewRoomMessageHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MewRoomMessageHeaderView.m; sourceTree = ""; }; @@ -1494,6 +1640,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2329AE932B5125BC00BDCF22 /* IAPHelper */ = { + isa = PBXGroup; + children = ( + 2329AE942B5125BC00BDCF22 /* MewRechargeStorage.m */, + 2329AE952B5125BC00BDCF22 /* MewRechargeStorage.h */, + ); + path = IAPHelper; + sourceTree = ""; + }; 233757242B0CB577001D0B7F /* Message */ = { isa = PBXGroup; children = ( @@ -2043,6 +2198,8 @@ 237053F32B1F3B3200F5DE14 /* UI */ = { isa = PBXGroup; children = ( + 237ACE062B4E9DDC00BA20B3 /* MovEncodeToMpegTool */, + 237ACE022B4E9A0500BA20B3 /* UILabel */, 236557862B4BD452008915E2 /* MewEmptyView */, 8CD782762B3E354D00F4CFF3 /* UpdateVersion */, 8CD780822B36611200F4CFF3 /* InputView */, @@ -2220,13 +2377,14 @@ 237054422B1F3B3200F5DE14 /* Tool */ = { isa = PBXGroup; children = ( + 2329AE932B5125BC00BDCF22 /* IAPHelper */, + 237ACE0A2B4E9E7F00BA20B3 /* MewUploadPhoto */, 2365576A2B4B9B9A008915E2 /* MewBuryPointManager */, 8CD780042B33799C00F4CFF3 /* CATransitionAnimation */, 237054542B1F3B3200F5DE14 /* CountDown */, 237054632B1F3B3200F5DE14 /* EncryptTool */, 237054512B1F3B3200F5DE14 /* File */, 237054672B1F3B3200F5DE14 /* GCDHelper */, - 2370546D2B1F3B3200F5DE14 /* IAPHelper */, 8CD77FF82B32727800F4CFF3 /* MewAlertView */, 237054732B1F3B3200F5DE14 /* MewHUDTool.h */, 2370545F2B1F3B3200F5DE14 /* MewHUDTool.m */, @@ -2346,6 +2504,8 @@ 2370546A2B1F3B3200F5DE14 /* ThemeColor */ = { isa = PBXGroup; children = ( + 237ACE172B4F890200BA20B3 /* MewThemeColor+MewGift.h */, + 237ACE182B4F890200BA20B3 /* MewThemeColor+MewGift.m */, 2370546C2B1F3B3200F5DE14 /* MewThemeColor.h */, 2370546B2B1F3B3200F5DE14 /* MewThemeColor.m */, 236557992B4BFCE1008915E2 /* MewThemeColor+MewRoom.h */, @@ -2356,15 +2516,6 @@ path = ThemeColor; sourceTree = ""; }; - 2370546D2B1F3B3200F5DE14 /* IAPHelper */ = { - isa = PBXGroup; - children = ( - 2370546E2B1F3B3200F5DE14 /* MewRechargeStorage.m */, - 2370546F2B1F3B3200F5DE14 /* MewRechargeStorage.h */, - ); - path = IAPHelper; - sourceTree = ""; - }; 237054702B1F3B3200F5DE14 /* Reachability */ = { isa = PBXGroup; children = ( @@ -2443,6 +2594,10 @@ 237ACD8D2B4E42EE00BA20B3 /* MewSendGiftManager */ = { isa = PBXGroup; children = ( + 2329AE812B50D67300BDCF22 /* MewSendGiftManager.h */, + 2329AE822B50D67300BDCF22 /* MewSendGiftManager.m */, + 2329AE872B50DEED00BDCF22 /* MewGiftCacheManager.h */, + 2329AE882B50DEED00BDCF22 /* MewGiftCacheManager.m */, ); path = MewSendGiftManager; sourceTree = ""; @@ -2450,6 +2605,34 @@ 237ACD8E2B4E42EE00BA20B3 /* MewSendGiftManagerModel */ = { isa = PBXGroup; children = ( + 237ACD9D2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.h */, + 237ACD9E2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.m */, + 237ACDA32B4E471200BA20B3 /* MewGoodGiftBroadcastModel.h */, + 237ACDA42B4E471200BA20B3 /* MewGoodGiftBroadcastModel.m */, + 237ACDAC2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.h */, + 237ACDAD2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.m */, + 237ACDBB2B4E879400BA20B3 /* MewGiftDataModel.h */, + 237ACDBC2B4E879400BA20B3 /* MewGiftDataModel.m */, + 237ACDBE2B4E897400BA20B3 /* MewWeekChampionListModel.h */, + 237ACDBF2B4E897400BA20B3 /* MewWeekChampionListModel.m */, + 237ACDC12B4E8A0000BA20B3 /* MewReceiveGiftDataModel.h */, + 237ACDC22B4E8A0000BA20B3 /* MewReceiveGiftDataModel.m */, + 237ACDC42B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.h */, + 237ACDC52B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.m */, + 237ACDC72B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.h */, + 237ACDC82B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.m */, + 237ACDCA2B4E8C6000BA20B3 /* MewGiftGoodPersonData.h */, + 237ACDCB2B4E8C6000BA20B3 /* MewGiftGoodPersonData.m */, + 237ACDCD2B4E8CE100BA20B3 /* MewGiftDataListModel.h */, + 237ACDCE2B4E8CE100BA20B3 /* MewGiftDataListModel.m */, + 237ACDD02B4E8D5B00BA20B3 /* MewGiftNumDataModel.h */, + 237ACDD12B4E8D5B00BA20B3 /* MewGiftNumDataModel.m */, + 237ACDD32B4E8DA100BA20B3 /* MewGiftNumDetailModel.h */, + 237ACDD42B4E8DA100BA20B3 /* MewGiftNumDetailModel.m */, + 237ACE1A2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.h */, + 237ACE1B2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.m */, + 23692DAF2B4FC7AD0011797F /* MewGiftBottomBarCountModel.h */, + 23692DB02B4FC7AD0011797F /* MewGiftBottomBarCountModel.m */, ); path = MewSendGiftManagerModel; sourceTree = ""; @@ -2459,6 +2642,8 @@ children = ( 237ACD902B4E42EE00BA20B3 /* MewCell */, 237ACD952B4E42EE00BA20B3 /* MewSubViews */, + 237ACD9A2B4E440500BA20B3 /* MewMainSendGiftVC.h */, + 237ACD9B2B4E440500BA20B3 /* MewMainSendGiftVC.m */, ); path = MewSendGiftManagerView; sourceTree = ""; @@ -2466,6 +2651,20 @@ 237ACD902B4E42EE00BA20B3 /* MewCell */ = { isa = PBXGroup; children = ( + 237ACDA62B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.h */, + 237ACDA72B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.m */, + 237ACDB52B4E7F9300BA20B3 /* MewSendGiftPersonCell.h */, + 237ACDB62B4E7F9300BA20B3 /* MewSendGiftPersonCell.m */, + 237ACE0E2B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.h */, + 237ACE0F2B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.m */, + 237ACE142B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.h */, + 237ACE152B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.m */, + 237ACE112B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.h */, + 237ACE122B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.m */, + 237ACE1E2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.h */, + 237ACE1D2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.m */, + 23692DB52B4FCBEC0011797F /* MewGiftBottomBarCell.h */, + 23692DB62B4FCBEC0011797F /* MewGiftBottomBarCell.m */, ); path = MewCell; sourceTree = ""; @@ -2473,6 +2672,24 @@ 237ACD952B4E42EE00BA20B3 /* MewSubViews */ = { isa = PBXGroup; children = ( + 237ACDA02B4E457A00BA20B3 /* MewGoodGiftBroadcastView.h */, + 237ACDA12B4E457A00BA20B3 /* MewGoodGiftBroadcastView.m */, + 237ACDA92B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.h */, + 237ACDAA2B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.m */, + 2329AE8A2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.h */, + 2329AE8B2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.m */, + 237ACDAF2B4E737300BA20B3 /* MewGiftSlideshowView.h */, + 237ACDB02B4E737300BA20B3 /* MewGiftSlideshowView.m */, + 237ACDB22B4E7B0100BA20B3 /* MewSendGiftPersonView.h */, + 237ACDB32B4E7B0100BA20B3 /* MewSendGiftPersonView.m */, + 237ACDB82B4E870700BA20B3 /* MewGiftDataView.h */, + 237ACDB92B4E870700BA20B3 /* MewGiftDataView.m */, + 23692DAC2B4FC7550011797F /* MewGiftBottomBarView.h */, + 23692DAD2B4FC7550011797F /* MewGiftBottomBarView.m */, + 23692DB22B4FC9B90011797F /* MewGiftNumView.h */, + 23692DB32B4FC9B90011797F /* MewGiftNumView.m */, + 23692DB82B4FE12E0011797F /* MedDrawGiftView.h */, + 23692DB92B4FE12E0011797F /* MedDrawGiftView.m */, ); path = MewSubViews; sourceTree = ""; @@ -2480,6 +2697,7 @@ 237ACD962B4E42EE00BA20B3 /* MewSendGiftManagerProtocol */ = { isa = PBXGroup; children = ( + 23692DBB2B4FFE8D0011797F /* MewSendGiftManagerProtocol.h */, ); path = MewSendGiftManagerProtocol; sourceTree = ""; @@ -2487,10 +2705,120 @@ 237ACD972B4E42EE00BA20B3 /* MewSendGiftManagerApi */ = { isa = PBXGroup; children = ( + 2329AE842B50D76000BDCF22 /* Api+MewSendGfit.h */, + 2329AE852B50D76000BDCF22 /* Api+MewSendGfit.m */, ); path = MewSendGiftManagerApi; sourceTree = ""; }; + 237ACDD62B4E994700BA20B3 /* PrivilegeCard */ = { + isa = PBXGroup; + children = ( + 237ACDD72B4E994700BA20B3 /* Presenter */, + 237ACDDA2B4E994700BA20B3 /* Protocol */, + 237ACDDC2B4E994700BA20B3 /* Subviews */, + 237ACDE92B4E994700BA20B3 /* Model */, + 237ACDEE2B4E994700BA20B3 /* View */, + 237ACDF32B4E994700BA20B3 /* Api */, + ); + path = PrivilegeCard; + sourceTree = ""; + }; + 237ACDD72B4E994700BA20B3 /* Presenter */ = { + isa = PBXGroup; + children = ( + 237ACDD82B4E994700BA20B3 /* XPPrivilegeCardPresenter.h */, + 237ACDD92B4E994700BA20B3 /* XPPrivilegeCardPresenter.m */, + ); + path = Presenter; + sourceTree = ""; + }; + 237ACDDA2B4E994700BA20B3 /* Protocol */ = { + isa = PBXGroup; + children = ( + 237ACDDB2B4E994700BA20B3 /* XPPrivilegeCardProtocol.h */, + ); + path = Protocol; + sourceTree = ""; + }; + 237ACDDC2B4E994700BA20B3 /* Subviews */ = { + isa = PBXGroup; + children = ( + 237ACDDD2B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.m */, + 237ACDDE2B4E994700BA20B3 /* XPPrivilegeCardItemCell.h */, + 237ACDDF2B4E994700BA20B3 /* XPPrivilegeCardProduceCell.m */, + 237ACDE02B4E994700BA20B3 /* XPPrivilegeCardProduceView.m */, + 237ACDE12B4E994700BA20B3 /* XPPrivilegeCardTitlView.h */, + 237ACDE22B4E994700BA20B3 /* XPPrivilegeCardConfirmView.m */, + 237ACDE32B4E994700BA20B3 /* XPPrivilegeCardProduceCell.h */, + 237ACDE42B4E994700BA20B3 /* XPPrivilegeCardItemCell.m */, + 237ACDE52B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.h */, + 237ACDE62B4E994700BA20B3 /* XPPrivilegeCardConfirmView.h */, + 237ACDE72B4E994700BA20B3 /* XPPrivilegeCardTitlView.m */, + 237ACDE82B4E994700BA20B3 /* XPPrivilegeCardProduceView.h */, + ); + path = Subviews; + sourceTree = ""; + }; + 237ACDE92B4E994700BA20B3 /* Model */ = { + isa = PBXGroup; + children = ( + 237ACDEA2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.m */, + 237ACDEB2B4E994700BA20B3 /* XPPrivilegeCardItemModel.h */, + 237ACDEC2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.h */, + 237ACDED2B4E994700BA20B3 /* XPPrivilegeCardItemModel.m */, + ); + path = Model; + sourceTree = ""; + }; + 237ACDEE2B4E994700BA20B3 /* View */ = { + isa = PBXGroup; + children = ( + 237ACDEF2B4E994700BA20B3 /* XPPrivilegeCardVC.h */, + 237ACDF02B4E994700BA20B3 /* XPPrivilegeCardItemVC.m */, + 237ACDF12B4E994700BA20B3 /* XPPrivilegeCardItemVC.h */, + 237ACDF22B4E994700BA20B3 /* XPPrivilegeCardVC.m */, + ); + path = View; + sourceTree = ""; + }; + 237ACDF32B4E994700BA20B3 /* Api */ = { + isa = PBXGroup; + children = ( + 237ACDF42B4E994700BA20B3 /* Api+PrivilegeCard.h */, + 237ACDF52B4E994700BA20B3 /* Api+PrivilegeCard.m */, + ); + path = Api; + sourceTree = ""; + }; + 237ACE022B4E9A0500BA20B3 /* UILabel */ = { + isa = PBXGroup; + children = ( + 237ACE032B4E9A0500BA20B3 /* UILabel+Factory.m */, + 237ACE042B4E9A0500BA20B3 /* UILabel+Factory.h */, + ); + path = UILabel; + sourceTree = ""; + }; + 237ACE062B4E9DDC00BA20B3 /* MovEncodeToMpegTool */ = { + isa = PBXGroup; + children = ( + 237ACE072B4E9DDC00BA20B3 /* MovEncodeToMpegTool.h */, + 237ACE082B4E9DDC00BA20B3 /* MovEncodeToMpegTool.m */, + ); + path = MovEncodeToMpegTool; + sourceTree = ""; + }; + 237ACE0A2B4E9E7F00BA20B3 /* MewUploadPhoto */ = { + isa = PBXGroup; + children = ( + 237ACE0B2B4E9E8900BA20B3 /* MewUploadPhoto.h */, + 237ACE0C2B4E9E8900BA20B3 /* MewUploadPhoto.m */, + ); + name = MewUploadPhoto; + path = "yinmeng-ios/Base/UI/MewUploadPhoto"; + sourceTree = SOURCE_ROOT; + }; 23E3FCEF2B493BC700D0B664 /* MewRoomBgImageView */ = { isa = PBXGroup; children = ( @@ -2698,6 +3026,7 @@ 8C9C82F72B0C697A00A601BC /* View */ = { isa = PBXGroup; children = ( + 237ACDD62B4E994700BA20B3 /* PrivilegeCard */, 237ACD8C2B4E42EE00BA20B3 /* MewSendGiftManager */, 8C9C84912B0D659800A601BC /* AnimationView */, 8C9C82FA2B0C697A00A601BC /* MenuContainerView */, @@ -2778,10 +3107,10 @@ 8C9C83102B0C697A00A601BC /* Model */ = { isa = PBXGroup; children = ( - 8C9C83112B0C697A00A601BC /* MewMessageInfoModel.m */, - 8C9C83122B0C697A00A601BC /* MewMessageRemoteExtModel.m */, - 8C9C83132B0C697A00A601BC /* MewMessageRemoteExtModel.h */, 8C9C83142B0C697A00A601BC /* MewMessageInfoModel.h */, + 8C9C83112B0C697A00A601BC /* MewMessageInfoModel.m */, + 8C9C83132B0C697A00A601BC /* MewMessageRemoteExtModel.h */, + 8C9C83122B0C697A00A601BC /* MewMessageRemoteExtModel.m */, ); path = Model; sourceTree = ""; @@ -3163,41 +3492,10 @@ 8C9C84802B0D25C700A601BC /* ModuleKit */ = { isa = PBXGroup; children = ( - 8C9C84812B0D25D700A601BC /* MewGiftView */, ); path = ModuleKit; sourceTree = ""; }; - 8C9C84812B0D25D700A601BC /* MewGiftView */ = { - isa = PBXGroup; - children = ( - 8C9C849B2B0D6A4600A601BC /* Presenter */, - 8C9C84862B0D286000A601BC /* Api */, - 8C9C84852B0D284000A601BC /* Model */, - ); - path = MewGiftView; - sourceTree = ""; - }; - 8C9C84852B0D284000A601BC /* Model */ = { - isa = PBXGroup; - children = ( - 8C9C84822B0D25EF00A601BC /* MewGiftInfoModel.h */, - 8C9C84832B0D25EF00A601BC /* MewGiftInfoModel.m */, - 8C9C848A2B0D2B8500A601BC /* MewGiftReceiveInfoModel.h */, - 8C9C848B2B0D2B8500A601BC /* MewGiftReceiveInfoModel.m */, - ); - path = Model; - sourceTree = ""; - }; - 8C9C84862B0D286000A601BC /* Api */ = { - isa = PBXGroup; - children = ( - 8C9C84872B0D286F00A601BC /* Api+Gift.h */, - 8C9C84882B0D286F00A601BC /* Api+Gift.m */, - ); - path = Api; - sourceTree = ""; - }; 8C9C84912B0D659800A601BC /* AnimationView */ = { isa = PBXGroup; children = ( @@ -3211,15 +3509,6 @@ path = AnimationView; sourceTree = ""; }; - 8C9C849B2B0D6A4600A601BC /* Presenter */ = { - isa = PBXGroup; - children = ( - 8C9C849C2B0D6A5C00A601BC /* MewGiftStorage.h */, - 8C9C849D2B0D6A5C00A601BC /* MewGiftStorage.m */, - ); - path = Presenter; - sourceTree = ""; - }; 8CAB97392B239ECE00ED8639 /* MewView */ = { isa = PBXGroup; children = ( @@ -3598,6 +3887,10 @@ 237054D92B204ADD00F5DE14 /* MewUserInfoModel.m */, 237054DC2B204C4E00F5DE14 /* MewUserVipInfoModel.h */, 237054DD2B204C4E00F5DE14 /* MewUserVipInfoModel.m */, + 2329AE8D2B51202300BDCF22 /* MewUserAddModel.h */, + 2329AE8E2B51202300BDCF22 /* MewUserAddModel.m */, + 2329AE902B51208B00BDCF22 /* MewUserPictureModel.h */, + 2329AE912B51208B00BDCF22 /* MewUserPictureModel.m */, ); path = UserModel; sourceTree = ""; @@ -4674,14 +4967,17 @@ 8CD7814B2B36611200F4CFF3 /* QEmotionHelper.m in Sources */, 8C9C843B2B0C697A00A601BC /* MewTRTCRtcImpl.m in Sources */, 8CD782112B3A4B9600F4CFF3 /* MewSpriteSheetImage.m in Sources */, + 237ACDB12B4E737300BA20B3 /* MewGiftSlideshowView.m in Sources */, 237053982B1F3AA100F5DE14 /* MewAudioPlayerManager.m in Sources */, 8CD77FD52B31297A00F4CFF3 /* MewSessionHeaderItemModel.m in Sources */, 8CD780752B365AB800F4CFF3 /* MewDynamicMomentsTopicView.m in Sources */, + 237ACDC62B4E8BB000BA20B3 /* MewReceiveGiftPersonDataModel.m in Sources */, 8CD780792B365C2D00F4CFF3 /* MewDynamicTextHeightLayout.m in Sources */, 8CD77FE22B3133FC00F4CFF3 /* MewMusicNoteView.m in Sources */, 2337575C2B0CB577001D0B7F /* MewSessionMessageCell.m in Sources */, 8CD781FC2B3682D100F4CFF3 /* MewDynamicPhotoMomentModel.m in Sources */, 8C9C821F2B0C694900A601BC /* AppDelegate.m in Sources */, + 23692DB42B4FC9B90011797F /* MewGiftNumView.m in Sources */, 2337F9B32B4D2B19007C6326 /* MewRoomTopRankEnterModel.m in Sources */, 8C92A8182B0EF3E9008F362C /* MewMineModifPayPwdView.m in Sources */, 8CD782412B3BC78F00F4CFF3 /* MewPersonalCenterFeatureItemCollectionCell.m in Sources */, @@ -4689,6 +4985,7 @@ 237053F12B1F3B1700F5DE14 /* MewHtmlUrl.m in Sources */, 8CD782C32B44E68C00F4CFF3 /* MewTeenagerPointTitleView.m in Sources */, 8CD782DB2B45EED600F4CFF3 /* MewUserGameModel.m in Sources */, + 237ACE132B4F846200BA20B3 /* MewGiftWeekChampionFlowLayout.m in Sources */, 8CD77FC12B3116F000F4CFF3 /* MewMessageViewController.m in Sources */, 237054A92B1F3B3200F5DE14 /* MewEncryptTool.m in Sources */, 237054A82B1F3B3200F5DE14 /* MewTimer.m in Sources */, @@ -4698,10 +4995,13 @@ 2370547F2B1F3B3200F5DE14 /* UIView+MewFilletCorner.m in Sources */, 236557852B4BCAD0008915E2 /* MewRoomActiveCell.m in Sources */, 8CD7814D2B36611200F4CFF3 /* QKeyboardManager.m in Sources */, + 237ACDBA2B4E870700BA20B3 /* MewGiftDataView.m in Sources */, + 237ACDFE2B4E994700BA20B3 /* XPPrivilegeCardItemModel.m in Sources */, 23E3FCF62B493F3700D0B664 /* MewSVGAParserTool.m in Sources */, 236557812B4BC97E008915E2 /* MewRoomActiveVC.m in Sources */, 8CD7800F2B33BFE600F4CFF3 /* MewCustomNavView.m in Sources */, 8CD782212B3B493200F4CFF3 /* MewPersonalCenterHeaderView.m in Sources */, + 237ACDAE2B4E6D5500BA20B3 /* MewWeekChampionBroadcastModel.m in Sources */, 8CD782372B3B9DBE00F4CFF3 /* MewPersonalCenterMoreItemModel.m in Sources */, 8CD781462B36611200F4CFF3 /* QInputBarView.m in Sources */, 8C9C84462B0C697A00A601BC /* MewMineSettingViewController.m in Sources */, @@ -4723,11 +5023,11 @@ 8CD77FFF2B32832C00F4CFF3 /* MewAlertModel.m in Sources */, 2370539C2B1F3AA100F5DE14 /* MewVoiceDiscView.m in Sources */, 23270C292B0E037300B9303B /* MewMessageConentAudioView.m in Sources */, + 237ACD9C2B4E440500BA20B3 /* MewMainSendGiftVC.m in Sources */, 23E3FD042B495EFF00D0B664 /* MewRoomMornView.m in Sources */, 2337F9BC2B4D50EC007C6326 /* MewRoomNoticeView.m in Sources */, 236557692B496DC2008915E2 /* MewRoomListEmptyCell.m in Sources */, 8CD782072B3900EB00F4CFF3 /* MewPushShareModel.m in Sources */, - 8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */, 2337F9AD2B4D2906007C6326 /* MewRoomContentContainerView.m in Sources */, 8CD780232B33D23100F4CFF3 /* MewUserInfoPhotoModel.m in Sources */, 237053902B1F3AA100F5DE14 /* MewSessionListViewController.m in Sources */, @@ -4737,12 +5037,15 @@ 237054A72B1F3B3200F5DE14 /* MewHUDTool.m in Sources */, 237053862B1F3AA100F5DE14 /* MewRoomMessageTableCell.m in Sources */, 8CD782332B3B590200F4CFF3 /* MewFriendCountView.m in Sources */, - 8C9C849E2B0D6A5C00A601BC /* MewGiftStorage.m in Sources */, 237053F22B1F3B1700F5DE14 /* MewConstant.m in Sources */, 237054DE2B204C4E00F5DE14 /* MewUserVipInfoModel.m in Sources */, + 237ACDF62B4E994700BA20B3 /* XPPrivilegeCardPresenter.m in Sources */, 237054AD2B1F3B3200F5DE14 /* YYReachability.m in Sources */, 8CD780072B3379C800F4CFF3 /* MewCATransitionAnimation.m in Sources */, + 237ACE012B4E994700BA20B3 /* Api+PrivilegeCard.m in Sources */, 237054DB2B204ADE00F5DE14 /* MewUserInfoModel.m in Sources */, + 237ACE162B4F850D00BA20B3 /* MewGiftWeekChampionItemCell.m in Sources */, + 23692DB12B4FC7AD0011797F /* MewGiftBottomBarCountModel.m in Sources */, 8CD7826D2B3E2B2800F4CFF3 /* MewLimitSystemPermissionFooterView.m in Sources */, 8C9C843A2B0C697A00A601BC /* MewBaseRtcImpl.m in Sources */, 8CD77FE82B3211C800F4CFF3 /* MewSessionFanPartyModel.m in Sources */, @@ -4753,7 +5056,6 @@ 237054E72B204F1000F5DE14 /* MewUtility+MewApp.m in Sources */, 8CD7829C2B41FB6B00F4CFF3 /* MewFooterMarkViewController.m in Sources */, 8CD7803B2B35135C00F4CFF3 /* MewUserPersonalProfieSkillCardTableCell.m in Sources */, - 237054AC2B1F3B3200F5DE14 /* MewRechargeStorage.m in Sources */, 237053962B1F3AA100F5DE14 /* Api+MewParty.m in Sources */, 237054812B1F3B3200F5DE14 /* MewStackManager.m in Sources */, 8C92A80E2B0EEF3A008F362C /* MewLoginBindPhoneViewController.m in Sources */, @@ -4761,14 +5063,19 @@ 237054902B1F3B3200F5DE14 /* TTActionSheetView.m in Sources */, 8C9C84432B0C697A00A601BC /* MewWalletInfoModel.m in Sources */, 8CD782922B3F984600F4CFF3 /* MewFriendVisitorViewController.m in Sources */, + 237ACDFD2B4E994700BA20B3 /* XPPrivilegeCardVideoItemModel.m in Sources */, 8CD782D72B45EBA900F4CFF3 /* MewOrderRecordsTableViewCell.m in Sources */, + 237ACDBD2B4E879400BA20B3 /* MewGiftDataModel.m in Sources */, 8C9C84552B0C697A00A601BC /* MewLoginForgetEditView.m in Sources */, 8C9C84542B0C697A00A601BC /* MewLoginInputView.m in Sources */, 8CD783392B48BDB000F4CFF3 /* MewSkillCardTableViewCell.m in Sources */, + 237ACDAB2B4E6D3000BA20B3 /* MewWeekChampionBroadcastView.m in Sources */, 233757632B0CB577001D0B7F /* MewMessageContentUnSupportView.m in Sources */, + 237ACDC32B4E8A0000BA20B3 /* MewReceiveGiftDataModel.m in Sources */, 8CD782CC2B450C1D00F4CFF3 /* MewMineCollectionEditButtonView.m in Sources */, 8CD782BC2B44C98900F4CFF3 /* MewWalletDiamondTitleReusableView.m in Sources */, 2337575E2B0CB577001D0B7F /* MewNIMMessageMaker.m in Sources */, + 237ACE192B4F890200BA20B3 /* MewThemeColor+MewGift.m in Sources */, 8CD782B02B44C03D00F4CFF3 /* MewWalletPayCollectionCell.m in Sources */, 8CD783052B4644C300F4CFF3 /* MewSearchNavView.m in Sources */, 8CD7806F2B365A7300F4CFF3 /* MewDynamicMomentsPhotoView.m in Sources */, @@ -4784,6 +5091,8 @@ 2370539E2B1F3AA100F5DE14 /* MewPlayVoiceView.m in Sources */, 8C9C841C2B0C697A00A601BC /* MewRoomInfoModel.m in Sources */, 2337575B2B0CB577001D0B7F /* UIView+NIM.m in Sources */, + 237ACDA52B4E471200BA20B3 /* MewGoodGiftBroadcastModel.m in Sources */, + 237ACDA82B4E473C00BA20B3 /* MewGoodGiftBroadcastCell.m in Sources */, 8CD782792B3E356400F4CFF3 /* MewUpdateVersionView.m in Sources */, 237054892B1F3B3200F5DE14 /* TTPopup.m in Sources */, 8C9C843F2B0C697A00A601BC /* MewFansInfoModel.m in Sources */, @@ -4791,8 +5100,11 @@ 8CD782002B38FC9500F4CFF3 /* MewShareView.m in Sources */, 8CD7804B2B35290F00F4CFF3 /* MewSaveSkillCardModel.m in Sources */, 233757652B0CB577001D0B7F /* MewSessionNavView.m in Sources */, + 2329AE962B5125BC00BDCF22 /* MewRechargeStorage.m in Sources */, + 237ACDB72B4E7F9300BA20B3 /* MewSendGiftPersonCell.m in Sources */, 8C9C84282B0C697A00A601BC /* MewRoomMessageParser.m in Sources */, 8CAB97012B1FE16000ED8639 /* UITableView+NIMScrollToBottom.m in Sources */, + 2329AE862B50D76000BDCF22 /* Api+MewSendGfit.m in Sources */, 8CD782EF2B461C3700F4CFF3 /* MewDressupShopModel.m in Sources */, 8CD782152B3A4BD300F4CFF3 /* YYAnimatedImageView+MewUntil.m in Sources */, 8CD7820A2B3A0DC200F4CFF3 /* MewShareItemCollectionCell.m in Sources */, @@ -4800,6 +5112,7 @@ 233757592B0CB577001D0B7F /* MewNIMBadgeView.m in Sources */, 237054A42B1F3B3200F5DE14 /* MewTimeIntervalUtils.m in Sources */, 233757562B0CB577001D0B7F /* MewMessagePresenter.m in Sources */, + 237ACE0D2B4E9E8900BA20B3 /* MewUploadPhoto.m in Sources */, 8C9C84512B0C697A00A601BC /* MewLoginPasswordPresent.m in Sources */, 8C9C841F2B0C697A00A601BC /* MewStageView.m in Sources */, 237054C32B20179800F5DE14 /* MewAccountInfoStorage.m in Sources */, @@ -4823,23 +5136,28 @@ 8C9C84402B0C697A00A601BC /* MewMineSettingItemModel.m in Sources */, 8CD7824A2B3CB40800F4CFF3 /* MewVerBindLoginPhoneViewController.m in Sources */, 2337F99D2B4D2359007C6326 /* MewMiniRoomWindow.m in Sources */, + 237ACE002B4E994700BA20B3 /* XPPrivilegeCardVC.m in Sources */, 8CD782A22B41FC8700F4CFF3 /* MewFooterMarkModel.m in Sources */, 8CD782C62B44EEAE00F4CFF3 /* MewOpenTeenagerPasswordViewController.m in Sources */, 237054AE2B1F3B3200F5DE14 /* NSObject+MEWExtension.m in Sources */, 8C9C84232B0C697A00A601BC /* MewMicroStateModel.m in Sources */, 8CD782302B3B4DFA00F4CFF3 /* MewUserAvatarAnimateView.m in Sources */, + 23692DAE2B4FC7550011797F /* MewGiftBottomBarView.m in Sources */, 8C9C84212B0C697A00A601BC /* MewMicroQueueModel.m in Sources */, 8C9C844F2B0C697A00A601BC /* MewLoginFullInfoPresenter.m in Sources */, + 237ACDD22B4E8D5B00BA20B3 /* MewGiftNumDataModel.m in Sources */, 237ACD852B4D6A2E00BA20B3 /* MewRoomPublishNoticeView.m in Sources */, 8CD7833F2B48C46500F4CFF3 /* MewThemeColor+SkillCard.m in Sources */, 8C9C84222B0C697A00A601BC /* MewMicroExtModel.m in Sources */, 8CD781F92B366BB200F4CFF3 /* NSMutableAttributedString+MewUtil.m in Sources */, 8C9C843C2B0C697A00A601BC /* MewRtcManager.m in Sources */, 8CD782512B3D05EF00F4CFF3 /* MewPersonalNoticationRemindViewController.m in Sources */, + 237ACDF72B4E994700BA20B3 /* XPPrivilegeCardProduceFooterView.m in Sources */, 8C9C84BA2B0ECD2100A601BC /* MewMineRechargePresenter.m in Sources */, 8CD781442B36611200F4CFF3 /* QInputBarViewConfiguration.m in Sources */, 8CD782192B3A4FC100F4CFF3 /* MewSystemTool.m in Sources */, 8CD77FED2B32182D00F4CFF3 /* MewYoungerView.m in Sources */, + 2329AE922B51208B00BDCF22 /* MewUserPictureModel.m in Sources */, 2370538C2B1F3AA100F5DE14 /* MewLoginPasswordView.m in Sources */, 8CD780312B33DD5500F4CFF3 /* MewUserPersonalDetailHeaderInfoView.m in Sources */, 8C9C841E2B0C697A00A601BC /* MewRoomSendTextView.m in Sources */, @@ -4848,6 +5166,7 @@ 8CD781492B36611200F4CFF3 /* QEmotion.m in Sources */, 8C9C843E2B0C697A00A601BC /* MewMineSettingPresenter.m in Sources */, 8C4D53622AFD4CF700238AE6 /* main.m in Sources */, + 237ACDF92B4E994700BA20B3 /* XPPrivilegeCardProduceView.m in Sources */, 233757642B0CB577001D0B7F /* MewMessageContentText.m in Sources */, 8C9C84242B0C697A00A601BC /* MewRoomMessageContainerView.m in Sources */, 8CD782722B3E326A00F4CFF3 /* MewUpdateVersionModel.m in Sources */, @@ -4863,6 +5182,7 @@ 2365578F2B4BD628008915E2 /* MewEmptyCollectionViewCell.m in Sources */, 8C9C84252B0C697A00A601BC /* MewMessageInfoModel.m in Sources */, 8CD781472B36611200F4CFF3 /* QEEmotionImageView.m in Sources */, + 237ACDCF2B4E8CE100BA20B3 /* MewGiftDataListModel.m in Sources */, 8CD7830C2B464B0100F4CFF3 /* MewDressupSendSearchTableViewCell.m in Sources */, 8CD781482B36611200F4CFF3 /* QKeyboardBaseManager.m in Sources */, 8CD7814C2B36611200F4CFF3 /* QEmotionAttachment.m in Sources */, @@ -4875,6 +5195,8 @@ 233757582B0CB577001D0B7F /* MewChatLimitModel.m in Sources */, 2370539A2B1F3AA100F5DE14 /* MewVoiceGuideView.m in Sources */, 8CD77FF12B321CB500F4CFF3 /* MewMessageSessionListTableCell.m in Sources */, + 237ACE1C2B4F8ADF00BA20B3 /* MewNobleGiftDataModel.m in Sources */, + 2329AE8C2B51148100BDCF22 /* MewGiftWeekFirstPlaceBroadcastView.m in Sources */, 8CD77FB62B30D68B00F4CFF3 /* NIMManager.m in Sources */, 8C9C84492B0C697A00A601BC /* MewMineAboutUsViewController.m in Sources */, 8CD783362B48BD5100F4CFF3 /* MewSkillCardHeaderView.m in Sources */, @@ -4890,6 +5212,8 @@ 237054AF2B1F3B3200F5DE14 /* MewPaymentAction.swift in Sources */, 237054A02B1F3B3200F5DE14 /* NSMutableDictionary+MEWSafe.m in Sources */, 8C9C84502B0C697A00A601BC /* MewLoginVerifCodePresent.m in Sources */, + 237ACE052B4E9A0500BA20B3 /* UILabel+Factory.m in Sources */, + 2329AE832B50D67300BDCF22 /* MewSendGiftManager.m in Sources */, 8C9C844C2B0C697A00A601BC /* MewCustomAttachmentDecoder.m in Sources */, 8CD7822A2B3B49EE00F4CFF3 /* MewPersonalCenterMoreFeatureTableCell.m in Sources */, 8CD77FDB2B3132B700F4CFF3 /* MewMessageSessionHeaderCollectionCell.m in Sources */, @@ -4903,7 +5227,6 @@ 237053842B1F3AA100F5DE14 /* MewRoomRightView.m in Sources */, 237054C62B20265D00F5DE14 /* MewAccountModel.m in Sources */, 8CD77FE52B313F8600F4CFF3 /* MewMessageSessionHeaderItemView.m in Sources */, - 8C9C848C2B0D2B8500A601BC /* MewGiftReceiveInfoModel.m in Sources */, 8CD7833C2B48C3D500F4CFF3 /* MewVoiceSkillCardView.m in Sources */, 8C9C84572B0C697A00A601BC /* Api+Login.m in Sources */, 2337575D2B0CB577001D0B7F /* MewSessionToolbarView.m in Sources */, @@ -4915,9 +5238,11 @@ 237053872B1F3AA100F5DE14 /* MewRoomViewController.m in Sources */, 2370539F2B1F3AA100F5DE14 /* MewRightFollowVoiceView.m in Sources */, 8CD7822D2B3B4A3A00F4CFF3 /* MewPersonalCenterBannerTableCell.m in Sources */, + 237ACDFB2B4E994700BA20B3 /* XPPrivilegeCardItemCell.m in Sources */, 237054862B1F3B3200F5DE14 /* NetImageView.m in Sources */, 8CD7802D2B33DBDB00F4CFF3 /* SDBrowserImageView.m in Sources */, 233757662B0CB577001D0B7F /* MewSessionAudioRecordView.m in Sources */, + 237ACDB42B4E7B0100BA20B3 /* MewSendGiftPersonView.m in Sources */, 8CD77FB72B30D68B00F4CFF3 /* NIMManager+MessageListener.m in Sources */, 237053832B1F3AA100F5DE14 /* MewSocialStageView.m in Sources */, 233757672B0CB577001D0B7F /* Api+Message.m in Sources */, @@ -4935,27 +5260,34 @@ 8CD782872B3F4CF600F4CFF3 /* MewBaseTableViewController.m in Sources */, 8C9C84522B0C697A00A601BC /* MewThirdUserInfo.m in Sources */, 8C92A81F2B0EF4D2008F362C /* MineLoginPasswordPresenter.m in Sources */, + 237ACE102B4EB4BF00BA20B3 /* MewGiftWeekChampionCell.m in Sources */, 8C9C84472B0C697A00A601BC /* MewMineCollectionTableViewCell.m in Sources */, 2337F9A02B4D2376007C6326 /* MewMiniRoomTool.m in Sources */, 8C9C844E2B0C697A00A601BC /* MewLoginPresenter.m in Sources */, - 8C9C84842B0D25EF00A601BC /* MewGiftInfoModel.m in Sources */, 8C9C84272B0C697A00A601BC /* MewNetImageLabel.m in Sources */, + 237ACDFC2B4E994700BA20B3 /* XPPrivilegeCardTitlView.m in Sources */, 2370538E2B1F3AA100F5DE14 /* MewLoginViewController.m in Sources */, 8CD782832B3E7CE200F4CFF3 /* MewPayForgetPasswordViewController.m in Sources */, + 237ACDD52B4E8DA100BA20B3 /* MewGiftNumDetailModel.m in Sources */, 23E3FCF92B4946AE00D0B664 /* MewRoomBgImageItemModel.m in Sources */, 8CD782582B3D0EDF00F4CFF3 /* MewPersonalNoticationRemindTableCell.m in Sources */, 8CD780812B365F3100F4CFF3 /* MewDynamicReplyCommentModel.m in Sources */, 237054842B1F3B3200F5DE14 /* UIImageConstant.m in Sources */, + 237ACDFA2B4E994700BA20B3 /* XPPrivilegeCardConfirmView.m in Sources */, 8CD7805F2B36193200F4CFF3 /* MewUserGiftWallModel.m in Sources */, 8C9C842A2B0C697A00A601BC /* Api+Room.m in Sources */, 8CD77FCC2B311FBE00F4CFF3 /* MewCategoryTitleContainerView.m in Sources */, + 237ACDC02B4E897400BA20B3 /* MewWeekChampionListModel.m in Sources */, 8CD781432B36611200F4CFF3 /* QEmotionBoardView.m in Sources */, 2370549F2B1F3B3200F5DE14 /* UIImage+RW.m in Sources */, 8C9C84902B0D439800A601BC /* MewRoomMessageFilter.m in Sources */, 237054E42B204ED000F5DE14 /* MewUtility.m in Sources */, + 237ACE1F2B4F999100BA20B3 /* XPPrivilegeCardGiftCell.m in Sources */, 8C92A8072B0EEDD0008F362C /* MewLoginVerifBindPhoneViewController.m in Sources */, + 237ACDF82B4E994700BA20B3 /* XPPrivilegeCardProduceCell.m in Sources */, 236557702B4B9BE9008915E2 /* MewBuryPointService.m in Sources */, 237054AB2B1F3B3200F5DE14 /* MewThemeColor.m in Sources */, + 237ACD9F2B4E447B00BA20B3 /* MewSendGiftPersonDataModel.m in Sources */, 8CD782AD2B44A11A00F4CFF3 /* MewPayModel.m in Sources */, 8CD782C02B44E56900F4CFF3 /* MewTeenagerModeViewController.m in Sources */, 23E3FD002B495DA100D0B664 /* MewRoomTopView.m in Sources */, @@ -4978,7 +5310,9 @@ 8C9C84452B0C697A00A601BC /* MewMineCollectRoomViewController.m in Sources */, 2337575F2B0CB577001D0B7F /* MewSessionInfoViewController.m in Sources */, 237ACD7B2B4D663700BA20B3 /* MewRoomMornModel.m in Sources */, + 237ACDC92B4E8C2400BA20B3 /* MewGiftGoodPackListDataModel.m in Sources */, 233757572B0CB577001D0B7F /* MewMessageMenuModel.m in Sources */, + 237ACE092B4E9DDC00BA20B3 /* MovEncodeToMpegTool.m in Sources */, 237053A02B1F3AA100F5DE14 /* MewShowVoiceView.m in Sources */, 237053932B1F3AA100F5DE14 /* MewHomeRecommendRoomModel.m in Sources */, 8CD7826A2B3E074100F4CFF3 /* MewLimitSytemPermissionTableCell.m in Sources */, @@ -4989,8 +5323,10 @@ 237053A12B1F3AA100F5DE14 /* MewUserIntroductionView.m in Sources */, 2370531A2B1F3A5D00F5DE14 /* MewClientDataModel.m in Sources */, 8CD780162B33CC7700F4CFF3 /* MewUserPersonalProfileViewController.m in Sources */, + 2329AE892B50DEED00BDCF22 /* MewGiftCacheManager.m in Sources */, 8C92A8112B0EEFAE008F362C /* MewLoginBindPhonePresent.m in Sources */, 237054ED2B20550400F5DE14 /* NSObject+MewAutoCoding.m in Sources */, + 23692DBA2B4FE12E0011797F /* MedDrawGiftView.m in Sources */, 237054822B1F3B3200F5DE14 /* MewBaseNavigationController.m in Sources */, 237054852B1F3B3200F5DE14 /* NetImageConfig.m in Sources */, 2370548B2B1F3B3200F5DE14 /* TTAlertButtonConfig.m in Sources */, @@ -5000,20 +5336,25 @@ 8CD7801F2B33CFF400F4CFF3 /* MewUserPersonalDetailHeaderPhotosView.m in Sources */, 8C9C84262B0C697A00A601BC /* MewMessageRemoteExtModel.m in Sources */, 8CD783192B4725A900F4CFF3 /* MewChatBubbleModel.m in Sources */, + 237ACDA22B4E457A00BA20B3 /* MewGoodGiftBroadcastView.m in Sources */, 8CD7824D2B3CF13900F4CFF3 /* MewBindPhoneSuccessView.m in Sources */, 8CD7830F2B47208B00F4CFF3 /* MewMineDressupViewController.m in Sources */, 237054A12B1F3B3200F5DE14 /* NSArray+MewSafe.m in Sources */, 8CD77FFB2B3272CA00F4CFF3 /* MewAlertPopup.m in Sources */, 8CD782F52B46220D00F4CFF3 /* Api+DressUp.m in Sources */, 2370539B2B1F3AA100F5DE14 /* MewPushExclusiveVoiceView.m in Sources */, + 237ACDFF2B4E994700BA20B3 /* XPPrivilegeCardItemVC.m in Sources */, 8CD7814A2B36611200F4CFF3 /* QExtendBoardView.m in Sources */, + 2329AE8F2B51202300BDCF22 /* MewUserAddModel.m in Sources */, 237054802B1F3B3200F5DE14 /* UIImage+MewUtils.m in Sources */, 237ACD7E2B4D66BE00BA20B3 /* MewSettingManager.m in Sources */, 8C92A8142B0EF1D8008F362C /* MewMineLoginPasswordViewController.m in Sources */, 8C9C84942B0D65C300A601BC /* MewRoomAnimationHitView.m in Sources */, 8CD7828E2B3F828100F4CFF3 /* MewFriendInfoTableViewCell.m in Sources */, + 23692DB72B4FCBEC0011797F /* MewGiftBottomBarCell.m in Sources */, 237ACD8B2B4E393900BA20B3 /* MewRoomHourListEnterCell.m in Sources */, 8CD783462B48D07D00F4CFF3 /* MewSkillCardContentTableCell.m in Sources */, + 237ACDCC2B4E8C6000BA20B3 /* MewGiftGoodPersonData.m in Sources */, 8CD7825F2B3DF0A800F4CFF3 /* MewBlackListTableCell.m in Sources */, 236557622B4963C0008915E2 /* MewRoomListCell.m in Sources */, 237053A22B1F3AA100F5DE14 /* MewHeaderView.m in Sources */, diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/common_diamond@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/common_diamond@2x.png deleted file mode 100644 index 68f282c..0000000 Binary files a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/common_diamond@2x.png and /dev/null differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/common_diamond@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/common_diamond@3x.png deleted file mode 100644 index f0dc0cf..0000000 Binary files a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/common_diamond@3x.png and /dev/null differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/Contents.json similarity index 74% rename from yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/Contents.json rename to yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/Contents.json index 6029460..b392e5d 100644 --- a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/common_diamond.imageset/Contents.json +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "common_diamond@2x.png", + "filename" : "mew_diamond_icon@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "common_diamond@3x.png", + "filename" : "mew_diamond_icon@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/mew_diamond_icon@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/mew_diamond_icon@2x.png new file mode 100644 index 0000000..1285d1b Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/mew_diamond_icon@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/mew_diamond_icon@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/mew_diamond_icon@3x.png new file mode 100644 index 0000000..f71ba3f Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Common/mew_diamond_icon.imageset/mew_diamond_icon@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/Contents.json new file mode 100644 index 0000000..af4fd7a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_audit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_audit@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/room_Privilege_Card_audit@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/room_Privilege_Card_audit@2x.png new file mode 100644 index 0000000..1d5922e Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/room_Privilege_Card_audit@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/room_Privilege_Card_audit@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/room_Privilege_Card_audit@3x.png new file mode 100644 index 0000000..4724402 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_audit.imageset/room_Privilege_Card_audit@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/Contents.json new file mode 100644 index 0000000..bc60ced --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_cell_boottom_mask@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_cell_boottom_mask@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/room_Privilege_Card_cell_boottom_mask@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/room_Privilege_Card_cell_boottom_mask@2x.png new file mode 100644 index 0000000..ebe9f74 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/room_Privilege_Card_cell_boottom_mask@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/room_Privilege_Card_cell_boottom_mask@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/room_Privilege_Card_cell_boottom_mask@3x.png new file mode 100644 index 0000000..a65bce2 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_boottom_mask.imageset/room_Privilege_Card_cell_boottom_mask@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/Contents.json new file mode 100644 index 0000000..07feb4f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_cell_mask@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_cell_mask@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/room_Privilege_Card_cell_mask@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/room_Privilege_Card_cell_mask@2x.png new file mode 100644 index 0000000..8b4dc03 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/room_Privilege_Card_cell_mask@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/room_Privilege_Card_cell_mask@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/room_Privilege_Card_cell_mask@3x.png new file mode 100644 index 0000000..148fba6 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_cell_mask.imageset/room_Privilege_Card_cell_mask@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/Contents.json new file mode 100644 index 0000000..b7d9f99 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_choose_del@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_choose_del@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/room_Privilege_Card_choose_del@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/room_Privilege_Card_choose_del@2x.png new file mode 100644 index 0000000..a3b3187 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/room_Privilege_Card_choose_del@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/room_Privilege_Card_choose_del@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/room_Privilege_Card_choose_del@3x.png new file mode 100644 index 0000000..82dc7df Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_choose_del.imageset/room_Privilege_Card_choose_del@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/Contents.json new file mode 100644 index 0000000..440f7fe --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_create@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_create@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/room_Privilege_Card_create@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/room_Privilege_Card_create@2x.png new file mode 100644 index 0000000..cd6ac25 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/room_Privilege_Card_create@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/room_Privilege_Card_create@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/room_Privilege_Card_create@3x.png new file mode 100644 index 0000000..bcbac74 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_create.imageset/room_Privilege_Card_create@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/Contents.json new file mode 100644 index 0000000..e25e413 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_del@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_del@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/room_Privilege_Card_del@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/room_Privilege_Card_del@2x.png new file mode 100644 index 0000000..802e12e Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/room_Privilege_Card_del@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/room_Privilege_Card_del@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/room_Privilege_Card_del@3x.png new file mode 100644 index 0000000..5df045f Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_del.imageset/room_Privilege_Card_del@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/Contents.json new file mode 100644 index 0000000..0635577 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_mask@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_mask@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/room_Privilege_Card_mask@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/room_Privilege_Card_mask@2x.png new file mode 100644 index 0000000..35a700c Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/room_Privilege_Card_mask@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/room_Privilege_Card_mask@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/room_Privilege_Card_mask@3x.png new file mode 100644 index 0000000..760b672 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_mask.imageset/room_Privilege_Card_mask@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/Contents.json new file mode 100644 index 0000000..acc1061 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_no_image@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_no_image@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/room_Privilege_Card_no_image@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/room_Privilege_Card_no_image@2x.png new file mode 100644 index 0000000..55f0277 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/room_Privilege_Card_no_image@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/room_Privilege_Card_no_image@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/room_Privilege_Card_no_image@3x.png new file mode 100644 index 0000000..4c017fe Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_image.imageset/room_Privilege_Card_no_image@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/Contents.json new file mode 100644 index 0000000..a121603 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_no_push@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_no_push@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/room_Privilege_Card_no_push@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/room_Privilege_Card_no_push@2x.png new file mode 100644 index 0000000..73b3474 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/room_Privilege_Card_no_push@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/room_Privilege_Card_no_push@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/room_Privilege_Card_no_push@3x.png new file mode 100644 index 0000000..7bf1755 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_no_push.imageset/room_Privilege_Card_no_push@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/Contents.json new file mode 100644 index 0000000..82fd68e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_out_time@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_out_time@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/room_Privilege_Card_out_time@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/room_Privilege_Card_out_time@2x.png new file mode 100644 index 0000000..5432506 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/room_Privilege_Card_out_time@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/room_Privilege_Card_out_time@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/room_Privilege_Card_out_time@3x.png new file mode 100644 index 0000000..5677139 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_out_time.imageset/room_Privilege_Card_out_time@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/Contents.json new file mode 100644 index 0000000..27c3e66 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_Privilege_Card_use@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_Privilege_Card_use@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/room_Privilege_Card_use@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/room_Privilege_Card_use@2x.png new file mode 100644 index 0000000..47cf0c6 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/room_Privilege_Card_use@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/room_Privilege_Card_use@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/room_Privilege_Card_use@3x.png new file mode 100644 index 0000000..d08cd6a Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/PrivilegeCard/room_Privilege_Card_use.imageset/room_Privilege_Card_use@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/Contents.json new file mode 100644 index 0000000..4555527 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_gift_first_pay_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_gift_first_pay_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/mew_gift_first_pay_bg@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/mew_gift_first_pay_bg@2x.png new file mode 100644 index 0000000..b8a7e8f Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/mew_gift_first_pay_bg@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/mew_gift_first_pay_bg@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/mew_gift_first_pay_bg@3x.png new file mode 100644 index 0000000..4a6a2a9 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_first_pay_bg.imageset/mew_gift_first_pay_bg@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/Contents.json new file mode 100644 index 0000000..2eae68b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_gift_good_broadcas_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_gift_good_broadcas_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/mew_gift_good_broadcas_bg@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/mew_gift_good_broadcas_bg@2x.png new file mode 100644 index 0000000..1a5193a Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/mew_gift_good_broadcas_bg@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/mew_gift_good_broadcas_bg@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/mew_gift_good_broadcas_bg@3x.png new file mode 100644 index 0000000..383d36c Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_bg.imageset/mew_gift_good_broadcas_bg@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/Contents.json new file mode 100644 index 0000000..e669cac --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_gift_good_broadcas_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_gift_good_broadcas_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/mew_gift_good_broadcas_icon@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/mew_gift_good_broadcas_icon@2x.png new file mode 100644 index 0000000..a708e4d Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/mew_gift_good_broadcas_icon@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/mew_gift_good_broadcas_icon@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/mew_gift_good_broadcas_icon@3x.png new file mode 100644 index 0000000..28ae86c Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_icon.imageset/mew_gift_good_broadcas_icon@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/Contents.json new file mode 100644 index 0000000..2c5bc70 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_gift_good_broadcas_playType@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_gift_good_broadcas_playType@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/mew_gift_good_broadcas_playType@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/mew_gift_good_broadcas_playType@2x.png new file mode 100644 index 0000000..433d976 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/mew_gift_good_broadcas_playType@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/mew_gift_good_broadcas_playType@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/mew_gift_good_broadcas_playType@3x.png new file mode 100644 index 0000000..d1c37be Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_gift_good_broadcas_playType.imageset/mew_gift_good_broadcas_playType@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/Contents.json new file mode 100644 index 0000000..6379221 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_Sslideshow_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_Sslideshow_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/mew_room_gift_Sslideshow_arrow@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/mew_room_gift_Sslideshow_arrow@2x.png new file mode 100644 index 0000000..7820808 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/mew_room_gift_Sslideshow_arrow@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/mew_room_gift_Sslideshow_arrow@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/mew_room_gift_Sslideshow_arrow@3x.png new file mode 100644 index 0000000..1873953 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_Sslideshow_arrow.imageset/mew_room_gift_Sslideshow_arrow@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/Contents.json new file mode 100644 index 0000000..6ce6a69 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_bar_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_bar_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/mew_room_gift_bar_arrow@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/mew_room_gift_bar_arrow@2x.png new file mode 100644 index 0000000..e0c1c2a Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/mew_room_gift_bar_arrow@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/mew_room_gift_bar_arrow@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/mew_room_gift_bar_arrow@3x.png new file mode 100644 index 0000000..54e6b36 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_arrow.imageset/mew_room_gift_bar_arrow@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/Contents.json new file mode 100644 index 0000000..ae7e0e5 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_bar_num_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_bar_num_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/mew_room_gift_bar_num_arrow@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/mew_room_gift_bar_num_arrow@2x.png new file mode 100644 index 0000000..f63b996 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/mew_room_gift_bar_num_arrow@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/mew_room_gift_bar_num_arrow@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/mew_room_gift_bar_num_arrow@3x.png new file mode 100644 index 0000000..42880a7 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_num_arrow.imageset/mew_room_gift_bar_num_arrow@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/Contents.json new file mode 100644 index 0000000..dc7d8f6 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_bar_pay_white_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_bar_pay_white_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/mew_room_gift_bar_pay_white_arrow@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/mew_room_gift_bar_pay_white_arrow@2x.png new file mode 100644 index 0000000..2054e37 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/mew_room_gift_bar_pay_white_arrow@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/mew_room_gift_bar_pay_white_arrow@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/mew_room_gift_bar_pay_white_arrow@3x.png new file mode 100644 index 0000000..31ca35c Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_pay_white_arrow.imageset/mew_room_gift_bar_pay_white_arrow@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/Contents.json new file mode 100644 index 0000000..41e0c6b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_bar_white_num_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_bar_white_num_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/mew_room_gift_bar_white_num_arrow@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/mew_room_gift_bar_white_num_arrow@2x.png new file mode 100644 index 0000000..7c301af Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/mew_room_gift_bar_white_num_arrow@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/mew_room_gift_bar_white_num_arrow@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/mew_room_gift_bar_white_num_arrow@3x.png new file mode 100644 index 0000000..c5fe4f1 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_bar_white_num_arrow.imageset/mew_room_gift_bar_white_num_arrow@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/Contents.json new file mode 100644 index 0000000..f748dba --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_choose_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_choose_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/mew_room_gift_choose_bg@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/mew_room_gift_choose_bg@2x.png new file mode 100644 index 0000000..36b4067 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/mew_room_gift_choose_bg@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/mew_room_gift_choose_bg@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/mew_room_gift_choose_bg@3x.png new file mode 100644 index 0000000..8f3b781 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_choose_bg.imageset/mew_room_gift_choose_bg@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/Contents.json new file mode 100644 index 0000000..a48402e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_draw_close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_draw_close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/mew_room_gift_draw_close@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/mew_room_gift_draw_close@2x.png new file mode 100644 index 0000000..cbf8bf0 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/mew_room_gift_draw_close@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/mew_room_gift_draw_close@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/mew_room_gift_draw_close@3x.png new file mode 100644 index 0000000..4d55fd4 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_close.imageset/mew_room_gift_draw_close@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/Contents.json new file mode 100644 index 0000000..b507dbd --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_draw_delete@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_draw_delete@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/mew_room_gift_draw_delete@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/mew_room_gift_draw_delete@2x.png new file mode 100644 index 0000000..b061ef1 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/mew_room_gift_draw_delete@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/mew_room_gift_draw_delete@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/mew_room_gift_draw_delete@3x.png new file mode 100644 index 0000000..edecbf5 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_delete.imageset/mew_room_gift_draw_delete@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/Contents.json new file mode 100644 index 0000000..61f4cea --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_draw_hand@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_draw_hand@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/mew_room_gift_draw_hand@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/mew_room_gift_draw_hand@2x.png new file mode 100644 index 0000000..96705b3 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/mew_room_gift_draw_hand@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/mew_room_gift_draw_hand@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/mew_room_gift_draw_hand@3x.png new file mode 100644 index 0000000..a9e50bb Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_hand.imageset/mew_room_gift_draw_hand@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/Contents.json new file mode 100644 index 0000000..be44e27 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_draw_repeal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_draw_repeal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/mew_room_gift_draw_repeal@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/mew_room_gift_draw_repeal@2x.png new file mode 100644 index 0000000..5c31738 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/mew_room_gift_draw_repeal@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/mew_room_gift_draw_repeal@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/mew_room_gift_draw_repeal@3x.png new file mode 100644 index 0000000..b190e38 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_draw_repeal.imageset/mew_room_gift_draw_repeal@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/Contents.json new file mode 100644 index 0000000..c7ecdd3 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_first_place_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_first_place_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/mew_room_gift_first_place_bg@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/mew_room_gift_first_place_bg@2x.png new file mode 100644 index 0000000..f610ef6 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/mew_room_gift_first_place_bg@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/mew_room_gift_first_place_bg@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/mew_room_gift_first_place_bg@3x.png new file mode 100644 index 0000000..fd47387 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_bg.imageset/mew_room_gift_first_place_bg@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/Contents.json new file mode 100644 index 0000000..108c862 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_first_place_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_first_place_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/mew_room_gift_first_place_icon@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/mew_room_gift_first_place_icon@2x.png new file mode 100644 index 0000000..f37b27d Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/mew_room_gift_first_place_icon@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/mew_room_gift_first_place_icon@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/mew_room_gift_first_place_icon@3x.png new file mode 100644 index 0000000..b20de84 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_first_place_icon.imageset/mew_room_gift_first_place_icon@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/Contents.json new file mode 100644 index 0000000..98f9696 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_icon_effect@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_icon_effect@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/mew_room_gift_icon_effect@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/mew_room_gift_icon_effect@2x.png new file mode 100644 index 0000000..cd10ead Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/mew_room_gift_icon_effect@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/mew_room_gift_icon_effect@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/mew_room_gift_icon_effect@3x.png new file mode 100644 index 0000000..c843a5b Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_effect.imageset/mew_room_gift_icon_effect@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/Contents.json new file mode 100644 index 0000000..5cb7ec8 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_icon_exclude@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_icon_exclude@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/mew_room_gift_icon_exclude@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/mew_room_gift_icon_exclude@2x.png new file mode 100644 index 0000000..699d6ee Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/mew_room_gift_icon_exclude@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/mew_room_gift_icon_exclude@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/mew_room_gift_icon_exclude@3x.png new file mode 100644 index 0000000..2b33ad4 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_exclude.imageset/mew_room_gift_icon_exclude@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/Contents.json new file mode 100644 index 0000000..6cea203 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_icon_latest@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_icon_latest@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/mew_room_gift_icon_latest@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/mew_room_gift_icon_latest@2x.png new file mode 100644 index 0000000..01196c8 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/mew_room_gift_icon_latest@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/mew_room_gift_icon_latest@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/mew_room_gift_icon_latest@3x.png new file mode 100644 index 0000000..20f1cf8 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_latest.imageset/mew_room_gift_icon_latest@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/Contents.json new file mode 100644 index 0000000..5554575 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_icon_lock@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_icon_lock@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/mew_room_gift_icon_lock@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/mew_room_gift_icon_lock@2x.png new file mode 100644 index 0000000..c3f4bf0 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/mew_room_gift_icon_lock@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/mew_room_gift_icon_lock@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/mew_room_gift_icon_lock@3x.png new file mode 100644 index 0000000..f897d8e Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_lock.imageset/mew_room_gift_icon_lock@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/Contents.json new file mode 100644 index 0000000..8cbc3a7 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_icon_time_limit@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_icon_time_limit@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/mew_room_gift_icon_time_limit@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/mew_room_gift_icon_time_limit@2x.png new file mode 100644 index 0000000..8c0b2c3 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/mew_room_gift_icon_time_limit@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/mew_room_gift_icon_time_limit@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/mew_room_gift_icon_time_limit@3x.png new file mode 100644 index 0000000..2b414f5 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_icon_time_limit.imageset/mew_room_gift_icon_time_limit@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/Contents.json new file mode 100644 index 0000000..84a946e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_room_gift_new_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_room_gift_new_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/mew_room_gift_new_icon@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/mew_room_gift_new_icon@2x.png new file mode 100644 index 0000000..6f13127 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/mew_room_gift_new_icon@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/mew_room_gift_new_icon@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/mew_room_gift_new_icon@3x.png new file mode 100644 index 0000000..6a208aa Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_room_gift_new_icon.imageset/mew_room_gift_new_icon@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/Contents.json b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/Contents.json new file mode 100644 index 0000000..c9d1a8a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mew_week_champion_broadcast_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mew_week_champion_broadcast_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/mew_week_champion_broadcast_bg@2x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/mew_week_champion_broadcast_bg@2x.png new file mode 100644 index 0000000..07bf400 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/mew_week_champion_broadcast_bg@2x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/mew_week_champion_broadcast_bg@3x.png b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/mew_week_champion_broadcast_bg@3x.png new file mode 100644 index 0000000..6051f36 Binary files /dev/null and b/yinmeng-ios/yinmeng-ios/Assets.xcassets/Mew/Room/mew_week_champion_broadcast_bg.imageset/mew_week_champion_broadcast_bg@3x.png differ diff --git a/yinmeng-ios/yinmeng-ios/Base/Base.h b/yinmeng-ios/yinmeng-ios/Base/Base.h index 85f8b44..9bcc68e 100644 --- a/yinmeng-ios/yinmeng-ios/Base/Base.h +++ b/yinmeng-ios/yinmeng-ios/Base/Base.h @@ -38,6 +38,7 @@ if (@available(iOS 11.0, *)) {\ #import #import #import +#import #import "TTPopup.h" #import #import @@ -62,4 +63,10 @@ if (@available(iOS 11.0, *)) {\ #import "MewWebViewController.h" #import "MewBuryPointManager.h" #import "NSString+MewUtil.h" +#import +#import "UILabel+Factory.h" +#import +#import "UIView+MewFilletCorner.h" +#import "MewThemeColor+MewGift.h" +#import "UIImage+MewUtils.h" #endif /* Base_h */ diff --git a/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserAddModel.h b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserAddModel.h new file mode 100644 index 0000000..7047fd3 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserAddModel.h @@ -0,0 +1,21 @@ +// +// MewUserAddModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//UserExpand +@interface MewUserAddModel : NSObject +@property (nonatomic , assign) NSInteger id; +@property (nonatomic , assign) BOOL showLocation; +@property (nonatomic , assign) NSInteger uid; +@property (nonatomic , assign) BOOL showAge; +@property (nonatomic , assign) BOOL matchChat; +@property (nonatomic , assign) BOOL sysMsgNotify; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserAddModel.m b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserAddModel.m new file mode 100644 index 0000000..22e4b2f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserAddModel.m @@ -0,0 +1,12 @@ +// +// MewUserAddModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import "MewUserAddModel.h" + +@implementation MewUserAddModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserInfoModel.h b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserInfoModel.h index 6b8aa92..0aef41e 100644 --- a/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserInfoModel.h +++ b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserInfoModel.h @@ -12,7 +12,8 @@ #import "MewUserInfoPhotoModel.h" #import "MewUserGiftWallModel.h" #import "MewDynamicMomentModel.h" - +#import "MewUserAddModel.h" +#import "MewUserPictureModel.h" NS_ASSUME_NONNULL_BEGIN @@ -36,86 +37,137 @@ NS_ASSUME_NONNULL_BEGIN @interface MewUserInfoModel : NSObject -@property (nonatomic , copy) NSString * phone; -@property (nonatomic , copy) NSString * nick; -@property (nonatomic , copy) NSString * avatar; -/// mew avatar -//@property (nonatomic , copy) NSString * newAvatar; -@property (nonatomic , assign) MewGenderType gender; -@property (nonatomic , assign) NSInteger uid; -@property (nonatomic , assign) NSInteger platformRole; -/// 是否绑定登录密码 -@property (nonatomic , assign) BOOL isBindPasswd; -/// 是否绑定支付密码 -@property (nonatomic , assign) BOOL isBindPaymentPwd; -@property (nonatomic , assign) NSInteger followNum; -@property (nonatomic , assign) NSInteger fansNum; -@property (nonatomic,assign) NSInteger erbanNo; -///是否是新用户 -@property (nonatomic,assign) BOOL newUser; -/// 是否绑定手机号码 -@property (nonatomic , assign) BOOL isBindPhone; -/// 访客数量 -@property (nonatomic, assign) NSInteger visitNum; -///足迹 -@property (nonatomic, assign) NSInteger inRoomNum; -/// 出生日期 +@property (nonatomic , assign) NSInteger bindType; +@property (nonatomic , assign) NSInteger createTime; +@property (nonatomic , assign) BOOL parentMode; +@property (nonatomic , assign) BOOL isBindPhone; +@property (nonatomic , strong) MewUserAddModel * userExpand; +@property (nonatomic , assign) NSInteger erbanNo; +@property (nonatomic , assign) NSInteger registerDay; +@property (nonatomic , assign) BOOL isFirstCharge; +@property (nonatomic , assign) BOOL hasPrettyErbanNo; +@property (nonatomic , strong) MewUserLevelVo * userLevelVo; +@property (nonatomic , assign) BOOL isBindApple; +@property (nonatomic , assign) NSInteger fansNum; +@property (nonatomic , assign) BOOL isBindBankCard; +@property (nonatomic , assign) BOOL hasRegPacket; +@property (nonatomic , assign) MewGenderType gender; +@property (nonatomic , assign) NSInteger platformRole; +@property (nonatomic , assign) NSInteger uid; +@property (nonatomic , assign) NSInteger defUser; +@property (nonatomic , copy) NSString * phone; +@property (nonatomic , copy) NSString * nick; +@property (nonatomic , assign) NSInteger remainDay; +@property (nonatomic , copy) NSString * avatar; +@property (nonatomic , copy) NSString * reviewingAvatar; +@property (nonatomic , assign) BOOL isReview; +//@property (nonatomic , strong) UserInfoSkillVo * userInfoSkillVo; +@property (nonatomic , assign) BOOL newUser; +@property (nonatomic , assign) NSInteger followNum; +@property (nonatomic , assign) BOOL isBindPaymentPwd; +@property (nonatomic , assign) BOOL isBindXCZAccount; +@property (nonatomic , assign) BOOL isBindAlipay; +///是否绑定了密码 +@property (nonatomic , assign) BOOL isBindPasswd; +@property (nonatomic, assign) NSInteger visitNum;///访客数量 +@property (nonatomic, assign) NSInteger inRoomNum;///足迹 +///是否需要展示限时首充列表 +@property (nonatomic, assign) BOOL showLimitCharge; +///限时首充结束时间 +@property (nonatomic, assign) long limitChargeEndTime; +///相册 +@property (nonatomic, strong) NSArray *privatePhoto;//相册 +///签名 +@property (nonatomic,copy) NSString *userDesc; +///出生日期 @property (nonatomic,assign) long birth; -/// 自定义星座的数据 -@property (nonatomic, strong) NSString *starSign; -/// 是否在房间,用在发现新朋友 -@property (nonatomic, copy) NSString * inRoomUid; -/// 是否在麦位,用在发现新朋友 -@property (nonatomic, assign) BOOL inMic; -/// 账号类型 -@property (nonatomic , assign) NSInteger defUser; - -///贵族icon -@property (nonatomic, copy) NSString *vipIcon; -/// 用户的声音秀 -@property (nonatomic, copy) NSString *userVoice; -/// 用户声音的事件 -@property (nonatomic, assign) NSInteger voiceDura; -/// 用户签名 -@property (nonatomic, copy) NSString *userDesc; -/// 用户等级 -@property (nonatomic, strong) MewUserLevelVo *userLevelVo; -/// 图片是否在审核中 -@property (nonatomic , assign) BOOL isReview; -/// 用户相册 -@property (nonatomic, strong) NSArray *privatePhoto; -/// 用户是否是靓号 -@property (nonatomic , assign) BOOL hasPrettyErbanNo; -/// 铭牌铭牌背景 +///是否实名认证 +@property (nonatomic,assign) BOOL isCertified; +///铭牌背景 @property (nonatomic, copy) NSString *nameplatePic; ///铭牌名称 @property (nonatomic, copy) NSString *nameplateWord; -///礼物墙中的礼物 -@property (nonatomic,strong) NSArray *userGiftWall; -///礼物墙中的幸运礼物礼物 -@property (nonatomic,strong) NSArray *userLuckyBagGiftWall; -///用户的动态 -@property (nonatomic,strong) NSArray *dynamicInfo; +///如果在房间有直播中字段 +@property(nonatomic, copy) NSString * roomUid; +///如果在房间,房间的标题 +@property (nonatomic, copy) NSString *roomTitle; +///用户信息中的 座驾 并不需要CarModel 映射一下吧 +@property (nonatomic,copy) NSString *carEffect; +///座驾特效类型 0:普通, 1:VAP特效 +@property (nonatomic, assign) NSInteger otherViewType; +///用户信息中需要用VAP播放的座驾, 映射一下 +@property (nonatomic, copy) NSString *viewUrl; +///用户信息中的 座驾昵称 并不需要CarModel 映射一下吧 +@property (nonatomic,copy) NSString *carName; ///用户信息中的 头饰的动画 并不需要HeadwearModel 映射一下吧 @property (nonatomic,copy) NSString *headwearEffect; ///用户信息中的 头饰的动画 如果没有的话 就用这个 并不需要HeadwearModel 映射一下吧 @property (nonatomic,copy) NSString *headwearPic; ///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上 @property (nonatomic,copy) NSString *headWearUrl; -/// 是否为青少年模式 -@property (nonatomic , assign) BOOL parentMode; - -///跟随的 本地添加的字段 -//@property (nonatomic,copy) NSString *fromNick; -//@property (nonatomic,assign) UserEnterRoomFromType fromType; -//@property (nonatomic,copy) NSString *fromUid; - +/// 是否在房间,用在发现新朋友 +@property (nonatomic, copy) NSString * inRoomUid; +/// 是否在麦位,用在发现新朋友 +@property (nonatomic, assign) BOOL inMic; +/// 是否空闲,用在发现新朋友 +@property(nonatomic,assign) BOOL inOnline; #pragma mark - 相亲房的字段 +///是否为相亲模式VIP坑位 +@property (nonatomic,assign) BOOL vipMic; +///帽子 相亲中收到礼物值最高的那个人 男神 女神都有 +@property (nonatomic,copy) NSString *capUrl; +///是不是选择了人 +@property (nonatomic,assign) BOOL hasSelectUser; +///所选择的麦序 +@property (nonatomic,assign) int selectMicPosition; ///贵族信息 @property (nonatomic, strong) MewUserVipInfoModel *userVipInfoVO; +///当前使用的资料卡装扮 +@property (nonatomic, copy) NSString *userInfoCardPic; +///麦位光圈链接 +@property (nonatomic, copy) NSString *micCircle; ///麦位昵称颜色 @property (nonatomic, copy) NSString *micNickColor; +///技能卡图标列表 +@property (nonatomic, strong) NSArray *absCardPics; + +///跟随的 本地添加的字段 +@property (nonatomic,copy) NSString *fromNick; +@property (nonatomic,assign) MewUserEnterRoomType fromType; +@property (nonatomic,copy) NSString *fromUid; +///安卓房间公屏气泡 +@property (nonatomic, copy) NSString *androidBubbleUrl; +///iOS房间公屏气泡 +@property (nonatomic, copy) NSString *iosBubbleUrl; +#pragma mark - 小游戏 +/// 小游戏状态 0 未加入游戏;1 加入游戏未准备;2 加入游戏已准备 3 游戏中 +@property (nonatomic, assign) MewMiniGamesStatus gameStatus; +///用户的参加PK的类型 +@property (nonatomic, assign) MewPKOpponentType groupType; +///礼物墙中的礼物 +@property (nonatomic,strong) NSArray *userGiftWall; +///礼物墙中的幸运礼物礼物 +@property (nonatomic,strong) NSArray *userLuckyBagGiftWall; +///是否防被踢 +@property (nonatomic, assign) BOOL preventKick; +///是否符合渠道打招呼 +@property (nonatomic,assign) BOOL fromSayHelloChannel; +///是否是封号用户 +@property (nonatomic,assign) BOOL banAccount; +///用户的动态 +@property (nonatomic,strong) NSArray *dynamicInfo; +///首页点单游戏信息 +//@property(nonatomic,strong) UserGameInfoVo *userGamePartnerVo; +///个人详情资料的点单游戏信息 +//@property(nonatomic,strong) NSArray *userGamePartner; +///pk时不能禁麦 +@property(nonatomic,assign) BOOL isNoProhibitMic; +@property(nonatomic,copy) NSString *starSign; +/// 用户的声音秀 +@property (nonatomic, copy) NSString *userVoice; +/// 用户声音的事件 +@property (nonatomic, assign) NSInteger voiceDura; /// genderType -> genderImageName - (NSString *)customGenderTypeToImageName; diff --git a/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserPictureModel.h b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserPictureModel.h new file mode 100644 index 0000000..5a20841 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserPictureModel.h @@ -0,0 +1,18 @@ +// +// MewUserPictureModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//UserPhoto +@interface MewUserPictureModel : NSObject +@property (copy, nonatomic) NSString *photoUrl; +@property (copy, nonatomic) NSString *pid; +@property (nonatomic, assign) BOOL isReview; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserPictureModel.m b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserPictureModel.m new file mode 100644 index 0000000..bf9a7a0 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/MVP/Model/UserModel/MewUserPictureModel.m @@ -0,0 +1,12 @@ +// +// MewUserPictureModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import "MewUserPictureModel.h" + +@implementation MewUserPictureModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Base/Tool/ThemeColor/MewThemeColor+MewGift.h b/yinmeng-ios/yinmeng-ios/Base/Tool/ThemeColor/MewThemeColor+MewGift.h new file mode 100644 index 0000000..27a0209 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/Tool/ThemeColor/MewThemeColor+MewGift.h @@ -0,0 +1,43 @@ +// +// MewThemeColor+SkillCard.h +// yinmeng-ios +// +// Created by 触海 on 2024/1/5. +// + +#import "MewThemeColor.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MewThemeColor (MewGift) + +/// 没有选择送礼物的人的头像 UIColorRGBAlpha(0x000000, 0.3) ++ (UIColor *)mewAvatarCoverColor; +/// 送礼物 充值 0xFFB606 ++ (UIColor *)mewGiftRechargeColor; +/// 礼物主背景色 #0B0B0D ++ (UIColor *)mewGiftBackGroundColor; +///钱包余额信息 0xffffff 0.5 ++ (UIColor *)mewGiftBalanceColor; +/// 送礼物 分页指示器的颜色 ++ (UIColor *)mewGiftPageIndicatorColor; +/// 分段控制器文字默认的颜色 #FFFFFF ++ (UIColor *)mewGiftSegmentNormalTitleColor; +/// 分段控制器文字选中的颜色 #5FCCE4 ++ (UIColor *)mewGiftSegmentSelectTitleColor; +/// 礼物选中的时候的颜色 0x5FCCE4 ++ (UIColor *)mewGiftNameSelectColor; +/// 礼物选中的时候的颜色 0x5FCCE4 ++ (UIColor *)mewGiftPriceSelectColor; +/// 礼物价格没有选中的时候的眼色ffffff ++ (UIColor *)mewGiftPriceNormalColor; +/// 礼物选中的覆盖背景 (0x248CFE, 0.2) ++ (UIColor *)mewGiftSelectBgColor; +///玩法规则的图片 7A797A ++ (UIColor *)mewGiftPlayRuleColor; +///个数 FFFFFF ++ (UIColor *)mewGiftCountTitleColor; + +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Base/Tool/ThemeColor/MewThemeColor+MewGift.m b/yinmeng-ios/yinmeng-ios/Base/Tool/ThemeColor/MewThemeColor+MewGift.m new file mode 100644 index 0000000..5dbae67 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/Tool/ThemeColor/MewThemeColor+MewGift.m @@ -0,0 +1,71 @@ +// +// MewThemeColor+SkillCard.m +// yinmeng-ios +// +// Created by 触海 on 2024/1/5. +// + +#import "MewThemeColor+MewGift.h" + +@implementation MewThemeColor (MewGift) + +/// 没有选择送礼物的人的头像 UIColorMewRGBAlpha(0x000000, 0.3) ++ (UIColor *)mewAvatarCoverColor { + return [UIColor colorWithWhite:0 alpha:0.3]; +} + +/// 送礼物 充值 0xFFB606 ++ (UIColor *)mewGiftRechargeColor { + return UIColorMewFromRGB(0xFFB606); +} + +/// 礼物主背景色 #0C0B0C ++ (UIColor *)mewGiftBackGroundColor { + return UIColorMewRGBAlpha(0x000000, 0.4); +} + +///钱包余额信息 0xffffff 0.5 ++ (UIColor *)mewGiftBalanceColor { + return UIColorMewRGBAlpha(0xFFFFFF, 0.35); +} +/// 送礼物 分页指示器的颜色 ++ (UIColor *)mewGiftPageIndicatorColor { + return [UIColor whiteColor]; +} +/// 分段控制器文字默认的颜色 #FFFFFF ++ (UIColor *)mewGiftSegmentNormalTitleColor { + return UIColorMewRGBAlpha(0xBDBFD0, 1); +} +/// 分段控制器文字选中的颜色 #5FCCE4 ++ (UIColor *)mewGiftSegmentSelectTitleColor { + return UIColorMewRGBAlpha(0xFFE710, 1); +} +/// 礼物选中的时候的颜色 0x#5FCCE4 ++ (UIColor *)mewGiftNameSelectColor { + return UIColorMewFromRGB(0x5FCCE4); +} +/// 礼物选中的时候的颜色 0x5FCCE4 ++ (UIColor *)mewGiftPriceSelectColor { + return UIColorMewFromRGB(0x5FCCE4); +} +/// 礼物价格没有选中的时候的眼色#ffffff ++ (UIColor *)mewGiftPriceNormalColor { + return UIColorMewRGBAlpha(0xffffff, 1);; +} +/// 礼物选中的覆盖背景 (0x248CFE, 0.2) ++ (UIColor *)mewGiftSelectBgColor { + return [UIColor clearColor]; +} + +///玩法规则的图片 7A797A ++ (UIColor *)mewGiftPlayRuleColor { + return UIColorMewFromRGB(0x7A797A); +} + +///玩法规则的图片 FFFFFF ++ (UIColor *)mewGiftCountTitleColor { + return UIColorMewFromRGB(0xFFFFFF); +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MewBaseViewController.h b/yinmeng-ios/yinmeng-ios/Base/UI/MewBaseViewController.h index 170d876..46cd706 100644 --- a/yinmeng-ios/yinmeng-ios/Base/UI/MewBaseViewController.h +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MewBaseViewController.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN /*加载 loading*/ - (void)mew_showLoading; -/*隐藏 XCHUDTool*/ +/*隐藏 MewHUDTool*/ - (void)mew_hideHUD; @end diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.h b/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.h index 44a3b7a..3f28c39 100644 --- a/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.h +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.h @@ -10,6 +10,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MewEmptyCollectionViewCell : UICollectionViewCell +@property(nonatomic,assign) CGFloat mewTop; +@property(nonatomic,assign) CGSize mewSize; @property(nonatomic,copy) NSString *mewImage; @property(nonatomic,copy) NSString *mewText; /// 是否是礼物墙 diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.m b/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.m index 4599d80..56118c4 100644 --- a/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.m +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MewEmptyView/MewEmptyCollectionViewCell.m @@ -27,7 +27,14 @@ }]; self.mewTitleView.font = kFontRegular(13); } - +-(void)setMewTop:(CGFloat)mewTop{ + _mewTop = mewTop; + [self.mewEmptyImageView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.contentView).offset(mewTop); + make.centerX.mas_equalTo(self.contentView); + make.size.mas_equalTo(self.mewSize); + }]; +} #pragma mark - Private Method - (void)mewSetUI { [self.contentView addSubview:self.mewEmptyImageView]; diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MewUploadPhoto/MewUploadPhoto.h b/yinmeng-ios/yinmeng-ios/Base/UI/MewUploadPhoto/MewUploadPhoto.h new file mode 100644 index 0000000..93ee099 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MewUploadPhoto/MewUploadPhoto.h @@ -0,0 +1,37 @@ +// +// MewUploadPhoto.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface MewUploadPhoto : NSObject +/// 上传一个Image +/// @param image 图片 +/// @param imageName 图片的名字 +/// @param token token +/// @param success 成功 +/// @param failure 失败 ++ (void)mew_uploadPhoto:(UIImage *)image + named:(NSString *)imageName + token:(NSString *)token + success:(void (^)(NSString *key, NSDictionary *resp))success + failure:(void (^)(NSNumber *resCode, NSString *message))failure; +/// 上传一个gif图片 +/// @param data 图片 +/// @param imageName 图片的名字 +/// @param token token +/// @param success 成功 +/// @param failure 失败 ++ (void)mew_uploadGifImageData:(NSData *)data + named:(NSString *)imageName + token:(NSString *)token + success:(void (^)(NSString *key, NSDictionary *resp))success + failure:(void (^)(NSNumber *resCode, NSString *message))failure; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MewUploadPhoto/MewUploadPhoto.m b/yinmeng-ios/yinmeng-ios/Base/UI/MewUploadPhoto/MewUploadPhoto.m new file mode 100644 index 0000000..2bbceb8 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MewUploadPhoto/MewUploadPhoto.m @@ -0,0 +1,61 @@ +// +// MewUploadPhoto.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewUploadPhoto.h" + +@implementation MewUploadPhoto +/// 上传一个Image +/// @param image 图片 +/// @param imageName 图片的名字 +/// @param token token +/// @param success 成功 +/// @param failure 失败 ++ (void)mew_uploadPhoto:(UIImage *)image + named:(NSString *)imageName + token:(NSString *)token + success:(void (^)(NSString *key, NSDictionary *resp))success + failure:(void (^)(NSNumber *resCode, NSString *message))failure{ + QNConfiguration *config = [QNConfiguration build:^(QNConfigurationBuilder *builder) { + builder.zone = [QNFixedZone zone2]; + + }]; + QNUploadManager *upManager = [[QNUploadManager alloc] initWithConfiguration:config]; + NSData *data = UIImageJPEGRepresentation(image, 0.5); + [upManager putData:data key:imageName token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { + if (resp) { + success(key,resp); + }else{ + failure(@(info.statusCode),info.error.localizedDescription); + } + } option:nil]; +} +/// 上传一个gif图片 +/// @param data 图片 +/// @param imageName 图片的名字 +/// @param token token +/// @param success 成功 +/// @param failure 失败 ++ (void)mew_uploadGifImageData:(NSData *)data + named:(NSString *)imageName + token:(NSString *)token + success:(void (^)(NSString *key, NSDictionary *resp))success + failure:(void (^)(NSNumber *resCode, NSString *message))failure{ + QNConfiguration *config = [QNConfiguration build:^(QNConfigurationBuilder *builder) { + builder.zone = [QNFixedZone zone2]; + + }]; + QNUploadManager *upManager = [[QNUploadManager alloc] initWithConfiguration:config]; + + [upManager putData:data key:imageName token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) { + if (resp) { + success(key,resp); + }else{ + failure(@(info.statusCode),info.error.localizedDescription); + } + } option:nil]; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MovEncodeToMpegTool/MovEncodeToMpegTool.h b/yinmeng-ios/yinmeng-ios/Base/UI/MovEncodeToMpegTool/MovEncodeToMpegTool.h new file mode 100644 index 0000000..a57e39c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MovEncodeToMpegTool/MovEncodeToMpegTool.h @@ -0,0 +1,36 @@ +// +// MovEncodeToMpegTool.h +// xplan-ios +// +// Created by duoban on 2023/11/2. +// + +#import +@class PHAsset; +typedef void(^MovEncodeToMpegToolResultBlock)(NSURL * _Nullable mp4FileUrl, NSData * _Nullable mp4Data, NSError * _Nullable error); +NS_ASSUME_NONNULL_BEGIN +typedef enum : NSUInteger { + ExportPresetLowQuality, //低质量 可以通过移动网络分享 + ExportPresetMediumQuality, //中等质量 可以通过WIFI网络分享 + ExportPresetHighestQuality, //高等质量 + ExportPreset640x480, + ExportPreset960x540, + ExportPreset1280x720, //720pHD + ExportPreset1920x1080, //1080pHD + ExportPreset3840x2160, + +} ExportPresetQuality; + +@interface MovEncodeToMpegTool : NSObject +/// 转码 MOV--MP4 +/// @param resourceAsset MOV资源 +/// @param exportQuality 预设 +/// @param movEncodeToMpegToolResultBlock 转码后的MP4文件链接 ++ (void)convertMovToMp4FromPHAsset:(PHAsset*)resourceAsset + andAVAssetExportPresetQuality:(ExportPresetQuality)exportQuality + andMovEncodeToMpegToolResultBlock:(MovEncodeToMpegToolResultBlock)movEncodeToMpegToolResultBlock; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/MovEncodeToMpegTool/MovEncodeToMpegTool.m b/yinmeng-ios/yinmeng-ios/Base/UI/MovEncodeToMpegTool/MovEncodeToMpegTool.m new file mode 100644 index 0000000..65089da --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/UI/MovEncodeToMpegTool/MovEncodeToMpegTool.m @@ -0,0 +1,246 @@ +// +// MovEncodeToMpegTool.m +// xplan-ios +// +// Created by duoban on 2023/11/2. +// + + +#pragma mark - WeakSelf/StrongSelf + +#import +#import "MovEncodeToMpegTool.h" + + +@implementation MovEncodeToMpegTool + +/// 转码 MOV--MP4 +/// @param resourceAsset MOV资源 +/// @param exportQuality 预设 +/// @param movEncodeToMpegToolResultBlock 转码后的MP4文件链接 ++ (void)convertMovToMp4FromPHAsset:(PHAsset*)resourceAsset + andAVAssetExportPresetQuality:(ExportPresetQuality)exportQuality + andMovEncodeToMpegToolResultBlock:(MovEncodeToMpegToolResultBlock)movEncodeToMpegToolResultBlock { + + /* + iOS 13 以前 + { + assetLocalIdentifier = "A99AA1C3-7D59-4E10-A8D3-BF4FAD7A1BC6/L0/001"; + fileSize = 2212572; + filename = "IMG_0049.MOV"; + size = "1080,1920"; + type = video; + uti = "com.apple.quicktime-movie"; + } + iOS 13 + { + asset = "9B3F7172-14BB-462E-B003-1CDA5583B038/L0/001"; + duration = "20.678"; + filename = "IMG_0031.MOV"; + size = "1080,1920"; + type = video; + uti = "com.apple.quicktime-movie"; + } + */ + NSDictionary *videoInfo = [self getVideoInfo:resourceAsset]; + NSLog(@"\n%@", videoInfo); + + PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init]; + options.version = PHImageRequestOptionsVersionCurrent; + options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic; + options.networkAccessAllowed = true; + + PHImageManager *manager = [PHImageManager defaultManager]; + [manager requestAVAssetForVideo:resourceAsset + options:options + resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) { + + if ([asset isKindOfClass:[AVURLAsset class]]) { + AVURLAsset *urlAsset = (AVURLAsset *)asset; + [MovEncodeToMpegTool convertMovToMp4FromAVURLAsset:urlAsset + andAVAssetExportPresetQuality:exportQuality + andMovEncodeToMpegToolResultBlock:movEncodeToMpegToolResultBlock]; + } else { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10008 + userInfo:@{NSLocalizedDescriptionKey:@"resource type error"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } + }];; +} + +#pragma mark ### MOV转码MP4 + ++ (void)convertMovToMp4FromAVURLAsset:(AVURLAsset*)urlAsset + andAVAssetExportPresetQuality:(ExportPresetQuality)exportQuality + andMovEncodeToMpegToolResultBlock:(MovEncodeToMpegToolResultBlock)movEncodeToMpegToolResultBlock { + + AVURLAsset *avAsset = [AVURLAsset URLAssetWithURL:urlAsset.URL options:nil]; + NSArray *compatiblePresets = [AVAssetExportSession exportPresetsCompatibleWithAsset:avAsset]; + + // 查询是否有匹配的预设 + if ([compatiblePresets containsObject:[self getAVAssetExportPresetQuality:exportQuality]]) { + // 在Documents目录下创建一个名为FileData的文件夹 + NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)lastObject] stringByAppendingPathComponent:@"Cache/VideoData"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + BOOL isDir = FALSE; + BOOL isDirExist = [fileManager fileExistsAtPath:path isDirectory:&isDir]; + if(!(isDirExist && isDir)) { + BOOL bCreateDir = [fileManager createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:nil]; + if(!bCreateDir){ + NSLog(@"创建文件夹失败!%@",path); + } + NSLog(@"创建文件夹成功,文件路径%@",path); + } + + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + [formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"]]; + [formatter setDateFormat:@"yyyyMMddHHmmss"]; //每次启动后都保存一个新的文件中 + NSString *dateStr = [formatter stringFromDate:[NSDate date]]; + + NSString *resultPath = [path stringByAppendingFormat:@"/%@.mp4",dateStr]; + NSLog(@"resultFileName = %@",dateStr); + + AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:avAsset + presetName:[self getAVAssetExportPresetQuality:exportQuality]]; + exportSession.outputURL = [NSURL fileURLWithPath:resultPath]; + exportSession.outputFileType = AVFileTypeMPEG4; + exportSession.shouldOptimizeForNetworkUse = YES; + + [exportSession exportAsynchronouslyWithCompletionHandler:^(void) { + switch (exportSession.status) { + case AVAssetExportSessionStatusUnknown: { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10001 + userInfo:@{NSLocalizedDescriptionKey:@"AVAssetExportSessionStatusUnknown"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } + break; + case AVAssetExportSessionStatusWaiting: { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10002 + userInfo:@{NSLocalizedDescriptionKey:@"AVAssetExportSessionStatusWaiting"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } + break; + case AVAssetExportSessionStatusExporting: { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10003 + userInfo:@{NSLocalizedDescriptionKey:@"AVAssetExportSessionStatusExporting"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } + break; + case AVAssetExportSessionStatusCompleted: { + NSData *mp4Data = [NSData dataWithContentsOfURL:exportSession.outputURL]; + movEncodeToMpegToolResultBlock(exportSession.outputURL, mp4Data , nil); + } + break; + case AVAssetExportSessionStatusFailed: { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10005 + userInfo:@{NSLocalizedDescriptionKey:@"AVAssetExportSessionStatusFailed"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } + break; + case AVAssetExportSessionStatusCancelled: { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10006 + userInfo:@{NSLocalizedDescriptionKey:@"AVAssetExportSessionStatusCancelled"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } + break; + } + }]; + } else { + NSError *error = [NSError errorWithDomain:@"ConvertMovToMp4ErrorDomain" + code:10007 + userInfo:@{NSLocalizedDescriptionKey:@"AVAssetExportSessionStatusNoPreset"}]; + movEncodeToMpegToolResultBlock(nil, nil , error); + } +} + +/* +AVAssetExportPresetLowQuality 低质量 可以通过移动网络分享 +AVAssetExportPresetMediumQuality 中等质量 可以通过WIFI网络分享 +AVAssetExportPresetHighestQuality 高等质量 +AVAssetExportPreset640x480 +AVAssetExportPreset960x540 +AVAssetExportPreset1280x720 720pHD +AVAssetExportPreset1920x1080 1080pHD +AVAssetExportPreset3840x2160 +*/ + ++ (NSString *const )getAVAssetExportPresetQuality:(ExportPresetQuality)exportPreset { + switch (exportPreset) { + case ExportPresetLowQuality: + return AVAssetExportPresetLowQuality; + case ExportPresetMediumQuality: + return AVAssetExportPresetMediumQuality; + case ExportPresetHighestQuality: + return AVAssetExportPresetHighestQuality; + case ExportPreset640x480: + return AVAssetExportPreset640x480; + case ExportPreset960x540: + return AVAssetExportPreset960x540; + case ExportPreset1280x720: + return AVAssetExportPreset1280x720; + case ExportPreset1920x1080: + return AVAssetExportPreset1920x1080; + case ExportPreset3840x2160: + return AVAssetExportPreset3840x2160; + } +} + +/// 收到转码结束回调 +/// @param urlAsset 转码源文件 +/// @param audioMix 转码源文件音频 +/// @param vedioInfo 视频信息 +/// @param size 视频文件大小 ++ (void)choseVedioCompeletWithVedioAsset:(AVURLAsset *)urlAsset + andAVAudioMix:(AVAudioMix *)audioMix + andVedioInfo:(NSDictionary *)vedioInfo + andImageSize:(CGSize)size + andAVAssetExportPresetQuality:(ExportPresetQuality)exportQuality + andMovEncodeToMpegToolResultBlock:(MovEncodeToMpegToolResultBlock)movEncodeToMpegToolResultBlock { + //[self showLoadingView:@"处理视频数据"]; +} + + ++ (NSDictionary *)getVideoInfo:(PHAsset *)asset { + // A99AA1C3-7D59-4E10-A8D3-BF4FAD7A1BC6/L0/001 mediaType=2/0, sourceType=1, (1080x1920), creationDate=2018-06-04 09:32:53 +0000, location=1, hidden=0, favorite=0 + /// 包含该视频的基础信息 + PHAssetResource * resource = [[PHAssetResource assetResourcesForAsset: asset] firstObject]; + NSMutableArray *resourceArray = nil; + + if (@available(iOS 13.0, *)) { + NSString *string1 = [resource.description stringByReplacingOccurrencesOfString:@" - " withString:@" "]; + NSString *string2 = [string1 stringByReplacingOccurrencesOfString:@": " withString:@"="]; + NSString *string3 = [string2 stringByReplacingOccurrencesOfString:@"{" withString:@""]; + NSString *string4 = [string3 stringByReplacingOccurrencesOfString:@"}" withString:@""]; + NSString *string5 = [string4 stringByReplacingOccurrencesOfString:@", " withString:@" "]; + resourceArray = [NSMutableArray arrayWithArray:[string5 componentsSeparatedByString:@" "]]; + [resourceArray removeObjectAtIndex:0]; + [resourceArray removeObjectAtIndex:0]; + } else { + NSString *string1 = [resource.description stringByReplacingOccurrencesOfString:@"{" withString:@""]; + NSString *string2 = [string1 stringByReplacingOccurrencesOfString:@"}" withString:@""]; + NSString *string3 = [string2 stringByReplacingOccurrencesOfString:@", " withString:@","]; + resourceArray = [NSMutableArray arrayWithArray:[string3 componentsSeparatedByString:@" "]]; + [resourceArray removeObjectAtIndex:0]; + [resourceArray removeObjectAtIndex:0]; + } + + NSMutableDictionary *videoInfo = [[NSMutableDictionary alloc] init]; + for (NSString *string in resourceArray) { + NSArray *array = [string componentsSeparatedByString:@"="]; + if (array.count >= 2) { + videoInfo[array[0]] = array[1]; + } + } + videoInfo[@"duration"] = @(asset.duration).description; + return videoInfo; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/UILabel/UILabel+Factory.h b/yinmeng-ios/yinmeng-ios/Base/UI/UILabel/UILabel+Factory.h new file mode 100644 index 0000000..e6f9e85 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/UI/UILabel/UILabel+Factory.h @@ -0,0 +1,18 @@ +// +// UILabel+Factory.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UILabel (Factory) ++(UILabel *)mew_getLabWithText:(NSString *)text font:(UIFont *)font textColor:(UIColor *)textColor; ++ (CGFloat)getLabelHeightWithText:(NSString *)text width:(CGFloat)width font:(UIFont *)font; ++ (CGFloat)getWidthWithText:(NSString *)text height:(CGFloat)height font:(UIFont *)font; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Base/UI/UILabel/UILabel+Factory.m b/yinmeng-ios/yinmeng-ios/Base/UI/UILabel/UILabel+Factory.m new file mode 100644 index 0000000..5809f2e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Base/UI/UILabel/UILabel+Factory.m @@ -0,0 +1,70 @@ +// +// UILabel+Factory.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "UILabel+Factory.h" + +@implementation UILabel (Factory) ++(UILabel *)mew_getLabWithText:(NSString *)text font:(UIFont *)font textColor:(UIColor *)textColor{ + UILabel *label = [[UILabel alloc]initWithFrame:CGRectZero]; + if(text.length > 0){ + label.text = text; + } + if(font != nil){ + label.font = font; + } + if(textColor != nil){ + label.textColor = textColor; + } + return label; +} +/** + 根据宽度求高度 + @param text 计算的内容 + @param width 计算的宽度 + @param font font字体大小 + @return 放回label的高度 + */ + ++ (CGFloat)getLabelHeightWithText:(NSString *)text width:(CGFloat)width font: (UIFont *)font + +{ + + CGRect rect = [text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) + + options:NSStringDrawingUsesLineFragmentOrigin + + attributes:@{NSFontAttributeName:font} context:nil]; + + + + return rect.size.height; + +} +/** + 根据高度求宽度 + @param text 计算的内容 + @param height 计算的高度 + @param font font字体大小 + @return 返回Label的宽度 + */ + ++ (CGFloat)getWidthWithText:(NSString *)text height:(CGFloat)height font:(UIFont *)font{ + + + + CGRect rect = [text boundingRectWithSize:CGSizeMake(MAXFLOAT, height) + + options:NSStringDrawingUsesLineFragmentOrigin + + attributes:@{NSFontAttributeName:font} + + context:nil]; + + return rect.size.width; + +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Global/MewEnum.h b/yinmeng-ios/yinmeng-ios/Global/MewEnum.h index cc2afd6..f6ebf86 100644 --- a/yinmeng-ios/yinmeng-ios/Global/MewEnum.h +++ b/yinmeng-ios/yinmeng-ios/Global/MewEnum.h @@ -798,4 +798,88 @@ typedef NS_ENUM(NSUInteger, MewWebViewNavPushType){ ///分享图片 MewWebViewNavPushType_Photo = 5 }; +//SendGiftType +typedef NS_ENUM(NSInteger, MewSendGiftManagerType) { + MewSendGiftManagerType_Room = 1, ///房间内送礼物 + MewSendGiftManagerType_Person, ///送给某一个人 +}; +//GiftSegmentType +typedef NS_ENUM(NSInteger, MewSendGiftType) { + MewSendGiftType_Normal = 1, ///普通的礼物 + MewSendGiftType_Good,///幸运礼物 + MewSendGiftType_Noble,///贵族礼物 + MewSendGiftType_WeekChampion, ///周星礼物 + MewSendGiftType_Pack,///背包礼物 + MewSendGiftType_Graffiti,///涂鸦礼物 + MewSendGiftType_Anchor,///个播 + MewSendGiftType_Punish,///惩罚礼物 + MewSendGiftType_Privilege,///特权卡 +}; +//GiftType +//礼物类型 +typedef NS_ENUM(NSUInteger, MewGiftDataType) { + MewGiftDataType_Game = 2, // 游戏轰趴礼物 + MewGiftDataType_Good = 3, // 福袋礼物 + MewGiftDataType_GoodPool = 5, //福袋奖池礼物 + MewGiftDataType_Noble = 7, // 贵族礼物 + MewGiftDataType_WeekChampion = 8, //周星礼物 + MewGiftDataType_Graffiti = 10, //涂鸦礼物 + MewGiftDataType_Anchor = 11, //个播礼物 + MewGiftDataType_Punish = 12, //惩罚礼物 + MewGiftDataType_Constellation = 13, //星座礼物 +}; +//GiftSourceType +//礼物类型 +typedef NS_ENUM(NSUInteger, MewGiftOriginType) { + MewGiftOriginType_Normal = 1, //普通礼物 + MewGiftOriginType_Pack = 2, // 背包礼物 +}; +//GiftOtherViewType +///礼物播放类型(0 无, 1 MP4、VAP播放) +typedef NS_ENUM(NSUInteger, MewGiftEffectType) { + MewGiftEffectTypeNormal = 0, + MewGiftEffectTypeMp4 = 1, +}; + +/** + 赠送类型 1给主播直接刷礼物,2私聊送个人礼物,3房间内给坑位上的人送礼物,5.公聊大厅给人送礼物 + + - GameRoomSendType_Room: 给主播直接刷礼物 + - GameRoomSendType_Chat: 2私聊送个人礼物 + - GameRoomSendType_OnMic: 3房间内给坑位上的人送礼物 + - GameRoomSendType_PublicChat: 公聊大厅给人送礼物 + - GameRoomSendType_Team 群聊礼物 + */ +//GiftSendType +typedef NS_ENUM(NSUInteger, MewGiftObjType) { + MewGiftObjType_Room = 1,///zho + MewGiftObjType_Chat = 2, + MewGiftObjType_OnMic = 3, +}; + +/** + 送礼物的类型,1全麦,2多人非全麦,3个人送礼w + - GameRoomSendGiftType_AllMic: 全麦 + - GameRoomSendGiftType_MutableOnMic: 多人w非全麦 + - GameRoomSendGiftType_ToOne: 对个人送礼 + */ +//RoomSendGiftType +typedef NS_ENUM(NSUInteger, MewRoomSendGiftPersonType) { + MewRoomSendGiftPersonType_AllMic, + MewRoomSendGiftPersonType_MutableOnMic, + MewRoomSendGiftPersonType_ToOne, +}; +//LittleGamePlayStatus +typedef NS_ENUM(NSInteger, MewMiniGamesStatus) { + MewMiniGamesStatus_NoIn = 0,//未加入 + MewMiniGamesStatus_IsIn = 1,//已加入 + MewMiniGamesStatus_Ready = 2, //已准备 + MewMiniGamesStatus_Plying = 3,//游戏中 +}; +//GroupType +typedef NS_ENUM(NSInteger, MewPKOpponentType) { + MewPKOpponentType_default = 0,//默认 + MewPKOpponentTypee_Blue = 1,//蓝队 男神 + MewPKOpponentType_Red = 2, //红队 女神 +}; #endif /* MewEnum_h */ diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.h b/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.h index 9e4b78f..5932a57 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.h +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.h @@ -228,7 +228,9 @@ NS_ASSUME_NONNULL_BEGIN searchType:(NSString *)searchType currSize:(NSString *)currSize pageSize:(NSString *)pageSize; - +/// 上传七牛获取token +/// @param completion 完成 ++ (void)mew_UpLoadQiniuPhoto:(MewHttpRequestHelperCompletion)completion ; @end NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.m b/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.m index 21964a5..1f77b24 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/Api/Api+Mine.m @@ -259,5 +259,9 @@ pageSize:(NSString *)pageSize { [self makeRequest:@"gamePartnerOrder/record" method:MewHttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid,searchType,currSize,pageSize, nil]; } - +/// 上传七牛获取token +/// @param completion 完成 ++ (void)mew_UpLoadQiniuPhoto:(MewHttpRequestHelperCompletion)completion { + [self makeRequest:@"qiniu/upload/getUploadToken" method:MewHttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil]; +} @end diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopBottomView.m b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopBottomView.m index 367c112..49c72b7 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopBottomView.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopBottomView.m @@ -82,7 +82,7 @@ [_diamondButton setTitle:@"我的钻石" forState:UIControlStateNormal]; [_diamondButton setTitleColor:MewThemeColor.mewThreeTextColor forState:UIControlStateNormal]; _diamondButton.titleLabel.font = kFontBold(12); - [_diamondButton setImage:[UIImage imageNamed:@"common_diamond"] forState:UIControlStateNormal]; + [_diamondButton setImage:[UIImage imageNamed:@"mew_diamond_icon"] forState:UIControlStateNormal]; } return _diamondButton; } diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopListCollectionCell.m b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopListCollectionCell.m index ebb431c..f57e49a 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopListCollectionCell.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Dressup/Cell/MewDressupShopListCollectionCell.m @@ -259,7 +259,7 @@ - (UIImageView *)diamondImageView { if (!_diamondImageView) { _diamondImageView = [[UIImageView alloc] init]; - _diamondImageView.image = [UIImage imageNamed:@"common_diamond"]; + _diamondImageView.image = [UIImage imageNamed:@"mew_diamond_icon"]; } return _diamondImageView; } diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.h b/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.h index e631af7..0299be5 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.h +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.h @@ -10,7 +10,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MewRechargeViewController : MewMvpViewController - +@property (nonatomic,weak) UINavigationController *mewCurNav; +@property(nonatomic,assign) BOOL mewIsPush; @end NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.m b/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.m index 55545ed..1eddf27 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/View/MiewMineView/MewRechargeViewController.m @@ -224,7 +224,12 @@ NSString *rechageProtocol = [MewEncryptTool MEW_aesDecrypt:@"3fYQzValG55yGNx2mWnN7NvVzsWc9cmKVWuOUkwu8a9ALvqUxXRhaWrnne5rd9oR"]; webVC.url = rechageProtocol; - [self.navigationController pushViewController:webVC animated:YES]; + if(self.mewCurNav != nil){ + [self.mewCurNav pushViewController:webVC animated:YES]; + }else{ + [self.navigationController pushViewController:webVC animated:YES]; + } + } @@ -233,7 +238,11 @@ #pragma mark - Action Event - (void)mew_backButtonAction { - [self.navigationController popViewControllerAnimated:NO]; + if(self.mewIsPush){ + [self.navigationController popViewControllerAnimated:NO]; + return; + } + [self dismissViewControllerAnimated:YES completion:nil]; } #pragma mark - Init diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondCollectionCell.m b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondCollectionCell.m index b9be58d..a1cfff9 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondCollectionCell.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondCollectionCell.m @@ -121,7 +121,7 @@ if (!_diamondImageView) { _diamondImageView = [[UIImageView alloc] init]; _diamondImageView.contentMode = UIViewContentModeScaleAspectFit; - _diamondImageView.image = [UIImage imageNamed:@"common_diamond"]; + _diamondImageView.image = [UIImage imageNamed:@"mew_diamond_icon"]; } return _diamondImageView; } diff --git a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondHeaderReusableView.m b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondHeaderReusableView.m index cbd8c5b..54e0778 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondHeaderReusableView.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mine/View/Wallet/MewWalletDiamondHeaderReusableView.m @@ -95,7 +95,7 @@ - (UIImageView *)diamondImageView { if (!_diamondImageView) { _diamondImageView = [[UIImageView alloc] init]; - _diamondImageView.image = [UIImage imageNamed:@"common_diamond"]; + _diamondImageView.image = [UIImage imageNamed:@"mew_diamond_icon"]; _diamondImageView.contentMode = UIViewContentModeScaleAspectFit; } return _diamondImageView; diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Api/Api+Gift.h b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Api/Api+Gift.h deleted file mode 100644 index c43fe7a..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Api/Api+Gift.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Api+Gift.h -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import "Api.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface Api (Gift) - -/// 送礼物的接口 -/// @param complection 完成 -/// @param targetUids 送给谁的 -/// @param giftNum 送的个数 -/// @param sendType 送的类型 -/// @param giftId 礼物的id -/// @param giftSource 礼物的来源 -/// @param giftType 礼物的类型 -/// @param roomUid 房间的ID -/// @param msg 喊话的 -/// @param uid 用户的id -+ (void)Mew_RequestSendGift:(MewHttpRequestHelperCompletion)complection - targetUids:(NSString *)targetUids - giftNum:(NSString *)giftNum - sendType:(NSString *)sendType - giftId:(NSString *)giftId - giftSource:(NSString *)giftSource - giftType:(NSString *)giftType - roomUid:(NSString *)roomUid - msg:(NSString *)msg - uid:(NSString *)uid; -@end - -NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Api/Api+Gift.m b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Api/Api+Gift.m deleted file mode 100644 index b8f1255..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Api/Api+Gift.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// Api+Gift.m -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import "Api+Gift.h" -#import "MewEncryptTool.h" -@implementation Api (Gift) -/// 送礼物的接口 -/// @param complection 完成 -/// @param targetUids 送给谁的 -/// @param giftNum 送的个数 -/// @param sendType 送的类型 -/// @param giftId 礼物的id -/// @param giftSource 礼物的来源 -/// @param giftType 礼物的类型 -/// @param roomUid 房间的ID -/// @param msg 喊话的 -/// @param uid 用户的id -+ (void)Mew_RequestSendGift:(MewHttpRequestHelperCompletion)complection - targetUids:(NSString *)targetUids - giftNum:(NSString *)giftNum - sendType:(NSString *)sendType - giftId:(NSString *)giftId - giftSource:(NSString *)giftSource - giftType:(NSString *)giftType - roomUid:(NSString *)roomUid - msg:(NSString *)msg - uid:(NSString *)uid { - NSString *getUrl = [MewEncryptTool MEW_aesDecrypt:@"gIV0xamx+afcRMN4yGb5jw=="];//gift/sendV4 - NSString *method = getUrl; - [self makeRequest:method method:MewHttpRequestHelperMethodPOST completion:complection, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil]; -} -@end diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftInfoModel.h b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftInfoModel.h deleted file mode 100644 index a84b090..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftInfoModel.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// MewGiftInfoModel.h -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(NSUInteger, GiftSendType) { - GiftSendType_Room = 1,//给主播直接刷礼物 - GiftSendType_Chat = 2, //私聊送个人礼物 - GiftSendType_OnMic = 3, //房间内给坑位上的人送礼物 -}; - - -@interface MewGiftInfoModel : NSObject -///礼物id -@property (nonatomic, assign)NSInteger giftId; -///礼物名字 -@property (nonatomic, strong)NSString *giftName; -///价格 -@property (nonatomic, assign)double goldPrice; -///礼物url -@property (nonatomic, copy)NSString *giftUrl; - -@end - -NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftInfoModel.m b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftInfoModel.m deleted file mode 100644 index cc9194b..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftInfoModel.m +++ /dev/null @@ -1,12 +0,0 @@ -// -// MewGiftInfoModel.m -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import "MewGiftInfoModel.h" - -@implementation MewGiftInfoModel - -@end diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftReceiveInfoModel.h b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftReceiveInfoModel.h deleted file mode 100644 index 77525cf..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftReceiveInfoModel.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// MewGiftReceiveInfoModel.h -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import "NSObject+MEWExtension.h" -#import "MewGiftInfoModel.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface MewGiftReceiveInfoModel : NSObject -///目标的uid -@property(nonatomic,copy)NSString * targetUid; -///目标的头像 -@property (nonatomic,copy) NSString *targetAvatar; -///目标的昵称 -@property (nonatomic,copy) NSString *targetNick; -@property (nonatomic,strong) NSArray *targetUids; -///礼物信息 -@property (nonatomic,strong) MewGiftInfoModel *gift; -///礼物信息 -@property (nonatomic,strong) MewGiftInfoModel *giftInfo; -///送礼物的人uid -@property(nonatomic, assign)NSString * uid; -///礼物的id -@property (nonatomic,copy) NSString *giftId; -///送礼物的人 -@property(nonatomic, strong)NSString *nick; -///送礼物的人的头像 -@property(nonatomic, strong)NSString *avatar; -///送礼物的个数 -@property (assign, nonatomic) NSInteger giftNum; -///礼物名字 -@property (nonatomic,strong)NSString *giftName; - - -// 这里先写死string -///礼物来源 -@property (nonatomic,assign) NSString* sourceType; -///房间送礼物的类型 -@property (nonatomic,assign) NSString* roomSendGiftType; -@end - -NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftReceiveInfoModel.m b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftReceiveInfoModel.m deleted file mode 100644 index d473464..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Model/MewGiftReceiveInfoModel.m +++ /dev/null @@ -1,12 +0,0 @@ -// -// MewGiftReceiveInfoModel.m -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import "MewGiftReceiveInfoModel.h" - -@implementation MewGiftReceiveInfoModel - -@end diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Presenter/MewGiftStorage.h b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Presenter/MewGiftStorage.h deleted file mode 100644 index 0c1e33b..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Presenter/MewGiftStorage.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// MewGiftStorage.h -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import -@class MewGiftInfoModel; -NS_ASSUME_NONNULL_BEGIN - -@interface MewGiftStorage : NSObject -+ (instancetype)shareStorage; -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)copy NS_UNAVAILABLE; -- (instancetype)mutableCopy NS_UNAVAILABLE; - - -- (void)mew_saveGiftDatasource:(NSArray *)giftArray roomUid:(NSString *)roomUid; - -/** - 这个不是最好的获取方式 可能由于没有房间uid 导致获取失败 - 目前用在公屏获取礼物 因为公屏的架构 传入一个房间id 的话 改动太大 先这样用着吧 - */ -/// 获取当前房间的数据中的礼物 -/// @param giftId 礼物的id -- (MewGiftInfoModel *)mew_findGiftInfo:(NSString *)giftId; - -@end - -NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Presenter/MewGiftStorage.m b/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Presenter/MewGiftStorage.m deleted file mode 100644 index 0c42204..0000000 --- a/yinmeng-ios/yinmeng-ios/Main/ModuleKit/MewGiftView/Presenter/MewGiftStorage.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// MewGiftStorage.m -// yinmeng-ios -// -// Created by 触海 on 2023/11/21. -// - -#import "MewGiftStorage.h" -#import "MewGiftInfoModel.h" -#import "NSObject+MEWExtension.h" -#import "NSArray+MewSafe.h" - -@interface MewGiftStorage() -///key:房间id value:房间对应的礼物列表 -@property (nonatomic, strong) NSCache *> *roomGiftCache; -///当前房间的uid -@property (nonatomic,copy) NSString *currentRoomUid; -/// -@property (nonatomic,assign) BOOL isWriteToFile; -@end - -@implementation MewGiftStorage - -+ (instancetype)shareStorage { - static dispatch_once_t onceToken; - static MewGiftStorage * storage; - dispatch_once(&onceToken, ^{ - storage = [[MewGiftStorage alloc] init]; - }); - return storage; -} - - -- (void)mew_saveGiftDatasource:(NSArray *)giftArray roomUid:(NSString *)roomUid { - if (giftArray.count > 0 && roomUid.length > 0) { - [self.roomGiftCache setObject:giftArray forKey:roomUid]; - } -} - - -/// 获取当前房间的数据中的礼物 -/// @param giftId 礼物的id -- (MewGiftInfoModel *)mew_findGiftInfo:(NSString *)giftId { - MewGiftInfoModel * giftInfo = [self mew_getGiftInfoFromDirectory:giftId]; - if (giftInfo) { - return giftInfo; - } - - if (self.currentRoomUid) { - NSArray *giftLists = [self.roomGiftCache objectForKey:self.currentRoomUid]; - if (giftLists.count > 0) { - __block MewGiftInfoModel * giftInfo; - [giftLists enumerateObjectsUsingBlock:^(MewGiftInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - if (obj.giftId == giftId.integerValue) { - giftInfo = obj; - *stop = YES; - } - }]; - return giftInfo; - } - } - return nil; -} - - -- (NSCache *> *)roomGiftCache { - if (!_roomGiftCache) { - _roomGiftCache = [[NSCache alloc] init]; - // 设置缓存数据的数目 - _roomGiftCache.countLimit = 10; - } - return _roomGiftCache; -} - - -- (MewGiftInfoModel *)mew_getGiftInfoFromDirectory:(NSString *)giftId { - //找到相应的目录 - NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; - NSString *pathFile = [path stringByAppendingPathComponent:@"Gift"]; - //判断有没有文件夹 - BOOL isDir =NO; - NSFileManager *fileManager = [NSFileManager defaultManager]; - BOOL existed = [fileManager fileExistsAtPath:pathFile isDirectory:&isDir]; - MewGiftInfoModel * giftInfo; - if (existed) { - NSString *aPath = [pathFile stringByAppendingPathComponent:giftId]; - NSDictionary * dic = [NSKeyedUnarchiver unarchiveObjectWithFile:aPath]; - giftInfo = [MewGiftInfoModel mewModelWithDictionary:dic]; - } - return giftInfo; -} - -@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.h b/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.h index dcd02f7..1a4f069 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.h +++ b/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.h @@ -51,11 +51,7 @@ NS_ASSUME_NONNULL_BEGIN /// @param roomUid 房间uid - (void)mew_reportUserOutRoom:(NSString *)roomUid; -/// Mew 送礼物 -/// @param targetUids 送礼物的人 -/// @param roomUid 房主的uid -- (void)mew_sendRoomGift:(NSString *)targetUids - roomUid:(NSString *)roomUid; + @end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.m b/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.m index 6ee7b15..d2ea03c 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.m +++ b/yinmeng-ios/yinmeng-ios/Main/Room/Presenter/MewRoomPresenter.m @@ -8,13 +8,13 @@ #import "MewRoomPresenter.h" ///Api #import "Api+Room.h" -#import "Api+Gift.h" +#import "Api+MewSendGfit.h" ///Model #import "MewUserInfoModel.h" #import "MewRoomInfoModel.h" #import "MewAccountInfoStorage.h" #import "MewMessageRemoteExtModel.h" -#import "MewGiftReceiveInfoModel.h" +#import "MewReceiveGiftDataModel.h" ///P #import "MewRoomProtocol.h" ///Third @@ -148,33 +148,6 @@ } uid:[[MewAccountInfoStorage instance] mew_getUid] roomUid:roomUid ticket:[[MewAccountInfoStorage instance] mew_getTicket]]; } -/// Mew 送礼物 房间内给麦位上的某个用户送普通的薯片礼物,默认写死 -/// @param targetUids 送礼物的人 -/// @param roomUid 房主的uid -- (void)mew_sendRoomGift:(NSString *)targetUids - roomUid:(NSString *)roomUid { - NSString *uid = [MewAccountInfoStorage instance].mew_getUid; - NSString *giftNum = @"1"; - // 房间内给麦位上的人送礼物 - NSString *sendType = @"3"; - // 薯片的giftid - NSString * giftId = @"2"; - // 普通礼物 - NSString *giftSource = @"1"; - // 礼物类型 - NSString *giftType = @"2"; - // 送一个人 - NSString *roomSendType = @"3"; - - [Api Mew_RequestSendGift:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { - MewGiftReceiveInfoModel *receive = [MewGiftReceiveInfoModel mewModelWithJSON:data.data]; - receive.sourceType = giftSource; - receive.roomSendGiftType = roomSendType; - - [[self mew_getView] mew_sendRoomGiftSuccess:receive originDic:data.data uidCount:1]; - } fail:^(NSInteger code, NSString * _Nullable msg) { - [[self mew_getView] mew_sendRoomGiftFailWithCode:code msg:msg]; - }] targetUids:targetUids giftNum:giftNum sendType:sendType giftId:giftId giftSource:giftSource giftType:giftType roomUid:roomUid msg:@"" uid:uid]; -} + @end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/AnimationView/MewRoomAnimationView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/AnimationView/MewRoomAnimationView.m index f3f8111..00933fe 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Room/View/AnimationView/MewRoomAnimationView.m +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/AnimationView/MewRoomAnimationView.m @@ -16,12 +16,12 @@ #import #import ///Model -#import "MewGiftReceiveInfoModel.h" +#import "MewReceiveGiftDataModel.h" #import "MewAttachmentModel.h" #import "MewRoomInfoModel.h" -#import "MewGiftInfoModel.h" +#import "MewGiftDataModel.h" /// Tool -#import "MewGiftStorage.h" +#import "MewGiftCacheManager.h" #import "MewRoomAnimationGroup.h" #import "MewMacro.h" @@ -31,12 +31,12 @@ ///代理 @property (nonatomic,weak) iddelegate; ///礼物特效的队列 -@property (nonatomic,strong) NSMutableArray *giftEffectQueue; +@property (nonatomic,strong) NSMutableArray *giftEffectQueue; ///礼物定时器 6s刷新一次 @property (nonatomic,strong)dispatch_source_t giftEffectTimer; #pragma mark - 送礼物的动画的 ///礼物的队列 -@property (nonatomic,strong) NSMutableArray *giftQueue; +@property (nonatomic,strong) NSMutableArray *giftQueue; ///定时器 @property (nonatomic ,strong)dispatch_source_t giftTimer; ///复用池 应为送礼物的动画是一个很频繁的事情 所以可以减少内存的消耗 @@ -93,7 +93,7 @@ if (obj.attachment != nil && [obj.attachment isKindOfClass:[MewAttachmentModel class]]) { MewAttachmentModel *attachment = (MewAttachmentModel *)obj.attachment; if (attachment.first == MewRoomCustomMsgType_Gift) { - MewGiftReceiveInfoModel * receiveInfo = [MewGiftReceiveInfoModel mewModelWithJSON:attachment.data]; + MewReceiveGiftDataModel * receiveInfo = [MewReceiveGiftDataModel mewModelWithJSON:attachment.data]; // 过滤礼物薯片id if (![receiveInfo.giftId isEqualToString:@"2"]) { return; } [self mew_receiveGiftHandleSendGiftAnimation:attachment]; @@ -113,12 +113,12 @@ #pragma mark - 普通礼物 ///收到了礼物 -- (void)mew_receiveGift:(MewGiftReceiveInfoModel *)receiveInfo { +- (void)mew_receiveGift:(MewReceiveGiftDataModel *)receiveInfo { ///CPU警告的时候 需要停止接收动画 MewRoomInfoModel * roomInfor = [self.delegate mew_getRoomInformation]; - MewGiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo; + MewGiftDataModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo; if (!giftInfo) { - giftInfo = [[MewGiftStorage shareStorage] mew_findGiftInfo: receiveInfo.giftId]; + giftInfo = [[MewGiftCacheManager mewShare] mew_getGiftDataByGiftId: receiveInfo.giftId]; } ///重新赋值一下 用的时候不用在查找了 真的没有的话 那就没有那个礼物了 if (giftInfo) { @@ -149,7 +149,7 @@ @kStrongify(self) if (self.giftEffectQueue.count > 0) { dispatch_sync(dispatch_get_main_queue(), ^{ - MewGiftReceiveInfoModel * receiveModel = [self.giftEffectQueue firstObject]; + MewReceiveGiftDataModel * receiveModel = [self.giftEffectQueue firstObject]; [self mew_createGiftBannerViewAnimation:receiveModel]; [self.giftEffectQueue removeObject:receiveModel]; }); @@ -162,10 +162,10 @@ self.giftEffectTimer = _timer; } -- (void)mew_createGiftBannerViewAnimation:(MewGiftReceiveInfoModel *)receiveInfo { - MewGiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo; +- (void)mew_createGiftBannerViewAnimation:(MewReceiveGiftDataModel *)receiveInfo { + MewGiftDataModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo; if (!giftInfo) { - giftInfo = [[MewGiftStorage shareStorage] mew_findGiftInfo: receiveInfo.giftId]; + giftInfo = [[MewGiftCacheManager mewShare] mew_getGiftDataByGiftId: receiveInfo.giftId]; } NSInteger giftTotal = 0; if (receiveInfo.targetUids.count > 0) { @@ -179,11 +179,11 @@ #pragma mark - 收到礼物展示动画 - (void)mew_receiveGiftHandleSendGiftAnimation:(MewAttachmentModel *)attachment { if (!self.delegate.mew_getRoomInformation.hasAnimationEffect) {return;} - MewGiftReceiveInfoModel * receiveInfo = [MewGiftReceiveInfoModel mewModelWithJSON:attachment.data]; - MewGiftInfoModel * giftInfo = receiveInfo.gift ? receiveInfo.gift : receiveInfo.giftInfo; + MewReceiveGiftDataModel * receiveInfo = [MewReceiveGiftDataModel mewModelWithJSON:attachment.data]; + MewGiftDataModel * giftInfo = receiveInfo.gift ? receiveInfo.gift : receiveInfo.giftInfo; if (giftInfo == nil) { - giftInfo = [[MewGiftStorage shareStorage] mew_findGiftInfo:receiveInfo.giftId]; + giftInfo = [[MewGiftCacheManager mewShare] mew_getGiftDataByGiftId:receiveInfo.giftId]; } ///在最外面判断是否可以拿到那个礼物 后面使用就不用判断了 @@ -202,7 +202,7 @@ dispatch_source_set_event_handler(_timer, ^{ dispatch_async(dispatch_get_main_queue(), ^{ if (self.giftQueue.count) { - MewGiftReceiveInfoModel * receiveInfo = self.giftQueue.firstObject; + MewReceiveGiftDataModel * receiveInfo = self.giftQueue.firstObject; [self mew_handoutGiftDistributeAnimation:receiveInfo]; [self.giftQueue removeObject:receiveInfo]; }else { @@ -216,8 +216,8 @@ } ///处理礼物的分发动画 -- (void)mew_handoutGiftDistributeAnimation:(MewGiftReceiveInfoModel *)receiveInfo { - MewGiftInfoModel * giftInfo = receiveInfo.gift; +- (void)mew_handoutGiftDistributeAnimation:(MewReceiveGiftDataModel *)receiveInfo { + MewGiftDataModel * giftInfo = receiveInfo.gift; NSString * sendUid = receiveInfo.uid; CGPoint starPoint = [self mew_getGiftAnimationPoint:sendUid isEnd:NO]; CGPoint endPoint; @@ -292,7 +292,7 @@ #pragma mark - Getters And Setters -- (NSMutableArray *)giftEffectQueue { +- (NSMutableArray *)giftEffectQueue { if (!_giftEffectQueue) { _giftEffectQueue = [NSMutableArray array]; } @@ -308,7 +308,7 @@ return _lowLevelView; } -- (NSMutableArray *)giftQueue { +- (NSMutableArray *)giftQueue { if (!_giftQueue) { _giftQueue = [NSMutableArray array]; } diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MessageContainerView/Tool/MewRoomMessageParser.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MessageContainerView/Tool/MewRoomMessageParser.m index 4a67f13..b9db151 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Room/View/MessageContainerView/Tool/MewRoomMessageParser.m +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MessageContainerView/Tool/MewRoomMessageParser.m @@ -14,14 +14,14 @@ #import "MewMessageInfoModel.h" #import "MewMessageRemoteExtModel.h" #import "MewAttachmentModel.h" -#import "MewGiftReceiveInfoModel.h" -#import "MewGiftInfoModel.h" +#import "MewReceiveGiftDataModel.h" +#import "MewGiftDataModel.h" /// Tool #import "MewAccountInfoStorage.h" #import "NSMutableAttributedString+MewUtil.h" #import "MewThemeColor.h" #import "MewRoomMessageConstant.h" -#import "MewGiftStorage.h" +#import "MewGiftCacheManager.h" #import "NetImageConfig.h" #import "NetImageView.h" @@ -88,10 +88,10 @@ - (MewMessageInfoModel *)mew_createSendGiftAttribute:(MewAttachmentModel *)attachment sendInfo:(MewMessageRemoteExtModel *)sendInfo messageInfo:(MewMessageInfoModel *)messageInfo{ NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; - MewGiftReceiveInfoModel *info = [MewGiftReceiveInfoModel mewModelWithJSON:attachment.data]; - MewGiftInfoModel *giftInfo = info.gift == nil ? info.giftInfo : info.gift; + MewReceiveGiftDataModel *info = [MewReceiveGiftDataModel mewModelWithJSON:attachment.data]; + MewGiftDataModel *giftInfo = info.gift == nil ? info.giftInfo : info.gift; if (giftInfo == nil) { - giftInfo = [[MewGiftStorage shareStorage] mew_findGiftInfo:info.giftId]; + giftInfo = [[MewGiftCacheManager mewShare] mew_getGiftDataByGiftId:info.giftId]; } // 过滤礼物薯片id diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewGiftCacheManager.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewGiftCacheManager.h new file mode 100644 index 0000000..63386f7 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewGiftCacheManager.h @@ -0,0 +1,34 @@ +// +// MewGiftCacheManager.h +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import +#import "MewGiftDataModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface MewGiftCacheManager : NSObject ++ (instancetype)mewShare; +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)copy NS_UNAVAILABLE; +- (instancetype)mutableCopy NS_UNAVAILABLE; + +- (NSArray *)mew_getGiftInfoList:(NSString *)mewRoomuid; + +- (void)mew_saveGiftInfoList:(NSArray *)mewList mewRoomUid:(NSString *)mewRoomUid; + +/** + 这个不是最好的获取方式 可能由于没有房间uid 导致获取失败 + 目前用在公屏获取礼物 因为公屏的架构 传入一个房间id 的话 改动太大 先这样用着吧 + */ +/// 获取当前房间的数据中的礼物 +/// @param mewGiftId 礼物的id +- (MewGiftDataModel *)mew_getGiftDataByGiftId:(NSString *)mewGiftId; + +///礼物数据写入本地 +- (void)mew_writeGiftDataListInDic:(NSArray *)mewList; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewGiftCacheManager.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewGiftCacheManager.m new file mode 100644 index 0000000..dfebfea --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewGiftCacheManager.m @@ -0,0 +1,119 @@ +// +// MewGiftCacheManager.m +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import "MewGiftCacheManager.h" +@interface MewGiftCacheManager() +///key:房间id value:房间对应的礼物列表 +@property (nonatomic, strong) NSCache *> *mewCache; +///当前房间的uid +@property (nonatomic,copy) NSString *mewCurRoomUid; +/// +@property (nonatomic,assign) BOOL mewWriteSucceed; +@end +@implementation MewGiftCacheManager ++ (instancetype)mewShare { + static dispatch_once_t onceToken; + static MewGiftCacheManager * storage; + dispatch_once(&onceToken, ^{ + storage = [[MewGiftCacheManager alloc] init]; + }); + return storage; +} + + +- (void)mew_saveGiftInfoList:(NSArray *)mewList mewRoomUid:(NSString *)mewRoomUid; { + if (mewList.count > 0 && mewRoomUid.length > 0) { + [self.mewCache setObject:mewList forKey:mewRoomUid]; + } +} + +- (NSArray *)mew_getGiftInfoList:(NSString *)mewRoomuid { + if (mewRoomuid.length > 0) { + self.mewCurRoomUid = mewRoomuid; + NSArray *giftLists = [self.mewCache objectForKey:mewRoomuid]; + if (giftLists.count >= 0) { + return giftLists; + } + } + return nil; +} + +/// 获取当前房间的数据中的礼物 +/// @param mewGiftId 礼物的id +- (MewGiftDataModel *)mew_getGiftDataByGiftId:(NSString *)mewGiftId { + MewGiftDataModel * giftInfo = [self mew_getGiftData:mewGiftId]; + if (giftInfo) { + return giftInfo; + } + + if (self.mewCurRoomUid) { + NSArray *giftLists = [self.mewCache objectForKey:self.mewCurRoomUid]; + if (giftLists.count > 0) { + __block MewGiftDataModel * giftInfo; + [giftLists enumerateObjectsUsingBlock:^(MewGiftDataModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (obj.giftId == mewGiftId.integerValue) { + giftInfo = obj; + *stop = YES; + } + }]; + return giftInfo; + } + } + return nil; +} + + +- (NSCache *> *)mewCache { + if (!_mewCache) { + _mewCache = [[NSCache alloc] init]; + // 设置缓存数据的数目 + _mewCache.countLimit = 10; + } + return _mewCache; +} + +- (void)mew_writeGiftDataListInDic:(NSArray *)mewList{ + ///因为不想每次都要大量的IO操作 就保存一份吧 + if (self.mewWriteSucceed) { + return; + } + NSString * path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject; + NSString * giftDirPath = [path stringByAppendingPathComponent:@"MewSendGiftData"]; + //判断有没有文件夹 + BOOL isDir =NO; + NSFileManager *fileManager = [NSFileManager defaultManager]; + BOOL existed = [fileManager fileExistsAtPath:giftDirPath isDirectory:&isDir]; + if ( !(isDir ==YES && existed == YES) ){ + //如果没有文件夹则创建 + [fileManager createDirectoryAtPath:giftDirPath withIntermediateDirectories:YES attributes:nil error:nil]; + } + for (int i = 0; i< mewList.count; i++) { + MewGiftDataModel * giftInfoModel = [mewList mewSafeObjectAtIndex:i]; + NSString *giftPath = [giftDirPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%ld", giftInfoModel.giftId]]; + [NSKeyedArchiver archiveRootObject:giftInfoModel.mewModel2dictionary toFile:giftPath]; + } + self.mewWriteSucceed = YES; +} + +- (MewGiftDataModel *)mew_getGiftData:(NSString *)giftId { + //找到相应的目录 + NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; + NSString *pathFile = [path stringByAppendingPathComponent:@"Gift"]; + //判断有没有文件夹 + BOOL isDir =NO; + NSFileManager *fileManager = [NSFileManager defaultManager]; + BOOL existed = [fileManager fileExistsAtPath:pathFile isDirectory:&isDir]; + MewGiftDataModel * giftInfo; + if (existed) { + NSString *aPath = [pathFile stringByAppendingPathComponent:giftId]; + NSDictionary * dic = [NSKeyedUnarchiver unarchiveObjectWithFile:aPath]; + giftInfo = [MewGiftDataModel mewModelWithDictionary:dic]; + } + return giftInfo; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewSendGiftManager.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewSendGiftManager.h new file mode 100644 index 0000000..f9d2adf --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewSendGiftManager.h @@ -0,0 +1,60 @@ +// +// MewSendGiftManager.h +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import "MewBaseMvpPresenter.h" +#import "Api+MewSendGfit.h" +#import "MewGiftDataModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface MewSendGiftManager : MewBaseMvpPresenter +/// 获取用户信息 +/// @param mewUid 查询的用户的uid +- (void)mew_requestUserData:(NSString *)mewUid; +/// 获取用户钱包信息 +- (void)mew_requestUserMoneyData; +/// 获取普通的礼物 +/// @param mewRoomUid 房主的uid 获取房间专属礼物 +- (void)mew_requestNormalGiftArray:(NSString *)mewRoomUid; +/// 获取背包礼物 +- (void)mew_requestPackGiftArray; +/// 送礼物 +/// @param mewTargetUids 送礼物的人 +/// @param mewGiftNum 礼物的个数 +/// @param mewSendType 送的类型 +/// @param mewGiftId 送礼物的id +/// @param mewGiftSource 送礼物的来源 +/// @param mewGiftType 礼物的类型 +/// @param mewRoomSendType 赠送的类型 +/// @param mewRoomUid 房主的uid +/// @param mewMsg 喊话的内容 +- (void)mew_requestSendGiftData:(NSString *)mewTargetUids + mewGiftNum:(NSString *)mewGiftNum + mewSendType:(MewGiftObjType)mewSendType + mewGiftId:(NSString *)mewGiftId + mewGiftSource:(MewGiftOriginType)mewGiftSource + mewGiftType:(MewGiftDataType)mewGiftType + mewRoomSendType:(MewRoomSendGiftPersonType)mewRoomSendType + mewRoomUid:(NSString *)mewRoomUid + mewMsg:(NSString *)mewMsg; + +/// 送特权卡 +/// @param mewCardId 特权卡ID +/// @param mewRoomUid 房间ID +/// @param mewSendUid 赠送用户UID +-(void)mew_requestSendPrivilegeCardWithCardId:(NSString *)mewCardId mewRoomUid:(NSString *)mewRoomUid mewSendUid:(NSString *)mewSendUid mewCardUrl:(NSString *)mewCardUrl; +///全服福袋记录记录 +- (void)mew_requestGoodGiftList; + +///星座礼物 +- (void)mew_requestHoroscopeGiftList:(NSString *)mewRoomUid; + +///等到特权卡 +/// +-(void)mew_requestGiftPrivilegeCardWithRoomUid:(NSString *)mewRoomUid mewUid:(NSString *)mewUid; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewSendGiftManager.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewSendGiftManager.m new file mode 100644 index 0000000..73e9f96 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManager/MewSendGiftManager.m @@ -0,0 +1,170 @@ +// +// MewSendGiftManager.m +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import "MewSendGiftManager.h" +#import "Api.h" +#import "MewSendGiftManagerProtocol.h" +#import "MewWalletInfoModel.h" +#import "MewGiftCacheManager.h" +#import "MewReceiveGiftDataModel.h" +#import "MewGoodGiftBroadcastModel.h" +#import "MewWeekChampionBroadcastModel.h" +#import "XPPrivilegeCardItemModel.h" +@interface MewSendGiftManager () +@property (nonatomic,weak) id view; +@end +@implementation MewSendGiftManager +/// 获取用户信息 +/// @param mewUid 查询的用户的uid +- (void)mew_requestUserData:(NSString *)mewUid { + if (mewUid == nil) { + return; + } + [Api Mew_GetUserInfo:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + MewUserInfoModel * infoModel = [MewUserInfoModel mewModelWithDictionary:data.data]; + [[self mew_getView] mew_creadUserDataSuccess:infoModel]; + }] uid:mewUid]; +} + +/// 获取用户钱包信息 +- (void)mew_requestUserMoneyData { + NSString * uid = [MewAccountInfoStorage instance].mew_getUid; + NSString * ticket = [MewAccountInfoStorage instance].mew_getTicket; + [Api Mew_GetUserWalletInfo:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + MewWalletInfoModel * model = [MewWalletInfoModel mewModelWithDictionary:data.data]; + [[self mew_getView] mew_creadUserMoneyData:model]; + }] uid:uid ticket:ticket]; +} + + +/// 获取普通的礼物 +/// @param mewRoomUid 房主的uid 获取房间专属礼物 +- (void)mew_requestNormalGiftArray:(NSString *)mewRoomUid { + ///先不请求接口 从缓存中获取 + NSArray * arrary = [[MewGiftCacheManager mewShare] mew_getGiftInfoList:mewRoomUid]; + if (arrary.count > 0) { + [[self mew_getView] mew_creadNormalGiftArraySuccess:arrary]; + } + + [Api mew_getNormalGiftArray:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + NSArray *luckyBagGift = [MewGiftDataModel mewModelsWithArray:data.data[@"luckyBagGift"]]; // 福袋礼物 + NSArray *vipGift = [MewGiftDataModel mewModelsWithArray:data.data[@"vipGift"]]; // 贵族礼物 + NSArray *luckyPoolGift = [MewGiftDataModel mewModelsWithArray:data.data[@"luckyPoolGift"]];// 福袋奖池礼物 + NSArray *normalGift = [MewGiftDataModel mewModelsWithArray:data.data[@"normalGift"]]; // 普通面板礼物 + NSArray *weekStarGift = [MewGiftDataModel mewModelsWithArray:data.data[@"weekStarGift"]]; // 周星礼物 + NSArray *drawGift = [MewGiftDataModel mewModelsWithArray:data.data[@"drawGift"]]; // 涂鸦礼物 + NSArray *penaltyGift = [MewGiftDataModel mewModelsWithArray:data.data[@"penaltyGift"]]; // 惩罚礼物 + NSArray *anchorGift = [MewGiftDataModel mewModelsWithArray:data.data[@"singlePopularGift"]]; // 个播礼物 + NSArray *twelveStarGiftList = [MewGiftDataModel mewModelsWithArray:data.data[@"twelveStarGiftList"]]; // 星座礼物 + NSMutableArray *info = [NSMutableArray array]; + NSMutableArray *totalInfo = [NSMutableArray array]; + [info addObjectsFromArray:luckyBagGift]; + [info addObjectsFromArray:vipGift]; + [info addObjectsFromArray:normalGift]; + [info addObjectsFromArray:weekStarGift]; + [info addObjectsFromArray:drawGift]; + [info addObjectsFromArray:anchorGift]; + [info addObjectsFromArray:penaltyGift]; + [info addObjectsFromArray:twelveStarGiftList]; + [totalInfo addObjectsFromArray:info]; + [totalInfo addObjectsFromArray:luckyPoolGift]; + ///把礼物信息保存一下 + [[MewGiftCacheManager mewShare] mew_saveGiftInfoList:info mewRoomUid:mewRoomUid]; + [[MewGiftCacheManager mewShare] mew_writeGiftDataListInDic:totalInfo]; + [[self mew_getView] mew_creadNormalGiftArraySuccess:info]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + [[self mew_getView] mew_creadNormalGiftArrayFail:msg]; + }] mewRoomUid:mewRoomUid]; + +} + + +/// 获取背包礼物 +- (void)mew_requestPackGiftArray { + NSString * uid = [MewAccountInfoStorage instance].mew_getUid; + NSString * ticket = [MewAccountInfoStorage instance].mew_getTicket; + [Api mew_getPackGiftArray:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + NSArray * info = [MewGiftDataModel mewModelsWithArray:data.data]; + [[self mew_getView] mew_creadPackGiftArraySuccess:info]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + [[self mew_getView] mew_creadPacketGiftArrayFail:msg]; + }] mewUid:uid mewTicket:ticket]; +} + + +/// 送礼物 +/// @param mewTargetUids 送礼物的人 +/// @param mewGiftNum 礼物的个数 +/// @param mewSendType 送的类型 +/// @param mewGiftId 送礼物的id +/// @param mewGiftSource 送礼物的来源 +/// @param mewGiftType 礼物的类型 +/// @param mewRoomSendType 赠送的类型 +/// @param mewRoomUid 房主的uid +/// @param mewMsg 喊话的内容 +- (void)mew_requestSendGiftData:(NSString *)mewTargetUids + mewGiftNum:(NSString *)mewGiftNum + mewSendType:(MewGiftObjType)mewSendType + mewGiftId:(NSString *)mewGiftId + mewGiftSource:(MewGiftOriginType)mewGiftSource + mewGiftType:(MewGiftDataType)mewGiftType + mewRoomSendType:(MewRoomSendGiftPersonType)mewRoomSendType + mewRoomUid:(NSString *)mewRoomUid + mewMsg:(NSString *)mewMsg + { + NSString * uid = [MewAccountInfoStorage instance].mew_getUid; + NSString * giftSourceStr = [NSString stringWithFormat:@"%ld", mewGiftSource]; + NSString * giftTypeStr = [NSString stringWithFormat:@"%ld", mewGiftType]; + NSString * giftSendTypeStr = [NSString stringWithFormat:@"%ld", mewSendType]; + if (mewRoomUid.length <=0) { + mewRoomUid = @""; + } + [Api mew_getSendAllGiftArray:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + MewReceiveGiftDataModel *receive = [MewReceiveGiftDataModel mewModelWithJSON:data.data]; + receive.sourceType = mewGiftSource; + receive.roomSendGiftType = mewRoomSendType; + NSArray * array = [mewTargetUids componentsSeparatedByString:@","]; + [self.mew_getView mew_sendGiftDataSuccess:receive originDic:data.data uidNum:array.count]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + [[self mew_getView] mew_sendGiftDataFailWithCode:code msg:msg]; + }] mewTargetUids:mewTargetUids mewGiftNum:mewGiftNum mewSendType:giftSendTypeStr mewGiftId:mewGiftId mewGiftSource:giftSourceStr mewGiftType: giftTypeStr mewRoomUid:mewRoomUid mewMsg:mewMsg mewUid:uid]; +} +/// 送特权卡 +/// @param mewCardId 特权卡ID +/// @param mewRoomUid 房间ID +/// @param mewSendUid 赠送用户UID +-(void)mew_requestSendPrivilegeCardWithCardId:(NSString *)mewCardId mewRoomUid:(NSString *)mewRoomUid mewSendUid:(NSString *)mewSendUid mewCardUrl:(NSString *)mewCardUrl{ + [Api mewgetSendPrivilegeCard:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + [[self mew_getView]mew_sendPrivilegeCardSuccess:mewCardUrl]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [[self mew_getView]mew_sendPrivilegeCardFail]; + } mew_showLoading:NO errorToast:YES] mewCardId:mewCardId mewRoomUid:mewRoomUid mewSendUid:mewSendUid]; +} +///全服福袋记录记录 +- (void)mew_requestGoodGiftList{ + [Api mew_getGoodGiftAllServerArray:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + NSArray * array = [MewGoodGiftBroadcastModel mewModelsWithArray:data.data]; + [[self mew_getView] mew_getGoodGiftRecordListSuccess:array]; + }]]; +} + +///获取十二星座礼物banner +- (void)mew_requestHoroscopeGiftList:(NSString *)mewRoomUid { + [Api mew_getHoroscopeGiftArray:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + MewWeekChampionBroadcastModel * model = [MewWeekChampionBroadcastModel mewModelWithDictionary:data.data]; + [[self mew_getView] mew_creadWeekChampionDataSuccess:model]; + }] mewRoomUid:mewRoomUid]; +} +-(void)mew_requestGiftPrivilegeCardWithRoomUid:(NSString *)MewRoomUid mewUid:(NSString *)mewUid{ + [Api mew_getGiftPrivilegeCard:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + NSArray *list = [XPPrivilegeCardItemModel mewModelsWithArray:data.data]; + [[self mew_getView]mew_getGiftPrivilegeCardSuccess:list]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + + }] mewRoomUid:MewRoomUid mewUid:mewUid]; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerApi/Api+MewSendGfit.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerApi/Api+MewSendGfit.h new file mode 100644 index 0000000..de5052b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerApi/Api+MewSendGfit.h @@ -0,0 +1,92 @@ +// +// Api+Gift.h +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "Api.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface Api (MewSendGfit) +/// 请求背包礼物 +/// @param complection 完成 +/// @param mewUid 用户uid +/// @param mewTicket 用户ticket ++ (void)mew_getPackGiftArray:(MewHttpRequestHelperCompletion)complection + mewUid:(NSString *)mewUid + mewTicket:(NSString *)mewTicket; + +/// 请求普通礼物列表 +/// @param complection 完成 +/// @param mewRoomUid 房间的roomuid ++ (void)mew_getNormalGiftArray:(MewHttpRequestHelperCompletion)complection + mewRoomUid:(NSString *)mewRoomUid; + +/// 送礼物的接口 +/// @param complection 完成 +/// @param mewTargetUids 送给谁的 +/// @param mewGiftNum 送的个数 +/// @param mewSendType 送的类型 +/// @param mewGiftId 礼物的id +/// @param mewGiftSource 礼物的来源 +/// @param mewGiftType 礼物的类型 +/// @param mewRoomUid 房间的ID +/// @param mewMsg 喊话的 +/// @param mewUid 用户的id ++ (void)mew_getSendAllGiftArray:(MewHttpRequestHelperCompletion)complection + mewTargetUids:(NSString *)mewTargetUids + mewGiftNum:(NSString *)mewGiftNum + mewSendType:(NSString *)mewSendType + mewGiftId:(NSString *)mewGiftId + mewGiftSource:(NSString *)mewGiftSource + mewGiftType:(NSString *)mewGiftType + mewRoomUid:(NSString *)mewRoomUid + mewMsg:(NSString *)mewMsg + mewUid:(NSString *)mewUid; + +/// 送粉丝团入团礼物的接口 +/// @param completion 完成 +/// @param mewTargetUids 送给谁的 +/// @param mewGiftNum 送的个数 +/// @param mewSendType 送的类型 +/// @param mewGiftId 礼物的id +/// @param mewGiftSource 礼物的来源 +/// @param mewGiftType 礼物的类型 +/// @param mewRoomUid 房间的ID +/// @param mewMsg 喊话的 +/// @param mewUid 用户的id ++ (void)mew_sendFansGiftData:(MewHttpRequestHelperCompletion)completion + mewTargetUids:(NSString *)mewTargetUids + mewGiftNum:(NSString *)mewGiftNum + mewSendType:(NSString *)mewSendType + mewGiftId:(NSString *)mewGiftId + mewGiftSource:(NSString *)mewGiftSource + mewGiftType:(NSString *)mewGiftType + mewRoomUid:(NSString *)mewRoomUid + mewMsg:(NSString *)mewMsg + mewUid:(NSString *)mewUid; + +/// 请求福袋全服礼物全服记录 +/// @param complection 完成 ++ (void)mew_getGoodGiftAllServerArray:(MewHttpRequestHelperCompletion)complection; + +/// 请求星座礼物信息 ++ (void)mew_getHoroscopeGiftArray:(MewHttpRequestHelperCompletion)completion mewRoomUid:(NSString *)mewRoomUid; + +///请求特权卡 ++(void)mew_getGiftPrivilegeCard:(MewHttpRequestHelperCompletion)completion mewRoomUid:(NSString *)mewRoomUid mewUid:(NSString *)mewUid; + +/// 送特权卡 +/// - Parameters: +/// - complection: 完成 +/// - mewCardId: 特权卡ID +/// - mewRoomUid: 房间ID +/// - mewSendUid: 赠送用户UID ++ (void)mewgetSendPrivilegeCard:(MewHttpRequestHelperCompletion)complection mewCardId:(NSString *)mewCardId mewRoomUid:(NSString *)mewRoomUid mewSendUid:(NSString *)mewSendUid; +@end + + + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerApi/Api+MewSendGfit.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerApi/Api+MewSendGfit.m new file mode 100644 index 0000000..0e2fd83 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerApi/Api+MewSendGfit.m @@ -0,0 +1,104 @@ +// +// Api+Gift.m +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "Api+MewSendGfit.h" +#import "MewEncryptTool.h" +@implementation Api (MewSendGfit) +/// 请求背包礼物 +/// @param complection 完成 +/// @param mewUid 用户uid +/// @param mewTicket 用户ticket ++ (void)mew_getPackGiftArray:(MewHttpRequestHelperCompletion)complection + mewUid:(NSString *)mewUid + mewTicket:(NSString *)mewTicket { + [self makeRequest:@"backpack/listUserBackpackV2" method:MewHttpRequestHelperMethodGET completion:complection, __FUNCTION__, mewUid, mewTicket, nil]; +} + +/// 请求普通礼物列表 +/// @param complection 完成 +/// @param mewRoomUid 房间的roomuid ++ (void)mew_getNormalGiftArray:(MewHttpRequestHelperCompletion)complection + mewRoomUid:(NSString *)mewRoomUid { + [self makeRequest:@"gift/listV4" method:MewHttpRequestHelperMethodGET completion:complection, __FUNCTION__, mewRoomUid, nil]; +} + +/// 请求福袋全服礼物全服记录 +/// @param complection 完成 ++ (void)mew_getGoodGiftAllServerArray:(MewHttpRequestHelperCompletion)complection { + [self makeRequest:@"gift/luckyBag/serviceMsg/record" method:MewHttpRequestHelperMethodGET completion:complection, __FUNCTION__, nil]; +} + + +/// 送礼物的接口 +/// @param complection 完成 +/// @param mewTargetUids 送给谁的 +/// @param mewGiftNum 送的个数 +/// @param mewSendType 送的类型 +/// @param mewGiftId 礼物的id +/// @param mewGiftSource 礼物的来源 +/// @param mewGiftType 礼物的类型 +/// @param mewRoomUid 房间的ID +/// @param mewMsg 喊话的 +/// @param mewUid 用户的id ++ (void)mew_getSendAllGiftArray:(MewHttpRequestHelperCompletion)complection + mewTargetUids:(NSString *)mewTargetUids + mewGiftNum:(NSString *)mewGiftNum + mewSendType:(NSString *)mewSendType + mewGiftId:(NSString *)mewGiftId + mewGiftSource:(NSString *)mewGiftSource + mewGiftType:(NSString *)mewGiftType + mewRoomUid:(NSString *)mewRoomUid + mewMsg:(NSString *)mewMsg + mewUid:(NSString *)mewUid { + NSString *method = @"gift/sendV4"; + [self makeRequest:method method:MewHttpRequestHelperMethodPOST completion:complection, __FUNCTION__, mewTargetUids, mewGiftNum, mewSendType, mewGiftId, mewGiftSource, mewGiftType, mewRoomUid, mewMsg, mewUid, nil]; +} +/// 送特权卡 +/// - Parameters: +/// - complection: 完成 +/// - mewCardId: 特权卡ID +/// - mewRoomUid: 房间ID +/// - mewSendUid: 赠送用户UID ++ (void)mewgetSendPrivilegeCard:(MewHttpRequestHelperCompletion)complection mewCardId:(NSString *)mewCardId mewRoomUid:(NSString *)mewRoomUid mewSendUid:(NSString *)mewSendUid{ + [self makeRequest:@"privilegeCard/send" method:MewHttpRequestHelperMethodPOST completion:complection, __FUNCTION__,mewCardId,mewRoomUid,mewSendUid, nil]; +} +/// 送粉丝团入团礼物的接口 +/// @param completion 完成 +/// @param mewTargetUids 送给谁的 +/// @param mewGiftNum 送的个数 +/// @param mewSendType 送的类型 +/// @param mewGiftId 礼物的id +/// @param mewGiftSource 礼物的来源 +/// @param mewGiftType 礼物的类型 +/// @param mewRoomUid 房间的ID +/// @param mewMsg 喊话的 +/// @param mewUid 用户的id ++ (void)mew_sendFansGiftData:(MewHttpRequestHelperCompletion)completion + mewTargetUids:(NSString *)mewTargetUids + mewGiftNum:(NSString *)mewGiftNum + mewSendType:(NSString *)mewSendType + mewGiftId:(NSString *)mewGiftId + mewGiftSource:(NSString *)mewGiftSource + mewGiftType:(NSString *)mewGiftType + mewRoomUid:(NSString *)mewRoomUid + mewMsg:(NSString *)mewMsg + mewUid:(NSString *)mewUid { + [self makeRequest:@"anchorFansTeam/sendJoinTeamGift" method:MewHttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mewTargetUids, mewGiftNum, mewSendType, mewGiftId, mewGiftSource, mewGiftType, mewRoomUid, mewMsg, mewUid, nil]; +} + +/// 请求星座礼物信息 + ++ (void)mew_getHoroscopeGiftArray:(MewHttpRequestHelperCompletion)completion mewRoomUid:(NSString *)mewRoomUid { + NSMutableDictionary * dic = [NSMutableDictionary dictionary]; + [dic mewSafeSetObject:mewRoomUid forKey:@"roomUid"]; + [MewHttpRequestHelper request:@"twelveStar/getLastRankFirst" method:MewHttpRequestHelperMethodGET params:dic completion:completion]; +} +///请求特权卡 ++(void)mew_getGiftPrivilegeCard:(MewHttpRequestHelperCompletion)completion mewRoomUid:(NSString *)mewRoomUid mewUid:(NSString *)mewUid{ + [self makeRequest:@"privilegeCard/tab" method:MewHttpRequestHelperMethodGET completion:completion, __FUNCTION__,mewRoomUid, mewUid, nil]; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftBottomBarCountModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftBottomBarCountModel.h new file mode 100644 index 0000000..e49597b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftBottomBarCountModel.h @@ -0,0 +1,25 @@ +// +// MewGiftBottomBarCountModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//XPGiftCountModel +@interface MewGiftBottomBarCountModel : NSObject +/// +@property (nonatomic,copy) NSString *title; +///礼物的个数 +@property (nonatomic,copy) NSString *giftNumber; +/// 背包礼物的时候显示是全部 +@property (nonatomic,assign) BOOL isTotal; +///是否是自定义数量 默认为NO +@property (nonatomic, assign) BOOL isCustomCount; + ++ (instancetype)initWithtext:(NSString *)text num:(NSString *)num; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftBottomBarCountModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftBottomBarCountModel.m new file mode 100644 index 0000000..19cdd7e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftBottomBarCountModel.m @@ -0,0 +1,19 @@ +// +// MewGiftBottomBarCountModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewGiftBottomBarCountModel.h" + +@implementation MewGiftBottomBarCountModel ++ (instancetype)initWithtext:(NSString *)text num:(NSString *)num { + MewGiftBottomBarCountModel * model = [[MewGiftBottomBarCountModel alloc] init]; + model.title = text; + model.giftNumber = num; + model.isTotal = NO; + model.isCustomCount = NO; + return model; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataListModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataListModel.h new file mode 100644 index 0000000..5388a2a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataListModel.h @@ -0,0 +1,18 @@ +// +// MewGiftDataListModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftListsInfo +@interface MewGiftDataListModel : NSObject +@property (nonatomic, assign) NSInteger giftNum; +@property (nonatomic, assign) NSInteger prizeLevel; +@property (nonatomic, assign) NSInteger giftId; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataListModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataListModel.m new file mode 100644 index 0000000..d9d5788 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataListModel.m @@ -0,0 +1,12 @@ +// +// MewGiftDataListModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftDataListModel.h" + +@implementation MewGiftDataListModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataModel.h new file mode 100644 index 0000000..99b4b51 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataModel.h @@ -0,0 +1,68 @@ +// +// MewGiftDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewWeekChampionListModel.h" +#import "MewNobleGiftDataModel.h" +NS_ASSUME_NONNULL_BEGIN +//GiftInfoModel +@interface MewGiftDataModel : NSObject +///礼物id +@property (nonatomic, assign)NSInteger giftId; +///礼物名字 +@property (nonatomic, strong)NSString *giftName; +///价格 +@property (nonatomic, assign)double goldPrice; +///礼物url +@property (nonatomic, copy)NSString *giftUrl; +///福袋svagUrl +@property (nonatomic, copy)NSString *luckyGiftSvgaUrl; +///玩法说明Url +@property (nonatomic, copy)NSString *giftExplainUrl; + +@property (nonatomic, assign) MewGiftDataType giftType;//礼物类型 +///是否有vgg特效 +@property (assign, nonatomic) BOOL hasVggPic; +///动效url +@property (copy, nonatomic) NSString *vggUrl; +///是否最新 +@property (assign, nonatomic) BOOL hasLatest; +///是否限时 +@property (assign, nonatomic) BOOL hasTimeLimit; +///是否特效 +@property (assign, nonatomic) BOOL hasEffect; +///是否是房间专属礼物 +@property (assign, nonatomic) BOOL roomExclude; +///是否支持发广播 +@property (nonatomic,assign) BOOL isSendMsg; +///礼物文件类型 0 其他, 1 mp4 +@property (nonatomic, assign) MewGiftEffectType otherViewType; +///mp4类型特效url +@property (nonatomic, copy) NSString *viewUrl; + +/**------------- 礼物背包 ----------------**/ +///个数 +@property (nonatomic, assign) NSInteger count; +@property (nonatomic, assign) NSInteger reciveCount; + +//isSelected 用于本地修改 +@property (nonatomic,assign) BOOL isSelected;//是否被选中 +///礼物来源 +@property (nonatomic,assign) MewGiftOriginType sourceType; +///贵族礼物专属信息 +@property (nonatomic, strong) MewNobleGiftDataModel *giftVipInfo; + +/*----------周星礼物--------*/ +///上周周星礼物ID +@property (nonatomic, assign) NSInteger lastGiftId; +///上周对应礼物的魅力榜第一 +@property (nonatomic, strong) MewWeekChampionListModel *firstCharmRankUser; +///上周对应礼物豪气榜第一 +@property (nonatomic, strong) MewWeekChampionListModel *firstLevelRankUser; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataModel.m new file mode 100644 index 0000000..77039a4 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftDataModel.m @@ -0,0 +1,12 @@ +// +// MewGiftDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftDataModel.h" +#import "MJExtension.h" +@implementation MewGiftDataModel +MJCodingImplementation +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPackListDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPackListDataModel.h new file mode 100644 index 0000000..3efc4ce --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPackListDataModel.h @@ -0,0 +1,18 @@ +// +// MewGiftGoodPackListDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewGiftGoodPersonData.h" +#import "MewGiftDataListModel.h" +NS_ASSUME_NONNULL_BEGIN +//GiftLuckyBagGiftsInfo +@interface MewGiftGoodPackListDataModel : NSObject +@property (nonatomic, strong) NSArray *giftList; +@property (nonatomic, strong) MewGiftGoodPersonData *user; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPackListDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPackListDataModel.m new file mode 100644 index 0000000..2325980 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPackListDataModel.m @@ -0,0 +1,15 @@ +// +// MewGiftGoodPackListDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftGoodPackListDataModel.h" + +@implementation MewGiftGoodPackListDataModel ++ (NSDictionary *)objectClassInArray { + return @{@"giftList":MewGiftDataListModel.class + }; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPersonData.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPersonData.h new file mode 100644 index 0000000..a281aed --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPersonData.h @@ -0,0 +1,18 @@ +// +// MewGiftGoodPersonData.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftLuckyUserInfo +@interface MewGiftGoodPersonData : NSObject +@property(nonatomic, copy) NSString *nick; +//基础信息 +@property(nonatomic, assign) NSInteger uid; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPersonData.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPersonData.m new file mode 100644 index 0000000..220f3e4 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftGoodPersonData.m @@ -0,0 +1,12 @@ +// +// MewGiftGoodPersonData.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftGoodPersonData.h" + +@implementation MewGiftGoodPersonData + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDataModel.h new file mode 100644 index 0000000..678dc23 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDataModel.h @@ -0,0 +1,17 @@ +// +// MewGiftNumDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewGiftNumDetailModel.h" +NS_ASSUME_NONNULL_BEGIN +//GiftValueInfoModel +@interface MewGiftNumDataModel : NSObject +@property (nonatomic, copy) NSString *currentTime;//系统时间戳 +@property (nonatomic, strong) NSArray *giftValueVos; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDataModel.m new file mode 100644 index 0000000..6d2c20f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDataModel.m @@ -0,0 +1,15 @@ +// +// MewGiftNumDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftNumDataModel.h" + +@implementation MewGiftNumDataModel ++ (NSDictionary *)objectClassInArray { + return @{@"giftValueVos":MewGiftNumDetailModel.class}; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDetailModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDetailModel.h new file mode 100644 index 0000000..98871b0 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDetailModel.h @@ -0,0 +1,19 @@ +// +// MewGiftNumDetailModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftValueDetailModel +@interface MewGiftNumDetailModel : NSObject +///用户的uid +@property (nonatomic, copy) NSString * uid; +///礼物值 +@property (nonatomic, assign) long long giftValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDetailModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDetailModel.m new file mode 100644 index 0000000..85a7e45 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGiftNumDetailModel.m @@ -0,0 +1,12 @@ +// +// MewGiftNumDetailModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftNumDetailModel.h" + +@implementation MewGiftNumDetailModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGoodGiftBroadcastModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGoodGiftBroadcastModel.h new file mode 100644 index 0000000..3a1a743 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGoodGiftBroadcastModel.h @@ -0,0 +1,27 @@ +// +// MewGoodGiftBroadcastModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftLuckyBroadcastModel +@interface MewGoodGiftBroadcastModel : NSObject +///礼物名称 +@property (nonatomic,strong) NSString *giftName; +///价格 +@property (nonatomic, assign)double goldPrice; +///幸运礼物 +@property (nonatomic,strong) NSString *luckyBagName; +///昵称 +@property (nonatomic,strong) NSString *nick; +///房间标题 +@property (nonatomic,strong) NSString *roomTitle; +///房间的uid +@property (nonatomic,strong) NSString *roomUid; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGoodGiftBroadcastModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGoodGiftBroadcastModel.m new file mode 100644 index 0000000..be5fb86 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewGoodGiftBroadcastModel.m @@ -0,0 +1,12 @@ +// +// MewGoodGiftBroadcastModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGoodGiftBroadcastModel.h" + +@implementation MewGoodGiftBroadcastModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewNobleGiftDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewNobleGiftDataModel.h new file mode 100644 index 0000000..d4373fe --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewNobleGiftDataModel.h @@ -0,0 +1,21 @@ +// +// MewNobleGiftDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftNobleInfoModel +@interface MewNobleGiftDataModel : NSObject +///贵族图标 +@property (nonatomic, copy)NSString *vipIcon; +///可用贵族等级 +@property (nonatomic, assign) NSInteger vipLevel; +///贵族名称 +@property (nonatomic, copy) NSString *vipName; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewNobleGiftDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewNobleGiftDataModel.m new file mode 100644 index 0000000..9363024 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewNobleGiftDataModel.m @@ -0,0 +1,12 @@ +// +// MewNobleGiftDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewNobleGiftDataModel.h" + +@implementation MewNobleGiftDataModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftDataModel.h new file mode 100644 index 0000000..9ce73ec --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftDataModel.h @@ -0,0 +1,68 @@ +// +// MewReceiveGiftDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewGiftDataModel.h" +#import "MewReceiveGiftPersonDataModel.h" +#import "MewGiftGoodPackListDataModel.h" +#import "MewGiftGoodPackListDataModel.h" +#import "MewGiftNumDataModel.h" +NS_ASSUME_NONNULL_BEGIN +//GiftReceiveInfoModel +@interface MewReceiveGiftDataModel : NSObject +///目标的uid +@property(nonatomic,copy)NSString * targetUid; +///目标的头像 +@property (nonatomic,copy) NSString *targetAvatar; +///目标的昵称 +@property (nonatomic,copy) NSString *targetNick; +@property (nonatomic,strong) NSArray *targetUids; +///礼物信息 +@property (nonatomic,strong) MewGiftDataModel *gift; +///礼物信息 +@property (nonatomic,strong) MewGiftDataModel *giftInfo; +///送礼物的人uid +@property(nonatomic, assign)NSString * uid; +///礼物的id +@property (nonatomic,copy) NSString *giftId; +///送礼物的人 +@property(nonatomic, strong)NSString *nick; +///送礼物的人的头像 +@property(nonatomic, strong)NSString *avatar; +///送礼物的个数 +@property (assign, nonatomic) NSInteger giftNum; +///礼物名字 +@property (nonatomic,strong)NSString *giftName; +///动效url +@property (copy,nonatomic) NSString *vggUrl; +///vap动效url +@property (nonatomic, copy) NSString *viewUrl; +///福袋svagUrl +@property (nonatomic, copy)NSString *luckyGiftSvgaUrl; +///非全麦 多人送礼时 +@property (nonatomic,strong) NSArray *targetUsers; +///福袋礼物需要展示的vg动画 +@property (nonatomic,strong) NSArray *displayGift; +///福袋随机获取的礼物 +@property (nonatomic,strong) NSArray *luckyBagGifts; +///多人接收到的具体福袋礼物 是对luckyBagGifts的分离 要多次发送消息使用 +@property (nonatomic,strong) MewGiftGoodPackListDataModel* luckyGiftList; +///礼物来源 +@property (nonatomic,assign) MewGiftOriginType sourceType; +///房间送礼物的类型 +@property (nonatomic,assign) MewRoomSendGiftPersonType roomSendGiftType; +///礼物值信息 +@property (nonatomic, strong) NSArray *giftValueVos; +///是否是背包礼物 +@property (nonatomic,assign) BOOL isLuckyBagGift; +///是不是全麦 +@property (nonatomic,assign) BOOL isBatch; +///播放哪个动画 +@property (nonatomic, assign) BOOL isShowAnimation; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftDataModel.m new file mode 100644 index 0000000..cd6a1d4 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftDataModel.m @@ -0,0 +1,17 @@ +// +// MewReceiveGiftDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewReceiveGiftDataModel.h" + +@implementation MewReceiveGiftDataModel ++ (NSDictionary *)objectClassInArray { + return @{@"targetUsers":MewReceiveGiftPersonDataModel.class, + @"displayGift":MewGiftDataModel.class, + @"luckyBagGifts":MewGiftGoodPackListDataModel.class + }; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftPersonDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftPersonDataModel.h new file mode 100644 index 0000000..cc293e9 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftPersonDataModel.h @@ -0,0 +1,21 @@ +// +// MewReceiveGiftPersonDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftReceiveUserInfoModel +@interface MewReceiveGiftPersonDataModel : NSObject +///收礼物的人 +@property(nonatomic, strong)NSString *nick; +///收礼物的人的头像 +@property(nonatomic, strong)NSString *avatar; +///用户uid +@property(nonatomic, assign) NSInteger uid; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftPersonDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftPersonDataModel.m new file mode 100644 index 0000000..835a5a2 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewReceiveGiftPersonDataModel.m @@ -0,0 +1,12 @@ +// +// MewReceiveGiftPersonDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewReceiveGiftPersonDataModel.h" + +@implementation MewReceiveGiftPersonDataModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewSendGiftPersonDataModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewSendGiftPersonDataModel.h new file mode 100644 index 0000000..c6f9c9a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewSendGiftPersonDataModel.h @@ -0,0 +1,27 @@ +// +// MewSendGiftPersonDataModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//XPGiftUserInfoModel +@interface MewSendGiftPersonDataModel : UIView +///头像 +@property (nonatomic,copy) NSString * avatar; +///昵称 +@property (nonatomic,copy) NSString *nick; +///用户的uid +@property (nonatomic,assign) NSInteger uid; +///坑位 如果用户在坑位的话 就有值 如果没在坑位的话 就没有有值 +@property (nonatomic,copy) NSString * position; +///是否为相亲模式VIP坑位 +@property (nonatomic,assign) BOOL vipMic; +///是否选择 本地字段刷新页面使用 +@property (nonatomic,assign) BOOL isSelect; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewSendGiftPersonDataModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewSendGiftPersonDataModel.m new file mode 100644 index 0000000..4c482f3 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewSendGiftPersonDataModel.m @@ -0,0 +1,20 @@ +// +// MewSendGiftPersonDataModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewSendGiftPersonDataModel.h" + +@implementation MewSendGiftPersonDataModel + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionBroadcastModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionBroadcastModel.h new file mode 100644 index 0000000..0e67360 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionBroadcastModel.h @@ -0,0 +1,23 @@ +// +// MewWeekChampionBroadcastModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//GiftTwelveStarFirstModel +@interface MewWeekChampionBroadcastModel : NSObject +@property (nonatomic, copy) NSString *avatar; +@property (nonatomic, copy) NSString *erbanNo; +@property (nonatomic, copy) NSString *markUrl; +@property (nonatomic, copy) NSString *nick; +@property (nonatomic, copy) NSString *twelveStarName; +@property (nonatomic, copy) NSString *uid; +@property (nonatomic, assign) NSInteger gender; +@property (nonatomic, copy) NSString *twelveId; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionBroadcastModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionBroadcastModel.m new file mode 100644 index 0000000..462bfba --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionBroadcastModel.m @@ -0,0 +1,12 @@ +// +// MewWeekChampionBroadcastModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewWeekChampionBroadcastModel.h" + +@implementation MewWeekChampionBroadcastModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionListModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionListModel.h new file mode 100644 index 0000000..c726816 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionListModel.h @@ -0,0 +1,27 @@ +// +// MewWeekChampionListModel.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//XPWeekStarRankUserModel +@interface MewWeekChampionListModel : NSObject +///头像 +@property (nonatomic, copy) NSString *avatar; +///榜单值 +@property (nonatomic, assign) NSInteger amount; +///uid +@property (nonatomic, assign) NSInteger uid; +///二般号 +@property (nonatomic, assign) NSInteger erbanNo; +///昵称 +@property (nonatomic, copy) NSString *nick; +///礼物id +@property (nonatomic, assign) NSInteger giftId; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionListModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionListModel.m new file mode 100644 index 0000000..ba7f2f9 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerModel/MewWeekChampionListModel.m @@ -0,0 +1,12 @@ +// +// MewWeekChampionListModel.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewWeekChampionListModel.h" + +@implementation MewWeekChampionListModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerProtocol/MewSendGiftManagerProtocol.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerProtocol/MewSendGiftManagerProtocol.h new file mode 100644 index 0000000..882cb9f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerProtocol/MewSendGiftManagerProtocol.h @@ -0,0 +1,42 @@ +// +// MewSendGiftManagerProtocol.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import +@class MewWalletInfoModel, MewGiftDataModel, MewReceiveGiftDataModel, MewUserInfoModel, MewWeekChampionBroadcastModel,XPPrivilegeCardItemModel; +NS_ASSUME_NONNULL_BEGIN + +@protocol MewSendGiftManagerProtocol +///获取用户信息成功 +- (void)mew_creadUserDataSuccess:(MewUserInfoModel *)userData; +///获取用户钱包信息成功 +- (void)mew_creadUserMoneyData:(MewWalletInfoModel *)moneyData; +///获取普通礼物列表 +- (void)mew_creadNormalGiftArraySuccess:(NSArray *)giftArray; +///获取普通礼物列表失败 +- (void)mew_creadNormalGiftArrayFail:(NSString *)msg; +///获取背包礼物列表 +- (void)mew_creadPackGiftArraySuccess:(NSArray *)giftList; +///获取背包礼物列表失败 +- (void)mew_creadPacketGiftArrayFail:(NSString *)msg; +///送礼物成功 +- (void)mew_sendGiftDataSuccess:(MewReceiveGiftDataModel *)receiveData originDic:(NSDictionary *)originDic uidNum:(NSInteger)uidNum; +///送礼物失败 +- (void)mew_sendGiftDataFailWithCode:(NSInteger)code msg:(NSString *)msg; +///送特权卡成功 +- (void)mew_sendPrivilegeCardSuccess:(NSString *)cardUrl; +///送特权卡失败 +- (void)mew_sendPrivilegeCardFail; +///获取全服福袋礼物记录 +- (void)mew_getGoodGiftRecordListSuccess:(NSArray *)list; + +///获取周星礼物成功 +- (void)mew_creadWeekChampionDataSuccess:(MewWeekChampionBroadcastModel *)data; +///获取特权卡 +-(void)mew_getGiftPrivilegeCardSuccess:(NSArray *)list; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftBottomBarCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftBottomBarCell.h new file mode 100644 index 0000000..1a08445 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftBottomBarCell.h @@ -0,0 +1,17 @@ +// +// MewGiftBottomBarCell.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import + +#import "MewGiftBottomBarCountModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface MewGiftBottomBarCell : UICollectionViewCell +@property (nonatomic,strong) MewGiftBottomBarCountModel *mewNumModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftBottomBarCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftBottomBarCell.m new file mode 100644 index 0000000..126ddef --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftBottomBarCell.m @@ -0,0 +1,95 @@ +// +// MewGiftBottomBarCell.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewGiftBottomBarCell.h" +@interface MewGiftBottomBarCell() +///显示标题 +@property (nonatomic,strong) UILabel *mewtextView; +///显示礼物个数 +@property (nonatomic,strong) UILabel *mewNumView; +///显示其他数额的箭头 +@property (nonatomic,strong) UIImageView *mewArrowView; +@end +@implementation MewGiftBottomBarCell +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI { + [self.contentView addSubview:self.mewtextView]; + [self.contentView addSubview:self.mewNumView]; + [self.contentView addSubview:self.mewArrowView]; +} + +- (void)mew_setUIConstraints { + [self.mewtextView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(20); + make.centerY.mas_equalTo(self.contentView); + }]; + [self.mewNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-20); + make.centerY.mas_equalTo(0); + make.left.mas_greaterThanOrEqualTo(self.mewtextView.mas_right).offset(5); + }]; + + [self.mewArrowView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-20); + make.centerY.mas_equalTo(0); + make.width.height.mas_equalTo(10); + }]; +} + +#pragma mark - Getters And Setters +-(void)setMewNumModel:(MewGiftBottomBarCountModel *)mewNumModel{ + _mewNumModel = mewNumModel; + if (_mewNumModel) { + self.mewtextView.text = _mewNumModel.title; + self.mewNumView.text = _mewNumModel.giftNumber; + if (_mewNumModel.isCustomCount) { + self.mewArrowView.hidden = NO; + } else { + self.mewArrowView.hidden = YES; + } + } +} + + +- (UILabel *)mewtextView { + if (!_mewtextView) { + _mewtextView = [[UILabel alloc] init]; + _mewtextView.font = [UIFont systemFontOfSize:13]; + _mewtextView.textColor = [MewThemeColor mewGiftCountTitleColor]; + } + return _mewtextView; +} + +- (UILabel *)mewNumView { + if (!_mewNumView) { + _mewNumView = [[UILabel alloc] init]; + _mewNumView.font = [UIFont systemFontOfSize:14]; + _mewNumView.textColor = [MewThemeColor mewAppMainColor]; + _mewNumView.textAlignment = NSTextAlignmentRight; + } + return _mewNumView; +} + +- (UIImageView *)mewArrowView { + if (!_mewArrowView) { + _mewArrowView = [[UIImageView alloc] init]; + _mewArrowView.image = [UIImage imageNamed:@"mew_room_gift_bar_arrow"]; + _mewArrowView.hidden = YES; + } + return _mewArrowView; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionCell.h new file mode 100644 index 0000000..9e00628 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionCell.h @@ -0,0 +1,27 @@ +// +// MewGiftWeekChampionCell.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewGiftDataModel.h" +@class MewGiftWeekChampionCell; +NS_ASSUME_NONNULL_BEGIN +@protocol MewGiftWeekChampionCellDelegate + +- (void)mewGiftWeekChampionCell:(MewGiftWeekChampionCell *)view didChooseGift:(MewGiftDataModel *)giftData; + +@end +//XPGiftWeekStarCollectionViewCell +@interface MewGiftWeekChampionCell : UICollectionViewCell +///使用的地方 +@property (nonatomic,assign) MewSendGiftManagerType mewPersonType; +///周星礼物 +@property (nonatomic,strong) NSArray *mewArray; +///代理 +@property (nonatomic,weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionCell.m new file mode 100644 index 0000000..a0ce42b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionCell.m @@ -0,0 +1,135 @@ +// +// MewGiftWeekChampionCell.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftWeekChampionCell.h" +#import "MewGiftWeekChampionFlowLayout.h" +#import "MewGiftWeekChampionItemCell.h" +@interface MewGiftWeekChampionCell () +///列表 +@property (nonatomic,strong) UICollectionView *mewCollectionView; +///分页 +@property (nonatomic,strong) UIPageControl *mewPageControl; +///选中的礼物 +@property (nonatomic,strong) MewGiftDataModel *mewChooseGiftData; +@end +@implementation MewGiftWeekChampionCell +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} +#pragma mark - Private Method +- (void)initSubViews { + [self.contentView addSubview:self.mewCollectionView]; + [self.contentView addSubview:self.mewPageControl]; +} + +- (void)initSubViewConstraints { + [self.mewCollectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self.contentView); + make.height.mas_equalTo(108 * 2); + }]; + + [self.mewPageControl mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewCollectionView.mas_bottom).offset(5); + make.left.right.mas_equalTo(self.contentView); + make.height.mas_equalTo(10); + }]; +} + + +#pragma mark - UICollectionViewDelegate And UICollectionDatasource +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + CGFloat itemWidth = (CGFloat)(KScreenWidth - 15 * 2 - 5 * 3) / (CGFloat)4; + return CGSizeMake(itemWidth, 105); +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.mewArray.count; +} + +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + MewGiftWeekChampionItemCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MewGiftWeekChampionItemCell class]) forIndexPath:indexPath]; + MewGiftDataModel * giftInfo; + giftInfo = [self.mewArray mewSafeObjectAtIndex:indexPath.item]; + if (giftInfo.giftId == self.mewChooseGiftData.giftId) { + giftInfo.isSelected = YES; + } else { + giftInfo.isSelected = NO; + } + cell.mewType = self.mewPersonType; + cell.mewGiftData = giftInfo; + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + if (self.mewArray.count > 0) { + MewGiftDataModel * giftInfo= [self.mewArray mewSafeObjectAtIndex:indexPath.item]; + self.mewChooseGiftData = giftInfo; + [self.mewCollectionView reloadData]; + + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftWeekChampionCell:didChooseGift:)]) { + [self.delegate mewGiftWeekChampionCell:self didChooseGift:giftInfo]; + } + } +} +#pragma mark - scrollviewdelegate +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + CGFloat offX = scrollView.contentOffset.x; + CGFloat width = CGRectGetWidth(scrollView.frame); + self.mewPageControl.currentPage = ceilf(offX/width); +} + +#pragma mark - Getters And Setters +- (void)setmewArray:(NSArray *)mewArray { + _mewArray = mewArray; + if (_mewArray.count > 0) { + self.mewChooseGiftData = _mewArray.firstObject; + } + NSInteger page = 0; + if (_mewArray.count % 8 == 0) { //刚好满页 + page = _mewArray.count / 8; + } else { + page = _mewArray.count / 8 + 1; + } + self.mewPageControl.hidden = page <= 1; + [self.mewPageControl setNumberOfPages:page]; + self.mewPageControl.currentPage = 0; + [self.mewCollectionView reloadData]; +} + +- (UICollectionView *)mewCollectionView{ + if (!_mewCollectionView) { + MewGiftWeekChampionFlowLayout *layout = [[MewGiftWeekChampionFlowLayout alloc] init]; + layout.minimumLineSpacing = 5; + layout.minimumInteritemSpacing = 5; + layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0); + _mewCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _mewCollectionView.dataSource = self; + _mewCollectionView.delegate = self; + _mewCollectionView.backgroundColor = [UIColor clearColor]; + _mewCollectionView.pagingEnabled = YES; + _mewCollectionView.showsHorizontalScrollIndicator = NO; + [_mewCollectionView registerClass:[MewGiftWeekChampionItemCell class] forCellWithReuseIdentifier:NSStringFromClass([MewGiftWeekChampionItemCell class])]; + } + return _mewCollectionView; +} + +- (UIPageControl *)mewPageControl { + if (!_mewPageControl) { + _mewPageControl = [[UIPageControl alloc] init]; + _mewPageControl.currentPageIndicatorTintColor = [MewThemeColor mewGiftPageIndicatorColor]; + } + return _mewPageControl; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionFlowLayout.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionFlowLayout.h new file mode 100644 index 0000000..4e8d03e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionFlowLayout.h @@ -0,0 +1,16 @@ +// +// MewGiftWeekChampionFlowLayout.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//XPGiftCollectionViewFlowLayout +@interface MewGiftWeekChampionFlowLayout : UICollectionViewFlowLayout + +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionFlowLayout.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionFlowLayout.m new file mode 100644 index 0000000..0e8e2e3 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionFlowLayout.m @@ -0,0 +1,149 @@ +// +// MewGiftWeekChampionFlowLayout.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewGiftWeekChampionFlowLayout.h" +@interface MewGiftWeekChampionFlowLayout() +@property (nonatomic, copy) NSMutableDictionary *mewSectionData; +@property (nonatomic, strong) NSMutableArray *mewList; +@end + +@implementation MewGiftWeekChampionFlowLayout +#pragma mark - life cycle +- (instancetype)init { + self = [super init]; + if (self) { + self.scrollDirection = UICollectionViewScrollDirectionHorizontal; + } + return self; +} + +#pragma mark - overload + +- (void)prepareLayout { + + [super prepareLayout]; + + _mewSectionData = [NSMutableDictionary dictionary]; + self.mewList = [NSMutableArray array]; + //获取section的数量 + NSUInteger section = [self.collectionView numberOfSections]; + + for (int sec = 0; sec < section; sec++) { + //获取每个section的cell个数 + NSUInteger count = [self.collectionView numberOfItemsInSection:sec]; + + for (NSUInteger item = 0; item *)layoutAttributesForElementsInRect:(CGRect)rect { + + return self.mewList; +} + +#pragma mark - private method + +- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)attributes { + + if(attributes.representedElementKind != nil){ + return; + } + CGFloat minLine = self.minimumLineSpacing; + CGFloat minSpacing = self.minimumInteritemSpacing; + + //attributes 的宽度 + CGFloat itemW = attributes.frame.size.width; + //attributes 的高度 + CGFloat itemH = attributes.frame.size.height; + UIEdgeInsets sectionInsets = self.sectionInset; + //collectionView 的宽度 + CGFloat width = self.collectionView.frame.size.width; + //collectionView 的高度 + CGFloat height = self.collectionView.frame.size.height; + //每个attributes的下标值 从0开始 + NSInteger itemIndex = attributes.indexPath.item; + + CGFloat stride = (self.scrollDirection == UICollectionViewScrollDirectionHorizontal) ? width : height; + + + //获取现在的attributes是第几组 + NSInteger section = attributes.indexPath.section; + //获取每个section的item的个数 + NSInteger itemCount = [self.collectionView numberOfItemsInSection:section]; + + + CGFloat offset = section * stride; + + //计算x方向item个数 + NSInteger xCount = (width / itemW); + //计算y方向item个数 + NSInteger yCount = (height / itemH); + //计算一页总个数 + NSInteger allCount = (xCount * yCount); + //获取每个section的页数,从0开始 + NSInteger page = itemIndex / allCount; + + //余数,用来计算item的x的偏移量 + NSInteger remain = (itemIndex % xCount); + //取商,用来计算item的y的偏移量 + NSInteger merchant = (itemIndex-page*allCount)/xCount; + + + //x方向每个item的偏移量 + CGFloat xCellOffset = remain * (itemW + minLine)+ sectionInsets.left; + //y方向每个item的偏移量 + CGFloat yCellOffset = merchant * (itemH + minSpacing); + + //获取每个section中item占了几页 + NSInteger pageRe = (itemCount % allCount == 0)? (itemCount / allCount) : (itemCount / allCount) + 1; + //将每个section与pageRe对应,计算下面的位置 + [_mewSectionData setValue:@(pageRe) forKey:[NSString stringWithFormat:@"%ld", section]]; + + if(self.scrollDirection == UICollectionViewScrollDirectionHorizontal) { + + NSInteger actualLo = 0; + //将每个section中的页数相加 + for (NSString *key in [_mewSectionData allKeys]) { + actualLo += [_mewSectionData[key] integerValue]; + } + //获取到的最后的数减去最后一组的页码数 + actualLo -= [_mewSectionData[[NSString stringWithFormat:@"%ld", [_mewSectionData allKeys].count-1]] integerValue]; + xCellOffset += page*width + actualLo*width; + + } else { + + yCellOffset += offset; + } + + attributes.frame = CGRectMake(xCellOffset, yCellOffset, itemW, itemH); +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionItemCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionItemCell.h new file mode 100644 index 0000000..b16b9d8 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionItemCell.h @@ -0,0 +1,21 @@ +// +// MewGiftWeekChampionItemCell.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import +#import "MewGiftDataModel.h" +NS_ASSUME_NONNULL_BEGIN +//XPGiftItemCollectionViewCell +@interface MewGiftWeekChampionItemCell : UICollectionViewCell +/// +@property (nonatomic,strong) MewGiftDataModel *mewGiftData; +///当前用户贵族等级 +@property (nonatomic, assign) NSInteger mewLevel; +///使用的地方 +@property (nonatomic,assign) MewSendGiftManagerType mewType; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionItemCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionItemCell.m new file mode 100644 index 0000000..aca26cb --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGiftWeekChampionItemCell.m @@ -0,0 +1,299 @@ +// +// MewGiftWeekChampionItemCell.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewGiftWeekChampionItemCell.h" +@interface MewGiftWeekChampionItemCell() + +///礼物图片 +@property (nonatomic,strong) NetImageView *mewGiftView; +///礼物名称 +@property (nonatomic,strong) UILabel *mewGiftNickView; +/// +@property (nonatomic,strong) UIStackView *mewPriceView; +///价格 +@property (nonatomic,strong) UILabel *mewPriceNumView; +///💎 +@property (nonatomic,strong) UIImageView *mewDiamondView; +/// +@property (nonatomic,strong) UIStackView *mewIconView; +///新的 +@property (nonatomic,strong) UIImageView *mewGiftNewView; +///特别的 +@property (nonatomic,strong) UIImageView *mewSpecialView; +///限定 +@property (nonatomic,strong) UIImageView *mewLimitView; +///专属 +@property (nonatomic,strong) UIImageView *mewExclusiveView; +/// +@property (nonatomic,strong) UIImageView * mewBgView; +/// +@property (nonatomic,strong) UILabel *mewGiftValueView; +///贵族icon +@property (nonatomic, strong) NetImageView *mewNobleIconView; +///贵族礼物锁 +@property (nonatomic, strong) UIImageView *mewLockView; +@end +@implementation MewGiftWeekChampionItemCell +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI { + [self.contentView addSubview:self.mewBgView]; + [self.contentView addSubview:self.mewIconView]; + [self.contentView addSubview:self.mewGiftView]; + [self.contentView addSubview:self.mewGiftNickView]; + [self.contentView addSubview:self.mewPriceView]; + [self.contentView addSubview:self.mewGiftValueView]; + [self.contentView addSubview:self.mewNobleIconView]; + [self.contentView addSubview:self.mewLockView]; + + [self.mewIconView addArrangedSubview:self.mewExclusiveView]; + [self.mewIconView addArrangedSubview:self.mewGiftNewView]; + [self.mewIconView addArrangedSubview:self.mewLimitView]; + [self.mewIconView addArrangedSubview:self.mewSpecialView]; + + [self.mewPriceView addArrangedSubview:self.mewPriceNumView]; + [self.mewPriceView addArrangedSubview:self.mewDiamondView]; + +} + +- (void)mew_setUIConstraints { + [self.mewIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.top.mas_equalTo(self.contentView).inset(3); + make.height.mas_equalTo(14); + }]; + + [self.mewBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self); + }]; + + + [self.mewGiftView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.contentView).offset(18); + make.centerX.mas_equalTo(self.contentView); + make.size.mas_equalTo(CGSizeMake(48, 48)); + }]; + + [self.mewGiftNickView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewGiftView.mas_bottom).offset(3); + make.centerX.mas_equalTo(self.mewGiftView); + }]; + + [self.mewPriceView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.mewGiftNickView.mas_bottom).offset(5); + make.centerX.equalTo(self.contentView); + make.height.mas_equalTo(10); + }]; + + [self.mewDiamondView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(10); + }]; + + [self.mewGiftValueView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.contentView).offset(4.5); + make.left.equalTo(self.contentView).offset(6); + }]; + + [self.mewNobleIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(16); + make.right.mas_equalTo(self.mewIconView.mas_left).mas_offset(-2); + make.centerY.mas_equalTo(self.mewIconView); + }]; + [self.mewLockView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.bottom.mas_equalTo(self.contentView).mas_offset(-4); + make.width.height.mas_equalTo(16); + }]; +} + +- (UIImageView *)mew_getImageView:(NSString *)imageName { + UIImageView * imageView = [[UIImageView alloc] init]; + imageView.userInteractionEnabled = YES; + imageView.image = [UIImage imageNamed:imageName]; + return imageView; +} + +#pragma mark - Getters And Setters +- (void)setMewGiftData:(MewGiftDataModel *)mewGiftData{ + _mewGiftData = mewGiftData; + if (_mewGiftData) { + self.mewGiftView.imageUrl = mewGiftData.giftUrl; + self.mewGiftNickView.text = _mewGiftData.giftName.length > 0 ? _mewGiftData.giftName : @""; + self.mewBgView.hidden = !mewGiftData.isSelected; + NSString *strr = [NSString stringWithFormat:@"%ld",(long)_mewGiftData.goldPrice]; + self.mewPriceNumView.text = strr; + self.mewGiftValueView.hidden = mewGiftData.count <=0 ; + self.mewGiftValueView.text = [NSString stringWithFormat:@"x%ld",(long)mewGiftData.count]; + + self.mewExclusiveView.hidden = !_mewGiftData.roomExclude; + self.mewGiftNewView.hidden = !_mewGiftData.hasLatest; + self.mewLimitView.hidden = !_mewGiftData.hasTimeLimit; + self.mewSpecialView.hidden = !_mewGiftData.hasEffect; + + if (_mewType == MewSendGiftManagerType_Person) { + self.mewGiftNickView.textColor = [MewThemeColor mewColorWithHexString:@"#282828"]; + self.mewPriceNumView.textColor = [MewThemeColor mewColorWithHexString:@"#878B9C"]; + self.mewGiftValueView.textColor = [MewThemeColor mewSecondTextColor]; + self.mewBgView.image = nil; + self.mewBgView.layer.borderWidth = 1.5; + self.mewBgView.layer.borderColor = [MewThemeColor mewColorWithHexString:@"#FFE710"].CGColor; + self.mewBgView.layer.masksToBounds = YES; + self.mewBgView.layer.cornerRadius = 10; + } else { + self.mewGiftNickView.textColor = [UIColor whiteColor]; + self.mewPriceNumView.textColor = [UIColor colorWithWhite:1 alpha:0.6]; + self.mewGiftValueView.textColor = [MewThemeColor mewGiftSegmentNormalTitleColor]; + self.mewBgView.layer.borderWidth = 0; + self.mewBgView.layer.borderColor = [UIColor clearColor].CGColor; + self.mewBgView.image = [UIImage imageNamed:@"mew_room_gift_choose_bg"]; + self.mewBgView.layer.masksToBounds = YES; + self.mewBgView.layer.cornerRadius = 0; + } + + if (mewGiftData.giftType == MewGiftDataType_Noble && mewGiftData.giftVipInfo) { + self.mewNobleIconView.hidden = NO; + self.mewNobleIconView.imageUrl = mewGiftData.giftVipInfo.vipIcon; + self.mewLockView.hidden = self.mewLevel >= mewGiftData.giftVipInfo.vipLevel; + } else { + self.mewNobleIconView.hidden = YES; + self.mewLockView.hidden = YES; + } + } +} + + + + +- (UIStackView *)mewIconView { + if (!_mewIconView) { + _mewIconView = [[UIStackView alloc] init]; + _mewIconView.axis = UILayoutConstraintAxisHorizontal; + _mewIconView.distribution = UIStackViewDistributionFill; + _mewIconView.alignment = UIStackViewAlignmentCenter; + _mewIconView.spacing = 2; + } + return _mewIconView; +} + +- (UIImageView *)mewExclusiveView { + if (!_mewExclusiveView) { + _mewExclusiveView = [self mew_getImageView:@"mew_room_gift_icon_exclude"]; + } + return _mewExclusiveView; +} + +- (UIImageView *)mewLimitView { + if (!_mewLimitView) { + _mewLimitView = [self mew_getImageView:@"mew_room_gift_icon_time_limit"]; + } + return _mewLimitView; +} + +- (UIImageView *)mewSpecialView { + if (!_mewSpecialView) { + _mewSpecialView = [self mew_getImageView:@"mew_room_gift_icon_effect"]; + } + return _mewSpecialView; +} +- (UIImageView *)mewGiftNewView { + if (!_mewGiftNewView) { + _mewGiftNewView = [self mew_getImageView:@"mew_room_gift_icon_latest"]; + } + return _mewGiftNewView; +} + +- (UIStackView *)mewPriceView { + if (!_mewPriceView) { + _mewPriceView = [[UIStackView alloc] init]; + _mewPriceView.axis = UILayoutConstraintAxisHorizontal; + _mewPriceView.distribution = UIStackViewDistributionEqualSpacing; + _mewPriceView.alignment = UIStackViewAlignmentCenter; + _mewPriceView.spacing = 2; + } + return _mewPriceView; +} + +- (UIImageView *)mewDiamondView { + if (!_mewDiamondView) { + _mewDiamondView = [self mew_getImageView:@"mew_diamond_icon"]; + } + return _mewDiamondView; +} + +- (UILabel *)mewPriceNumView { + if (!_mewPriceNumView) { + _mewPriceNumView = [[UILabel alloc] init]; + _mewPriceNumView.font = [UIFont systemFontOfSize:9]; + _mewPriceNumView.textColor = [MewThemeColor mewGiftPriceNormalColor]; + } + return _mewPriceNumView; +} + + +- (UILabel *)mewGiftNickView { + if (!_mewGiftNickView) { + _mewGiftNickView = [[UILabel alloc] init]; + _mewGiftNickView.font = [UIFont systemFontOfSize:10 weight:UIFontWeightSemibold]; + _mewGiftNickView.textAlignment = NSTextAlignmentCenter; + _mewGiftNickView.textColor = [UIColor whiteColor]; + } + return _mewGiftNickView; +} + +- (UILabel *)mewGiftValueView { + if (!_mewGiftValueView) { + _mewGiftValueView = [[UILabel alloc] init]; + _mewGiftValueView.font = [UIFont systemFontOfSize:10]; + _mewGiftValueView.textColor = [UIColor colorWithWhite:1 alpha:0.6]; + } + return _mewGiftValueView; +} + +- (UIImageView *)mewBgView { + if (!_mewBgView) { + _mewBgView = [[UIImageView alloc] init]; + _mewBgView.image = [UIImage imageNamed:@"mew_room_gift_choose_bg"]; + _mewBgView.hidden = YES; + } + return _mewBgView; +} + +- (NetImageView *)mewGiftView { + if (!_mewGiftView) { + _mewGiftView = [[NetImageView alloc] init]; + _mewGiftView.backgroundColor = [UIColor clearColor]; + _mewGiftView.layer.masksToBounds = YES; + _mewGiftView.contentMode = UIViewContentModeScaleAspectFit; + } + return _mewGiftView; +} + +- (NetImageView *)mewNobleIconView { + if (!_mewNobleIconView) { + _mewNobleIconView = [[NetImageView alloc] init]; + _mewNobleIconView.backgroundColor = [UIColor clearColor]; + _mewNobleIconView.hidden = YES; + _mewNobleIconView.contentMode = UIViewContentModeScaleAspectFit; + } + return _mewNobleIconView; +} + + +- (UIImageView *)mewLockView { + if (!_mewLockView) { + _mewLockView = [self mew_getImageView:@"mew_room_gift_icon_lock"]; + _mewLockView.hidden = YES; + } + return _mewLockView; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGoodGiftBroadcastCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGoodGiftBroadcastCell.h new file mode 100644 index 0000000..56fcab0 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGoodGiftBroadcastCell.h @@ -0,0 +1,17 @@ +// +// MewGoodGiftBroadcastCell.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewGoodGiftBroadcastModel.h" +NS_ASSUME_NONNULL_BEGIN +//MewGoodGiftBroadcastCell +@interface MewGoodGiftBroadcastCell : UICollectionViewCell + +@property (nonatomic,strong) MewGoodGiftBroadcastModel *mewGiftData; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGoodGiftBroadcastCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGoodGiftBroadcastCell.m new file mode 100644 index 0000000..51f76c7 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewGoodGiftBroadcastCell.m @@ -0,0 +1,71 @@ +// +// MewGoodGiftBroadcastCell.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGoodGiftBroadcastCell.h" +#import "MewGoodGiftBroadcastModel.h" +@interface MewGoodGiftBroadcastCell() +@property (nonatomic,strong) YYLabel *mewTextView; +@end +@implementation MewGoodGiftBroadcastCell +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI{ + [self.contentView addSubview:self.mewTextView]; +} + +- (void)mew_setUIConstraints { + [self.mewTextView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.contentView); + }]; +} + +- (NSMutableAttributedString *)mew_getTextAtt:(NSString *)text color:(UIColor *)color { + if (text == nil || text.length <= 0) { + text = @""; + } + NSMutableAttributedString *attribute = [[NSMutableAttributedString alloc] initWithString:text attributes:nil]; + attribute.yy_font = [UIFont systemFontOfSize:12]; + attribute.yy_color = color; + return attribute; +} + +#pragma mark - Getters And Setters +-(void)setMewGiftData:(MewGoodGiftBroadcastModel *)mewGiftData{ + _mewGiftData = mewGiftData; + if(_mewGiftData){ + NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; + [attribute appendAttributedString:[self mew_getTextAtt:@"恭喜 " color:[UIColor whiteColor]]]; + NSString * nick = _mewGiftData.nick; + if (nick.length > 6) { + nick = [nick substringToIndex:6]; + } + [attribute appendAttributedString:[self mew_getTextAtt:[NSString stringWithFormat:@"%@ " , nick] color:[MewThemeColor mewColorWithHexString:@"#FFD436"]]]; + [attribute appendAttributedString:[self mew_getTextAtt:[NSString stringWithFormat:@"开出%@获得 ", mewGiftData.luckyBagName] color:[UIColor whiteColor]]]; + [attribute appendAttributedString:[self mew_getTextAtt:[NSString stringWithFormat:@"%@ " , mewGiftData.giftName] color:[MewThemeColor mewColorWithHexString:@"#6FE3FF"]]]; + self.mewTextView.attributedText = attribute; + } +} + + + + +- (YYLabel *)mewTextView { + if (!_mewTextView) { + _mewTextView = [[YYLabel alloc] init]; + } + return _mewTextView; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewSendGiftPersonCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewSendGiftPersonCell.h new file mode 100644 index 0000000..617822e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewSendGiftPersonCell.h @@ -0,0 +1,17 @@ +// +// MewSendGiftPersonCell.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewSendGiftPersonDataModel.h" +NS_ASSUME_NONNULL_BEGIN +//XPGiftUserCollectionViewCell +@interface MewSendGiftPersonCell : UICollectionViewCell +///数据模型 +@property (nonatomic,strong) MewSendGiftPersonDataModel *mewPersonData; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewSendGiftPersonCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewSendGiftPersonCell.m new file mode 100644 index 0000000..0b99c54 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/MewSendGiftPersonCell.m @@ -0,0 +1,126 @@ +// +// MewSendGiftPersonCell.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewSendGiftPersonCell.h" +@interface MewSendGiftPersonCell() +///头像 +@property (nonatomic,strong) NetImageView *mewHeadView; +///背景图 +@property (nonatomic,strong) UIView * mewBgView; +///当前位置的 +@property (nonatomic,strong) UILabel *mewPositionView; +@end +@implementation MewSendGiftPersonCell +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI{ + [self.contentView addSubview:self.mewHeadView]; + [self.contentView addSubview:self.mewBgView]; + [self.contentView addSubview:self.mewPositionView]; +} + +- (void)mew_setUIConstraints { + [self.mewHeadView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.top.mas_equalTo(self.contentView); + make.width.height.mas_equalTo(38); + }]; + + [self.mewBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.mewHeadView); + }]; + + [self.mewPositionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(10); + make.centerY.mas_equalTo(self.mewHeadView.mas_bottom); + make.width.mas_equalTo(10); + make.centerX.mas_equalTo(self.mewHeadView); + }]; +} + +#pragma mark - Getters And Setters +- (void)setMewPersonData:(MewSendGiftPersonDataModel *)mewPersonData{ + _mewPersonData = mewPersonData; + if (_mewPersonData.position.length > 0) { + + if (_mewPersonData.vipMic) { + self.mewPositionView.text = @"VIP"; + [self.mewPositionView mas_updateConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(28); + }]; + } else { + if (_mewPersonData.position.integerValue == -1) { + self.mewPositionView.text = @"房主"; + [self.mewPositionView mas_updateConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(28); + }]; + } else { + self.mewPositionView.text = [NSString stringWithFormat:@"%ld", _mewPersonData.position.integerValue + 1]; + [self.mewPositionView mas_updateConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(10); + }]; + } + } + + } + self.mewHeadView.imageUrl = _mewPersonData.avatar; + if (_mewPersonData.isSelect) { + self.mewHeadView.layer.borderWidth = 2; + self.mewBgView.hidden = YES; + self.mewPositionView.backgroundColor = [MewThemeColor mewAppMainColor]; + _mewPositionView.textColor = [MewThemeColor mewMainTextColor]; + } else { + self.mewHeadView.layer.borderWidth = 0; + self.mewBgView.hidden = NO; + self.mewPositionView.backgroundColor = [MewThemeColor mewThreeTextColor]; + _mewPositionView.textColor = [UIColor whiteColor]; + } +} + + +- (NetImageView *)mewHeadView { + if (!_mewHeadView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _mewHeadView = [[NetImageView alloc] initWithConfig:config]; + _mewHeadView.layer.masksToBounds = YES; + _mewHeadView.layer.cornerRadius = 38/2; + _mewHeadView.layer.borderColor = [MewThemeColor mewAppMainColor].CGColor; + } + return _mewHeadView; +} + +- (UIView *)mewBgView { + if (!_mewBgView) { + _mewBgView = [[UIView alloc] init]; + _mewBgView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3]; + _mewBgView.layer.cornerRadius = 38/2; + _mewBgView.layer.masksToBounds = YES; + } + return _mewBgView; +} + +- (UILabel *)mewPositionView{ + if (!_mewPositionView) { + _mewPositionView = [[UILabel alloc] init]; + _mewPositionView.font = [UIFont systemFontOfSize:8]; + _mewPositionView.textColor = [UIColor whiteColor]; + _mewPositionView.textAlignment = NSTextAlignmentCenter; + _mewPositionView.backgroundColor = UIColorMewFromRGB(0x999999); + _mewPositionView.layer.masksToBounds = YES; + _mewPositionView.layer.cornerRadius = 5; + } + return _mewPositionView; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/XPPrivilegeCardGiftCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/XPPrivilegeCardGiftCell.h new file mode 100644 index 0000000..8e03f8c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/XPPrivilegeCardGiftCell.h @@ -0,0 +1,17 @@ +// +// XPPrivilegeCardGiftCell.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import +#import "XPPrivilegeCardItemModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardGiftCell : UICollectionViewCell +@property(nonatomic,assign) BOOL isChoose; +@property(nonatomic,strong) XPPrivilegeCardItemModel *cardModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/XPPrivilegeCardGiftCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/XPPrivilegeCardGiftCell.m new file mode 100644 index 0000000..e8ffb39 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewCell/XPPrivilegeCardGiftCell.m @@ -0,0 +1,129 @@ +// +// XPPrivilegeCardGiftCell.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// +#import +#import "XPPrivilegeCardGiftCell.h" +@interface XPPrivilegeCardGiftCell() +///背景 +@property(nonatomic,strong) FLAnimatedImageView *bgGifView; +///时间 +@property(nonatomic,strong) UILabel *timeView; +///标题 +@property(nonatomic,strong) UILabel *titleVeiw; +///蒙层 +@property(nonatomic,strong) UIImageView *curMaskView; +@property(nonatomic,strong) UIImageView *specialImageView; +@end + +@implementation XPPrivilegeCardGiftCell +-(void)dealloc{ + +} +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self.contentView addSubview:self.bgGifView]; + [self.bgGifView addSubview:self.timeView]; + [self.bgGifView addSubview:self.curMaskView]; + [self.contentView addSubview:self.titleVeiw]; + [self.contentView addSubview:self.specialImageView]; +} +-(void)installConstraints{ + [self.bgGifView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.top.equalTo(self.contentView); + make.width.mas_equalTo(kGetScaleWidth(160)); + make.height.mas_equalTo(kGetScaleWidth(90)); + }]; + [self.curMaskView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.bottom.equalTo(self.bgGifView); + make.height.mas_equalTo(kGetScaleWidth(40)); + }]; + [self.timeView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(-kGetScaleWidth(4)); + make.leading.trailing.equalTo(self.contentView).inset(kGetScaleWidth(5)); + }]; + [self.titleVeiw mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.bgGifView.mas_bottom).mas_offset(kGetScaleWidth(6)); + make.leading.trailing.equalTo(self.contentView).inset(kGetScaleWidth(5)); + make.height.mas_equalTo(kGetScaleWidth(14)); + }]; + [self.specialImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(14)); + make.top.mas_equalTo(kGetScaleWidth(6)); + make.trailing.mas_equalTo(-kGetScaleWidth(8)); + + }]; +} +- (void)setCardModel:(XPPrivilegeCardItemModel *)cardModel{ + _cardModel = cardModel; + _titleVeiw.text = _cardModel.cardName; + _timeView.text = [NSString stringWithFormat:@"有效期至:%@",_cardModel.expireTime]; + + _bgGifView.layer.borderWidth = _cardModel.isSelected ? 2 : 0; + _specialImageView.hidden = _cardModel.cardType == 0; + + [_bgGifView sd_setImageWithURL:[NSURL URLWithString: _cardModel.cardUrl]completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { + if(cardModel.cardType == 0){ + NSData *data = self.bgGifView.animatedImage.data; + if([UIImage mew_isGifWithImageData:data] == YES){ + self.specialImageView.hidden = NO; + } + } + }]; + + +} + + +#pragma mark - 懒加载 + +- (FLAnimatedImageView *)bgGifView{ + if(!_bgGifView){ + _bgGifView = [FLAnimatedImageView new]; + _bgGifView.layer.cornerRadius = kGetScaleWidth(12); + _bgGifView.layer.masksToBounds = YES; + _bgGifView.layer.borderColor = UIColorMewFromRGB(0xFFDA24).CGColor; + _bgGifView.contentMode = UIViewContentModeScaleAspectFill; + + + } + return _bgGifView; +} +- (UILabel *)timeView{ + if(!_timeView){ + _timeView = [UILabel mew_getLabWithText:@"" font:kFontMedium(8) textColor:[UIColor whiteColor]]; + _timeView.textAlignment = NSTextAlignmentCenter; + } + return _timeView; +} +-(UILabel *)titleVeiw{ + if(!_titleVeiw){ + _titleVeiw = [UILabel mew_getLabWithText:@"" font:kFontMedium(10) textColor:[UIColor whiteColor]]; + _titleVeiw.textAlignment = NSTextAlignmentCenter; + } + return _titleVeiw; +} +- (UIImageView *)curMaskView{ + if(!_curMaskView){ + _curMaskView = [UIImageView new]; + _curMaskView.image = kImage(@"room_Privilege_Card_mask"); + } + return _curMaskView; +} +- (UIImageView *)specialImageView { + if (!_specialImageView) { + _specialImageView = [UIImageView new]; + _specialImageView.image = kImage(@"gift_tag_effect"); + } + return _specialImageView; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewMainSendGiftVC.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewMainSendGiftVC.h new file mode 100644 index 0000000..d894c49 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewMainSendGiftVC.h @@ -0,0 +1,34 @@ +// +// MewMainSendGiftVC.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewMvpViewController.h" +#import "MewSendGiftPersonDataModel.h" +NS_ASSUME_NONNULL_BEGIN +//XPSendGiftView +@interface MewMainSendGiftVC : MewMvpViewController +///房间内才需要 +@property (nonatomic,weak) id delegate; +/// 送礼物的 +/// @param type 送礼物的类型 +/// @param mewUid 送礼物的人 +- (instancetype)initWithType:(MewSendGiftManagerType)type mewUid:(NSString * __nullable)mewUid; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)copy NS_UNAVAILABLE; +- (instancetype)mutableCopy NS_UNAVAILABLE; + +///对外只需要一个 获取麦序的接口 +///完全封闭的一个组件 +- (void)mew_setGiftPersonList:(NSArray *)users; + +///选中的礼物id +@property (nonatomic, copy) NSString *mew_chooseGiftId; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewMainSendGiftVC.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewMainSendGiftVC.m new file mode 100644 index 0000000..db4713e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewMainSendGiftVC.m @@ -0,0 +1,864 @@ +// +// MewMainSendGiftVC.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewMainSendGiftVC.h" +#import "MewGiftBottomBarView.h" +#import "MewSendGiftManagerProtocol.h" +#import "MedDrawGiftView.h" +#import "MewGiftDataView.h" +#import "MewSendGiftPersonView.h" +#import "MewGiftSlideshowView.h" +#import "MewGoodGiftBroadcastView.h" +#import "MewWeekChampionBroadcastView.h" +#import "MewSendGiftManager.h" +#import "MewGiftWeekFirstPlaceBroadcastView.h" +#import "MewAttachmentModel.h" +#import "MewMessageRemoteExtModel.h" +#import "MewRechargeViewController.h" +#import "MewRoomHalfScreenWebView.h" +#import +@interface MewMainSendGiftVC() +///顶部的区域 +@property (nonatomic,strong) UIView * mewHeadView; +///内容区域 +@property (nonatomic,strong) UIView *mewDetailsView; +///模糊背景 +@property (nonatomic, strong) UIVisualEffectView *mewDimBgView; +/// +@property (nonatomic,strong) UIStackView *mewContainerView; +///幸运礼物广播 +@property (nonatomic, strong) MewGoodGiftBroadcastView *mewGoodView; +///星座礼物广播 +@property (nonatomic, strong) MewWeekChampionBroadcastView *mewConstellationView; +///礼物类型(普通/互动) +@property (nonatomic, strong) MewGiftSlideshowView *mewSlideshowView; +///送礼物的人 +@property (nonatomic,strong) MewSendGiftPersonView *mewPersonView; + + +///送的什么礼物 +@property (nonatomic,strong) MewGiftDataView *mewGiftDataView; +///送多少礼物 +@property (nonatomic,strong) MewGiftBottomBarView *mewBottomBarView; +///底部的View +@property (nonatomic,strong) UIView * mewBottomBgView; +///涂鸦礼物 +@property (nonatomic,strong) MedDrawGiftView *mewDrawView; +///房主的uid/私聊的话 就是用户的uid +@property (nonatomic,copy) NSString *mewRoomUid; +///使用的地方 +@property (nonatomic,assign) MewSendGiftManagerType mewUserType; +///普通礼物的重试次数 +@property (nonatomic,assign) int mewNormalNum; +///背包礼物的重试次数 +@property (nonatomic,assign) int mewPackNum; +@property (nonatomic,strong) NSArray *mewPersonList; +///涂鸦礼物的坐标 +@property (nonatomic,strong) NSArray *mewDrawPoint; +///选择了滑块的类型 +@property (nonatomic,assign) MewSendGiftType mewGiftType; +///福袋礼物全服记录 +@property (nonatomic,strong) NSArray *mewGoodList; +@end +@implementation MewMainSendGiftVC + +- (MewSendGiftManager *)createPresenter { + return [[MewSendGiftManager alloc] init]; +} + + +- (instancetype)initWithType:(MewSendGiftManagerType)type mewUid:(NSString * __nullable)mewUid{ + if (self = [super init]) { + self.modalPresentationStyle = UIModalPresentationOverFullScreen; + self.mewRoomUid = mewUid; + self.mewUserType = type; + } + return self; +} + +- (void)viewDidLoad { + [self initSubViews]; + [self initSubViewConstraints]; + [self initHttpRequest]; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self.view addSubview:self.mewHeadView]; + [self.view addSubview:self.mewDetailsView]; + [self.mewDetailsView addSubview:self.mewDimBgView]; + [self.mewDetailsView addSubview:self.mewContainerView]; + [self.mewContainerView addArrangedSubview:self.mewDrawView]; + [self.mewContainerView addArrangedSubview:self.mewSlideshowView]; + [self.mewContainerView addArrangedSubview:self.mewPersonView]; + [self.mewContainerView addArrangedSubview:self.mewGiftDataView]; + [self.mewContainerView addArrangedSubview:self.mewBottomBarView]; + [self.mewContainerView addArrangedSubview:self.mewBottomBgView]; +} + +- (void)initSubViewConstraints { + [self.mewHeadView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self.view); + make.bottom.mas_equalTo(self.mewDetailsView.mas_top);; + }]; + + [self.mewDetailsView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewContainerView.mas_top); + make.left.right.bottom.mas_equalTo(self.view); + }]; + + [self.mewDimBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.mewDetailsView); + }]; + + [self.mewContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.mewDetailsView); + }]; + + [self.mewBottomBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(kSafeAreaBottomHeight); + }]; +} + +- (void)initHttpRequest { + [self.presenter mew_requestUserData:[MewAccountInfoStorage instance].mew_getUid]; + [self.presenter mew_requestUserMoneyData]; + [self.presenter mew_requestNormalGiftArray:self.mewRoomUid]; + [self.presenter mew_requestPackGiftArray]; + [self.presenter mew_requestGoodGiftList]; + [self.presenter mew_requestHoroscopeGiftList:self.mewRoomUid]; + [self.presenter mew_requestGiftPrivilegeCardWithRoomUid:self.mewRoomUid mewUid:[MewAccountInfoStorage instance].mew_getUid]; +} + +#pragma mark - Send Custom Message +- (void)sendGraffitiGiftMessage { + if (self.mewGiftType == MewSendGiftType_Graffiti && self.mewDrawPoint.count > 0) { + MewAttachmentModel * attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_Graffiti_Gift; + attachment.second = Mew_Room_Custom_Msg_Sub_Graffiti_Gift; + NSMutableDictionary * dic = [NSMutableDictionary dictionary]; + [dic setValue:@(self.mewGiftDataView.mewLastChooseGift.giftId) forKey:@"giftId"]; + [dic setValue:self.mewDrawPoint forKey:@"drawFixedArray"]; + attachment.data = dic; + [self sendCustomMessage:attachment]; + } +} + +- (void)sendCustomMessage:(MewReceiveGiftDataModel *)receiveModel oringinDic:(NSDictionary *)originDic { + NSDictionary * dict = originDic; + if (receiveModel.roomSendGiftType == MewRoomSendGiftPersonType_AllMic) { // 全麦 + NSMutableDictionary *data = [NSMutableDictionary dictionary]; + [data addEntriesFromDictionary:dict]; + if (receiveModel.gift.giftType == MewGiftDataType_Good) { // 如果是福袋 需要分开发送消息 + NSArray *luckyBagGifts = (NSArray *)[data objectForKey:@"luckyBagGifts"]; + if (luckyBagGifts.count >0) { + for (int i = 0; i < luckyBagGifts.count; i++) { + NSMutableDictionary * data1 = [NSMutableDictionary dictionary]; + [data1 addEntriesFromDictionary:dict]; + MewAttachmentModel * attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_AllMicroSend; + attachment.second = Mew_Room_Custom_Msg_Sub_AllMicroLuckySend; + NSDictionary * obj = [luckyBagGifts mewSafeObjectAtIndex:i]; + [data1 setObject:i == 0 ? @(YES):@(NO) forKey:@"isShowAnimation"]; + [data1 setObject:obj forKey:@"luckyGiftList"]; + [data1 setObject:receiveModel.gift.giftName forKey:@"giftName"]; + [data1 setObject:[obj valueForKeyPath:@"user.uid"] forKey:@"tarmew_getUid"]; + [data1 setObject:[dict valueForKeyPath:@"targetUsers.uid"] forKey:@"tarmew_getUids"]; + if ([dict valueForKeyPath:@"gift.luckyGiftSvgaUrl"]) { + [data1 setObject:[dict valueForKeyPath:@"gift.luckyGiftSvgaUrl"] forKey:@"luckyGiftSvgaUrl"]; + } + [data1 removeObjectForKey:@"luckyBagGifts"]; + [data1 removeObjectForKey:@"targetUsers"]; + [data1 removeObjectForKey:@"gift"]; + attachment.data = data1; + [self sendCustomMessage:attachment]; + } + } + }else { // 全麦赠送普通礼物 包含背包礼物 + MewAttachmentModel * attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_AllMicroSend; + attachment.second = Mew_Room_Custom_Msg_Sub_AllMicroSend; + [data setObject:[dict valueForKeyPath:@"targetUsers.uid"] forKey:@"tarmew_getUids"]; + attachment.data = data; + [self sendCustomMessage:attachment]; + } + } else if (receiveModel.roomSendGiftType == MewRoomSendGiftPersonType_MutableOnMic) { // 多人非全麦 + NSMutableDictionary *data = [NSMutableDictionary dictionary]; + [data addEntriesFromDictionary:dict]; + if (receiveModel.gift.giftType == MewGiftDataType_Good) { // 多人非全麦 福袋礼物 + NSArray *luckyBagGifts = (NSArray *)[data objectForKey:@"luckyBagGifts"]; + if (luckyBagGifts.count >0) { + // 产品想一个消息 多次发送 只能遍历插入消息体 + [luckyBagGifts enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + NSMutableDictionary * data1 = [NSMutableDictionary dictionary]; + [data1 addEntriesFromDictionary:dict]; + MewAttachmentModel * attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_AllMicroSend; + attachment.second = Mew_Room_Custom_Msg_Sub_AllBatchMicroLuckySend; + [data1 setObject:idx == 0 ? @(YES):@(NO) forKey:@"isShowAnimation"]; + [data1 setObject:obj forKey:@"luckyGiftList"]; + [data1 setObject:receiveModel.gift.giftName forKey:@"giftName"]; + [data1 setObject:[obj valueForKeyPath:@"user.uid"] forKey:@"tarmew_getUid"]; + [data1 setObject:[dict valueForKeyPath:@"targetUsers.uid"] forKey:@"tarmew_getUids"]; + if ([dict valueForKeyPath:@"gift.luckyGiftSvgaUrl"]) { + [data1 setObject:[dict valueForKeyPath:@"gift.luckyGiftSvgaUrl"] forKey:@"luckyGiftSvgaUrl"]; + } + [data1 removeObjectForKey:@"luckyBagGifts"]; + [data1 removeObjectForKey:@"targetUsers"]; + attachment.data = data1; + [self sendCustomMessage:attachment]; + }]; + } + }else { // 多人非全麦 普通礼物 + MewAttachmentModel *attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_AllMicroSend; + attachment.second = Mew_Room_Custom_Msg_Sub_AllBatchSend; + attachment.data = data; + [self sendCustomMessage:attachment]; + } + } else if (receiveModel.roomSendGiftType == MewRoomSendGiftPersonType_ToOne) { // 单人 + NSMutableDictionary *data = [NSMutableDictionary dictionary]; + [data addEntriesFromDictionary:dict]; + if (receiveModel.gift.giftType == MewGiftDataType_Good) { // 一对一 福袋礼物 + NSArray *luckyBagGifts = (NSArray *)[data objectForKey:@"luckyBagGifts"]; + [luckyBagGifts enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + NSMutableDictionary * data1 = [NSMutableDictionary dictionary]; + [data1 addEntriesFromDictionary:dict]; + MewAttachmentModel * attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_Gift; + attachment.second = Mew_Room_Custom_Msg_Sub_Gift_LuckySend; + [data1 setObject:idx == 0 ? @(YES):@(NO) forKey:@"isShowAnimation"]; + [data1 setObject:obj forKey:@"luckyGiftList"]; + [data1 setObject:receiveModel.gift.giftName forKey:@"giftName"]; + [data1 setObject:[obj valueForKeyPath:@"user.uid"] forKey:@"tarmew_getUid"]; + [data1 setObject:[obj valueForKeyPath:@"user.nick"] forKey:@"targetNick"]; + [data1 setObject:[dict valueForKeyPath:@"targetUsers.uid"] forKey:@"tarmew_getUids"]; + if ([dict valueForKeyPath:@"gift.luckyGiftSvgaUrl"]) { + [data1 setObject:[dict valueForKeyPath:@"gift.luckyGiftSvgaUrl"] forKey:@"luckyGiftSvgaUrl"]; + } + [data1 removeObjectForKey:@"luckyBagGifts"]; + [data1 removeObjectForKey:@"targetUsers"]; + attachment.data = data1; + [self sendCustomMessage:attachment]; + }]; + }else { // 一对一 普通礼物 + MewAttachmentModel *attachment = [[MewAttachmentModel alloc] init]; + attachment.first = MewRoomCustomMsgType_Gift; + attachment.second = Mew_Room_Custom_Msg_Sub_Gift_Send; + NSDictionary *targetUsers = ((NSArray *)[data objectForKey:@"targetUsers"]).firstObject; + [data setObject:[targetUsers valueForKeyPath:@"uid"] forKey:@"tarmew_getUid"]; + [data setObject:[targetUsers valueForKeyPath:@"nick"] forKey:@"targetNick"]; + [data setObject:[targetUsers valueForKeyPath:@"avatar"] forKey:@"targetAvatar"]; + attachment.data = data; + [self sendCustomMessage:attachment]; + } + } + +} + +- (void)sendCustomMessage:(MewAttachmentModel *)attachment { + + NSString *sessionID = self.mewUserType == MewSendGiftManagerType_Person ? [NSString stringWithFormat:@"%ld", self.mewPersonList.firstObject.uid] : [NSString stringWithFormat:@"%ld", [self.delegate mew_getRoomInformation].roomId]; + NIMMessage *message = [[NIMMessage alloc]init]; + NIMCustomObject *object = [[NIMCustomObject alloc] init]; + object.attachment = attachment; + message.messageObject = object; + + MewUserInfoModel *userInfo = [self.delegate mew_getUserInformation]; + MewMessageRemoteExtModel *extModel = [[MewMessageRemoteExtModel alloc] init]; + extModel.androidBubbleUrl = userInfo.androidBubbleUrl; + extModel.iosBubbleUrl = userInfo.iosBubbleUrl; + extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel; + NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.mewModel2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]]; + message.remoteExt = remoteExt; + NIMSessionType sessionType = self.mewUserType == MewSendGiftManagerType_Room ? NIMSessionTypeChatroom : NIMSessionTypeP2P; + //构造会话 + NIMSession *session = [NIMSession session:sessionID type:sessionType]; + [[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil]; +} + +#pragma mark - Deal Send Gift Data +- (NSString *)dealSendGiftCount:(MewGiftBottomBarCountModel *)model gift:(MewGiftDataModel *)gift { + NSString * count = @"1"; + if (model.isTotal) { + count = [NSString stringWithFormat:@"%ld", gift.count]; + } else { + count = model.giftNumber; + } + + if (self.mewGiftType == MewSendGiftType_Graffiti) { + count = [NSString stringWithFormat:@"%ld", self.mewDrawPoint.count]; + } + return count; +} + +- (NSString *)dealSendGiftUids:(NSArray *)uids { + NSString *uidString = [[NSString alloc] init]; + for (NSString *item in uids) { + if (uidString.length > 0) { + uidString = [uidString stringByAppendingString:@","]; + } + uidString = [uidString stringByAppendingString:item]; + } + return uidString; +} + +- (MewRoomSendGiftPersonType)dealMewRoomSendGiftPersonType:(MewGiftDataModel *)giftInfo giftCount:(MewGiftBottomBarCountModel*)giftCount { + NSArray * uids = self.mewPersonView.mewChoosePersonList; + MewRoomSendGiftPersonType MewRoomSendGiftPersonType; + if (self.mewPersonView.mewIsChooseAll) { + if (giftInfo.sourceType == MewGiftOriginType_Pack && giftCount.isTotal && giftInfo && uids.count > 1) { + [self mew_showErrorToast:@"只能全部赠送给一人"]; + return -1; + } + MewRoomSendGiftPersonType = MewRoomSendGiftPersonType_AllMic; + } else if(self.mewPersonView.mewChoosePersonList.count > 1) { + if (giftInfo.sourceType == MewGiftOriginType_Pack && giftCount.isTotal) { + [self mew_showErrorToast:@"只能全部赠送给一人"]; + return -1; + } + MewRoomSendGiftPersonType = MewRoomSendGiftPersonType_MutableOnMic; + } else if(self.mewPersonView.mewChoosePersonList.count == 1) { + MewRoomSendGiftPersonType = MewRoomSendGiftPersonType_ToOne; + } else { + MewRoomSendGiftPersonType = -1; + } + return MewRoomSendGiftPersonType; +} + +#pragma mark - Public Method +- (void)mew_setGiftPersonList:(NSArray *)users { + self.mewPersonList = users; + [self.mewPersonView mew_setGiftPersonList:users]; + if (users.count <= 0 || self.mewUserType == MewSendGiftManagerType_Person) { + self.mewPersonView.hidden = YES; + } else { + self.mewPersonView.hidden = NO; + } +} +#pragma mark - MewGiftBottomBarViewDelegate +- (void)mewGiftBottomBarView:(MewGiftBottomBarView *)view clickSendGift:(MewGiftBottomBarCountModel *)count { + ///总礼物 三要素 送礼物的人 送的什么礼物 送多少个礼物 + NSArray * uids = self.mewPersonView.mewChoosePersonList; + if(self.mewBottomBarView.mewType == MewSendGiftType_Privilege){ + XPPrivilegeCardItemModel *cardModel = self.mewGiftDataView.mewLastChoosePrivilege; + if (self.mewUserType == MewSendGiftManagerType_Room) { + if(cardModel.dailyNum.integerValue <= 0){ + [MewHUDTool showErrorWithMessage:@"今天该特权卡赠送次数已用完"]; + return; + } + self.mewBottomBarView.mewSendPrivileBtnEnable = NO; + [self.presenter mew_requestSendPrivilegeCardWithCardId:cardModel.ID mewRoomUid:self.mewRoomUid mewSendUid:[MewAccountInfoStorage instance].mew_getUid mewCardUrl:cardModel.cardUrl]; + } + return; + } + MewGiftDataModel * giftInfo = self.mewGiftDataView.mewLastChooseGift; + if (self.mewUserType == MewSendGiftManagerType_Room) { + if (uids.count > 0) { + ///送礼物的人 + NSString * uidString = [self dealSendGiftUids:uids]; + ///送礼物的个数 + NSString * giftNumber = [self dealSendGiftCount:count gift:giftInfo]; + ///送的什么礼物 + NSString * giftId = [NSString stringWithFormat:@"%ld", giftInfo.giftId]; + ///给麦上的人送礼物 + MewGiftObjType sendType = MewGiftObjType_OnMic; + ///礼物来源 + MewGiftOriginType sourceType = giftInfo.sourceType; + if(sourceType != MewGiftOriginType_Normal && sourceType != MewGiftOriginType_Pack){ + sourceType = _mewGiftType == MewSendGiftType_Pack ? MewGiftOriginType_Pack :MewGiftOriginType_Normal; + } + ///送一个人 还是全麦 还是多人非全麦 + MewRoomSendGiftPersonType roomSendType = [self dealMewRoomSendGiftPersonType:giftInfo giftCount:count]; + if (roomSendType == -1) { + return; + } + self.mewBottomBarView.mewCanEnable = NO; + ///发送消息 + [self.presenter mew_requestSendGiftData:uidString mewGiftNum:giftNumber mewSendType:sendType mewGiftId:giftId mewGiftSource:sourceType mewGiftType:giftInfo.giftType mewRoomSendType:roomSendType mewRoomUid:self.mewRoomUid mewMsg:@""]; + } else { + [self mew_showErrorToast:@"请选择至少一个人"]; + return; + } + } else if(self.mewUserType == MewSendGiftManagerType_Person) { + ///送礼物的人 + NSString * uidString = [self dealSendGiftUids:uids]; + ///送礼物的个数 + NSString * giftNumber = [self dealSendGiftCount:count gift:giftInfo]; + ///送的什么礼物 + NSString * giftId = [NSString stringWithFormat:@"%ld", giftInfo.giftId]; + ///给麦上的人送礼物 + MewGiftObjType sendType = MewGiftObjType_Chat; + ///礼物来源 + MewGiftOriginType sourceType = giftInfo.sourceType; + if(sourceType != MewGiftOriginType_Normal && sourceType != MewGiftOriginType_Pack){ + sourceType = _mewGiftType == MewSendGiftType_Pack ? MewGiftOriginType_Pack :MewGiftOriginType_Normal; + } + ///送一个人 还是全麦 还是多人非全麦 + MewRoomSendGiftPersonType roomSendType = MewRoomSendGiftPersonType_ToOne; + self.mewBottomBarView.mewCanEnable = NO; + [self.presenter mew_requestSendGiftData:uidString mewGiftNum:giftNumber mewSendType:sendType mewGiftId:giftId mewGiftSource:sourceType mewGiftType:giftInfo.giftType mewRoomSendType:roomSendType mewRoomUid:self.mewRoomUid mewMsg:@""]; + } + +} + +///充值 +- (void)mewGiftBottomBarViewClickPay:(MewGiftBottomBarView *)view { + [self dismissViewControllerAnimated:NO completion:^{ + MewRechargeViewController * rechargeVC = [[MewRechargeViewController alloc] init]; + rechargeVC.modalPresentationStyle = UIModalPresentationOverFullScreen; + rechargeVC.mewIsPush = YES; + rechargeVC.mewCurNav = self.delegate.mew_getCurrentNavigationController ? self.delegate.mew_getCurrentNavigationController : [MewStackManager shareManager].mew_getCurrentVC.navigationController; + [[MewStackManager shareManager].mew_getCurrentVC presentViewController:rechargeVC animated:YES completion:nil]; + }]; +} + +- (void)mewGiftBottomBarViewClickFirstPay:(MewGiftBottomBarView *)view { +// [self dismissViewControllerAnimated:NO completion:^{ +// XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController]; +// [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil]; +// }]; + [self dismissViewControllerAnimated:NO completion:^{ + MewRechargeViewController * rechargeVC = [[MewRechargeViewController alloc] init]; + rechargeVC.modalPresentationStyle = UIModalPresentationOverFullScreen; + rechargeVC.mewIsPush = YES; + rechargeVC.mewCurNav = self.delegate.mew_getCurrentNavigationController ? self.delegate.mew_getCurrentNavigationController : [MewStackManager shareManager].mew_getCurrentVC.navigationController; + [[MewStackManager shareManager].mew_getCurrentVC presentViewController:rechargeVC animated:YES completion:nil]; + }]; +} + +#pragma mark - MewGiftWeekFirstPlaceBroadcastViewDelegate +///点击了玩法说明 +- (void)mew_ClickGoodGiftBroadcastViewPlayingMethod { + NSString * giftExplainUrl; + if (self.mewGiftType == MewSendGiftType_Good) { + giftExplainUrl = [NSString stringWithFormat:MewHtmlURLWithType(kLuckyGiftPlayRuleURL), [NSString stringWithFormat:@"%ld", self.mewGiftDataView.mewLastChooseGift.giftId]]; + } else { + giftExplainUrl = self.mewGiftDataView.mewLastChooseGift.giftExplainUrl; + } + MewRoomHalfScreenWebView * webView = [[MewRoomHalfScreenWebView alloc] init]; + webView.mewPath = giftExplainUrl; + [TTPopup popupView:webView style:TTPopupStyleActionSheet]; +} + +#pragma mark - XPGiftWeekStarBroadcastViewDelegate +///点击了周星榜入口 +- (void)mewGiftWeekFirstPlaceBroadcastViewFirstPlaceClick { + [self dismissViewControllerAnimated:NO completion:^{ + MewWebViewController * webVC = [[MewWebViewController alloc] init]; + webVC.mewRoomUid = self.mewRoomUid; + webVC.url = MewHtmlURLWithType(kNewWeekStarURL); + [[MewStackManager shareManager].mew_getCurrentVC.navigationController pushViewController:webVC animated:YES]; + }]; +} + +#pragma mark - MewGiftSlideshowViewDelegate +///点击了贵族 +- (void)mewGiftSlideshowViewClickNoble:(MewGiftSlideshowView *)view { +// [self dismissViewControllerAnimated:NO completion:^{ +// [MewBuryPointManager buryPointWithKey:StatisticsServiceEventvipEntranceGiftClick]; +// XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid]; +// [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobleVC animated:YES]; +// }]; +} +///点击了首充 +- (void)mewGiftSlideshowViewClickFirstPay:(MewGiftSlideshowView *)view { + [self dismissViewControllerAnimated:NO completion:^{ +// XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController]; +// [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil]; + MewRechargeViewController * rechargeVC = [[MewRechargeViewController alloc] init]; + rechargeVC.modalPresentationStyle = UIModalPresentationOverFullScreen; + + rechargeVC.mewCurNav = self.delegate.mew_getCurrentNavigationController ? self.delegate.mew_getCurrentNavigationController : [MewStackManager shareManager].mew_getCurrentVC.navigationController; + rechargeVC.mewIsPush = YES; + [[MewStackManager shareManager].mew_getCurrentVC presentViewController:rechargeVC animated:YES completion:nil]; + }]; + +} +///点击了礼物 +- (void)mewGiftSlideshowViewClickSendGift:(MewGiftSlideshowView *)view { + [self.mewGoodView removeFromSuperview]; + [self.mewGiftDataView mew_setGiftHeadTypeChange:1]; + if (!self.mewDrawView.hidden) {//清空涂鸦礼物 + [self.mewDrawView mew_clearInfo]; + [self.mewDrawView mew_getMoneyAtt]; + [UIView animateWithDuration:0.2 animations:^{ + self.mewDrawView.hidden = YES; + self.mewGiftDataView.hidden = NO; + }]; + } +} +///点击了互动 +- (void)mewGiftSlideshowViewClickInteraction:(MewGiftSlideshowView *)view{ + [self.mewGoodView removeFromSuperview]; + [self.mewGiftDataView mew_setGiftHeadTypeChange:2]; +} + +#pragma mark - MewGiftDataViewDelegate +- (void)mewGiftDataView:(MewGiftDataView *)view didClickGiftType:(MewSendGiftType)type { + self.mewGiftType = type; + self.mewBottomBarView.mewType = type; + self.mewBottomBarView.mewDrawNum = 0; + if (type == MewSendGiftType_Good) { + [self.mewConstellationView removeFromSuperview]; + // self.presenter + if (!self.mewGoodView.superview) { + [self.view addSubview:self.mewGoodView]; + [self.mewGoodView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.mewDetailsView.mas_top); + make.left.right.mas_equalTo(0); + make.height.mas_equalTo(48); + }]; + } + } else if(type == MewSendGiftType_WeekChampion) { + [self.mewGoodView removeFromSuperview]; + if ([MewClientConfig shareConfig].configInfo.twelveStarSwitch) { + self.mewConstellationView.hidden = NO; + if (!self.mewConstellationView.superview) { + [self.view addSubview:self.mewConstellationView]; + [self.mewConstellationView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.mewDetailsView.mas_top); + make.left.right.mas_equalTo(0); + make.height.mas_equalTo(75); + }]; + } + } else { + self.mewConstellationView.hidden = YES; + } + } else { + [self.mewGoodView removeFromSuperview]; + [self.mewConstellationView removeFromSuperview]; + } +} + +- (void)mewGiftDataView:(MewGiftDataView *)view didClickGiftData:(MewGiftDataModel *_Nullable)info type:(MewSendGiftType)type{ + self.mewPersonView.hidden = self.mewPersonView.mewPersonList.count == 0; + + + if (type == MewSendGiftType_Graffiti) { + self.mewGiftDataView.hidden = YES; + self.mewDrawView.hidden = NO; + self.mewDrawView.mewValue = info.goldPrice; + self.mewBottomBarView.mewDrawNum = 0; + self.mewDrawView.mewChooseNum = self.mewPersonView.mewChoosePersonList.count; + [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:info.giftUrl] options:SDWebImageProgressiveLoad progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { + if (error == nil && image) { + self.mewDrawView.mewCurImage = image; + } else { + self.mewGiftDataView.hidden = NO; + } + }]; + } else { + self.mewBottomBarView.mewDrawNum = 10; + } +} +- (void)mewGiftDataView:(MewGiftDataView *)view didClickPrivilegeItem:(XPPrivilegeCardItemModel *_Nullable)cardModel type:(MewSendGiftType)type{ + if(cardModel == nil){ + self.mewPersonView.hidden = YES; + return; + } + self.mewBottomBarView.mewPrivilegeNum = cardModel.dailyNum; + self.mewBottomBarView.mewPrivilegeList = self.mewGiftDataView.mewPrivilegeList; + + + +} +#pragma mark - MewSendGiftPersonViewDelegate +- (void)mewSendGiftPerson:(MewSendGiftPersonView *)view didChooseUsers:(NSArray *)selectUids{ + self.mewDrawView.mewChooseNum = selectUids.count; +} + +#pragma mark - MedDrawGiftViewDelegate +- (void)medDrawGiftView:(MedDrawGiftView *_Nullable)view chooseClose:(UIButton *_Nullable)sender { + [UIView animateWithDuration:0.2 animations:^{ + self.mewDrawView.hidden = YES; + self.mewGiftDataView.hidden = NO; + }]; +} + + + +- (void)medDrawGiftView:(MedDrawGiftView *_Nullable)view chooseDraw:(NSArray *_Nullable)pointArray{ + self.mewDrawPoint = pointArray; + self.mewBottomBarView.mewDrawNum = self.mewDrawPoint.count; +} + +#pragma mark - MewWeekChampionBroadcastViewDelegate +- (void)mewWeekChampionBroadcastView:(MewWeekChampionBroadcastView *)view didClickBtn:(UIButton *)sender { + [self dismissViewControllerAnimated:NO completion:^{ + MewWebViewController * webVC = [[MewWebViewController alloc] init]; + webVC.url = MewHtmlURLWithType(kXinZuoStarURL); + [[MewStackManager shareManager].mew_getCurrentVC.navigationController pushViewController:webVC animated:YES]; + }]; +} + +#pragma mark - MewSendGiftManagerProtocol +- (void)mew_creadUserDataSuccess:(MewUserInfoModel *)userData { + self.mewSlideshowView.mewIsShowFirstPay = userData.isFirstCharge; + self.mewBottomBarView.mewIsShowFirstPay = userData.isFirstCharge; + self.mewGiftDataView.mewPersonNobleLevel = userData.userVipInfoVO.vipLevel; + +} + +- (void)mew_creadUserMoneyData:(MewWalletInfoModel *)moneyData{ + self.mewBottomBarView.mewMoneyModel = moneyData; +} +///背包礼物 +- (void)mew_creadPackGiftArraySuccess:(NSArray *)giftList { + self.mewGiftDataView.mewPackList = giftList; +} + +- (void)mew_creadPacketGiftArrayFail:(NSString *)msg { + self.mewPackNum ++; + if (self.mewPackNum <= 10) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self.presenter mew_requestPackGiftArray]; + }); + } +} + +///普通礼物 /幸运礼物 +- (void)mew_creadNormalGiftArraySuccess:(NSArray *)giftArray { + self.mewGiftDataView.mewNormalList = giftArray; +} + +- (void)mew_creadNormalGiftArrayFail:(NSString *)msg { + self.mewNormalNum ++; + if (self.mewNormalNum <= 10) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self.presenter mew_requestNormalGiftArray:self.mewRoomUid]; + }); + } +} + +- (void)mew_sendGiftDataSuccess:(MewReceiveGiftDataModel *)receiveData originDic:(NSDictionary *)originDic uidNum:(NSInteger)uidNum{ + self.mewBottomBarView.mewCanEnable = YES; + if (receiveData.sourceType == MewGiftOriginType_Pack) { + ///更新个数 + [self.mewGiftDataView mew_setPackOriginData:receiveData numUser:uidNum]; + } else { + [self.presenter mew_requestUserMoneyData]; + } + [self sendCustomMessage:receiveData oringinDic:originDic]; + ///发送涂鸦礼物消息 + [self sendGraffitiGiftMessage]; + if (self.mewGiftType == MewSendGiftType_Graffiti) { + NSString * title = [NSString stringWithFormat:@"发送涂鸦礼物:%@成功",self.mewGiftDataView.mewLastChooseGift.giftName]; + [self mew_showSuccessToast:title]; + [self dismissViewControllerAnimated:YES completion:nil]; + } +} + +///送礼物失败 +- (void)mew_sendGiftDataFailWithCode:(NSInteger)code msg:(NSString *)msg { + self.mewBottomBarView.mewCanEnable = YES; + if (code == 31005) {// 余额不足 + [self showNotSufficientFundsWithToast:msg]; + } else if (code == 8535) {//贵族等级未达到礼物等级 + MewGiftDataModel * giftInfo = self.mewGiftDataView.mewLastChooseGift; + TTAlertConfig *config = [[TTAlertConfig alloc] init]; + config.actionStyle = TTAlertActionConfirmStyle; + config.message = [NSString stringWithFormat:@"尚未达到赠送%@所需要的贵族等级哦\n所需贵族等级:%@", giftInfo.giftName, giftInfo.giftVipInfo.vipName]; + [TTPopup alertWithConfig:config confirmHandler:^{ + + } cancelHandler:^{ + + }]; + } else { + [self mew_showErrorToast:msg]; + } +} + +/// 余额不足,是否弹首充弹窗 +- (void)showNotSufficientFundsWithToast:(NSString *)msg { + if (self.delegate.mew_getUserInformation.isFirstCharge) { + [self dismissViewControllerAnimated:NO completion:^{ +// XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:XCCurrentVCStackManager.shareManager.getCurrentVC.navigationController]; +// [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil]; + MewRechargeViewController * rechargeVC = [[MewRechargeViewController alloc] init]; + rechargeVC.modalPresentationStyle = UIModalPresentationOverFullScreen; + rechargeVC.mewIsPush = YES; + rechargeVC.mewCurNav = self.delegate.mew_getCurrentNavigationController ? self.delegate.mew_getCurrentNavigationController : [MewStackManager shareManager].mew_getCurrentVC.navigationController; + [[MewStackManager shareManager].mew_getCurrentVC presentViewController:rechargeVC animated:YES completion:nil]; + }]; + } else { + [self mew_showErrorToast:msg]; + } +} + + +- (void)mew_getGoodGiftRecordListSuccess:(NSArray *)list { + self.mewGoodList = list; + self.mewGoodView.mewList = list; +} + +- (void)mew_creadWeekChampionDataSuccess:(MewWeekChampionBroadcastModel *)data { + self.mewConstellationView.mewGiftData = data; +} +-(void)mew_getGiftPrivilegeCardSuccess:(NSArray *)list{ + self.mewGiftDataView.mewPrivilegeList = list; +} +- (void)mew_sendPrivilegeCardSuccess:(NSString *)cardUrl{ + self.mewBottomBarView.mewSendPrivileBtnEnable = YES; + [MewHUDTool showSuccessWithMessage:@"赠送成功"]; + if(self.mewBottomBarView.mewPrivilegeNum.integerValue > 0){ + self.mewBottomBarView.mewPrivilegeNum = @(self.mewBottomBarView.mewPrivilegeNum.integerValue - 1).stringValue; + } + + +} +- (void)mew_sendPrivilegeCardFail{ + self.mewBottomBarView.mewSendPrivileBtnEnable = YES; +} +#pragma mark - Event Response +- (void)disMissViewRecognizer:(UITapGestureRecognizer *)tap { + [self dismissViewControllerAnimated:YES completion:nil]; +} + +#pragma mark - Getters And Setters +#pragma mark - Getters And Setters +- (void)setMewUserType:(MewSendGiftManagerType)mewUserType { + _mewUserType = mewUserType; + self.mewBottomBarView.mewUseType = mewUserType; + self.mewGiftDataView.mewPersonType = _mewUserType; + self.mewSlideshowView.hidden = _mewUserType == MewSendGiftManagerType_Person; + self.mewPersonView.hidden = _mewUserType == MewSendGiftManagerType_Person; + self.mewDimBgView.hidden = _mewUserType == MewSendGiftManagerType_Person; + if (_mewUserType == MewSendGiftManagerType_Person) { + self.mewDetailsView.backgroundColor = [UIColor whiteColor]; + self.mewBottomBgView.backgroundColor = [UIColor whiteColor]; + } else { + self.mewDetailsView.backgroundColor = UIColor.clearColor; + self.mewBottomBgView.backgroundColor = [MewThemeColor mewColorWithHexString:@"#161722"]; + } +} + +- (void)setMew_chooseGiftId:(NSString *)mew_chooseGiftId { + _mew_chooseGiftId = mew_chooseGiftId; + self.mewGiftDataView.mewChooseGiftId = mew_chooseGiftId; +} + +- (void)setDelegate:(id)delegate { + _delegate = delegate; + if (_delegate) { + self.mewGiftDataView.mewRoomData = [_delegate mew_getRoomInformation]; + self.mewGiftDataView.mewRoomPersonType = _delegate.mew_getRoomInformation.type; + + } +} + +- (UIView *)mewHeadView { + if (!_mewHeadView) { + _mewHeadView = [[UIView alloc] init]; + _mewHeadView.backgroundColor = [UIColor clearColor]; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(disMissViewRecognizer:)]; + [_mewHeadView addGestureRecognizer:tap]; + } + return _mewHeadView; +} + +- (UIView *)mewDetailsView { + if (!_mewDetailsView) { + _mewDetailsView = [[UIView alloc] init]; + UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, KScreenHeight) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)]; + CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; + maskLayer.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight); + maskLayer.path = maskPath.CGPath; + _mewDetailsView.layer.mask = maskLayer; + + } + return _mewDetailsView; +} + +- (MewSendGiftPersonView *)mewPersonView { + if (!_mewPersonView) { + _mewPersonView = [[MewSendGiftPersonView alloc] init]; + _mewPersonView.delegate = self; + } + return _mewPersonView; +} + +- (MewGiftDataView *)mewGiftDataView { + if (!_mewGiftDataView) { + _mewGiftDataView = [[MewGiftDataView alloc] init]; + _mewGiftDataView.delegate = self; + } + return _mewGiftDataView; +} + +- (MewGiftBottomBarView *)mewBottomBarView { + if (!_mewBottomBarView) { + _mewBottomBarView = [[MewGiftBottomBarView alloc] init]; + _mewBottomBarView.delegate = self; + } + return _mewBottomBarView; +} + +- (UIStackView *)mewContainerView { + if (!_mewContainerView) { + _mewContainerView = [[UIStackView alloc] init]; + _mewContainerView.axis = UILayoutConstraintAxisVertical; + _mewContainerView.distribution = UIStackViewDistributionFill; + _mewContainerView.alignment = UIStackViewAlignmentFill; + _mewContainerView.spacing = 0; + _mewContainerView.backgroundColor = [UIColor clearColor]; + } + return _mewContainerView; +} + +- (UIView *)mewBottomBgView { + if (!_mewBottomBgView) { + _mewBottomBgView = [[UIView alloc] init]; + _mewBottomBgView.backgroundColor = [UIColor clearColor]; + } + return _mewBottomBgView; +} + +- (MedDrawGiftView *)mewDrawView { + if (!_mewDrawView) { + _mewDrawView = [[MedDrawGiftView alloc] init]; + _mewDrawView.hidden = YES; + _mewDrawView.delegate = self; + } + return _mewDrawView; +} + +- (MewGiftSlideshowView *)mewSlideshowView { + if (!_mewSlideshowView) { + _mewSlideshowView = [[MewGiftSlideshowView alloc] init]; + _mewSlideshowView.delegate = self; + } + return _mewSlideshowView; +} + +- (MewGoodGiftBroadcastView *)mewGoodView { + if (!_mewGoodView) { + _mewGoodView = [[MewGoodGiftBroadcastView alloc] init]; + _mewGoodView.delegate = self; + } + return _mewGoodView; +} + +- (MewWeekChampionBroadcastView *)mewConstellationView { + if (!_mewConstellationView) { + _mewConstellationView = [[MewWeekChampionBroadcastView alloc] init]; + _mewConstellationView.delegate = self; + } + return _mewConstellationView; +} + +- (UIVisualEffectView*)mewDimBgView { + if (!_mewDimBgView) { + UIBlurEffect *beffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; + _mewDimBgView = [[UIVisualEffectView alloc] initWithEffect:beffect]; + _mewDimBgView.hidden = YES; + } + return _mewDimBgView; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MedDrawGiftView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MedDrawGiftView.h new file mode 100644 index 0000000..db5ab30 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MedDrawGiftView.h @@ -0,0 +1,35 @@ +// +// MedDrawGiftView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import +@class MedDrawGiftView; +@protocol MedDrawGiftViewDelegate + +///点击了关闭 +- (void)medDrawGiftView:(MedDrawGiftView *_Nullable)view chooseClose:(UIButton *_Nullable)sender; +///绘画完成了 +- (void)medDrawGiftView:(MedDrawGiftView *_Nullable)view chooseDraw:(NSArray *_Nullable)pointArray; +@end + +NS_ASSUME_NONNULL_BEGIN +//XPGraffitiGiftView +@interface MedDrawGiftView : UIView +@property (nonatomic,strong) UIImage *mewCurImage; +///代理 +@property (nonatomic,weak) id delegate; +///价格 +@property (nonatomic,assign) double mewValue; +///动画的数据 +@property (nonatomic,strong) NSArray *mewAnimationList; +///选择的用户个数 +@property (nonatomic,assign) NSInteger mewChooseNum; + +- (void)mew_clearInfo; +- (void)mew_getMoneyAtt; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MedDrawGiftView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MedDrawGiftView.m new file mode 100644 index 0000000..186745e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MedDrawGiftView.m @@ -0,0 +1,402 @@ +// +// MedDrawGiftView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MedDrawGiftView.h" +@interface MedDrawGiftView () +///回话的内容 +@property (nonatomic,strong) UIView * mewTextView; +///绘画的view +@property (nonatomic,strong) UIView * mewDrawingView; +///类型 +@property (nonatomic,strong) UIStackView *mewHintView; +///✋🏻 +@property (nonatomic,strong) UIImageView *mewHandIcon; +///提醒 +@property (nonatomic,strong) UILabel *mewHintLabel; +///mewBgView +@property (nonatomic,strong) UIView * mewBgView; +///至少花多少个 +@property (nonatomic,strong) UILabel *mewTitleView; +///类型 +@property (nonatomic,strong) UIStackView *mewBgContainerView; +///撤销 +@property (nonatomic,strong) UIButton *mewCancelBtn; +///删除 +@property (nonatomic,strong) UIButton *mewDelBtn; +///关闭 +@property (nonatomic,strong) UIButton *mewCloseBtn; +///手指滑动的point +@property (nonatomic,assign) CGPoint mewTapPoint; +///开始的point +@property (nonatomic,assign) CGPoint mewStartPoint; +///两个涂鸦的间距 +@property (nonatomic,assign) CGFloat mewDistance; + +///是否展示超过最大值的 +@property (nonatomic,assign) BOOL mewIsMax; +@property (nonatomic,strong) NSMutableArray *mewImageList; +@property (nonatomic,strong) NSMutableArray *mewIndexList; +@property (nonatomic,strong) NSMutableArray *> *mewPointList; +@end +@implementation MedDrawGiftView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI{ + self.mewIsMax = YES; + self.mewDistance = 10; + UIPanGestureRecognizer * panGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mew_setTapAction:)]; + [self addGestureRecognizer:panGes]; + self.backgroundColor = [UIColor clearColor]; + [self addSubview:self.mewTextView]; + + [self.mewTextView addSubview:self.mewHintView]; + [self.mewTextView addSubview:self.mewDrawingView]; + [self.mewTextView addSubview:self.mewBgView]; + + [self.mewHintView addArrangedSubview:self.mewHandIcon]; + [self.mewHintView addArrangedSubview:self.mewHintLabel]; + + [self.mewBgView addSubview:self.mewTitleView]; + [self.mewBgView addSubview:self.mewBgContainerView]; + + [self.mewBgContainerView addArrangedSubview:self.mewCancelBtn]; + [self.mewBgContainerView addArrangedSubview:self.mewDelBtn]; + [self.mewBgContainerView addArrangedSubview:self.mewCloseBtn]; +} + +- (void)mew_setUIConstraints { + CGFloat avatarHeight = (43 + 15 * 2); + CGFloat bottomHeight = (45); + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(KScreenWidth); + make.height.mas_equalTo(KScreenHeight - avatarHeight - bottomHeight); + }]; + + [self.mewTextView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self); + }]; + + + [self.mewHintView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.mewTextView); + make.width.mas_equalTo(KScreenWidth); + }]; + + [self.mewDrawingView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewTextView).offset(kSafeAreaTopHeight); + make.left.right.mas_equalTo(self.mewTextView); + make.bottom.mas_equalTo(self.mewBgView.mas_top); + }]; + + [self.mewHandIcon mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(78, 93)); + }]; + + + [self.mewBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.left.right.mas_equalTo(self.mewTextView); + make.height.mas_equalTo(56); + }]; + + [self.mewTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewBgView).offset(15); + make.centerY.mas_equalTo(self.mewBgView); + }]; + + [self.mewBgContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.mewBgView).offset(-15); + make.height.mas_equalTo(22); + make.centerY.mas_equalTo(self.mewBgView); + }]; + + [self.mewCancelBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(22); + }]; + + [self.mewDelBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(22); + }]; + + [self.mewCloseBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(22); + }]; +} + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { + self.mewHintView.hidden = YES; + UITouch *touch = touches.anyObject; + CGPoint point = [touch locationInView:self.mewTextView]; + self.mewStartPoint = point; +} + +- (void)mew_setTapAction:(UIPanGestureRecognizer *)tap { + if (self.mewPointList.count >= 300) { + if (self.mewIsMax) { + [MewHUDTool showErrorWithMessage:@"最多只能画300个呦"]; + self.mewIsMax = YES; + } + return; + } + + if (tap.state == UIGestureRecognizerStateBegan) { + [self.mewIndexList addObject:[NSNumber numberWithInteger:self.mewImageList.count]]; + } else if(tap.state == UIGestureRecognizerStateEnded) { + self.mewIsMax = YES; + } + CGPoint point = [tap translationInView:self.mewTextView]; + CGFloat dx = [self mew_getMineNum:point.x - self.mewTapPoint.x]; + CGFloat dy = [self mew_getMineNum:point.y - self.mewTapPoint.y]; + CGPoint drawPoint = CGPointMake(self.mewStartPoint.x + point.x , self.mewStartPoint.y + point.y); + if ((dx * dx + dy * dy) > 2 * self.mewDistance * self.mewDistance) { + [self mew_setSubViewPoint:drawPoint]; + self.mewTapPoint = point; + } +} + +- (int)mew_getMineNum:(int)num { + if (num >= 0) { + return num; + } + return -num; +} + + +- (void)mew_setSubViewPoint:(CGPoint)point { + UIImageView * imageView = [[UIImageView alloc] init]; + imageView.contentMode = UIViewContentModeScaleAspectFill; + imageView.layer.masksToBounds = YES; + imageView.image = self.mewCurImage; + imageView.frame = CGRectMake(point.x, point.y, 20, 20); + [self.mewDrawingView addSubview:imageView]; + [self.mewImageList addObject:imageView]; + [self.mewPointList addObject:@[@([self mew_setPointWidthDraw:point.x]), @([self mew_setHeightDraw:point.y])]]; + [self mew_getMoneyAtt]; + if (self.mewPointList.count >= 10 && self.delegate && [self.delegate respondsToSelector:@selector(medDrawGiftView:chooseDraw:)]) { + [self.delegate medDrawGiftView:self chooseDraw:self.mewPointList]; + } +} + +- (NSInteger)mew_setPointWidthDraw:(CGFloat)number { + return number / KScreenWidth * 1000; +} + +- (NSInteger)mew_setHeightDraw:(CGFloat)number { + return number / KScreenHeight * 1000; +} + +- (void)mew_clearInfo { + [self.mewImageList makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [self.mewImageList removeAllObjects]; + [self.mewPointList removeAllObjects]; + [self.mewIndexList removeAllObjects]; +} +#pragma mark - Event Response + +- (void)mewCancelBtnAction:(UIButton *)sender { + NSInteger index = [self.mewIndexList lastObject].integerValue; + if (index < self.mewImageList.count) { + NSArray * array = [self.mewImageList subarrayWithRange:NSMakeRange(index, self.mewImageList.count - index)]; + NSArray * array2 = [self.mewPointList subarrayWithRange:NSMakeRange(index, self.mewPointList.count - index)]; + [self.mewPointList removeObjectsInArray:array2]; + [self.mewImageList removeObjectsInArray:array]; + if (array.count) { + [array makeObjectsPerformSelector:@selector(removeFromSuperview)]; + } + if (self.mewIndexList.count > 0) { + [self.mewIndexList removeLastObject]; + } + [self mew_getMoneyAtt]; + if (self.delegate && [self.delegate respondsToSelector:@selector(medDrawGiftView:chooseDraw:)]) { + [self.delegate medDrawGiftView:self chooseDraw:self.mewPointList]; + } + } +} + +- (void)mewDelBtnAction:(UIButton *)sender { + [self mew_clearInfo]; + [self mew_getMoneyAtt]; + if (self.delegate && [self.delegate respondsToSelector:@selector(medDrawGiftView:chooseDraw:)]) { + [self.delegate medDrawGiftView:self chooseDraw:self.mewPointList]; + } +} + +- (void)mewCloseBtnAction:(UIButton *)sender { + [self mew_clearInfo]; + [self mew_getMoneyAtt]; + if (self.delegate && [self.delegate respondsToSelector:@selector(medDrawGiftView:chooseDraw:)]) { + [self.delegate medDrawGiftView:self chooseDraw:self.mewPointList]; + } + + if (self.delegate && [self.delegate respondsToSelector:@selector(medDrawGiftView:chooseClose:)]) { + [self.delegate medDrawGiftView:self chooseClose:sender]; + } +} + +- (void)mew_getMoneyAtt { + if (self.mewImageList.count < 10) { + NSString * title = @"至少画10个才能送出"; + NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:[UIColor whiteColor]}]; + self.mewTitleView.attributedText = attribute; + } else { + NSInteger number = self.mewChooseNum > 0 ? self.mewChooseNum : 0; + NSString * count = [NSString stringWithFormat:@"%ld", self.mewImageList.count]; + NSString * price = [NSString stringWithFormat:@"%.0f", self.mewImageList.count * self.mewValue * number]; + NSString * title = [NSString stringWithFormat:@"已画%@个,需花费%@钻石", count, price]; + NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:[UIColor whiteColor]}]; + [attribute addAttribute:NSForegroundColorAttributeName value:[MewThemeColor mewAppMainColor] range:[title rangeOfString:count]]; + [attribute addAttribute:NSForegroundColorAttributeName value:[MewThemeColor mewAppMainColor] range:[title rangeOfString:price]]; + self.mewTitleView.attributedText = attribute; + } + +} + +#pragma mark - Getters And Setters +- (void)setMewChooseNum:(NSInteger)mewChooseNum { + _mewChooseNum = mewChooseNum; + [self mew_getMoneyAtt]; +} + +- (UIView *)mewTextView { + if (!_mewTextView) { + _mewTextView = [[UIView alloc] init]; + _mewTextView.backgroundColor = UIColorMewRGBAlpha(0x000000, 0.7); + } + return _mewTextView; +} + +- (UIView *)mewDrawingView { + if (!_mewDrawingView) { + _mewDrawingView = [[UIView alloc] init]; + _mewDrawingView.backgroundColor = [UIColor clearColor]; + _mewDrawingView.layer.masksToBounds = YES; + } + return _mewDrawingView; +} + +- (UIStackView *)mewHintView { + if (!_mewHintView) { + _mewHintView = [[UIStackView alloc] init]; + _mewHintView.axis = UILayoutConstraintAxisVertical; + _mewHintView.distribution = UIStackViewDistributionFill; + _mewHintView.alignment = UIStackViewAlignmentCenter; + _mewHintView.spacing = 17; + } + return _mewHintView; +} + +- (UIImageView *)mewHandIcon { + if (!_mewHandIcon) { + _mewHandIcon = [[UIImageView alloc] init]; + _mewHandIcon.userInteractionEnabled = YES; + _mewHandIcon.image = [UIImage imageNamed:@"mew_room_gift_draw_hand"]; + } + return _mewHandIcon; +} + +- (UILabel *)mewHintLabel { + if (!_mewHintLabel) { + _mewHintLabel = [[UILabel alloc] init]; + _mewHintLabel.font = [UIFont systemFontOfSize:14]; + _mewHintLabel.textColor = [MewThemeColor mewThreeTextColor]; + _mewHintLabel.text = @"滑动手指,绘制图形"; + } + return _mewHintLabel; +} + +- (UIView *)mewBgView { + if (!_mewBgView) { + _mewBgView = [[UIView alloc] init]; + _mewBgView.backgroundColor = UIColorMewRGBAlpha(0xFFFFFF, 0.2); + CAShapeLayer * layer = [CAShapeLayer layer]; + layer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 56) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)].CGPath; + _mewBgView.layer.mask = layer; + } + return _mewBgView; +} + +- (UILabel *)mewTitleView { + if (!_mewTitleView) { + _mewTitleView = [[UILabel alloc] init]; + _mewTitleView.font = [UIFont systemFontOfSize:14]; + _mewTitleView.textColor = [UIColor whiteColor]; + _mewTitleView.text = @"至少画10个才能送出"; + } + return _mewTitleView; +} + +- (UIStackView *)mewBgContainerView { + if (!_mewBgContainerView) { + _mewBgContainerView = [[UIStackView alloc] init]; + _mewBgContainerView.axis = UILayoutConstraintAxisHorizontal; + _mewBgContainerView.distribution = UIStackViewDistributionFill; + _mewBgContainerView.alignment = UIStackViewAlignmentCenter; + _mewBgContainerView.spacing = 12; + } + return _mewBgContainerView; +} + +- (UIButton *)mewCancelBtn { + if (!_mewCancelBtn) { + _mewCancelBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewCancelBtn setImage:[UIImage imageNamed:@"mew_room_gift_draw_repeal"] forState:UIControlStateNormal]; + [_mewCancelBtn setImage:[UIImage imageNamed:@"mew_room_gift_draw_repeal"] forState:UIControlStateSelected]; + [_mewCancelBtn addTarget:self action:@selector(mewCancelBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewCancelBtn; +} + +- (UIButton *)mewDelBtn { + if (!_mewDelBtn) { + _mewDelBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewDelBtn setImage:[UIImage imageNamed:@"mew_room_gift_draw_delete"] forState:UIControlStateNormal]; + [_mewDelBtn setImage:[UIImage imageNamed:@"mew_room_gift_draw_delete"] forState:UIControlStateSelected]; + [_mewDelBtn addTarget:self action:@selector(mewDelBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewDelBtn; +} + +- (UIButton *)mewCloseBtn { + if (!_mewCloseBtn) { + _mewCloseBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewCloseBtn setImage:[UIImage imageNamed:@"mew_room_gift_draw_close"] forState:UIControlStateNormal]; + [_mewCloseBtn setImage:[UIImage imageNamed:@"mew_room_gift_draw_close"] forState:UIControlStateSelected]; + [_mewCloseBtn addTarget:self action:@selector(mewCloseBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewCloseBtn; +} + +- (NSMutableArray *)mewIndexList { + if (!_mewIndexList) { + _mewIndexList = [NSMutableArray array]; + } + return _mewIndexList; +} + +- (NSMutableArray *)mewPointList { + if (!_mewPointList) { + _mewPointList = [NSMutableArray array]; + } + return _mewPointList; +} + +- (NSMutableArray *)mewImageList { + if (!_mewImageList) { + _mewImageList = [NSMutableArray array]; + } + return _mewImageList; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftBottomBarView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftBottomBarView.h new file mode 100644 index 0000000..78733ac --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftBottomBarView.h @@ -0,0 +1,51 @@ +// +// MewGiftBottomBarView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import +#import "MewGiftBottomBarCountModel.h" +#import "MewWalletInfoModel.h" +#import "XPPrivilegeCardItemModel.h" +@class MewGiftBottomBarView; +NS_ASSUME_NONNULL_BEGIN +//XPGiftBarView +@protocol MewGiftBottomBarViewDelegate +///点击了充值的 +- (void)mewGiftBottomBarViewClickPay:(MewGiftBottomBarView *)view;; +///点击了送礼物的的 +- (void)mewGiftBottomBarView:(MewGiftBottomBarView *)view clickSendGift:(MewGiftBottomBarCountModel *)count; +///点击了首充 +- (void)mewGiftBottomBarViewClickFirstPay:(MewGiftBottomBarView *)view;; +@end + + +@interface MewGiftBottomBarView : UIView +///使用的地方 +@property (nonatomic,assign) MewSendGiftManagerType mewUseType; +///涂鸦礼物的个数 +@property (nonatomic,assign) NSInteger mewDrawNum; +///特权卡次数 +@property(nonatomic,copy) NSString *mewPrivilegeNum; +///特权卡 +@property(nonatomic,copy) NSArray* mewPrivilegeList; +///代理 +@property (nonatomic,weak) id delegate; +///不同的tabbar +@property (nonatomic,assign) MewSendGiftType mewType; + +///更新礼物个数 +@property (nonatomic,strong) MewGiftBottomBarCountModel *mewCountModel; +///钱包信息 +@property (nonatomic,strong) MewWalletInfoModel *mewMoneyModel; +///是否展示首充 +@property (nonatomic,assign) BOOL mewIsShowFirstPay; +///是否可用 +@property (nonatomic,assign) BOOL mewCanEnable; +///特友赠送是否可用 +@property (nonatomic,assign) BOOL mewSendPrivileBtnEnable; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftBottomBarView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftBottomBarView.m new file mode 100644 index 0000000..9972d78 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftBottomBarView.m @@ -0,0 +1,586 @@ +// +// MewGiftBottomBarView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewGiftBottomBarView.h" +#import "MewGiftNumView.h" +#import "XPPrivilegeCardConfirmView.h" +@interface MewGiftBottomBarView () +///充值的背景 +@property (nonatomic,strong) UIView *mewPayBgView; +@property (nonatomic,strong) UIStackView *mewPayContainerView; +///余额 +@property (nonatomic,strong) UILabel *mewMoneyView; +///💎 +@property (nonatomic,strong) UIImageView *mewDiamondIcon; +///去充值 +@property (nonatomic,strong) UIImageView *mewPayIcon; +//赠送 +@property (nonatomic,strong) UIStackView *mewSendBtn; +///个数 +@property (nonatomic,strong) UILabel *mewNumView; +///箭头 +@property (nonatomic,strong) UIButton *mewArrowBtn; +///赠送 +@property (nonatomic,strong) UIButton *mewSendGiftBtn; +///自定义个数 +@property (nonatomic,strong) UIView *mewCustomNumView; +//输入框 +@property (nonatomic, strong) UITextField *mewEditView; +//发送按钮 +@property (nonatomic, strong) UIButton *mewSureBtn; +///送礼物的个数 +@property (nonatomic,strong) MewGiftNumView *mewGiftNumView; + +///特权数量 +@property(nonatomic,strong) UILabel *mewPrivilegeNumView; + +///特权赠送 +@property(nonatomic,strong) UIButton *mewSendPrivilegeBtn; +@end +@implementation MewGiftBottomBarView + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + [self mew_setNot]; + [self mew_setUIEvents]; + } + return self; +} +#pragma mark - Response +- (void)mew_sendHandle:(UIButton *)sender { + if (self.mewType == MewSendGiftType_Graffiti && self.mewDrawNum < 10) { + return; + } + if(self.mewType == MewSendGiftType_Privilege && self.mewPrivilegeList.count == 0){ + XPPrivilegeCardConfirmView *confirmView = [[XPPrivilegeCardConfirmView alloc]initInstructionsWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + + [TTPopup popupView:confirmView style:TTPopupStyleAlert]; + return; + } + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftBottomBarView:clickSendGift:)]) { + [self.delegate mewGiftBottomBarView:self clickSendGift:self.mewCountModel]; + } +} + +- (void)didClickPay:(UITapGestureRecognizer *)tap { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftBottomBarViewClickPay:)]) { + [self.delegate mewGiftBottomBarViewClickPay:self]; + } +} + +- (void)mewArrowBtnAction:(UIButton *)sender { + if (![[self.superview.superview subviews] containsObject:self.mewGiftNumView]) { + [self.superview.superview addSubview:self.mewGiftNumView]; + + [self.mewGiftNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-15); + make.bottom.mas_equalTo(self.superview.superview.mas_bottom).offset(-45 -kSafeAreaBottomHeight); + make.width.mas_equalTo(135); + }]; + } + [self mew_setNumStatus]; + if (self.mewArrowBtn.isSelected) { + self.mewArrowBtn.transform = CGAffineTransformMakeRotation(M_PI); + } else { + self.mewArrowBtn.transform = CGAffineTransformIdentity;; + } +} + +- (void)mewSureBtnAction:(UIButton *)sender { + NSString *countStr = [self.mewEditView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + if (countStr.integerValue == 0) { + countStr = @"1"; + } + [self.mewEditView resignFirstResponder]; + self.mewEditView.text = @""; + self.mewCountModel.giftNumber = countStr; + self.mewNumView.text = countStr; +} + +- (void)mew_ClickFirstPayAction:(UIButton *)sender{ + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftBottomBarViewClickFirstPay:)]) { + [self.delegate mewGiftBottomBarViewClickFirstPay:self]; + } +} + +#pragma mark - Private Method +- (void)mew_setUI { + self.backgroundColor= [UIColor clearColor]; + [self addSubview:self.mewPayBgView]; + [self addSubview:self.mewSendBtn]; + + [self.mewPayBgView addSubview:self.mewPayContainerView]; + + [self.mewPayContainerView addArrangedSubview:self.mewDiamondIcon]; + [self.mewPayContainerView addArrangedSubview:self.mewMoneyView]; + [self.mewPayContainerView addArrangedSubview:self.mewPayIcon]; + + [self.mewSendBtn addArrangedSubview:self.mewNumView]; + [self.mewSendBtn addArrangedSubview:self.mewArrowBtn]; + [self.mewSendBtn addArrangedSubview:self.mewSendGiftBtn]; + + + [self.mewCustomNumView addSubview:self.mewEditView]; + [self.mewCustomNumView addSubview:self.mewSureBtn]; + + [self addSubview:self.mewPrivilegeNumView]; + [self addSubview:self.mewSendPrivilegeBtn]; +} + +- (void)mew_setUIConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(45); + }]; + [self.mewSendPrivilegeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-14); + make.width.mas_equalTo(60); + make.height.mas_equalTo(28); + make.bottom.mas_equalTo(-8.5); + }]; + [self.mewPrivilegeNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(14); + make.centerY.equalTo(self.mewSendPrivilegeBtn); + }]; + [self.mewPayBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self).offset(15); + make.height.mas_equalTo(32); + make.right.mas_equalTo(self.mewPayContainerView.mas_right).offset(9); + make.centerY.mas_equalTo(self.mewSendGiftBtn); + }]; + + [self.mewPayContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.bottom.mas_equalTo(self.mewPayBgView); + make.left.mas_equalTo(self.mewPayBgView).offset(9); + }]; + + [self.mewDiamondIcon mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(14, 14)); + }]; + + [self.mewPayIcon mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(15, 15)); + }]; + + [self.mewSendBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self).offset(-15); + make.top.mas_equalTo(11); + make.height.mas_equalTo(32); + }]; + + [self.mewNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(40); + make.height.mas_equalTo(30); + }]; + + + [self.mewArrowBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(30, 30)); + }]; + + [self.mewSendGiftBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(60, 30)); + }]; + + + [self.mewEditView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewCustomNumView).offset(15); + make.right.mas_equalTo(self.mewSureBtn.mas_left).offset(-10); + make.top.bottom.mas_equalTo(self.mewCustomNumView); + }]; + + [self.mewSureBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(30); + make.width.mas_equalTo(@50); + make.centerY.mas_equalTo(self.mewCustomNumView); + make.right.mas_equalTo(self.mewCustomNumView).offset(-15); + }]; +} + +- (void)mew_setUIEvents { + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didClickPay:)]; + [self.mewPayContainerView addGestureRecognizer:tap]; +} + +- (void)keyboardWillShow:(NSNotification *)notification { + CGRect keyboardRect = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; + CGFloat height = CGRectGetMinY(keyboardRect) - KScreenHeight; + if (height < 0) { + [UIView animateWithDuration:0.25 animations:^{ + CGRect rect = self.mewCustomNumView.superview.superview.superview.frame; + rect.origin.y = height; + self.mewCustomNumView.superview.superview.superview.frame = rect; + }]; + } +} +- (void)setMewPrivilegeNum:(NSString *)mewPrivilegeNum{ + _mewPrivilegeNum = mewPrivilegeNum; + NSMutableAttributedString *countAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"今日剩余赠送次数:%@次",_mewPrivilegeNum] attributes:@{NSFontAttributeName:kFontRegular(12),NSForegroundColorAttributeName:[UIColor whiteColor]}]; + [countAtt addAttributes:@{NSFontAttributeName:kFontMedium(12),NSForegroundColorAttributeName:UIColorMewFromRGB(0xFFDA24)} range:[countAtt.string rangeOfString:_mewPrivilegeNum]]; + _mewPrivilegeNumView.attributedText = countAtt; +} + +//键盘隐藏 +- (void)keyboardWillHidden:(NSNotification *)notification { + [UIView animateWithDuration:0.25 animations:^{ + CGRect rect = self.mewCustomNumView.superview.superview.superview.frame; + rect.origin.y = 0; + self.mewCustomNumView.superview.superview.superview.frame = rect; + }]; + self.mewCustomNumView.hidden = YES; + self.mewEditView.text = @""; +} + +- (void)mew_setNot { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHidden:) name:UIKeyboardWillHideNotification object:nil]; +} + +- (void)mew_setNumStatus { + self.mewArrowBtn.selected = !self.mewArrowBtn.selected; + self.mewGiftNumView.hidden = !self.mewArrowBtn.selected; +} + +#pragma mark - MewGiftNumViewDelegate +- (void)mewGiftNumView:(MewGiftNumView *)view chooseItem:(MewGiftBottomBarCountModel *)model { + self.mewArrowBtn.selected = NO; + self.mewGiftNumView.hidden= YES; + self.mewCountModel = model; + if (model.isCustomCount) { + if (![[self.superview.superview subviews] containsObject:self.mewCustomNumView]) { + [self.superview.superview addSubview:self.mewCustomNumView]; + + [self.mewCustomNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.superview.superview); + make.height.mas_equalTo(40); + }]; + } + self.mewCustomNumView.hidden = NO; + [self.mewEditView becomeFirstResponder]; + } +} + +#pragma mark - UITextFieldDelegate +- (BOOL)textFieldShouldReturn:(UITextField *)textField { + NSString *countStr = [self.mewEditView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + NSInteger count = [countStr integerValue]; + if (count > 9999) { + return NO; + } + [self.mewEditView resignFirstResponder]; + self.mewEditView.text = @""; + self.mewCountModel.giftNumber = textField.text; + return YES; +} + +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { + NSString *regex =@"[0-9]*"; + NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex]; + if ([pred evaluateWithObject:string]) { + return YES; + } + return NO; +} +#pragma mark - Getters And Setters +- (void)setMewUseType:(MewSendGiftManagerType)mewUseType{ + _mewUseType = mewUseType; + if (_mewUseType == MewSendGiftManagerType_Person) { + self.mewNumView.textColor = [MewThemeColor mewMainTextColor]; + [self.mewArrowBtn setImage:[UIImage imageNamed:@"mew_room_gift_bar_white_num_arrow"] forState:UIControlStateNormal]; + self.mewPayBgView.backgroundColor = UIColorMewRGBAlpha(0xFFE710, 0.3); + self.mewPayIcon.image = [UIImage imageNamed:@"mew_room_gift_bar_pay_white_arrow"]; + self.backgroundColor = [MewThemeColor mewColorWithHexString:@"#FFFFFF"]; + self.mewMoneyView.textColor = [MewThemeColor mewColorWithHexString:@"#282828"]; + } else { + self.mewNumView.textColor = [MewThemeColor mewGiftCountTitleColor]; + [self.mewArrowBtn setImage:[UIImage imageNamed:@"mew_room_gift_bar_num_arrow"] forState:UIControlStateNormal]; + self.mewPayBgView.backgroundColor = [MewThemeColor mewColorWithHexString:@"#000000"]; + self.mewPayIcon.image = [UIImage imageNamed:@"mew_room_gift_bar_arrow"]; + self.backgroundColor = [UIColor clearColor]; + self.mewMoneyView.textColor = [MewThemeColor mewColorWithHexString:@"#FFFFFF"]; + } +} + + +- (void)setmewDrawNum:(NSInteger)mewDrawNum { + _mewDrawNum = mewDrawNum; + if (_mewDrawNum >= 10) { + self.mewSendGiftBtn.selected = NO; + self.mewSendBtn.layer.borderWidth = 1; + self.mewSendBtn.layer.borderColor = [MewThemeColor mewAppMainColor].CGColor; + } else { + self.mewSendGiftBtn.selected = YES; + self.mewSendBtn.layer.borderWidth = 1; + self.mewSendBtn.layer.borderColor = [MewThemeColor mewDisableButtonColor].CGColor; + } +} +- (void)setMewCanEnable:(BOOL)mewCanEnable{ + _mewCanEnable = mewCanEnable; + [UIView animateWithDuration:0.3 animations:^{ + self.mewSendGiftBtn.enabled = self.mewCanEnable; + }]; +} + +- (void)setMewSendPrivileBtnEnable:(BOOL)mewSendPrivileBtnEnable{ + _mewSendPrivileBtnEnable = mewSendPrivileBtnEnable; + [UIView animateWithDuration:0.3 animations:^{ + self.mewSendPrivilegeBtn.enabled = self.mewSendPrivileBtnEnable; + }]; +} +-(void)setmewPrivilegeList:(NSArray *)mewPrivilegeList{ + _mewPrivilegeList = mewPrivilegeList; + if(_mewPrivilegeList.count == 0){ + [_mewSendPrivilegeBtn setTitle:@"说明" forState:UIControlStateNormal]; + [_mewSendPrivilegeBtn setTitle:@"说明" forState:UIControlStateDisabled]; + self.mewSendPrivilegeBtn.enabled = YES; + self.mewPrivilegeNumView.hidden = YES; + }else{ + [_mewSendPrivilegeBtn setTitle:@"赠送" forState:UIControlStateNormal]; + [_mewSendPrivilegeBtn setTitle:@"赠送中..." forState:UIControlStateDisabled]; + self.mewPrivilegeNumView.hidden = NO; + + } +} +-(void)setMewType:(MewSendGiftType)mewType{ + _mewType = mewType; + if(self.mewType == MewSendGiftType_Privilege){ + if(self.mewPrivilegeList.count > 0 ){ + self.mewPrivilegeNumView.hidden = NO; + } + self.mewSendPrivilegeBtn.hidden = NO; + self.mewPayBgView.hidden = YES; + self.mewSendBtn.hidden = YES; + self.mewGiftNumView.type = mewType; + return; + }else{ + self.mewPrivilegeNumView.hidden = YES; + self.mewSendPrivilegeBtn.hidden = YES; + self.mewPayBgView.hidden = NO; + self.mewSendBtn.hidden = NO; + } + + if (!self.mewGiftNumView.hidden) { + self.mewGiftNumView.hidden = YES; + self.mewArrowBtn.selected = NO; + } else { + if (_mewType == MewSendGiftType_Graffiti) { + self.mewNumView.hidden = YES; + self.mewArrowBtn.hidden = YES; + } else { + self.mewNumView.hidden = NO; + self.mewArrowBtn.hidden = NO; + } + } + self.mewGiftNumView.type = mewType; +} + + + +- (void)setMewCountModel:(MewGiftBottomBarCountModel *)mewCountModel { + _mewCountModel = mewCountModel; + self.mewArrowBtn.selected = NO; + if (_mewCountModel) { + self.mewNumView.text = _mewCountModel.giftNumber; + } +} +-(void)setMewMoneyModel:(MewWalletInfoModel *)mewMoneyModel{ + _mewMoneyModel = mewMoneyModel; + if (_mewMoneyModel) { + NSString * diamonds = _mewMoneyModel.diamonds; + self.mewMoneyView.text = diamonds; + } +} + + +- (UIView *)mewPayBgView { + if (!_mewPayBgView) { + _mewPayBgView = [[UIView alloc] init]; + _mewPayBgView.backgroundColor = [UIColor clearColor]; + _mewPayBgView.layer.masksToBounds= YES; + _mewPayBgView.layer.cornerRadius = 16; + } + return _mewPayBgView; +} + +- (UILabel *)mewMoneyView { + if (!_mewMoneyView) { + _mewMoneyView = [[UILabel alloc] init]; + _mewMoneyView.textColor = [MewThemeColor mewMainTextColor]; + _mewMoneyView.font = [UIFont systemFontOfSize:13]; + } + return _mewMoneyView; +} + +- (UIStackView *)mewPayContainerView { + if (!_mewPayContainerView) { + _mewPayContainerView = [[UIStackView alloc] init]; + _mewPayContainerView.axis = UILayoutConstraintAxisHorizontal; + _mewPayContainerView.distribution = UIStackViewDistributionFill; + _mewPayContainerView.alignment = UIStackViewAlignmentCenter; + _mewPayContainerView.spacing = 3; + } + return _mewPayContainerView; +} + +- (UIImageView *)mewDiamondIcon { + if (!_mewDiamondIcon) { + _mewDiamondIcon = [[UIImageView alloc] init]; + _mewDiamondIcon.userInteractionEnabled = YES; + _mewDiamondIcon.image = [UIImage imageNamed:@"mew_diamond_icon"]; + } + return _mewDiamondIcon; +} + +- (UIImageView *)mewPayIcon { + if (!_mewPayIcon) { + _mewPayIcon = [[UIImageView alloc] init]; + _mewPayIcon.userInteractionEnabled = YES; + _mewPayIcon.image = [UIImage imageNamed:@"mew_room_gift_bar_arrow"]; + } + return _mewPayIcon; +} + + +- (UIStackView *)mewSendBtn { + if (!_mewSendBtn) { + _mewSendBtn = [[UIStackView alloc] init]; + _mewSendBtn.axis = UILayoutConstraintAxisHorizontal; + _mewSendBtn.distribution = UIStackViewDistributionFill; + _mewSendBtn.alignment = UIStackViewAlignmentCenter; + _mewSendBtn.spacing = 1; + _mewSendBtn.layer.masksToBounds = YES; + _mewSendBtn.layer.cornerRadius = 15; + _mewSendBtn.layer.borderColor = [MewThemeColor mewAppMainColor].CGColor; + _mewSendBtn.layer.borderWidth = 5; + } + return _mewSendBtn; +} + + +- (UILabel *)mewNumView { + if (!_mewNumView) { + _mewNumView = [[UILabel alloc] init]; + _mewNumView.textAlignment = NSTextAlignmentCenter; + _mewNumView.textColor = [MewThemeColor mewGiftCountTitleColor]; + _mewNumView.text = @"1"; + _mewNumView.font = [UIFont systemFontOfSize:13]; + _mewNumView.textAlignment = NSTextAlignmentCenter; + } + return _mewNumView; +} + +- (UIButton *)mewArrowBtn { + if (!_mewArrowBtn) { + _mewArrowBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewArrowBtn setImage:[UIImage imageNamed:@"mew_room_gift_bar_num_arrow"] forState:UIControlStateNormal]; + [_mewArrowBtn addTarget:self action:@selector(mewArrowBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewArrowBtn; +} + +- (UIButton *)mewSendGiftBtn { + if (!_mewSendGiftBtn) { + _mewSendGiftBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewSendGiftBtn setTitle:@"赠送" forState:UIControlStateNormal]; + [_mewSendGiftBtn setTitleColor:[MewThemeColor mewMainTextColor] forState:UIControlStateNormal]; + [_mewSendGiftBtn setTitle:@"赠送中..." forState:UIControlStateDisabled]; + [_mewSendGiftBtn setTitleColor:[MewThemeColor mewDisableButtonTextColor] forState:UIControlStateDisabled]; + [_mewSendGiftBtn setTitle:@"赠送" forState:UIControlStateSelected]; + [_mewSendGiftBtn setTitleColor:[MewThemeColor mewDisableButtonTextColor] forState:UIControlStateSelected]; + [_mewSendGiftBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewConfirmButtonGradientStartColor], [MewThemeColor mewConfirmButtonGradientEndColor]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + [_mewSendGiftBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewDisableButtonColor], [MewThemeColor mewDisableButtonColor]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled]; + [_mewSendGiftBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewDisableButtonColor], [MewThemeColor mewDisableButtonColor]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateSelected]; + _mewSendGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; + _mewSendGiftBtn.layer.masksToBounds = YES; + CAShapeLayer *layer = [CAShapeLayer layer]; + UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 67, 30) byRoundingCorners:UIRectCornerTopRight | UIRectCornerBottomRight cornerRadii:CGSizeMake(15, 15)]; + layer.path = path.CGPath; + _mewSendGiftBtn.layer.mask = layer; + [_mewSendGiftBtn addTarget:self action:@selector(mew_sendHandle:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewSendGiftBtn; +} +- (UIButton *)mewSendPrivilegeBtn{ + if(!_mewSendPrivilegeBtn){ + _mewSendPrivilegeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewSendPrivilegeBtn setTitle:@"说明" forState:UIControlStateNormal]; + [_mewSendPrivilegeBtn setTitle:@"说明" forState:UIControlStateDisabled]; + [_mewSendPrivilegeBtn setTitleColor:[MewThemeColor mewDisableButtonTextColor] forState:UIControlStateDisabled]; + [_mewSendPrivilegeBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewConfirmButtonGradientStartColor], [MewThemeColor mewConfirmButtonGradientEndColor]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + [_mewSendPrivilegeBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewDisableButtonColor], [MewThemeColor mewDisableButtonColor]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled]; + _mewSendPrivilegeBtn.layer.cornerRadius = 14; + _mewSendPrivilegeBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];; + [_mewSendPrivilegeBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _mewSendPrivilegeBtn.layer.masksToBounds = YES; + _mewSendPrivilegeBtn.hidden = YES; + [_mewSendPrivilegeBtn addTarget:self action:@selector(mew_sendHandle:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewSendPrivilegeBtn; +} + +- (UITextField *)mewEditView { + if (!_mewEditView) { + _mewEditView = [[UITextField alloc] init]; + NSAttributedString * attribute = [[NSAttributedString alloc] initWithString:@"请输入赠送数额" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17], NSForegroundColorAttributeName:[MewThemeColor mewSecondTextColor]}]; + _mewEditView.attributedPlaceholder = attribute; + _mewEditView.borderStyle = UITextBorderStyleNone; + _mewEditView.returnKeyType = UIReturnKeyDone; + _mewEditView.delegate = self; + _mewEditView.textColor = [MewThemeColor mewSecondTextColor]; + _mewEditView.keyboardType = UIKeyboardTypeNumberPad; + } + return _mewEditView; +} + +- (UIButton *)mewSureBtn { + if (!_mewSureBtn) { + _mewSureBtn = [[UIButton alloc] init]; + [_mewSureBtn setTitle:@"确定" forState:UIControlStateNormal]; + _mewSureBtn.titleLabel.textColor = [MewThemeColor mewMainTextColor]; + _mewSureBtn.titleLabel.font = [UIFont systemFontOfSize:15]; + _mewSureBtn.backgroundColor = [MewThemeColor mewAppMainColor]; + _mewSureBtn.layer.cornerRadius = 5.0; + _mewSureBtn.layer.masksToBounds = YES; + [_mewSureBtn addTarget:self action:@selector(mewSureBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewSureBtn; +} + + +- (UIView *)mewCustomNumView { + if (!_mewCustomNumView) { + _mewCustomNumView = [[UIView alloc] init]; + _mewCustomNumView.backgroundColor = [UIColor whiteColor]; + } + return _mewCustomNumView; +} + +- (MewGiftNumView *)mewGiftNumView { + if (!_mewGiftNumView) { + _mewGiftNumView = [[MewGiftNumView alloc] init]; + _mewGiftNumView.delegate = self; + _mewGiftNumView.hidden = YES; + } + return _mewGiftNumView; +} +- (UILabel *)mewPrivilegeNumView{ + if(!_mewPrivilegeNumView){ + _mewPrivilegeNumView = [UILabel mew_getLabWithText:@"" font:kFontRegular(12) textColor:[UIColor whiteColor]]; + _mewPrivilegeNumView.hidden = YES; + NSMutableAttributedString *countAtt = [[NSMutableAttributedString alloc]initWithString:@"今日剩余赠送次数:0次" attributes:@{NSFontAttributeName:kFontRegular(12),NSForegroundColorAttributeName:[UIColor whiteColor]}]; + [countAtt addAttributes:@{NSFontAttributeName:kFontMedium(12),NSForegroundColorAttributeName:UIColorMewFromRGB(0xFFDA24)} range:[countAtt.string rangeOfString:@"0"]]; + _mewPrivilegeNumView.attributedText = countAtt; + } + return _mewPrivilegeNumView; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftDataView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftDataView.h new file mode 100644 index 0000000..b343c9f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftDataView.h @@ -0,0 +1,56 @@ +// +// MewGiftDataView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewGiftDataModel.h" +#import "MewReceiveGiftDataModel.h" +#import "XPPrivilegeCardItemModel.h" +NS_ASSUME_NONNULL_BEGIN +//XPGiftInfoView +@class MewGiftDataView; +@protocol MewGiftDataViewDelegate + +///点击了切换不同礼物的tabbar +- (void)mewGiftDataView:(MewGiftDataView *)view didClickGiftType:(MewSendGiftType)type; + +///点击了某个item +- (void)mewGiftDataView:(MewGiftDataView *)view didClickGiftData:(MewGiftDataModel *_Nullable)info type:(MewSendGiftType)type; +///点击了特权卡 +- (void)mewGiftDataView:(MewGiftDataView *)view didClickPrivilegeItem:(XPPrivilegeCardItemModel *_Nullable)cardModel type:(MewSendGiftType)type; +@end +@interface MewGiftDataView : UIView +///使用的地方 +@property (nonatomic,assign) MewSendGiftManagerType mewPersonType;//usingplaceType +///普通礼物/幸运礼物/贵族礼物 +@property (nonatomic,strong) NSArray *mewNormalList;///normalOriginArray +///背包礼物 +@property (nonatomic,strong) NSArray *mewPackList;///packOriginArray +///特权卡 +@property(nonatomic,copy) NSArray* mewPrivilegeList;//privilegeArray +///送背包礼物更新数据源 +- (void)mew_setPackOriginData:(MewReceiveGiftDataModel *)giftReceiveInfo numUser:(NSInteger)numUser;///updatePackSource +///代理 +@property (nonatomic,weak) id delegate; + +//////最后一次选中的特权卡 +@property (nonatomic,strong,readonly) XPPrivilegeCardItemModel *mewLastChoosePrivilege;///lastSelectPrivilege +///最后一次选中的礼物 +@property (nonatomic,strong,readonly) MewGiftDataModel *mewLastChooseGift;///lastSelectGift +///当前用户贵族等级 +@property (nonatomic, assign) NSInteger mewPersonNobleLevel;///curUserNobleLevel + +@property (nonatomic, copy) NSString *mewChooseGiftId;///defaultSelectGiftId +///房间类型 +@property (nonatomic,assign) MewRoomType mewRoomPersonType;///roomType +///房间数据 +@property(nonatomic,strong) MewRoomInfoModel *mewRoomData;///roomInfo +///头部礼物类型变更 +/// - Parameter headType: 1:礼物 2:互动 +- (void)mew_setGiftHeadTypeChange:(NSInteger)type;///giftHeadTypeHadChange +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftDataView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftDataView.m new file mode 100644 index 0000000..005de31 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftDataView.m @@ -0,0 +1,928 @@ +// +// MewGiftDataView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftDataView.h" +#import "MewGiftWeekChampionCell.h" +#import "XPPrivilegeCardGiftCell.h" +#import "MewGiftWeekChampionItemCell.h" +static NSString *kMewGiftDataViewHidePunishImage = @"kMewGiftDataViewHidePunishImage";///是否隐藏惩罚礼物“新”标识 + + +@interface MewGiftDataView () +///滚动的容器 +@property (nonatomic,strong) UIScrollView *mewScrollView; +@property (nonatomic,strong) UIStackView *mewTypeContainerView; +///普通礼物 +@property (nonatomic,strong) UIButton *mewNormalBtn; +///背包礼物 +@property (nonatomic,strong) UIButton *mewPackBtn; +///幸运礼物 +@property (nonatomic,strong) UIButton *mewGoodGBtn; +/////贵族礼物 +@property (nonatomic,strong) UIButton *mewNobleBtn; +///周星礼物 +@property (nonatomic, strong) UIButton *mewWeekBtn; +///涂鸦礼物 +@property (nonatomic,strong) UIButton *mewGraffitiBtn; +///惩罚礼物 +@property (nonatomic, strong) UIButton *mewPunishBtn; +///特权卡 +@property(nonatomic,strong) UIButton *mewPrivilegeBtn; +///新标识图标 +@property (nonatomic, strong) UIImageView *mewNewIconView; +///个播礼物 +@property (nonatomic,strong) UIButton *mewPersonBtn; +///背包总价值 +@property (nonatomic,strong) UILabel *mewNumView; +/// +@property (nonatomic,strong) UIStackView *mewGiftView; +///l礼物列表 +@property (nonatomic,strong) UICollectionView *mewCollectionView; + +///展示的数据源 +@property (nonatomic,strong) NSMutableArray *mewDataList; +///普通礼物的数据源 +@property (nonatomic,strong) NSArray *mewGiftList; +/////幸运礼物的数据源 +@property (nonatomic,strong) NSArray *mewGiftGoodList; +///贵族礼物的数据源 +@property (nonatomic, strong) NSArray *mewGiftNobleList; +///周星礼物的数据源 +@property (nonatomic, strong) NSArray *mewGiftWeekList; +///涂鸦礼物数据源 +@property (nonatomic,strong) NSArray *mewGiftGraffitiList; +///个播礼物数据源 +@property (nonatomic,strong) NSArray *mewAnchorList; +///惩罚礼物数据源 +@property (nonatomic, strong) NSArray *mewPunishList; + +///总的价值 +@property (nonatomic,strong) NSAttributedString *mewNumAtt; +///当前展示的数据的类型 +@property (nonatomic,assign) MewSendGiftType mewType; +///最后一次选中的礼物 +@property (nonatomic,strong) MewGiftDataModel *mewLastChooseGift; + +@property (nonatomic, assign) NSInteger mewChooseValue; + +///当前选中的page +@property (nonatomic,assign) NSInteger mewChooseCurPage; +//////最后一次选中的特权卡 +@property (nonatomic,strong) XPPrivilegeCardItemModel *mewLastChoosePrivilege; + +@end +@implementation MewGiftDataView + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Response +- (void)mew_clickGiftTypeAction:(UIButton *)sender { + self.mewNormalBtn.selected = NO; + self.mewGoodGBtn.selected = NO; + self.mewNobleBtn.selected = NO; + self.mewPackBtn.selected = NO; + self.mewWeekBtn.selected = NO; + self.mewGraffitiBtn.selected = NO; + self.mewPersonBtn.selected = NO; + self.mewPunishBtn.selected = NO; + self.mewPrivilegeBtn.selected = NO; + sender.selected = !sender.selected; + self.mewType = sender.tag; +} + +#pragma mark - Public Method +- (void)mew_setPackOriginData:(MewReceiveGiftDataModel *)giftReceiveInfo numUser:(NSInteger)numUser { + MewGiftDataModel * giftInfo = [self mew_getGiftDataWothGiftId:giftReceiveInfo.giftId.integerValue]; + giftInfo.count -= giftReceiveInfo.giftNum * numUser; + if (giftInfo.count == 0) { + [self.mewDataList removeObject:giftInfo]; + } + [self.mewCollectionView reloadData]; +} + +- (void)mew_setGiftHeadTypeChange:(NSInteger)type{ + if (type == 1) { + [self.mewGraffitiBtn removeFromSuperview]; + [self.mewPunishBtn removeFromSuperview]; + [self.mewNewIconView removeFromSuperview]; + self.mewNewIconView = nil; + [self.mewTypeContainerView addArrangedSubview:self.mewNormalBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewNobleBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewGoodGBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewWeekBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewPrivilegeBtn]; + + + if(self.mewRoomPersonType == MewRoomType_Anchor) { + [self.mewTypeContainerView addArrangedSubview:self.mewPersonBtn]; + [self mew_clickGiftTypeAction:self.mewPersonBtn]; + } + if(self.mewType != MewSendGiftType_Pack) { + [self mew_clickGiftTypeAction:self.mewNormalBtn]; + } + } else { + [self.mewNormalBtn removeFromSuperview]; + [self.mewGoodGBtn removeFromSuperview]; + [self.mewNobleBtn removeFromSuperview]; + [self.mewWeekBtn removeFromSuperview]; + [self.mewPersonBtn removeFromSuperview]; + [self.mewPrivilegeBtn removeFromSuperview]; + [self.mewTypeContainerView addArrangedSubview:self.mewGraffitiBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewPunishBtn]; + BOOL hiden = [[NSUserDefaults standardUserDefaults] boolForKey:kMewGiftDataViewHidePunishImage]; + if(!hiden) { + [self addSubview:self.mewNewIconView]; + [self.mewNewIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewPunishBtn.mas_right).mas_offset(-5); + make.bottom.mas_equalTo(self.mewPunishBtn.mas_top).mas_offset(5); + make.size.mas_equalTo(CGSizeMake(24, 10)); + }]; + } + if(self.mewType != MewSendGiftType_Pack) { + [self mew_clickGiftTypeAction:self.mewGraffitiBtn]; + } + } +} + + +#pragma mark - Private Method +- (void)mew_setUI { + [self addSubview:self.mewScrollView]; + [self addSubview:self.mewGiftView]; + [self addSubview:self.mewPackBtn]; + [self addSubview:self.mewNumView]; + [self.mewScrollView addSubview:self.mewTypeContainerView]; + ///分段控制 + [self.mewTypeContainerView addArrangedSubview:self.mewNormalBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewNobleBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewGoodGBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewWeekBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewPrivilegeBtn]; + [self.mewTypeContainerView addArrangedSubview:self.mewPersonBtn]; + + + ///礼物 + [self.mewGiftView addArrangedSubview:self.mewCollectionView]; +// [self.mewGiftView addArrangedSubview:self.pageController]; +} + +- (void)mew_setUIConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(30 + 108 * 2 + 10 + 15); + }]; + + [self.mewTypeContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.bottom.leading.trailing.height.mas_equalTo(self.mewScrollView); + }]; + + [self.mewScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self).mas_offset(15); + make.right.mas_equalTo(self.mewNumView.mas_left).mas_offset(-5); + make.top.mas_equalTo(self); + make.height.mas_equalTo(30); + }]; + [self.mewPackBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-15); + make.centerY.height.mas_equalTo(self.mewScrollView); + make.width.mas_equalTo(30); + }]; + [self.mewNumView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.mewPackBtn.mas_left).mas_offset(-6); + make.centerY.mas_equalTo(self.mewPackBtn); + }]; + + [self.mewGiftView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewTypeContainerView.mas_bottom).offset(10); + make.left.right.mas_equalTo(self); + make.height.mas_equalTo(108 * 2 + 20); + }]; +// [self.pageController mas_makeConstraints:^(MASConstraintMaker *make) { +// make.height.mas_equalTo(10); +// }]; +} +- (void)mew_resetSelectPrivilege:(NSArray *)array { + for (XPPrivilegeCardItemModel * gift in array) { + gift.isSelected = NO; + } +} +- (void)mew_setChooseGift:(NSArray *)list { + for (MewGiftDataModel * gift in list) { + gift.isSelected = NO; + } +} + +- (void)mew_getPackNumAtt { + __block NSInteger giftTotal = 0; + [self.mewPackList enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if ([obj isKindOfClass:MewGiftDataModel.class]) { + MewGiftDataModel *gift = (MewGiftDataModel *)obj; + giftTotal += gift.count * gift.goldPrice; + } + }]; + NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"总价值:" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10],NSForegroundColorAttributeName: self.mewPersonType == MewSendGiftManagerType_Room ? [MewThemeColor mewThreeTextColor] : [MewThemeColor mewColorWithHexString:@"#878B9C"]}]; + [str appendAttributedString:[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",[self mew_setNumIcon:giftTotal]] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12],NSForegroundColorAttributeName:self.mewPersonType == MewSendGiftManagerType_Room ? [MewThemeColor mewAppMainColor] : [MewThemeColor mewColorWithHexString:@"#282828"]}]]; + NSTextAttachment *attachImage = [[NSTextAttachment alloc] init]; + attachImage.image = [UIImage imageNamed:@"mew_diamond_icon"]; + attachImage.bounds = CGRectMake(0, 0, 10, 10); + [str appendAttributedString:[[NSMutableAttributedString alloc] initWithAttributedString:[NSAttributedString attributedStringWithAttachment:attachImage]]]; + self.mewNumAtt = str; +} + +/** + 将数量格式化为字符串 万之后用xx.xxW显示并保留小数点2位,最多显示9999W+; + @param number 数值 + @return 格式化后的字符串 + */ +- (NSString *)mew_setNumIcon:(NSInteger)number { + NSString *numStr = [NSString stringWithFormat:@"%li", number]; + NSInteger num = number; + if (num > 99990000) { + numStr = @"9999W+"; + } else if (num >= 10000) { + CGFloat numF = num / 10000.0; + numStr = [NSString stringWithFormat:@"%.2fW+", numF]; + } + return numStr; +} + +- (void)mew_setChooseGiftData:(MewGiftDataModel *)giftData { + self.mewLastChooseGift = giftData; + if (self.mewType == MewSendGiftType_Pack) { + giftData.sourceType = MewGiftOriginType_Pack; + } else { + giftData.sourceType = MewGiftOriginType_Normal; + } + giftData.isSelected = YES; +} + +// 根据礼物id查找 +- (MewGiftDataModel *)mew_getGiftDataWothGiftId:(NSInteger)giftId { + for (int i=0; i 0) { + [self mew_setChooseGift:self.mewDataList]; + MewGiftDataModel * giftInfo= [self.mewDataList mewSafeObjectAtIndex:indexPath.item]; + [self mew_setChooseGiftData:giftInfo]; + [self.mewCollectionView reloadData]; + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftDataView:didClickGiftData:type:)]) { + [self.delegate mewGiftDataView:self didClickGiftData:giftInfo type:self.mewType]; + } + } +} + +#pragma mark - MewGiftWeekChampionCellDelegate +- (void)mewGiftWeekChampionCell:(MewGiftWeekChampionCell *)view didChooseGift:(MewGiftDataModel *)giftData { + [self mew_setChooseGiftData:giftData]; +} + +#pragma mark - Getters And Setters +- (void)setMewRoomPersonType:(MewRoomType )mewRoomPersonType { + _mewRoomPersonType = mewRoomPersonType; + if (_mewRoomPersonType == MewRoomType_Anchor) { + self.mewPersonBtn.hidden = NO; + } +} +-(void)setMewPrivilegeList:(NSArray *)mewPrivilegeList{ + _mewPrivilegeList = mewPrivilegeList; + if(_mewPrivilegeList.count > 0){ + XPPrivilegeCardItemModel *cardModel = _mewPrivilegeList.firstObject; + cardModel.isSelected = YES; + } +} + + +- (void)setMewType:(MewSendGiftType)mewType { + if (mewType == _mewType) { + return; + } + _mewType = mewType; + self.mewNumView.hidden = YES; + if(_mewType == MewSendGiftType_Privilege){ + self.mewPackBtn.hidden = YES; + [self mew_resetSelectPrivilege:self.mewPrivilegeList]; + if(_mewPrivilegeList.count > 0){ + XPPrivilegeCardItemModel *cardModel = _mewPrivilegeList.firstObject; + self.mewLastChoosePrivilege = cardModel; + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftDataView:didClickPrivilegeItem:type:)]) { + [self.delegate mewGiftDataView:self didClickPrivilegeItem:cardModel type:self.mewType]; + } + cardModel.isSelected = YES; + }else{ + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftDataView:didClickPrivilegeItem:type:)]) { + [self.delegate mewGiftDataView:self didClickPrivilegeItem:nil type:self.mewType]; + } + } + [self.mewCollectionView reloadData]; + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftDataView:didClickGiftType:)]) { + [self.delegate mewGiftDataView:self didClickGiftType:_mewType]; + } + return; + } + self.mewPackBtn.hidden = NO; + [_mewDataList removeAllObjects]; + [self mew_setChooseGift:self.mewGiftList]; + [self mew_setChooseGift:self.mewPackList]; + [self mew_setChooseGift:self.mewGiftGoodList]; + [self mew_setChooseGift:self.mewGiftNobleList]; + [self mew_setChooseGift:self.mewGiftWeekList]; + [self mew_setChooseGift:self.mewGiftGraffitiList]; + [self mew_setChooseGift:self.mewAnchorList]; + [self mew_setChooseGift:self.mewPunishList]; + + switch (_mewType) { + case MewSendGiftType_Normal: + [self.mewDataList addObjectsFromArray:self.mewGiftList]; + break; + case MewSendGiftType_Good: + [self.mewDataList addObjectsFromArray:self.mewGiftGoodList]; + break; + case MewSendGiftType_Noble: { + [self.mewDataList addObjectsFromArray:self.mewGiftNobleList]; + } + break; + case MewSendGiftType_WeekChampion: { + [self.mewDataList addObjectsFromArray:self.mewGiftWeekList]; + } + break; + case MewSendGiftType_Pack: + { + [self.mewDataList addObjectsFromArray:self.mewPackList]; + self.mewNumView.hidden = NO; + self.mewNumView.attributedText= self.mewNumAtt; + } + break; + case MewSendGiftType_Graffiti: + [self.mewDataList addObjectsFromArray:self.mewGiftGraffitiList]; + break; + case MewSendGiftType_Anchor: + [self.mewDataList addObjectsFromArray:self.mewAnchorList]; + break; + case MewSendGiftType_Punish: + { + [self.mewDataList addObjectsFromArray:self.mewPunishList]; + [self.mewNewIconView removeFromSuperview]; + self.mewNewIconView = nil; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kMewGiftDataViewHidePunishImage]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } + break; + default: + [self.mewDataList addObjectsFromArray:self.mewGiftList]; + break; + } + NSInteger currentPage = 0; + if (self.mewDataList.count > 0) { + if (self.mewChooseGiftId.length && (self.mewType == MewSendGiftType_Normal | self.mewType == MewSendGiftType_Pack)) { + for (int i = 0 ; i 0 ? self.mewGiftList.firstObject : nil; + }else if (_mewType == MewSendGiftType_Good) { + self.mewLastChooseGift = self.mewGiftGoodList.count > 0 ? self.mewGiftGoodList.firstObject : nil; + }else if (_mewType == MewSendGiftType_WeekChampion) { + self.mewLastChooseGift = self.mewGiftWeekList.count > 0 ? self.mewGiftWeekList.firstObject : nil; + }else if (_mewType == MewSendGiftType_Noble) { + self.mewLastChooseGift = self.mewGiftNobleList.count > 0 ? self.mewGiftNobleList.firstObject : nil; + }else if (_mewType == MewSendGiftType_Graffiti) { + self.mewLastChooseGift = self.mewGiftGraffitiList.count > 0 ? self.mewGiftGraffitiList.firstObject : nil; + }else if (_mewType == MewSendGiftType_Anchor) { + self.mewLastChooseGift = self.mewAnchorList.count > 0 ? self.mewAnchorList.firstObject : nil; + }else if (_mewType == MewSendGiftType_Punish) { + self.mewLastChooseGift = self.mewPunishList.count > 0 ? self.mewPunishList.firstObject : nil; + } + + + + if(self.mewLastChooseGift){ + self.mewChooseGiftId = self.mewChooseGiftId == nil ? @(self.mewLastChooseGift.giftId).stringValue : self.mewChooseGiftId; + }else{ + + if(_mewType == MewSendGiftType_Normal){ + self.mewType = MewSendGiftType_Normal; + }else if (_mewType == MewSendGiftType_Good) { + self.mewType = MewSendGiftType_Good; + }else if (_mewType == MewSendGiftType_WeekChampion) { + self.mewType = MewSendGiftType_WeekChampion; + }else if (_mewType == MewSendGiftType_Noble) { + self.mewType = MewSendGiftType_Noble; + }else if (_mewType == MewSendGiftType_Graffiti) { + self.mewType = MewSendGiftType_Graffiti; + }else if (_mewType == MewSendGiftType_Anchor) { + self.mewType = MewSendGiftType_Anchor; + }else if (_mewType == MewSendGiftType_Punish) { + self.mewType = MewSendGiftType_Punish; + }else{ + self.mewType = MewSendGiftType_Normal; + } + return; + } + if(_mewType == MewSendGiftType_Privilege){ + return; + } + if (self.mewChooseGiftId.length) { + for (MewGiftDataModel *gift in self.mewNormalList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_Normal; + break; + } + } + for (MewGiftDataModel *gift in self.mewGiftGoodList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_Good; + break; + } + } + for (MewGiftDataModel *gift in self.mewGiftNobleList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_Noble; + break; + } + } + for (MewGiftDataModel *gift in self.mewGiftWeekList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_WeekChampion; + break; + } + } + + for (MewGiftDataModel *gift in self.mewGiftGraffitiList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_Graffiti; + break; + } + } + + for (MewGiftDataModel *gift in self.mewAnchorList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_Anchor; + break; + } + } + for (MewGiftDataModel *gift in self.mewPunishList) { + if (gift.giftId == [self.mewChooseGiftId integerValue]) { + self.mewType = MewSendGiftType_Punish; + break; + } + } + } else { + self.mewType = MewSendGiftType_Normal; + } +} + +- (void)setMewPackList:(NSArray *)mewPackList { + _mewPackList = mewPackList; + [self mew_getPackNumAtt]; +} + +- (void)setMewPersonNobleLevel:(NSInteger)mewPersonNobleLevel { + _mewPersonNobleLevel = mewPersonNobleLevel; + [self.mewCollectionView reloadData]; +} + +- (void)setMewPersonType:(MewSendGiftManagerType)mewPersonType { + _mewPersonType = mewPersonType; + if (_mewPersonType == MewSendGiftManagerType_Person) { + self.mewGoodGBtn.hidden = YES; + self.mewGraffitiBtn.hidden = YES; + self.mewPersonBtn.hidden = YES; + self.mewPunishBtn.hidden = YES; + self.mewPrivilegeBtn.hidden = YES; + [self.mewNobleBtn setTitleColor:[MewThemeColor mewMainTextColor] forState:UIControlStateSelected]; + [self.mewNobleBtn setTitleColor:[MewThemeColor mewSecondTextColor] forState:UIControlStateNormal]; + + [self.mewNormalBtn setTitleColor:[MewThemeColor mewMainTextColor] forState:UIControlStateSelected]; + [self.mewNormalBtn setTitleColor:[MewThemeColor mewSecondTextColor] forState:UIControlStateNormal]; + + [self.mewWeekBtn setTitleColor:[MewThemeColor mewMainTextColor] forState:UIControlStateSelected]; + [self.mewWeekBtn setTitleColor:[MewThemeColor mewSecondTextColor] forState:UIControlStateNormal]; + + [self.mewPackBtn setTitleColor:[MewThemeColor mewMainTextColor] forState:UIControlStateSelected]; + [self.mewPackBtn setTitleColor:[MewThemeColor mewSecondTextColor] forState:UIControlStateNormal]; + } +} + + + +- (UIStackView *)mewTypeContainerView { + if (!_mewTypeContainerView) { + _mewTypeContainerView = [[UIStackView alloc] init]; + _mewTypeContainerView.axis = UILayoutConstraintAxisHorizontal; + _mewTypeContainerView.distribution = UIStackViewDistributionFill; + _mewTypeContainerView.alignment = UIStackViewAlignmentCenter; + _mewTypeContainerView.spacing = 10; + _mewTypeContainerView.backgroundColor = [UIColor clearColor]; + } + return _mewTypeContainerView; +} + +- (UIStackView *)mewGiftView { + if (!_mewGiftView) { + _mewGiftView = [[UIStackView alloc] init]; + _mewGiftView.axis = UILayoutConstraintAxisVertical; + _mewGiftView.distribution = UIStackViewDistributionFill; + _mewGiftView.alignment = UIStackViewAlignmentFill; + _mewGiftView.spacing = 0; + } + return _mewGiftView; +} + +- (UIButton *)mewNormalBtn { + if (!_mewNormalBtn) { + _mewNormalBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewNormalBtn setTitle:@"礼物" forState:UIControlStateNormal]; + [_mewNormalBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewNormalBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewNormalBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewNormalBtn.tag = MewSendGiftType_Normal; + _mewNormalBtn.selected = YES; + [_mewNormalBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewNormalBtn; +} + +- (UIButton *)mewGoodGBtn { + if (!_mewGoodGBtn) { + _mewGoodGBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewGoodGBtn setTitle:@"幸运" forState:UIControlStateNormal]; + [_mewGoodGBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewGoodGBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewGoodGBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewGoodGBtn.tag = MewSendGiftType_Good; + _mewGoodGBtn.selected = NO; + [_mewGoodGBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewGoodGBtn; +} + +- (UIButton *)mewNobleBtn { + if (!_mewNobleBtn) { + _mewNobleBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewNobleBtn setTitle:@"贵族" forState:UIControlStateNormal]; + [_mewNobleBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewNobleBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewNobleBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewNobleBtn.tag = MewSendGiftType_Noble; + _mewNobleBtn.selected = NO; + _mewNobleBtn.hidden = YES; + [_mewNobleBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewNobleBtn; +} + +- (UIButton *)mewWeekBtn { + if (!_mewWeekBtn) { + _mewWeekBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewWeekBtn setTitle:@"星座礼物" forState:UIControlStateNormal]; + [_mewWeekBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewWeekBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewWeekBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewWeekBtn.tag = MewSendGiftType_WeekChampion; + _mewWeekBtn.selected = NO; + [_mewWeekBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewWeekBtn; +} + +- (UIButton *)mewPackBtn { + if (!_mewPackBtn) { + _mewPackBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewPackBtn setTitle:@"背包" forState:UIControlStateNormal]; + [_mewPackBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewPackBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewPackBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewPackBtn.tag = MewSendGiftType_Pack; + _mewPackBtn.selected = NO; + [_mewPackBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewPackBtn; +} +- (UIButton *)mewPrivilegeBtn { + if (!_mewPrivilegeBtn) { + _mewPrivilegeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewPrivilegeBtn setTitle:@"特权卡" forState:UIControlStateNormal]; + [_mewPrivilegeBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewPrivilegeBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewPrivilegeBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewPrivilegeBtn.tag = MewSendGiftType_Privilege; + _mewPrivilegeBtn.selected = NO; + [_mewPrivilegeBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewPrivilegeBtn; +} + + +- (UIButton *)mewGraffitiBtn { + if (!_mewGraffitiBtn) { + _mewGraffitiBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewGraffitiBtn setTitle:@"涂鸦礼物" forState:UIControlStateNormal]; + [_mewGraffitiBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewGraffitiBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewGraffitiBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewGraffitiBtn.tag = MewSendGiftType_Graffiti; + _mewGraffitiBtn.selected = NO; + [_mewGraffitiBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewGraffitiBtn; +} + +- (UIButton *)mewPunishBtn { + if (!_mewPunishBtn) { + _mewPunishBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewPunishBtn setTitle:@"惩罚礼物" forState:UIControlStateNormal]; + [_mewPunishBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewPunishBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewPunishBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewPunishBtn.tag = MewSendGiftType_Punish; + _mewPunishBtn.selected = NO; + [_mewPunishBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewPunishBtn; +} + +- (UIImageView *)mewNewIconView { + if (!_mewNewIconView) { + _mewNewIconView = [[UIImageView alloc] init]; + _mewNewIconView.image = [UIImage imageNamed:@"mew_room_gift_new_icon"]; + } + return _mewNewIconView; +} + +- (UIButton *)mewPersonBtn { + if (!_mewPersonBtn) { + _mewPersonBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewPersonBtn setTitle:@"人气" forState:UIControlStateNormal]; + [_mewPersonBtn setTitleColor:[MewThemeColor mewGiftSegmentSelectTitleColor] forState:UIControlStateSelected]; + [_mewPersonBtn setTitleColor:[MewThemeColor mewGiftSegmentNormalTitleColor] forState:UIControlStateNormal]; + _mewPersonBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold]; + _mewPersonBtn.tag = MewSendGiftType_Anchor; + _mewPersonBtn.selected = NO; + _mewPersonBtn.hidden = YES; + [_mewPersonBtn addTarget:self action:@selector(mew_clickGiftTypeAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewPersonBtn; +} + +- (UILabel *)mewNumView { + if (!_mewNumView) { + _mewNumView = [[UILabel alloc] init]; + } + return _mewNumView; +} + +- (UICollectionView *)mewCollectionView{ + if (!_mewCollectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + + _mewCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _mewCollectionView.dataSource = self; + _mewCollectionView.delegate = self; + _mewCollectionView.backgroundColor = [UIColor clearColor]; + [_mewCollectionView registerClass:[MewGiftWeekChampionItemCell class] forCellWithReuseIdentifier:NSStringFromClass([MewGiftWeekChampionItemCell class])]; + [_mewCollectionView registerClass:[MewEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([MewEmptyCollectionViewCell class])]; + [_mewCollectionView registerClass:[MewGiftWeekChampionCell class] forCellWithReuseIdentifier:NSStringFromClass([MewGiftWeekChampionCell class])]; + [_mewCollectionView registerClass:[XPPrivilegeCardGiftCell class] forCellWithReuseIdentifier:NSStringFromClass([XPPrivilegeCardGiftCell class])]; + + + } + return _mewCollectionView; +} + + +//- (UIPageControl *)pageController { +// if (!_pageController) { +// _pageController = [[UIPageControl alloc] init]; +// _pageController.currentPageIndicatorTintColor = [ThemeColor giftPageIndicatorColor]; +// } +// return _pageController; +//} + +- (NSMutableArray *)mewDataList { + if (!_mewDataList) { + _mewDataList = [NSMutableArray array]; + } + return _mewDataList; +} + +- (UIScrollView *)mewScrollView { + if (!_mewScrollView) { + _mewScrollView = [[UIScrollView alloc] init]; + _mewScrollView.backgroundColor = [UIColor clearColor]; + _mewScrollView.showsHorizontalScrollIndicator = NO; + } + return _mewScrollView; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftNumView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftNumView.h new file mode 100644 index 0000000..b0a683d --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftNumView.h @@ -0,0 +1,26 @@ +// +// MewGiftNumView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import +#import "MewGiftBottomBarCountModel.h" +@class MewGiftNumView; +NS_ASSUME_NONNULL_BEGIN +@protocol MewGiftNumViewDelegate + +///点击了多个个 +- (void)mewGiftNumView:(MewGiftNumView *)view chooseItem:(MewGiftBottomBarCountModel *)model; + +@end +//XPGiftCountView +@interface MewGiftNumView : UIView +///代理 +@property (nonatomic,weak) id delegate; +/// +@property (nonatomic,assign) MewSendGiftType type; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftNumView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftNumView.m new file mode 100644 index 0000000..961e14c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftNumView.m @@ -0,0 +1,157 @@ +// +// MewGiftNumView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/11. +// + +#import "MewGiftNumView.h" +#import "MewGiftBottomBarCell.h" +@interface MewGiftNumView() +//列表 +@property (nonatomic,strong) UICollectionView *mewCollectionView; +///礼物数量数据源 +@property (nonatomic, strong) NSArray *mewGiftList; +/// +@property (nonatomic,strong) UIVisualEffectView *mewEffectBgView; +@end +@implementation MewGiftNumView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI { + // 设置毛玻璃效果 + self.layer.cornerRadius = 12; + self.layer.masksToBounds = YES; + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; + UIVisualEffectView *mewEffectBgView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + self.mewEffectBgView = mewEffectBgView; + [self addSubview:mewEffectBgView]; + self.mewGiftList = [self mew_getNormalList]; + [self addSubview:self.mewCollectionView]; + +} + +- (void)mew_setUIConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(0); + }]; + + [self.mewEffectBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self); + }]; + + [self.mewCollectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self); + }]; +} + +///普通礼物的 个数的数据源 +- (NSArray *)mew_getNormalList { + NSMutableArray * datasource = [NSMutableArray array]; + MewGiftBottomBarCountModel *_otherDic = [MewGiftBottomBarCountModel initWithtext:@"其他数额" num:@""]; + _otherDic.isCustomCount = YES; + NSArray * array = [self mew_getCommonList]; + [datasource addObjectsFromArray:array]; + [datasource addObject:_otherDic]; + return [datasource copy]; +} + +///背包礼物的数据源 +- (NSArray *)mew_getPackList { + NSMutableArray * datasource = [NSMutableArray array]; + MewGiftBottomBarCountModel *_allDic = [MewGiftBottomBarCountModel initWithtext:@"全部" num:@"all"]; + _allDic.isTotal = YES; + // 其他数额 + MewGiftBottomBarCountModel *_otherDic = [MewGiftBottomBarCountModel initWithtext:@"其他数额" num:@""]; + _otherDic.isCustomCount = YES; + NSArray * array = [self mew_getCommonList]; + [datasource addObjectsFromArray:array]; + [datasource addObject:_allDic]; + [datasource addObject:_otherDic]; + return [datasource copy]; +} + +///一些公用的数据 +- (NSArray *)mew_getCommonList{ + MewGiftBottomBarCountModel *_1Dic = [MewGiftBottomBarCountModel initWithtext:@"一心一意" num:@"1"]; + MewGiftBottomBarCountModel *_10Dic = [MewGiftBottomBarCountModel initWithtext:@"十全十美" num:@"10"]; + MewGiftBottomBarCountModel *_66Dic = [MewGiftBottomBarCountModel initWithtext:@"一切顺利" num:@"66"]; + MewGiftBottomBarCountModel *_99Dic = [MewGiftBottomBarCountModel initWithtext:@"长长久久" num:@"99"]; + MewGiftBottomBarCountModel *_188Dic = [MewGiftBottomBarCountModel initWithtext:@"要抱抱" num:@"188"]; + MewGiftBottomBarCountModel *_520Dic = [MewGiftBottomBarCountModel initWithtext:@"我爱你" num:@"520"]; + MewGiftBottomBarCountModel *_1314Dic = [MewGiftBottomBarCountModel initWithtext:@"一生一世" num:@"1314"]; + NSArray * array = @[_1Dic, _10Dic, _66Dic, _99Dic,_188Dic,_520Dic, _1314Dic]; + return array; +} + +#pragma mark - UICollectionViewDelegate && UICollectionViewDataSource +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.mewGiftList.count; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + MewGiftBottomBarCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MewGiftBottomBarCell class]) forIndexPath:indexPath]; + MewGiftBottomBarCountModel *countItem = [self.mewGiftList mewSafeObjectAtIndex:indexPath.item]; + cell.mewNumModel = countItem; + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftNumView:chooseItem:)]) { + MewGiftBottomBarCountModel *countItem = [self.mewGiftList mewSafeObjectAtIndex:indexPath.item]; + [self.delegate mewGiftNumView:self chooseItem:countItem]; + } +} + +- (void)setType:(MewSendGiftType)type { + _type = type; + if (_type == MewSendGiftType_Pack) { + self.mewGiftList = [self mew_getPackList]; + } else { + self.mewGiftList = [self mew_getNormalList]; + } + + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftNumView:chooseItem:)]) { + MewGiftBottomBarCountModel *countItem = [self.mewGiftList mewSafeObjectAtIndex:0]; + [self.delegate mewGiftNumView:self chooseItem:countItem]; + } + + [self mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(28 * self.mewGiftList.count + 10); + }]; + + + + [self.mewCollectionView reloadData]; +} + + +#pragma mark - Getters And Setters +- (UICollectionView *)mewCollectionView{ + if (!_mewCollectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.itemSize = CGSizeMake(135, 28); + layout.minimumLineSpacing = 0; + layout.minimumInteritemSpacing = 0; + layout.sectionInset = UIEdgeInsetsMake(3, 0, 3, 0); + _mewCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _mewCollectionView.dataSource = self; + _mewCollectionView.delegate = self; + _mewCollectionView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.1]; + [_mewCollectionView registerClass:[MewGiftBottomBarCell class] forCellWithReuseIdentifier:NSStringFromClass([MewGiftBottomBarCell class])]; + } + return _mewCollectionView; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftSlideshowView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftSlideshowView.h new file mode 100644 index 0000000..1e3ec8f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftSlideshowView.h @@ -0,0 +1,32 @@ +// +// MewGiftSlideshowView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +//XPGiftHeadTypeView +@class MewGiftSlideshowView; +@protocol MewGiftSlideshowViewDelegate + +///点击了贵族 +- (void)mewGiftSlideshowViewClickNoble:(MewGiftSlideshowView *)view; +///点击了首充 +- (void)mewGiftSlideshowViewClickFirstPay:(MewGiftSlideshowView *)view; +///点击了礼物 +- (void)mewGiftSlideshowViewClickSendGift:(MewGiftSlideshowView *)view; +///点击了互动 +- (void)mewGiftSlideshowViewClickInteraction:(MewGiftSlideshowView *)view; + +@end +@interface MewGiftSlideshowView : UIView +///是否展示首充 +@property (nonatomic,assign) BOOL mewIsShowFirstPay; + +@property (nonatomic, weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftSlideshowView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftSlideshowView.m new file mode 100644 index 0000000..1523f1e --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftSlideshowView.m @@ -0,0 +1,261 @@ +// +// MewGiftSlideshowView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGiftSlideshowView.h" + +static NSString *kHideGiftRedPoint = @"kHideGiftRedPoint";//是否隐藏互动红点 + +@interface MewGiftSlideshowView() + +///礼物 +@property (nonatomic, strong) UIButton *mewClickGiftBtn; +@property (nonatomic, strong) UIView *mewLineView;///分割线 +///分割线 +@property (nonatomic, strong) UIView *mewBottomLineView; +///箭头 +@property (nonatomic, strong) UIImageView *mewArrowView; +///互动 +@property (nonatomic, strong) UIButton *mewInteractBtn; +///红点 +@property (nonatomic, strong) UIView *mewRedPointView; +///轮播图 +@property (nonatomic,strong) SDCycleScrollView *mewRollView; + +@property (nonatomic, strong) NSMutableArray *mewTextList; +@end +@implementation MewGiftSlideshowView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI{ + [self addSubview:self.mewClickGiftBtn]; + [self addSubview:self.mewLineView]; + [self addSubview:self.mewInteractBtn]; + [self addSubview:self.mewRedPointView]; + [self addSubview:self.mewArrowView]; + [self addSubview:self.mewRollView]; + [self addSubview:self.mewBottomLineView]; + self.mewRedPointView.hidden = [[NSUserDefaults standardUserDefaults] boolForKey:kHideGiftRedPoint]; +} + +- (void)mew_setUIConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(44); + }]; + + [self.mewClickGiftBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(16); + make.centerY.mas_equalTo(self); + make.width.mas_equalTo(40); + }]; + [self.mewArrowView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.mewBottomLineView.mas_top); + make.centerX.mas_equalTo(self.mewClickGiftBtn); + make.size.mas_equalTo(CGSizeMake(10, 6)); + }]; + [self.mewInteractBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self); + make.left.mas_equalTo(self.mewLineView.mas_right).mas_offset(8); + make.width.mas_equalTo(40); + }]; + [self.mewRedPointView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewInteractBtn.mas_right).mas_offset(-7); + make.bottom.mas_equalTo(self.mewInteractBtn.mas_top).mas_offset(9); + make.width.height.mas_equalTo(8); + }]; + + [self.mewLineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self); + make.left.mas_equalTo(self.mewClickGiftBtn.mas_right).mas_offset(8); + make.width.mas_equalTo(1); + make.height.mas_equalTo(10); + }]; + + [self.mewBottomLineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self); + make.left.right.mas_equalTo(0); + make.height.mas_equalTo(1); + }]; + + [self.mewRollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-16); + make.centerY.mas_equalTo(self); + make.width.mas_equalTo(70); + make.height.mas_equalTo(30); + }]; +} + +#pragma mark - SDCycleScrollViewDelegate +- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { + if (self.mewTextList.count > index) { + NSString *str = [self.mewTextList mewSafeObjectAtIndex:index]; + if([str isEqualToString:@"首充有礼"]) { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftSlideshowViewClickFirstPay:)]) { + [self.delegate mewGiftSlideshowViewClickFirstPay:self]; + } + } else { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftSlideshowViewClickNoble:)]) { + [self.delegate mewGiftSlideshowViewClickNoble:self]; + } + } + } +} + +#pragma mark - Response +- (void)mewClickGiftBtnAction:(UIButton *)sender { + if (!sender.isSelected) { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftSlideshowViewClickSendGift:)]) { + [self.delegate mewGiftSlideshowViewClickSendGift:self]; + } + } + sender.selected = YES; + self.mewInteractBtn.selected = NO; + sender.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; + self.mewInteractBtn.titleLabel.font = [UIFont systemFontOfSize:14]; + [self.mewArrowView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.mewBottomLineView.mas_top); + make.centerX.mas_equalTo(self.mewClickGiftBtn); + make.size.mas_equalTo(CGSizeMake(10, 6)); + }]; +} + +- (void)mewInteractBtnAction:(UIButton *)sender { + if (!sender.isSelected) { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftSlideshowViewClickInteraction:)]) { + [self.delegate mewGiftSlideshowViewClickInteraction:self]; + } + } + sender.selected = YES; + self.mewClickGiftBtn.selected = NO; + if(![[NSUserDefaults standardUserDefaults] boolForKey:kHideGiftRedPoint]) { + self.mewRedPointView.hidden = YES; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHideGiftRedPoint]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } + sender.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; + self.mewClickGiftBtn.titleLabel.font = [UIFont systemFontOfSize:14]; + + [self.mewArrowView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.mewBottomLineView.mas_top); + make.centerX.mas_equalTo(self.mewInteractBtn); + make.size.mas_equalTo(CGSizeMake(10, 6)); + }]; +} + +#pragma mark - setter +- (void)setMewIsShowFirstPay:(BOOL)mewIsShowFirstPay{ + _mewIsShowFirstPay = mewIsShowFirstPay; + // if (isShowFirstRecharge) { + // self.mewTextList = [NSMutableArray arrayWithObjects:@"首充有礼", @"贵族特权", nil]; + // self.cycleScrollView.imageURLStringsGroup = @[@"gift_first_recharge_bg", @"room_gift_noble_entrance"]; + // } else { + // self.mewTextList = [NSMutableArray arrayWithObjects:@"贵族特权", nil]; + // self.cycleScrollView.imageURLStringsGroup = @[@"room_gift_noble_entrance"]; + // } + if (_mewIsShowFirstPay) { + self.mewTextList = [NSMutableArray arrayWithObjects:@"首充有礼", nil]; + self.mewRollView.imageURLStringsGroup = @[@"mew_gift_first_pay_bg"]; + } + [self.mewRollView autoScroll]; +} + + +#pragma mark - getter +- (UIButton *)mewClickGiftBtn { + if (!_mewClickGiftBtn) { + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + button.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; + [button addTarget:self action:@selector(mewClickGiftBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + [button setTitle:@"送礼" forState:UIControlStateNormal]; + [button setTitleColor:[MewThemeColor mewSecondTextColor] forState:UIControlStateNormal]; + [button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected]; + button.selected = YES; + _mewClickGiftBtn = button; + } + return _mewClickGiftBtn; +} + +- (UIButton *)mewInteractBtn { + if (!_mewInteractBtn) { + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + button.titleLabel.font = [UIFont systemFontOfSize:14]; + [button addTarget:self action:@selector(mewInteractBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + [button setTitle:@"互动" forState:UIControlStateNormal]; + [button setTitleColor:[MewThemeColor mewSecondTextColor] forState:UIControlStateNormal]; + [button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected]; + _mewInteractBtn = button; + } + return _mewInteractBtn; +} + +- (UIView *)mewRedPointView { + if (!_mewRedPointView) { + _mewRedPointView = [[UIView alloc] init]; + _mewRedPointView.backgroundColor = UIColorMewFromRGB(0xFB486A); + _mewRedPointView.layer.cornerRadius = 4; + _mewRedPointView.layer.masksToBounds = YES; + _mewRedPointView.layer.borderWidth = 1; + _mewRedPointView.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _mewRedPointView; +} + +- (UIView *)mewLineView { + if (!_mewLineView) { + _mewLineView = [[UIView alloc] init]; + _mewLineView.backgroundColor = UIColorMewRGBAlpha(0xffffff, 0.1); + } + return _mewLineView; +} + +- (UIView *)mewBottomLineView { + if (!_mewBottomLineView) { + _mewBottomLineView = [[UIView alloc] init]; + _mewBottomLineView.backgroundColor = UIColorMewRGBAlpha(0xffffff, 0.1); + } + return _mewBottomLineView; +} + +- (SDCycleScrollView *)mewRollView { + if (!_mewRollView) { + _mewRollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil]; + _mewRollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter; + _mewRollView.showPageControl = NO; + _mewRollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00]; + _mewRollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit; + _mewRollView.pageControlBottomOffset = -10; + _mewRollView.autoScrollTimeInterval = 3; + } + return _mewRollView; +} + +- (NSMutableArray *)mewTextList { + if (!_mewTextList) { + _mewTextList = [NSMutableArray array]; + } + return _mewTextList; +} + +- (UIImageView *)mewArrowView { + if (!_mewArrowView) { + UIImageView *imageView = [[UIImageView alloc] init]; + imageView.image = [UIImage imageNamed:@"mew_room_gift_Sslideshow_arrow"]; + + _mewArrowView = imageView; + } + return _mewArrowView; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftWeekFirstPlaceBroadcastView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftWeekFirstPlaceBroadcastView.h new file mode 100644 index 0000000..2f13eb8 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftWeekFirstPlaceBroadcastView.h @@ -0,0 +1,24 @@ +// +// MewGiftWeekFirstPlaceBroadcastView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import +#import "MewGiftDataModel.h" +NS_ASSUME_NONNULL_BEGIN +@protocol MewGiftWeekFirstPlaceBroadcastViewDelegate + +///点击了周星榜入口 +- (void)mewGiftWeekFirstPlaceBroadcastViewFirstPlaceClick; + +@end +//XPGiftWeekStarBroadcastView +@interface MewGiftWeekFirstPlaceBroadcastView : UIView +@property (nonatomic, weak) id delegate; + +@property (nonatomic, strong) MewGiftDataModel *mewGiftData; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftWeekFirstPlaceBroadcastView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftWeekFirstPlaceBroadcastView.m new file mode 100644 index 0000000..412868a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGiftWeekFirstPlaceBroadcastView.m @@ -0,0 +1,254 @@ +// +// MewGiftWeekFirstPlaceBroadcastView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/12. +// + +#import "MewGiftWeekFirstPlaceBroadcastView.h" +@interface MewGiftWeekFirstPlaceBroadcastView() +///背景 +@property (nonatomic, strong) UIImageView *mewBgView; +///周星榜入口 +@property (nonatomic, strong) UIButton *mewClickBtn; +///魅力头像 +@property (nonatomic, strong) NetImageView *mewCharmView; +///贡献头像 +@property (nonatomic, strong) NetImageView *mewContributeView; +///魅力标题 +@property (nonatomic, strong) UILabel *mewCharmTitleView; +///贡献标题 +@property (nonatomic, strong) UILabel *meContributeTitleView; +///魅力昵称背景 +@property (nonatomic, strong) UIView *mewCharmBgIcon; +///魅力昵称 +@property (nonatomic, strong) UILabel *mewCharmNameView; +///贡献昵称背景 +@property (nonatomic, strong) UIView *mewContributeBgIcon; +///贡献昵称 +@property (nonatomic, strong) UILabel *mewContributeNameView; +@end +@implementation MewGiftWeekFirstPlaceBroadcastView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI{ + [self addSubview:self.mewBgView]; + [self addSubview:self.mewClickBtn]; + [self addSubview:self.mewCharmView]; + [self addSubview:self.mewCharmTitleView]; + [self addSubview:self.mewCharmBgIcon]; + [self addSubview:self.mewCharmNameView]; + [self addSubview:self.mewContributeView]; + [self addSubview:self.meContributeTitleView]; + [self addSubview:self.mewContributeBgIcon]; + [self addSubview:self.mewContributeNameView]; +} + +- (void)mew_setUIConstraints { + [self.mewBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.left.right.mas_equalTo(self).inset(10); + make.height.mas_equalTo(44); + }]; + [self.mewCharmView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewBgView).mas_offset(10); + make.width.height.mas_equalTo(30); + make.centerY.mas_equalTo(self.mewBgView); + }]; + [self.mewCharmTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewCharmView); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.mewCharmView.mas_right).mas_offset(12); + }]; + [self.mewCharmBgIcon mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.mewCharmNameView); + make.height.mas_equalTo(16); + make.left.right.mas_equalTo(self.mewCharmNameView).inset(-6); + }]; + [self.mewCharmNameView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewCharmTitleView.mas_bottom).mas_offset(6); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.mewCharmTitleView); + }]; + + [self.mewContributeView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewCharmTitleView.mas_right).mas_offset(24); + make.width.height.mas_equalTo(30); + make.centerY.mas_equalTo(self.mewBgView); + }]; + [self.meContributeTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.mewContributeView); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.mewContributeView.mas_right).mas_offset(12); + }]; + [self.mewContributeBgIcon mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.mewContributeNameView); + make.height.mas_equalTo(16); + make.left.right.mas_equalTo(self.mewContributeNameView).inset(-6); + }]; + [self.mewContributeNameView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.meContributeTitleView.mas_bottom).mas_offset(6); + make.height.mas_equalTo(12); + make.left.mas_equalTo(self.meContributeTitleView); + }]; + [self.mewClickBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(30); + make.centerY.mas_equalTo(self.mewBgView); + make.right.mas_equalTo(self.mewBgView).mas_offset(-7); + make.width.mas_equalTo(38); + }]; +} + +#pragma mark - action +- (void)mew_clickAction:(UIButton *)sender { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewGiftWeekFirstPlaceBroadcastViewFirstPlaceClick)]) { + [self.delegate mewGiftWeekFirstPlaceBroadcastViewFirstPlaceClick]; + } +} +- (void)setMewGiftData:(MewGiftDataModel *)mewGiftData{ + _mewGiftData = mewGiftData; + if (mewGiftData.firstCharmRankUser) { + self.mewCharmView.imageUrl = mewGiftData.firstCharmRankUser.avatar; + NSString * nick = mewGiftData.firstCharmRankUser.nick; + if (nick.length > 8) { + nick = [nick substringFromIndex:8]; + } + self.mewCharmNameView.text = nick; + } else { + self.mewCharmView.image = [UIImageConstant defaultEmptyAvatarPlaceholder]; + self.mewCharmNameView.text = @"虚位以待"; + } + + if (mewGiftData.firstLevelRankUser) { + self.mewContributeView.imageUrl = mewGiftData.firstLevelRankUser.avatar; + NSString * nick = mewGiftData.firstLevelRankUser.nick; + if (nick.length > 8) { + nick = [nick substringFromIndex:8]; + } + self.mewContributeNameView.text = nick; + } else { + self.mewContributeView.image = [UIImageConstant defaultEmptyAvatarPlaceholder]; + self.mewContributeNameView.text = @"虚位以待"; + } +} + + +- (UIImageView *)mewBgView { + if (!_mewBgView) { + _mewBgView = [[UIImageView alloc] init]; + _mewBgView.image = [UIImage imageNamed:@"mew_room_gift_first_place_bg"]; + _mewBgView.contentMode = UIViewContentModeScaleAspectFill; + } + return _mewBgView; +} + +- (NetImageView *)mewCharmView { + if (!_mewCharmView) { + NetImageConfig *config = [[NetImageConfig alloc] init]; + config.placeHolder = [UIImageConstant defaultEmptyAvatarPlaceholder]; + _mewCharmView = [[NetImageView alloc] initWithConfig:config]; + _mewCharmView.userInteractionEnabled = YES; + _mewCharmView.layer.masksToBounds = YES; + _mewCharmView.layer.cornerRadius = 15; + } + return _mewCharmView; +} + +- (UILabel *)mewCharmTitleView { + if (!_mewCharmTitleView) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [MewThemeColor mewMainTextColor]; + label.text = @"本周该礼物冠名者"; + _mewCharmTitleView = label; + } + return _mewCharmTitleView; +} + +- (UIView *)mewCharmBgIcon { + if (!_mewCharmBgIcon) { + UIView *view = [[UIView alloc] init]; + view.backgroundColor = UIColorMewRGBAlpha(0xffffff, 0.2); + view.layer.cornerRadius = 8; + view.layer.masksToBounds = YES; + _mewCharmBgIcon = view; + } + return _mewCharmBgIcon; +} + +- (UILabel *)mewCharmNameView { + if (!_mewCharmNameView) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [UIColor whiteColor]; + label.text = @"虚位以待"; + _mewCharmNameView = label; + } + return _mewCharmNameView; +} + +- (NetImageView *)mewContributeView { + if (!_mewContributeView) { + NetImageConfig *config = [[NetImageConfig alloc] init]; + config.placeHolder = [UIImageConstant defaultEmptyAvatarPlaceholder]; + _mewContributeView = [[NetImageView alloc] initWithConfig:config]; + _mewContributeView.userInteractionEnabled = YES; + _mewContributeView.layer.masksToBounds = YES; + _mewContributeView.layer.cornerRadius = 15; + } + return _mewContributeView; +} + +- (UILabel *)meContributeTitleView { + if (!_meContributeTitleView) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [MewThemeColor mewMainTextColor]; + label.text = @"本周该礼物星神豪"; + _meContributeTitleView = label; + } + return _meContributeTitleView; +} + +- (UIView *)mewContributeBgIcon { + if (!_mewContributeBgIcon) { + UIView *view = [[UIView alloc] init]; + view.backgroundColor = UIColorMewRGBAlpha(0xffffff, 0.2); + view.layer.cornerRadius = 8; + view.layer.masksToBounds = YES; + _mewContributeBgIcon = view; + } + return _mewContributeBgIcon; +} +- (UILabel *)mewContributeNameView { + if (!_mewContributeNameView) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [UIColor whiteColor]; + label.text = @"虚位以待"; + _mewContributeNameView = label; + } + return _mewContributeNameView; +} + +- (UIButton *)mewClickBtn { + if (!_mewClickBtn) { + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + [button setImage:[UIImage imageNamed:@"mew_room_gift_first_place_icon"] forState:UIControlStateNormal]; + [button addTarget:self action:@selector(mew_clickAction:) forControlEvents:UIControlEventTouchUpInside]; + _mewClickBtn = button; + } + return _mewClickBtn; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGoodGiftBroadcastView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGoodGiftBroadcastView.h new file mode 100644 index 0000000..8a0af00 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGoodGiftBroadcastView.h @@ -0,0 +1,27 @@ +// +// MewGoodGiftBroadcastView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol MewGoodGiftBroadcastViewDelegate + +///点击了玩法说明 +- (void)mew_ClickGoodGiftBroadcastViewPlayingMethod; + +@end + +//XPGiftLuckyGiftBroadcastView +@interface MewGoodGiftBroadcastView : UIView +@property (nonatomic, weak) id delegate; + + +@property (nonatomic,strong) NSArray *mewList; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGoodGiftBroadcastView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGoodGiftBroadcastView.m new file mode 100644 index 0000000..751e705 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewGoodGiftBroadcastView.m @@ -0,0 +1,141 @@ +// +// MewGoodGiftBroadcastView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewGoodGiftBroadcastView.h" +#import "MewGoodGiftBroadcastModel.h" +#import "MewGoodGiftBroadcastCell.h" +@interface MewGoodGiftBroadcastView() +///背景 +@property (nonatomic, strong) UIImageView *mewBgView; +///玩法说明 +@property (nonatomic, strong) UIImageView *mewPlayMethodView; +///icon +@property (nonatomic, strong) UIImageView *mewIconView; +///文字轮播 +@property (nonatomic, strong) SDCycleScrollView *mewRollView; +@end +@implementation MewGoodGiftBroadcastView +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI { + [self addSubview:self.mewBgView]; + [self addSubview:self.mewPlayMethodView]; + [self addSubview:self.mewIconView]; + [self addSubview:self.mewRollView]; +} + +- (void)mew_setUIConstraints { + [self.mewBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.left.right.mas_equalTo(self).inset(10); + make.height.mas_equalTo(37); + }]; + + [self.mewPlayMethodView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.mewBgView); + make.left.mas_equalTo(self.mewBgView).mas_offset(8); + make.width.height.mas_equalTo(20); + }]; + + [self.mewRollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewPlayMethodView.mas_right); + make.right.mas_equalTo(self.mewIconView.mas_left).offset(-5); + make.top.bottom.mas_equalTo(self.mewBgView); + }]; + + [self.mewIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.right.bottom.mas_equalTo(self.mewBgView); + make.width.mas_equalTo(67); + }]; +} + +#pragma mark - action +- (void)playButtonAction:(UITapGestureRecognizer *)tap { + if (self.delegate && [self.delegate respondsToSelector:@selector(mew_ClickGoodGiftBroadcastViewPlayingMethod)]) { + [self.delegate mew_ClickGoodGiftBroadcastViewPlayingMethod]; + } +} +#pragma mark - SDCycleScrollViewDelegate +- (Class)customCollectionViewCellClassForCycleScrollView:(SDCycleScrollView *)view { + return MewGoodGiftBroadcastCell.class; +} + +- (void)setupCustomCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index cycleScrollView:(SDCycleScrollView *)view { + MewGoodGiftBroadcastCell *myCell = (MewGoodGiftBroadcastCell *)cell; + MewGoodGiftBroadcastModel * info = [self.mewList mewSafeObjectAtIndex:index]; + myCell.mewGiftData = info; + +} +#pragma mark - Getters And Setters +-(void)setMewList:(NSArray *)mewList{ + _mewList = mewList; + if (_mewList.count > 0) { + NSMutableArray * array = [NSMutableArray array]; + for (MewGoodGiftBroadcastModel * item in _mewList) { + [array addObject:item.giftName]; + } + if (array.count > 0) { + self.mewRollView.imageURLStringsGroup = array; + [self.mewRollView autoScroll]; + } + } +} + + + +- (UIImageView *)mewBgView { + if (!_mewBgView) { + _mewBgView = [[UIImageView alloc] init]; + _mewBgView.image = [UIImage imageNamed:@"mew_gift_good_broadcas_bg"]; + _mewBgView.contentMode = UIViewContentModeScaleToFill; + } + return _mewBgView; +} + +- (UIImageView *)mewPlayMethodView { + if (!_mewPlayMethodView) { + _mewPlayMethodView = [[UIImageView alloc] init]; + _mewPlayMethodView.image = [UIImage imageNamed:@"mew_gift_good_broadcas_icon"]; + } + return _mewPlayMethodView; +} + +- (UIImageView *)mewIconView { + if (!_mewIconView) { + _mewIconView = [[UIImageView alloc] init]; + _mewIconView.image = [UIImage imageNamed:@"mew_gift_good_broadcas_playType"]; + _mewIconView.contentMode = UIViewContentModeScaleToFill; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(playButtonAction:)]; + _mewIconView.userInteractionEnabled = YES; + [_mewIconView addGestureRecognizer:tap]; + } + return _mewIconView; +} + +- (SDCycleScrollView *)mewRollView { + if (!_mewRollView) { + _mewRollView = [[SDCycleScrollView alloc] init]; + _mewRollView.backgroundColor = [UIColor clearColor]; + _mewRollView.layer.masksToBounds = YES; + _mewRollView.delegate = self; + _mewRollView.showPageControl = NO; + _mewRollView.autoScrollTimeInterval = 3.0; + [_mewRollView disableScrollGesture]; + } + return _mewRollView; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewSendGiftPersonView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewSendGiftPersonView.h new file mode 100644 index 0000000..771019b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewSendGiftPersonView.h @@ -0,0 +1,31 @@ +// +// MewSendGiftPersonView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewSendGiftPersonDataModel.h" +@class MewSendGiftPersonView; +NS_ASSUME_NONNULL_BEGIN +@protocol MewSendGiftPersonViewDelegate +///选中的用户 +- (void)mewSendGiftPerson:(MewSendGiftPersonView *)view didChooseUsers:(NSArray *)selectUids; + +@end +//XPGiftUsersView +@interface MewSendGiftPersonView : UIView +///原始的数据 +@property (nonatomic,strong,readonly) NSArray *mewPersonList;///userArray +///选中的人 送给谁礼物 +@property (nonatomic,strong, readonly) NSMutableArray *mewChoosePersonList;///selectUserArray +///是不是选择了全部麦上的人 +@property (nonatomic,assign, readonly) BOOL mewIsChooseAll;////isSelectAll +///麦序变化 赋值使用 +- (void)mew_setGiftPersonList:(NSArray *)users;///configGiftUsers +///代理 +@property (nonatomic,weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewSendGiftPersonView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewSendGiftPersonView.m new file mode 100644 index 0000000..5a70f62 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewSendGiftPersonView.m @@ -0,0 +1,327 @@ +// +// MewSendGiftPersonView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewSendGiftPersonView.h" +#import "MewSendGiftPersonCell.h" +@interface MewSendGiftPersonView() +///麦上的送礼物 +@property (nonatomic,strong) UIStackView *mewContainerView; +///送给 +@property (nonatomic,strong) UILabel *mewSendView; +///全麦送背景 +@property (nonatomic,strong) UIImageView *mewBgView; +///全麦 +@property (nonatomic,strong) UIButton *mewAllMicBtn; +///列表 +@property (nonatomic,strong) UICollectionView *mewCollectionView; +///单独送一个人礼物 +@property (nonatomic,strong) UIStackView *mewFristContainerView; +///昵称 +@property (nonatomic,strong) NetImageView *mewHeadView; +///头像 +@property (nonatomic,strong) UILabel *mewNameView; +///分割线 +@property (nonatomic, strong) UIView *mewLineView; +///原始的数据 +@property (nonatomic,strong) NSArray *mewPersonList; +///选中的人 +@property (nonatomic,strong) NSMutableArray *mewChoosePersonList; +///是不是选择了全部麦上的人 +@property (nonatomic,assign) BOOL mewIsChooseAll; +@end +@implementation MewSendGiftPersonView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} +#pragma mark - Response +- (void)mewChooseAllMicBtnAction:(UIButton *)sender { + sender.selected = !sender.selected; + [self.mewPersonList enumerateObjectsUsingBlock:^(MewSendGiftPersonDataModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + obj.isSelect = sender.selected; + NSString * selectUid = [NSString stringWithFormat:@"%ld", obj.uid]; + if (obj.isSelect) { + if (![self.mewChoosePersonList containsObject:selectUid]) { + [self.mewChoosePersonList addObject:selectUid]; + } + } else { + if ([self.mewChoosePersonList containsObject:selectUid]) { + [self.mewChoosePersonList removeObject:selectUid]; + } + } + }]; + self.mewIsChooseAll = sender.selected; + [self.mewCollectionView reloadData]; + + if (self.delegate && [self.delegate respondsToSelector:@selector(mewSendGiftPerson:didChooseUsers:)]) { + [self.delegate mewSendGiftPerson:self didChooseUsers:self.mewChoosePersonList]; + } +} + +#pragma mark - Private Method +- (void)mew_setUI { + self.backgroundColor = [UIColor clearColor];; + [self addSubview:self.mewContainerView]; + [self addSubview:self.mewFristContainerView]; + [self addSubview:self.mewLineView]; + [self.mewContainerView addArrangedSubview:self.mewSendView]; + [self.mewContainerView addArrangedSubview:self.mewCollectionView]; + [self.mewContainerView addArrangedSubview:self.mewBgView]; + + [self.mewBgView addSubview:self.mewAllMicBtn]; + + [self.mewFristContainerView addArrangedSubview:self.mewHeadView]; + [self.mewFristContainerView addArrangedSubview:self.mewNameView]; + +} + +- (void)mew_setUIConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(43 + 15 * 2); + }]; + + [self.mewContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self).inset(0); + make.top.bottom.mas_equalTo(self); + }]; + + [self.mewSendView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(53); + make.height.mas_equalTo(43); + }]; + + [self.mewFristContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self).inset(15); + make.top.bottom.mas_equalTo(self); + }]; + + [self.mewBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(84, 50)); + }]; + + [self.mewAllMicBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(36, 18)); + make.left.mas_equalTo(self.mewBgView).offset(34); + make.centerY.mas_equalTo(self.mewBgView); + }]; + + [self.mewCollectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(43); + }]; + + [self.mewHeadView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(38, 38)); + }]; + + [self.mewLineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(0); + make.height.mas_equalTo(1); + make.bottom.mas_equalTo(0); + }]; +} + +/// 查找麦序 坑位上有人的麦序 +/// @param users 麦序列表 +- (NSArray *)mew_findMicPersonList:(NSArray *)users { + NSMutableArray * tempArray = [NSMutableArray array]; + NSString * uid = [MewAccountInfoStorage instance].mew_getUid; + NSArray * newArray = [users sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { + MewSendGiftPersonDataModel * model1 = obj1; + MewSendGiftPersonDataModel * model2 = obj2; + NSComparisonResult resuest = [model1.position compare:model2.position]; + return resuest; + }]; + + for (int i = 0; i < newArray.count; i++) { + MewSendGiftPersonDataModel * userInfo = [newArray mewSafeObjectAtIndex:i]; + if (userInfo && userInfo.uid > 0 && userInfo.uid != uid.integerValue) { ///自己在麦上不显示在送礼物列表中 + NSString * uid = [NSString stringWithFormat:@"%ld", userInfo.uid]; + if (userInfo.isSelect) { + [self.mewChoosePersonList addObject:uid]; + } + [tempArray addObject:userInfo]; + } + } + return [tempArray copy]; +} + +#pragma mark - Public Method +- (void)mew_setGiftPersonList:(NSArray *)users{ + NSMutableArray *arr = [NSMutableArray array]; + self.mewPersonList = [self mew_findMicPersonList:users]; + if (users.count == 1 && users.firstObject.position == nil) {///只有一个 并且用户不再麦序中的话 + MewSendGiftPersonDataModel *userInfo = users.firstObject; + self.mewHeadView.imageUrl = userInfo.avatar; + self.mewNameView.text = userInfo.nick; + self.mewContainerView.hidden = YES; + self.mewFristContainerView.hidden = NO; + } else { + [self.mewCollectionView reloadData]; + self.mewFristContainerView.hidden = YES; + self.mewContainerView.hidden = NO; + } +} + + +#pragma mark - UICollectionViewDataSource And UICollectionViewDelegate +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.mewPersonList.count; +} + +-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + MewSendGiftPersonCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MewSendGiftPersonCell class]) forIndexPath:indexPath]; + MewSendGiftPersonDataModel * queue = [self.mewPersonList mewSafeObjectAtIndex:indexPath.row]; + cell.mewPersonData = queue; + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + MewSendGiftPersonDataModel * queue = [self.mewPersonList mewSafeObjectAtIndex:indexPath.row]; + queue.isSelect = !queue.isSelect; + [self.mewCollectionView reloadData]; + NSString * selectUid = [NSString stringWithFormat:@"%ld", queue.uid]; + if (queue.isSelect) { + [self.mewChoosePersonList addObject:selectUid]; + } else { + if ([self.mewChoosePersonList containsObject:selectUid]) { + [self.mewChoosePersonList removeObject:selectUid]; + } + } + if (self.mewChoosePersonList.count == self.mewPersonList.count) { + self.mewAllMicBtn.selected = YES; + self.mewIsChooseAll = YES; + } else { + self.mewAllMicBtn.selected = NO; + self.mewIsChooseAll = NO; + } + + if (self.delegate && [self.delegate respondsToSelector:@selector(mewSendGiftPerson:didChooseUsers:)]) { + [self.delegate mewSendGiftPerson:self didChooseUsers:self.mewChoosePersonList]; + } +} +#pragma mark - Getters And Setters +- (UIStackView *)mewContainerView { + if (!_mewContainerView) { + _mewContainerView = [[UIStackView alloc] init]; + _mewContainerView.axis = UILayoutConstraintAxisHorizontal; + _mewContainerView.distribution = UIStackViewDistributionFill; + _mewContainerView.alignment = UIStackViewAlignmentCenter; + _mewContainerView.spacing = 0; + } + return _mewContainerView; +} + +- (UIStackView *)mewFristContainerView { + if (!_mewFristContainerView) { + _mewFristContainerView = [[UIStackView alloc] init]; + _mewFristContainerView.axis = UILayoutConstraintAxisHorizontal; + _mewFristContainerView.distribution = UIStackViewDistributionFill; + _mewFristContainerView.alignment = UIStackViewAlignmentCenter; + _mewFristContainerView.spacing = 10; + } + return _mewFristContainerView; +} + +- (NetImageView *)mewHeadView { + if (!_mewHeadView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _mewHeadView = [[NetImageView alloc] initWithConfig:config]; + _mewHeadView.layer.masksToBounds = YES; + _mewHeadView.layer.cornerRadius = 38/2; + } + return _mewHeadView; +} + +- (UILabel *)mewSendView { + if (!_mewSendView) { + _mewSendView = [[UILabel alloc] init]; + _mewSendView.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium]; + _mewSendView.textColor = [UIColor whiteColor]; + _mewSendView.text = @"送给"; + _mewSendView.textAlignment = NSTextAlignmentCenter; + } + return _mewSendView; +} + +- (UILabel *)mewNameView { + if (!_mewNameView) { + _mewNameView = [[UILabel alloc] init]; + _mewNameView.font = [UIFont systemFontOfSize:15]; + _mewNameView.textColor = [UIColor whiteColor]; + } + return _mewNameView ; +} + +- (UIButton *)mewAllMicBtn { + if (!_mewAllMicBtn) { + _mewAllMicBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_mewAllMicBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewColorWithHexString:@"#878B9C"], [MewThemeColor mewColorWithHexString:@"#878B9C"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; + [_mewAllMicBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [_mewAllMicBtn setBackgroundImage:[UIImage mew_gradientColorImageFromColors:@[[MewThemeColor mewColorWithHexString:@"#FFE710"], [MewThemeColor mewColorWithHexString:@"#FFE710"]] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateSelected]; + [_mewAllMicBtn setTitleColor:[MewThemeColor mewColorWithHexString:@"#282828"] forState:UIControlStateSelected]; + [_mewAllMicBtn setTitle:@"全选" forState:UIControlStateSelected]; + [_mewAllMicBtn setTitle:@"全选" forState:UIControlStateNormal]; + _mewAllMicBtn.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium]; + _mewAllMicBtn.layer.masksToBounds = YES; + _mewAllMicBtn.layer.cornerRadius = 9; + [_mewAllMicBtn addTarget:self action:@selector(mewChooseAllMicBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _mewAllMicBtn; +} + +- (UIImageView *)mewBgView { + if (!_mewBgView) { + _mewBgView = [[UIImageView alloc] init]; + _mewBgView.userInteractionEnabled = YES; +// _mewBgView.image = [UIImage imageNamed:@"room_gift_all_mic_bg"]; + } + return _mewBgView; +} + + +- (UICollectionView *)mewCollectionView{ + if (!_mewCollectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + layout.itemSize = CGSizeMake(38, 43); + layout.minimumInteritemSpacing = 4; + layout.sectionInset = UIEdgeInsetsMake(0, 0, 0,0); + _mewCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _mewCollectionView.dataSource = self; + _mewCollectionView.delegate = self; + _mewCollectionView.backgroundColor = [UIColor clearColor]; + _mewCollectionView.showsHorizontalScrollIndicator = NO; + [_mewCollectionView registerClass:[MewSendGiftPersonCell class] forCellWithReuseIdentifier:NSStringFromClass([MewSendGiftPersonCell class])]; + } + return _mewCollectionView; +} + +- (NSMutableArray *)mewChoosePersonList { + if (!_mewChoosePersonList) { + _mewChoosePersonList = [NSMutableArray array]; + } + return _mewChoosePersonList; +} + +- (UIView *)mewLineView { + if (!_mewLineView) { + _mewLineView = [[UIView alloc] init]; + _mewLineView.backgroundColor = UIColorMewRGBAlpha(0xffffff, 0.1); + } + return _mewLineView; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewWeekChampionBroadcastView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewWeekChampionBroadcastView.h new file mode 100644 index 0000000..515f470 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewWeekChampionBroadcastView.h @@ -0,0 +1,26 @@ +// +// MewWeekChampionBroadcastView.h +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import +#import "MewWeekChampionBroadcastModel.h" +@class MewWeekChampionBroadcastView; +NS_ASSUME_NONNULL_BEGIN + +@protocol MewWeekChampionBroadcastViewDelegate + +- (void)mewWeekChampionBroadcastView:(MewWeekChampionBroadcastView *)view didClickBtn:(UIButton *)sender; +@end + +//XPGiftTwelveStarBroadcastView +@interface MewWeekChampionBroadcastView : UIView +@property (nonatomic, strong) MewWeekChampionBroadcastModel *mewGiftData; + +///代理 +@property (nonatomic,weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewWeekChampionBroadcastView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewWeekChampionBroadcastView.m new file mode 100644 index 0000000..97b167d --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSendGiftManager/MewSendGiftManagerView/MewSubViews/MewWeekChampionBroadcastView.m @@ -0,0 +1,235 @@ +// +// MewWeekChampionBroadcastView.m +// yinmeng-ios +// +// Created by duoban on 2024/1/10. +// + +#import "MewWeekChampionBroadcastView.h" +@interface MewWeekChampionBroadcastView () +@property (nonatomic, strong) UIView *mewHomeView; +///背景 +@property (nonatomic, strong) UIImageView *newBgView; +///活动入口 +@property (nonatomic, strong) UIButton *mewClickBtn; +///魅力头像 +@property (nonatomic, strong) NetImageView *mewCharmView; +///贡献头像 +@property (nonatomic, strong) NetImageView *mewHeadView; +///魅力标题 +@property (nonatomic, strong) UILabel *mewCharmTitleView; +///贡献标题 +@property (nonatomic, strong) UILabel *mewTitleView; + +@property (nonatomic, strong) UIImageView *mewGenderView; + +@property (nonatomic, strong) UILabel *mewDesView; +@end +@implementation MewWeekChampionBroadcastView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self mew_setUI]; + [self mew_setUIConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)mew_setUI { + [self addSubview:self.newBgView]; + [self addSubview:self.mewHomeView]; + [self.mewHomeView addSubview:self.mewClickBtn]; + [self.mewHomeView addSubview:self.mewCharmView]; + [self.mewHomeView addSubview:self.mewHeadView]; + [self.mewHomeView addSubview:self.mewCharmTitleView]; + [self.mewHomeView addSubview:self.mewGenderView]; + [self.mewHomeView addSubview:self.mewTitleView]; + [self.mewHomeView addSubview:self.mewDesView]; + + self.mewCharmView.hidden = YES; + self.mewHeadView.hidden = YES; + self.mewCharmTitleView.hidden = YES; + self.mewTitleView.hidden = YES; + self.mewGenderView.hidden = YES; +} + +- (void)mew_setUIConstraints { + [self.newBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.width.mas_equalTo(355); + make.top.bottom.mas_equalTo(self); + }]; + [self.mewHomeView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.newBgView); + make.height.mas_equalTo(36); + make.bottom.mas_equalTo(0); + }]; + [self.mewCharmView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewHomeView).mas_offset(33); + make.width.height.mas_equalTo(30); + make.centerY.mas_equalTo(self.mewHomeView); + }]; + [self.mewHeadView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.mewCharmView.mas_right).mas_offset(8); + make.width.height.mas_equalTo(24); + make.centerY.mas_equalTo(self.mewHomeView); + }]; + [self.mewCharmTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(14); + make.bottom.mas_equalTo(self.mewHeadView.mas_centerY); + make.left.mas_equalTo(self.mewHeadView.mas_right).mas_offset(8); + }]; + + [self.mewTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(14); + make.top.mas_equalTo(self.mewCharmTitleView.mas_bottom); + make.left.mas_equalTo(self.mewCharmTitleView); + }]; + [self.mewGenderView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(10); + make.left.mas_equalTo(self.mewTitleView.mas_right).mas_offset(2); + make.centerY.mas_equalTo(self.mewTitleView); + }]; + [self.mewClickBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(18); + make.centerY.mas_equalTo(self.mewHomeView); + make.right.mas_equalTo(self.mewHomeView).mas_offset(-25); + make.width.mas_equalTo(64); + }]; + [self.mewDesView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.mewHomeView); + make.left.mas_equalTo(self.mewHomeView).mas_offset(54); + }]; +} + +#pragma mark - action +- (void)mew_ClickAction:(UIButton *)sender { + if (self.delegate && [self.delegate respondsToSelector:@selector(mewWeekChampionBroadcastView:didClickBtn:)]) { + [self.delegate mewWeekChampionBroadcastView:self didClickBtn:sender]; + } +} +-(void)setMewGiftData:(MewWeekChampionBroadcastModel *)mewGiftData{ + _mewGiftData = mewGiftData; + if (mewGiftData.nick) { + self.mewCharmView.imageUrl = mewGiftData.markUrl; + self.mewHeadView.imageUrl = mewGiftData.avatar; + self.mewCharmTitleView.text = [NSString stringWithFormat:@"上期星座月%@星主", mewGiftData.twelveStarName]; + self.mewTitleView.text = mewGiftData.nick; + NSString *imageName = mewGiftData.gender == 1 ? @"mew_common_sex_male" : @"mew_common_sex_female"; + self.mewGenderView.image = [UIImage imageNamed:imageName]; + self.mewCharmView.hidden = NO; + self.mewHeadView.hidden = NO; + self.mewCharmTitleView.hidden = NO; + self.mewTitleView.hidden = NO; + self.mewGenderView.hidden = NO; + self.mewDesView.hidden = YES; + } else { + self.mewCharmView.hidden = YES; + self.mewHeadView.hidden = YES; + self.mewCharmTitleView.hidden = YES; + self.mewTitleView.hidden = YES; + self.mewGenderView.hidden = YES; + self.mewDesView.hidden = NO; + } +} + + +- (UIView *)mewHomeView { + if (!_mewHomeView) { + _mewHomeView = [[UIView alloc] init]; + } + return _mewHomeView; +} + +- (UIImageView *)newBgView { + if (!_newBgView) { + _newBgView = [[UIImageView alloc] init]; + _newBgView.image = [UIImage imageNamed:@"mew_week_champion_broadcast_bg"]; + _newBgView.contentMode = UIViewContentModeScaleAspectFill; + _newBgView.userInteractionEnabled = YES; + } + return _newBgView; +} + +- (NetImageView *)mewCharmView { + if (!_mewCharmView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _mewCharmView = [[NetImageView alloc] initWithConfig:config]; + _mewCharmView.userInteractionEnabled = YES; + } + return _mewCharmView; +} + +- (UILabel *)mewCharmTitleView { + if (!_mewCharmTitleView) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium]; + label.textColor = UIColorMewFromRGB(0xFDE19B); + label.text = @"上期星座月天蝎座星主"; + _mewCharmTitleView = label; + } + return _mewCharmTitleView; +} + +- (NetImageView *)mewHeadView { + if (!_mewHeadView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _mewHeadView = [[NetImageView alloc] initWithConfig:config]; + _mewHeadView.layer.masksToBounds = YES; + _mewHeadView.layer.cornerRadius = 12; + _mewHeadView.userInteractionEnabled = YES; + } + return _mewHeadView; +} + +- (UILabel *)mewTitleView { + if (!_mewTitleView) { + UILabel *label = [[UILabel alloc] init]; + label.font = [UIFont systemFontOfSize:10]; + label.textColor = [UIColor whiteColor]; + label.text = @"昵称"; + _mewTitleView = label; + } + return _mewTitleView; +} + +- (UIButton *)mewClickBtn { + if (!_mewClickBtn) { + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + button.backgroundColor = UIColorMewRGBAlpha(0x000000, 0.36); + [button addTarget:self action:@selector(mew_ClickAction:) forControlEvents:UIControlEventTouchUpInside]; + [button setTitle:@"活动详情 >" forState:UIControlStateNormal]; + [button setTitleColor:UIColorMewFromRGB(0x00EEFF) forState:UIControlStateNormal]; + button.titleLabel.font = [UIFont systemFontOfSize:10]; + button.layer.masksToBounds = YES; + button.layer.cornerRadius = 9; + _mewClickBtn = button; + } + return _mewClickBtn; +} + +- (UIImageView *)mewGenderView { + if (!_mewGenderView) { + _mewGenderView = [[UIImageView alloc] init]; + } + return _mewGenderView; +} + +- (UILabel *)mewDesView { + if (!_mewDesView) { + _mewDesView = [[UILabel alloc] init]; + _mewDesView.text = @"星座物语,限定开启星座月!"; + _mewDesView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; + _mewDesView.textColor = UIColorMewFromRGB(0xFDE19B); + } + return _mewDesView; +} + + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSetting/MewSettingView/MewRoomActiveVC.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSetting/MewSettingView/MewRoomActiveVC.m index 5dcdc80..67c4b32 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSetting/MewSettingView/MewRoomActiveVC.m +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewSetting/MewSettingView/MewRoomActiveVC.m @@ -353,7 +353,7 @@ // } // }]; // if (roomInfo.leaveMode && roomInfo.uid == targetUid.integerValue) { -// [XCHUDTool showErrorWithMessage:@"请先关闭离开模式"]; +// [MewHUDTool showErrorWithMessage:@"请先关闭离开模式"]; // return; // } // diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewView/MewRoomViewController.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewView/MewRoomViewController.m index 55faa5c..dd322ef 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Room/View/MewView/MewRoomViewController.m +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/MewView/MewRoomViewController.m @@ -21,8 +21,8 @@ #import "MewMessageInfoModel.h" #import "MewAttachmentModel.h" #import "MewMicroQueueModel.h" -#import "MewGiftInfoModel.h" -#import "MewGiftReceiveInfoModel.h" +#import "MewGiftDataModel.h" +#import "MewReceiveGiftDataModel.h" #import "MewMessageRemoteExtModel.h" ///Tool #import "MewAccountInfoStorage.h" @@ -40,6 +40,7 @@ #import "MewRoomBgImageView.h" #import "MewRoomContentContainerView.h" +#import "MewMainSendGiftVC.h" @interface MewRoomViewController () @@ -461,19 +462,9 @@ /// 礼物 - (void)sendRoomGift { - MewSocialStageView *mewStageView = (MewSocialStageView *)self.roomStageView; - NSString *selectId = mewStageView.selectUid; - if (selectId == [MewAccountInfoStorage instance].mew_getUid) { - [self mew_showErrorToast:@"不能赠送礼物给自己"]; - return; - } - if (mewStageView.selectUid.length == 0 || [mewStageView.selectUid isEqualToString:@""]) { - [self mew_showErrorToast:@"请点击麦位头像,选择送礼的人"]; - return; - } - - [MewHUDTool mew_showLoadingWithMessage:@"赠送中..."]; - [self.presenter mew_sendRoomGift:mewStageView.selectUid roomUid:self.roomUid]; + MewMainSendGiftVC *mewGiftVC = [[MewMainSendGiftVC alloc]initWithType:MewSendGiftManagerType_Room mewUid:@(self.roomInfo.uid).stringValue]; + mewGiftVC.delegate = self; + [self presentViewController:mewGiftVC animated:YES completion:nil]; } diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Api/Api+PrivilegeCard.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Api/Api+PrivilegeCard.h new file mode 100644 index 0000000..de58cd0 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Api/Api+PrivilegeCard.h @@ -0,0 +1,42 @@ +// +// Api+PrivilegeCard.h +// xplan-ios +// +// Created by duoban on 2023/7/25. +// + +#import "Api.h" + +NS_ASSUME_NONNULL_BEGIN + + + + + +@interface Api (PrivilegeCard) +/// 保存特权卡 +/// - Parameters: +/// - completion:完成 +/// - cardName: 卡片名称 +/// - dailyNum: 每日使用次数 +/// - description: 特权说明 +/// - effectDay: 有效期 +/// - erbanNoStr: 使用者id +/// - cardUrl: 特权卡图片 +/// - roomUid: 房间UID +/// - cardType: 卡片类型 0 图片 1 gif 2 mp4 +/// - duration: 时长 +/// - effectUrl: 视频链接 ++(void)savePrivilegeCard:(MewHttpRequestHelperCompletion)completion cardName:(NSString *)cardName dailyNum:(NSString *)dailyNum description:(NSString *)description effectDay:(NSString *)effectDay erbanNoStr:(NSString *)erbanNoStr cardUrl:(NSString *)cardUrl roomUid:(NSString *)roomUid cardType:(NSString *)cardType duration:(NSString *)duration effectUrl:(NSString *)effectUrl; + +/// 请求特权卡列表 +/// - Parameters: +/// - completion: 完成 +/// - roomUid: 房间id ++(void)requestPrivilegeCardList:(MewHttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid cardStatus:(NSString *)cardStatus; + +///删除特权卡 ++(void)deletePrivilegeCard:(MewHttpRequestHelperCompletion)completion id:(NSString *)id; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Api/Api+PrivilegeCard.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Api/Api+PrivilegeCard.m new file mode 100644 index 0000000..0e9e1cc --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Api/Api+PrivilegeCard.m @@ -0,0 +1,42 @@ +// +// Api+PrivilegeCard.m +// xplan-ios +// +// Created by duoban on 2023/7/25. +// + +#import "Api+PrivilegeCard.h" + +@implementation Api (PrivilegeCard) + +/// 保存特权卡 +/// - Parameters: +/// - completion:完成 +/// - cardName: 卡片名称 +/// - dailyNum: 每日使用次数 +/// - description: 特权说明 +/// - effectDay: 有效期 +/// - erbanNoStr: 使用者id +/// - cardUrl: 特权卡图片 +/// - roomUid: 房间UID +/// - cardType: 卡片类型 0 图片 1 gif 2 mp4 +/// - duration: 时长 +/// - effectUrl: 视频链接 ++(void)savePrivilegeCard:(MewHttpRequestHelperCompletion)completion cardName:(NSString *)cardName dailyNum:(NSString *)dailyNum description:(NSString *)description effectDay:(NSString *)effectDay erbanNoStr:(NSString *)erbanNoStr cardUrl:(NSString *)cardUrl roomUid:(NSString *)roomUid cardType:(NSString *)cardType duration:(NSString *)duration effectUrl:(NSString *)effectUrl{ + [self makeRequest:@"privilegeCard/save" method:MewHttpRequestHelperMethodPOST completion:completion, __FUNCTION__,cardName,dailyNum,description,effectDay,erbanNoStr,cardUrl, roomUid,cardType,duration,effectUrl, nil]; +} +/// 请求特权卡列表 +/// - Parameters: +/// - completion: 完成 +/// - roomUid: 房间id ++(void)requestPrivilegeCardList:(MewHttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid cardStatus:(NSString *)cardStatus{ + if(cardStatus.length == 0){ + [self makeRequest:@"privilegeCard/list" method:MewHttpRequestHelperMethodGET completion:completion, __FUNCTION__,roomUid,nil]; + return; + } + [self makeRequest:@"privilegeCard/list" method:MewHttpRequestHelperMethodGET completion:completion, __FUNCTION__,roomUid,cardStatus, nil]; +}; ++(void)deletePrivilegeCard:(MewHttpRequestHelperCompletion)completion id:(NSString *)id{ + [self makeRequest:@"privilegeCard/del" method:MewHttpRequestHelperMethodGET completion:completion, __FUNCTION__,id, nil]; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardItemModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardItemModel.h new file mode 100644 index 0000000..a569bb7 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardItemModel.h @@ -0,0 +1,46 @@ +// +// XPPrivilegeCardItemModel.h +// xplan-ios +// +// Created by duoban on 2023/7/25. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardItemModel : NSObject +//isSelected 用于本地修改 +@property (nonatomic,assign) BOOL isSelected;//是否被选中 +@property(nonatomic,copy) NSString *sendNick; +@property(nonatomic,copy) NSString *sendUid; +@property(nonatomic,copy) NSString *cardName; +@property(nonatomic,copy) NSString *cardStatus; +@property(nonatomic,copy) NSString *cardUrl; +@property(nonatomic,copy) NSString *checkReason; +@property(nonatomic,copy) NSString *checkTime; +@property(nonatomic,copy) NSString *createTime; +@property(nonatomic,copy) NSString *dailyNum; +@property(nonatomic,copy) NSString *desc; +@property(nonatomic,copy) NSString *effectTime; +@property(nonatomic,copy) NSString *erbanNoStr; +@property(nonatomic,copy) NSString *expireTime; +@property(nonatomic,copy) NSString *ID; +@property(nonatomic,copy) NSString *isDeleted; +@property(nonatomic,copy) NSString *isManual; +@property(nonatomic,copy) NSString *operateTime; +@property(nonatomic,copy) NSString *operatorId; +@property(nonatomic,copy) NSString *roomUid; +@property(nonatomic,copy) NSString *uidStr; +@property(nonatomic,copy) NSString *updateTime; +@property(nonatomic,copy) NSString *effectDay; +@property(nonatomic,assign) CGFloat cellHeight; +@property(nonatomic,strong) NSMutableAttributedString *numAtt; +@property(nonatomic,strong) NSMutableAttributedString *nameAtt; +@property(nonatomic,strong) NSMutableAttributedString *instructionsAtt; +@property(nonatomic,assign) int cardType;///卡片类型 0 图片 1 gif 2 mp4 +@property(nonatomic,assign) CGFloat duration; ///时长 +@property(nonatomic,copy) NSString *effectUrl; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardItemModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardItemModel.m new file mode 100644 index 0000000..218037c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardItemModel.m @@ -0,0 +1,14 @@ +// +// XPPrivilegeCardItemModel.m +// xplan-ios +// +// Created by duoban on 2023/7/25. +// + +#import "XPPrivilegeCardItemModel.h" + +@implementation XPPrivilegeCardItemModel ++ (NSDictionary *)replacedKeyFromPropertyName { + return @{@"ID":@"id", @"desc":@"description"}; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardVideoItemModel.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardVideoItemModel.h new file mode 100644 index 0000000..375103c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardVideoItemModel.h @@ -0,0 +1,19 @@ +// +// XPPrivilegeCardVideoItemModel.h +// xplan-ios +// +// Created by duoban on 2023/11/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardVideoItemModel : NSObject +@property(nonatomic,strong) NSData *_Nullable videoData; +@property(nonatomic,copy) NSString *duration; +@property(nonatomic,copy) NSString *videoPhotoUrl; +@property(nonatomic,strong) UIImage *videoPhoto; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardVideoItemModel.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardVideoItemModel.m new file mode 100644 index 0000000..8782007 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Model/XPPrivilegeCardVideoItemModel.m @@ -0,0 +1,12 @@ +// +// XPPrivilegeCardVideoItemModel.m +// xplan-ios +// +// Created by duoban on 2023/11/2. +// + +#import "XPPrivilegeCardVideoItemModel.h" + +@implementation XPPrivilegeCardVideoItemModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Presenter/XPPrivilegeCardPresenter.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Presenter/XPPrivilegeCardPresenter.h new file mode 100644 index 0000000..9ee134c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Presenter/XPPrivilegeCardPresenter.h @@ -0,0 +1,35 @@ +// +// XPPrivilegeCardPresenter.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import +#import "MewBaseMvpPresenter.h" +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardPresenter : MewBaseMvpPresenter + +/// 保存特权卡 +/// - Parameters: +/// - cardName: 卡片名称 +/// - dailyNum: 每日使用次数 +/// - description: 特权说明 +/// - effectTime: 有效期 +/// - erbanNoStr: 使用者id +/// - cardUrl: 特权卡图片 +/// - roomUid: 房间UID +/// - cardType: 卡片类型 0 图片 1 gif 2 mp4 +/// - duration: 时长 +/// - effectUrl: 视频链接 +-(void)savePrivilegeCardWittCardName:(NSString *)cardName dailyNum:(NSString *)dailyNum description:(NSString *)description effectDay:(NSString *)effectDay erbanNoStr:(NSString *)erbanNoStr cardUrl:(NSString *)cardUrl roomUid:(NSString *)roomUid cardType:(NSString *)cardType duration:(NSString *)duration effectUrl:(NSString *)effectUrl; + +/// 请求特权卡 +/// - Parameter roomUid: 房间id +-(void)getPrivilegeCardListWithRoomUid:(NSString *)roomUid cardStatus:(NSString *)cardStatus; +///删除特权 +-(void)deletePrivilegeCardWithID:(NSString *)Id; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Presenter/XPPrivilegeCardPresenter.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Presenter/XPPrivilegeCardPresenter.m new file mode 100644 index 0000000..3d5b5b4 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Presenter/XPPrivilegeCardPresenter.m @@ -0,0 +1,51 @@ +// +// XPPrivilegeCardPresenter.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardPresenter.h" +#import "XPPrivilegeCardProtocol.h" +#import "Api+PrivilegeCard.h" +#import "XPPrivilegeCardItemModel.h" + +@implementation XPPrivilegeCardPresenter +/// 保存特权卡 +/// - Parameters: +/// - cardName: 卡片名称 +/// - dailyNum: 每日使用次数 +/// - description: 特权说明 +/// - effectTime: 有效期 +/// - erbanNoStr: 使用者id +/// - cardUrl: 特权卡图片 +/// - roomUid: 房间UID +/// - cardType: 卡片类型 0 图片 1 gif 2 mp4 +/// - duration: 时长 +/// - effectUrl: 视频链接 +-(void)savePrivilegeCardWittCardName:(NSString *)cardName dailyNum:(NSString *)dailyNum description:(NSString *)description effectDay:(NSString *)effectDay erbanNoStr:(NSString *)erbanNoStr cardUrl:(NSString *)cardUrl roomUid:(NSString *)roomUid cardType:(NSString *)cardType duration:(NSString *)duration effectUrl:(NSString *)effectUrl{ + [Api savePrivilegeCard:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + [[self mew_getView]savePrivilegeCardSuccess]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [MewHUDTool showErrorWithMessage:msg]; + [[self mew_getView]savePrivilegeCardFail]; + } mew_showLoading:NO errorToast:YES] cardName:cardName dailyNum:dailyNum description:description effectDay:effectDay erbanNoStr:erbanNoStr cardUrl:cardUrl roomUid:roomUid cardType:cardType duration:duration effectUrl:effectUrl]; +} +/// 请求特权卡 +/// - Parameter roomUid: 房间id +-(void)getPrivilegeCardListWithRoomUid:(NSString *)roomUid cardStatus:(NSString *)cardStatus{ + [Api requestPrivilegeCardList:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + NSArray *list = [XPPrivilegeCardItemModel mewModelsWithArray:data.data]; + [[self mew_getView]getPrivilegeCardListSuccess:list]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [[self mew_getView]getPrivilegeCardListFail]; + } mew_showLoading:YES errorToast:YES] roomUid:roomUid cardStatus:cardStatus]; +} +-(void)deletePrivilegeCardWithID:(NSString *)Id{ + [Api deletePrivilegeCard:[self mew_createHttpCompletion:^(MewBaseModel * _Nonnull data) { + [[self mew_getView]deletePrivilegeCardSuccess]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + + } mew_showLoading:YES errorToast:YES] id:Id]; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Protocol/XPPrivilegeCardProtocol.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Protocol/XPPrivilegeCardProtocol.h new file mode 100644 index 0000000..b1fc24c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Protocol/XPPrivilegeCardProtocol.h @@ -0,0 +1,27 @@ +// +// XPPrivilegeCardProtocol.h +// xplan-ios +// +// Created by duoban on 2023/7/25. +// + +#import +#import "XPPrivilegeCardItemModel.h" +NS_ASSUME_NONNULL_BEGIN + +@protocol XPPrivilegeCardProtocol +///保存特权卡成功 +-(void)savePrivilegeCardSuccess; +///保存特权卡失败 +-(void)savePrivilegeCardFail; +///请求特权卡列表成功 +-(void)getPrivilegeCardListSuccess:(NSArray *)list; +///请求特权卡列表失败 +-(void)getPrivilegeCardListFail; +///删除特权卡成功 +-(void)deletePrivilegeCardSuccess; +///删除特权卡失败 +-(void)deletePrivilegeCardFail; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardConfirmView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardConfirmView.h new file mode 100644 index 0000000..d139f68 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardConfirmView.h @@ -0,0 +1,22 @@ +// +// XPPrivilegeCardConfirmView.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import + +typedef void(^ConfirmHanle)(void); + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardConfirmView : UIView +@property(nonatomic,copy) ConfirmHanle confirmHanle; +@property(nonatomic,copy) NSString *text; +@property(nonatomic,strong) NSMutableAttributedString *textAtt; +-(instancetype)initWithFrame:(CGRect)frame WithTitle:(BOOL)is; +-(instancetype)initInstructionsWithFrame:(CGRect)frame; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardConfirmView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardConfirmView.m new file mode 100644 index 0000000..a09df63 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardConfirmView.m @@ -0,0 +1,254 @@ +// +// XPPrivilegeCardConfirmView.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardConfirmView.h" +@interface XPPrivilegeCardConfirmView() +@property(nonatomic,strong) UIView *bgView; +@property(nonatomic,strong) UILabel *titleView; +@property(nonatomic,strong) UILabel *contentView; +@property(nonatomic,strong) UILabel *contentView1; +@property(nonatomic,strong) UILabel *contentView2; +///取消 +@property(nonatomic,strong) UIButton *cancelBtn; +///确认 +@property(nonatomic,strong) UIButton *verifyBtn; +@property(nonatomic,assign) BOOL isHaveTitle; +@end +@implementation XPPrivilegeCardConfirmView + +-(instancetype)initInstructionsWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUIWithInstructions]; + [self installConstraintsWithInstructions]; + } + return self; +} + +-(instancetype)initWithFrame:(CGRect)frame WithTitle:(BOOL)is{ + self = [super initWithFrame:frame]; + if(self){ + self.isHaveTitle = is; + [self installUIWithTitle]; + [self installConstraintsWithTitle]; + + } + return self; +} +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUIWithInstructions{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; + [self addSubview:self.bgView]; + [self.bgView addSubview:self.titleView]; + [self.bgView addSubview:self.contentView]; + [self.bgView addSubview:self.contentView1]; + [self.bgView addSubview:self.contentView2]; + + [self.bgView addSubview:self.verifyBtn]; + self.titleView.text = @"关于特权卡"; + self.titleView.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; + self.contentView.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + self.contentView.text = @"1. 特权卡是用户在房间内身份的象征,"; + self.contentView1.text = @"送出特权卡可增加用户之间互动。"; + self.contentView2.text = @"2. 特权卡由房主和房间管理员发放"; + self.contentView.numberOfLines = 1; + [self.verifyBtn setTitle:@"知道了" forState:UIControlStateNormal]; +} +-(void)installConstraintsWithInstructions{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(307); + make.height.mas_equalTo(223); + make.center.equalTo(self); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(28); + make.height.mas_equalTo(24); + make.centerX.equalTo(self.bgView); + }]; + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(68); + make.leading.mas_equalTo(32); + make.height.mas_equalTo(21); + }]; + [self.contentView1 mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.contentView.mas_bottom); + make.leading.mas_equalTo(48); + make.height.mas_equalTo(21); + }]; + [self.contentView2 mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.contentView1.mas_bottom).mas_offset(8); + make.leading.mas_equalTo(32); + make.height.mas_equalTo(21); + }]; + [self.verifyBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(-kGetScaleWidth(24)); + make.width.mas_equalTo(kGetScaleWidth(244)); + make.centerX.equalTo(self.bgView); + make.height.mas_equalTo(kGetScaleWidth(40)); + }]; +} +-(void)installUIWithTitle{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; + [self addSubview:self.bgView]; + [self.bgView addSubview:self.titleView]; + [self.bgView addSubview:self.contentView]; + + [self.bgView addSubview:self.verifyBtn]; + [self.verifyBtn setTitle:@"知道了" forState:UIControlStateNormal]; +} +-(void)installConstraintsWithTitle{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(307)); + make.height.mas_greaterThanOrEqualTo(kGetScaleWidth(184)); + make.center.equalTo(self); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(48)); + make.centerX.equalTo(self.bgView); + }]; + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(72)); + make.leading.trailing.equalTo(self.bgView).inset(kGetScaleWidth(10)); + make.centerX.equalTo(self.bgView); + make.bottom.mas_equalTo(-kGetScaleWidth(92)); + }]; + + [self.verifyBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(-kGetScaleWidth(24)); + make.width.mas_equalTo(kGetScaleWidth(244)); + make.centerX.equalTo(self.bgView); + make.height.mas_equalTo(kGetScaleWidth(40)); + }]; +} +-(void)installUI{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; + [self addSubview:self.bgView]; + [self.bgView addSubview:self.contentView]; + [self.bgView addSubview:self.cancelBtn]; + [self.bgView addSubview:self.verifyBtn]; +} + +-(void)installConstraints{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(307)); + make.height.mas_greaterThanOrEqualTo(kGetScaleWidth(184)); + make.center.equalTo(self); + }]; + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(48)); + make.leading.trailing.equalTo(self.bgView).inset(kGetScaleWidth(10)); + make.centerX.equalTo(self.bgView); + make.bottom.mas_equalTo(-kGetScaleWidth(92)); + }]; + [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(-kGetScaleWidth(24)); + make.width.mas_equalTo(kGetScaleWidth(124)); + make.height.mas_equalTo(kGetScaleWidth(40)); + make.leading.mas_equalTo(kGetScaleWidth(24)); + }]; + [self.verifyBtn mas_makeConstraints:^(MASConstraintMaker *make) { + + make.top.width.height.equalTo(self.cancelBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(24)); + }]; +} +-(void)setText:(NSString *)text{ + _text = text; + _contentView.text = text; +} +-(void)setTextAtt:(NSMutableAttributedString *)textAtt{ + _textAtt = textAtt; + _contentView.attributedText = _textAtt; +} +-(void)cancelAction{ + [TTPopup dismiss]; +} +-(void)verifyAction{ + [TTPopup dismiss]; + if(self.isHaveTitle == YES)return; + if(self.confirmHanle){ + self.confirmHanle(); + } +} +#pragma mark - 懒加载 +-(UIView *)bgView{ + if(!_bgView){ + _bgView = [UIView new]; + _bgView.backgroundColor = [UIColor whiteColor]; + _bgView.layer.cornerRadius = kGetScaleWidth(16); + _bgView.layer.masksToBounds = YES; + } + return _bgView; +} +-(UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel mew_getLabWithText:@"审核不通过原因" font:kFontRegular(15) textColor:UIColorMewFromRGB(0x2B2D33)]; + _titleView.textAlignment = NSTextAlignmentCenter; + _titleView.numberOfLines = 0; + } + return _titleView; +} +- (UIButton *)cancelBtn{ + if(!_cancelBtn){ + _cancelBtn = [UIButton new]; + [_cancelBtn setTitle:@"取消" forState:UIControlStateNormal]; + _cancelBtn.titleLabel.font = kFontMedium(14); + [_cancelBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _cancelBtn.backgroundColor = UIColorMewRGBAlpha(0xFFDA24, 0.2); + _cancelBtn.layer.cornerRadius = kGetScaleWidth(40)/2; + _cancelBtn.layer.masksToBounds = YES; + [_cancelBtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _cancelBtn; +} +-(UIButton *)verifyBtn{ + if(!_verifyBtn){ + _verifyBtn = [UIButton new]; + [_verifyBtn setTitle:@"确认" forState:UIControlStateNormal]; + _verifyBtn.titleLabel.font = kFontMedium(14); + [_verifyBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _verifyBtn.backgroundColor = UIColorMewFromRGB(0xFFDA24); + _verifyBtn.layer.cornerRadius = kGetScaleWidth(40)/2; + _verifyBtn.layer.masksToBounds = YES; + [_verifyBtn addTarget:self action:@selector(verifyAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _verifyBtn; +} +- (UILabel *)contentView{ + if(!_contentView){ + _contentView = [UILabel mew_getLabWithText:@"" font:kFontRegular(15) textColor:UIColorMewFromRGB(0x2B2D33)]; + _contentView.textAlignment = NSTextAlignmentCenter; + _contentView.numberOfLines = 0; + } + return _contentView; +} +- (UILabel *)contentView1{ + if(!_contentView1){ + _contentView1 = [UILabel mew_getLabWithText:@"" font:kFontRegular(15) textColor:UIColorMewFromRGB(0x2B2D33)]; + _contentView1.textAlignment = NSTextAlignmentCenter; + _contentView1.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + + } + return _contentView1; +} +- (UILabel *)contentView2{ + if(!_contentView2){ + _contentView2 = [UILabel mew_getLabWithText:@"" font:kFontRegular(15) textColor:UIColorMewFromRGB(0x2B2D33)]; + _contentView2.textAlignment = NSTextAlignmentCenter; + _contentView2.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + } + return _contentView2; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardItemCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardItemCell.h new file mode 100644 index 0000000..05ad4b8 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardItemCell.h @@ -0,0 +1,32 @@ +// +// XPPrivilegeCardItemCell.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import +#import "XPPrivilegeCardItemVC.h" +#import "XPPrivilegeCardItemModel.h" +@class XPPrivilegeCardItemCell; +@protocol XPPrivilegeCardItemCellDelegate +///删除 +-(void)deleteExpiredPrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel; +///查看原因 +-(void)checkCauseOfPrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel; +///重新编辑 +-(void)againEditPrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel; +///点击图片 +-(void)clickPicturePrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel; +@end + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardItemCell : UITableViewCell +@property(nonatomic,assign)XPPrivilegeCardItemVCType type; +@property(nonatomic,strong) XPPrivilegeCardItemModel *cardModel; +@property(nonatomic,weak) iddelegate; ++(NSMutableAttributedString *)getTextAttWithText:(NSString *)text subText:(NSString *)subText textFont:(UIFont *)textFont subTextFont:(UIFont *)subTextFont; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardItemCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardItemCell.m new file mode 100644 index 0000000..1bc4a2a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardItemCell.m @@ -0,0 +1,408 @@ +// +// XPPrivilegeCardItemCell.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardItemCell.h" +#import + +@interface XPPrivilegeCardItemCell() +///背景 +@property(nonatomic,strong) UIView *bgView; +///背景图片 + + +@property(nonatomic,strong) FLAnimatedImageView *bgGifView; + +///审核状态背景 +@property(nonatomic,strong) UIImageView *examineView; +///审核状态 +@property(nonatomic,strong) UILabel *examineTitleView; +///删除 +@property(nonatomic,strong) UIButton *delBtn; +///蒙层 +@property(nonatomic,strong) UIImageView *curMaskView; +///底部阴影 +@property(nonatomic,strong) UIImageView *bottomMaskView; +///时间 +@property(nonatomic,strong) UILabel *timeView; +///使用次数背景 +@property(nonatomic,strong) UIView *numBgView; +///使用次数 +@property(nonatomic,strong) UILabel *numView; +///名字 +@property(nonatomic,strong) UILabel *nameView; +///说明 +@property(nonatomic,strong) UILabel *instructionsView; +///使用者titel +@property(nonatomic,strong) UILabel *useIDHeadView; +///使用者id +@property(nonatomic,strong) UILabel *useIDView; + +///查看原因 +@property(nonatomic,strong) UIButton *reasonBtn; +///重新编辑 +@property(nonatomic,strong) UIButton *editBtn; + +@end +@implementation XPPrivilegeCardItemCell + +-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} + +-(void)installUI{ + self.selectionStyle = UITableViewCellSelectionStyleNone; + self.contentView.backgroundColor = [UIColor clearColor]; + self.backgroundColor = [UIColor clearColor]; + [self.contentView addSubview:self.bgView]; + [self.bgView addSubview:self.bgGifView]; + [self.bgView addSubview:self.bottomMaskView]; + [self.bgView addSubview:self.timeView]; + [self.bgView addSubview:self.numBgView]; + [self.bgGifView addSubview:self.examineView]; + [self.examineView addSubview:self.examineTitleView]; + [self.bgGifView addSubview:self.delBtn]; + [self.bgGifView addSubview:self.curMaskView]; + + [self.numBgView addSubview:self.numView]; + + [self.bgView addSubview:self.nameView]; + [self.bgView addSubview:self.instructionsView]; + [self.bgView addSubview:self.useIDHeadView]; + [self.bgView addSubview:self.useIDView]; + [self.bgView addSubview:self.reasonBtn]; + [self.bgView addSubview:self.editBtn]; +} +-(void)installConstraints{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(16)); + make.trailing.mas_equalTo(-kGetScaleWidth(16)); + make.top.equalTo(self.contentView); + make.bottom.mas_equalTo(-kGetScaleWidth(10)); + }]; + [self.bgGifView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(16)); + make.width.mas_equalTo(kGetScaleWidth(288)); + make.height.mas_equalTo(kGetScaleWidth(162)); + make.centerX.equalTo(self.bgView); + }]; + + [self.bottomMaskView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(32)); + make.trailing.mas_equalTo(-kGetScaleWidth(32)); + make.height.mas_equalTo(kGetScaleWidth(33)); + make.top.mas_equalTo(kGetScaleWidth(142)); + }]; + [self.examineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(10)); + make.leading.mas_equalTo(kGetScaleWidth(10)); + make.width.mas_equalTo(kGetScaleWidth(60)); + make.height.mas_equalTo(kGetScaleWidth(21)); + }]; + [self.examineTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.bottom.top.trailing.equalTo(self.examineView); + }]; + [self.curMaskView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.bottom.equalTo(self.bgGifView); + make.width.mas_equalTo(kGetScaleWidth(288)); + make.height.mas_equalTo(kGetScaleWidth(72)); + }]; + [self.delBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(28)); + make.top.mas_equalTo(kGetScaleWidth(6)); + make.trailing.mas_equalTo(-kGetScaleWidth(10)); + }]; + [self.numBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.trailing.equalTo(self.bgGifView); + make.height.mas_equalTo(kGetScaleWidth(28)); + make.width.mas_equalTo(kGetScaleWidth(100)); + }]; + [self.numView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.equalTo(self.numBgView).inset(kGetScaleWidth(8)); + make.centerY.equalTo(self.numBgView); + }]; + [self.timeView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(156)); + make.leading.mas_equalTo(kGetScaleWidth(40)); + make.width.mas_equalTo(kGetScaleWidth(170)); + + }]; + [self.nameView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.bgGifView.mas_bottom).mas_offset(kGetScaleWidth(12)); + make.leading.mas_equalTo(kGetScaleWidth(28)); + make.trailing.mas_equalTo(-kGetScaleWidth(28)); + make.height.mas_equalTo(kGetScaleWidth(18)); + }]; + [self.instructionsView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.nameView.mas_bottom).mas_offset(kGetScaleWidth(6)); + make.leading.mas_equalTo(kGetScaleWidth(28)); +// make.trailing.mas_equalTo(-kGetScaleWidth(28)); + make.height.mas_equalTo(kGetScaleWidth(18)); + }]; + [self.useIDHeadView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.instructionsView.mas_bottom).mas_offset(kGetScaleWidth(6)); + make.leading.mas_equalTo(kGetScaleWidth(28)); + }]; + [self.useIDView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.instructionsView.mas_bottom).mas_offset(kGetScaleWidth(6)); + make.leading.equalTo(self.useIDHeadView.mas_trailing); + make.width.mas_equalTo(kGetScaleWidth(227)); + }]; + [self.reasonBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.useIDView.mas_bottom).mas_offset(kGetScaleWidth(14)); + make.leading.mas_equalTo(kGetScaleWidth(28)); + make.width.mas_equalTo(kGetScaleWidth(136)); + make.height.mas_equalTo(kGetScaleWidth(0)); + }]; + [self.editBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.width.height.equalTo(self.reasonBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(28)); + }]; + [self.numBgView.superview layoutIfNeeded]; + [self.numBgView mew_setCornerWithLeftTopCorner:12 rightTopCorner:0 bottomLeftCorner:0 bottomRightCorner:0 size:self.numBgView.frame.size]; +} +-(void)setType:(XPPrivilegeCardItemVCType)type{ + _type = type; + _delBtn.hidden = YES; + _editBtn.hidden = YES; + _reasonBtn.hidden = YES; + [self.reasonBtn mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(kGetScaleWidth(0)); + }]; + switch (type) { + case XPPrivilegeCardItemVCType_no_push: + { + _examineView.image = kImage(@"room_Privilege_Card_no_push"); + _examineTitleView.text = @"未通过"; + _editBtn.hidden = NO; + _reasonBtn.hidden = NO; + [self.reasonBtn mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(kGetScaleWidth(42)); + }]; + + } + break; + case XPPrivilegeCardItemVCType_audit: + { + _examineView.image = kImage(@"room_Privilege_Card_audit"); + _examineTitleView.text = @"审核中"; + } + break; + case XPPrivilegeCardItemVCType_out_time: + { + _examineView.image = kImage(@"room_Privilege_Card_out_time"); + _examineTitleView.text = @"已过期"; + _delBtn.hidden = NO; + } + break; + case XPPrivilegeCardItemVCType_use: + { + _examineView.image = kImage(@"room_Privilege_Card_use"); + _examineTitleView.text = @"生效中"; + } + break; + default: + break; + } +} +-(void)setCardModel:(XPPrivilegeCardItemModel *)cardModel{ + _cardModel = cardModel; + + + [_bgGifView sd_setImageWithURL:[NSURL URLWithString:_cardModel.cardUrl]]; + + + + _timeView.hidden = _cardModel.cardStatus.intValue == 0; + _numView.attributedText = _cardModel.numAtt; + _nameView.attributedText =_cardModel.nameAtt; + _instructionsView.attributedText = _cardModel.instructionsAtt; + _useIDView.text = _cardModel.erbanNoStr; + _timeView.text = [NSString stringWithFormat:@"有效期:%@ 至 %@",_cardModel.effectTime,_cardModel.expireTime]; + + + +} ++(NSMutableAttributedString *)getTextAttWithText:(NSString *)text subText:(NSString *)subText textFont:(UIFont *)textFont subTextFont:(UIFont *)subTextFont{ + NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName:textFont,NSForegroundColorAttributeName:UIColorMewFromRGB(0x696D7A)}]; + [textAtt addAttributes:@{NSFontAttributeName:subTextFont,NSForegroundColorAttributeName:UIColorMewFromRGB(0x2B2D33)} range:[text rangeOfString:subText]]; + + return textAtt; +}; + +-(void)againEditAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(againEditPrivilegeCardWithCell:cardModel:)]){ + [self.delegate againEditPrivilegeCardWithCell:self cardModel:self.cardModel]; + } +} +-(void)checkCauseAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(checkCauseOfPrivilegeCardWithCell:cardModel:)]){ + [self.delegate checkCauseOfPrivilegeCardWithCell:self cardModel:self.cardModel]; + } +} +-(void)deleteExpiredAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(deleteExpiredPrivilegeCardWithCell:cardModel:)]){ + [self.delegate deleteExpiredPrivilegeCardWithCell:self cardModel:self.cardModel]; + } +} +-(void)clickPictureAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(clickPicturePrivilegeCardWithCell:cardModel:)]){ + [self.delegate clickPicturePrivilegeCardWithCell:self cardModel:self.cardModel]; + } +} +#pragma mark - 懒加载 +- (UIView *)bgView{ + if(!_bgView){ + _bgView = [UIView new]; + _bgView.backgroundColor = [UIColor whiteColor]; + _bgView.layer.cornerRadius = kGetScaleWidth(16); + } + return _bgView; +} + + +- (FLAnimatedImageView *)bgGifView{ + if(!_bgGifView){ + _bgGifView = [FLAnimatedImageView new]; + _bgGifView.contentMode = UIViewContentModeScaleAspectFit; + _bgGifView.backgroundColor = UIColorMewFromRGB(0xF8F8FA); + _bgGifView.userInteractionEnabled = YES; + _bgGifView.layer.cornerRadius = kGetScaleWidth(12); + _bgGifView.layer.masksToBounds = YES; + + _bgGifView.contentMode = UIViewContentModeScaleAspectFill; + _bgGifView.userInteractionEnabled = YES; + UITapGestureRecognizer *clickPictureTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickPictureAction)]; + [_bgGifView addGestureRecognizer:clickPictureTap]; + } + return _bgGifView; +} + +- (UIImageView *)examineView{ + if(!_examineView){ + _examineView = [UIImageView new]; + } + return _examineView; +} +-(UILabel *)examineTitleView{ + if(!_examineTitleView){ + _examineTitleView = [UILabel mew_getLabWithText:@"" font:kFontMedium(12) textColor:[UIColor whiteColor]]; + _examineTitleView.textAlignment = NSTextAlignmentCenter; + } + return _examineTitleView; +} +-(UIButton *)delBtn{ + if(!_delBtn){ + _delBtn = [UIButton new]; + [_delBtn setBackgroundImage:kImage(@"room_Privilege_Card_del") forState:UIControlStateNormal]; + _delBtn.hidden = YES; + [_delBtn addTarget:self action:@selector(deleteExpiredAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _delBtn; +} +- (UIImageView *)curMaskView{ + if(!_curMaskView){ + + _curMaskView = [UIImageView new]; + _curMaskView.image = kImage(@"room_Privilege_Card_cell_mask"); + + } + return _curMaskView; +} +- (UIImageView *)bottomMaskView{ + if(!_bottomMaskView){ + _bottomMaskView = [UIImageView new]; + _bottomMaskView.image = kImage(@"room_Privilege_Card_cell_boottom_mask"); + } + return _bottomMaskView; +} +-(UILabel *)timeView{ + if(!_timeView){ + _timeView = [UILabel mew_getLabWithText:@"" font:kFontMedium(10) textColor:UIColorMewFromRGB(0xffffff)]; + _timeView.adjustsFontSizeToFitWidth = YES; + } + return _timeView; +} +- (UIView *)numBgView{ + if(!_numBgView){ + _numBgView = [UIView new]; + _numBgView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.8]; + } + return _numBgView; +} +-(UILabel *)numView{ + if(!_numView){ + _numView = [UILabel mew_getLabWithText:@"" font:kFontMedium(10) textColor:UIColorMewFromRGB(0x696D7A)]; + _numView.textAlignment = NSTextAlignmentCenter; + _numView.adjustsFontSizeToFitWidth = YES; + } + return _numView; +} +-(UILabel *)nameView{ + if(!_nameView){ + _nameView = [UILabel mew_getLabWithText:@"" font:kFontRegular(12) textColor:UIColorMewFromRGB(0x696D7A)]; + } + return _nameView; +} +- (UILabel *)instructionsView{ + if(!_instructionsView){ + _instructionsView = [UILabel mew_getLabWithText:@"" font:kFontRegular(12) textColor:UIColorMewFromRGB(0x696D7A)]; + _instructionsView.numberOfLines = 0; + } + return _instructionsView; +} +-(UILabel *)useIDHeadView{ + if(!_useIDHeadView){ + _useIDHeadView = [UILabel mew_getLabWithText:@"使用者ID:" font:kFontRegular(12) textColor:UIColorMewFromRGB(0x696D7A)]; + } + return _useIDHeadView; +} +- (UILabel *)useIDView{ + if(!_useIDView){ + _useIDView = [UILabel mew_getLabWithText:@"" font:kFontMedium(13) textColor:UIColorMewFromRGB(0x2B2D33)]; + _useIDView.numberOfLines = 0; + } + return _useIDView; +} + +- (UIButton *)reasonBtn{ + if(!_reasonBtn){ + _reasonBtn = [UIButton new]; + _reasonBtn.backgroundColor = UIColorMewFromRGB(0xFFDA24); + [_reasonBtn setTitle:@"查看原因" forState:UIControlStateNormal]; + _reasonBtn.titleLabel.font = kFontMedium(14); + [_reasonBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _reasonBtn.layer.cornerRadius = kGetScaleWidth(42)/2; + _reasonBtn.layer.masksToBounds = YES; + _reasonBtn.hidden = YES; + [_reasonBtn addTarget:self action:@selector(checkCauseAction) forControlEvents:UIControlEventTouchUpInside]; + + } + return _reasonBtn; +} +-(UIButton *)editBtn{ + if(!_editBtn){ + _editBtn = [UIButton new]; + _editBtn.backgroundColor = [UIColor whiteColor]; + [_editBtn setTitle:@"重新编辑" forState:UIControlStateNormal]; + [_editBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _editBtn.titleLabel.font = kFontMedium(14); + _editBtn.layer.cornerRadius = kGetScaleWidth(42)/2; + _editBtn.layer.masksToBounds = YES; + _editBtn.layer.borderWidth = 1; + _editBtn.layer.borderColor = UIColorMewFromRGB(0xFFDA24).CGColor; + _editBtn.hidden = YES; + [_editBtn addTarget:self action:@selector(againEditAction) forControlEvents:UIControlEventTouchUpInside]; + + } + return _editBtn; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceCell.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceCell.h new file mode 100644 index 0000000..7c108ae --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceCell.h @@ -0,0 +1,21 @@ +// +// XPPrivilegeCardProduceCell.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardProduceCell : UITableViewCell +@property(nonatomic,copy) NSString *title; +@property(nonatomic,copy) NSString *text; +@property(nonatomic,copy) NSString *placeholder; +@property(nonatomic,strong) NSIndexPath *path; + +-(NSString *)getContent; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceCell.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceCell.m new file mode 100644 index 0000000..3a1b3a1 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceCell.m @@ -0,0 +1,164 @@ +// +// XPPrivilegeCardProduceCell.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardProduceCell.h" +@interface XPPrivilegeCardProduceCell() +///标题 +@property(nonatomic,strong) UILabel *titilView; +///填写内容 +@property(nonatomic,strong) UITextField *fillOutView; +///分割线 +@property(nonatomic,strong) UIView *lineView; +@end +@implementation XPPrivilegeCardProduceCell +-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} + +-(void)installUI{ + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.titilView]; + [self.contentView addSubview:self.fillOutView]; + [self.contentView addSubview:self.lineView]; +} +-(void)installConstraints{ + [self.titilView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.mas_equalTo(kGetScaleWidth(32)); + make.centerY.equalTo(self.contentView); + make.height.mas_equalTo(kGetScaleWidth(18)); + }]; + [self.fillOutView mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-kGetScaleWidth(32)); + make.width.mas_equalTo(kGetScaleWidth(187)); + make.centerY.equalTo(self.contentView); + make.height.mas_equalTo(kGetScaleWidth(18)); + }]; + [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.equalTo(self.contentView).inset(kGetScaleWidth(20)); + make.bottom.equalTo(self.contentView); + make.height.mas_equalTo(0.5); + }]; +} +-(void)setTitle:(NSString *)title{ + _title = title; + _titilView.text = _title; +} +- (void)setPlaceholder:(NSString *)placeholder{ + _placeholder = placeholder; + NSAttributedString *attText = [[NSAttributedString alloc]initWithString:_placeholder attributes:@{NSFontAttributeName:kFontRegular(13),NSForegroundColorAttributeName:UIColorMewFromRGB(0xCED1DB)}]; + _fillOutView.attributedPlaceholder = attText; +} +-(void)textFieldDidChange:(UITextField *)textField{ + + if(self.path.row == 0){ + if(textField.text.length > 12){ + [MewHUDTool showErrorWithMessage:@"特权卡名称不能超过12个字符"]; + textField.text = [textField.text substringToIndex:12]; + } + }else if (self.path.row == 2){ + if(textField.text.length > 20){ + [MewHUDTool showErrorWithMessage:@"特权说明不能超过20个字符"]; + textField.text = [textField.text substringToIndex:20]; + } + } + if(self.path.row == 1 || self.path.row == 3){ + if(textField.text.length > 4){ + textField.text = [textField.text substringToIndex:4];; + } + + } +} +//判断是否为数字 + +- (BOOL)isPureInt:(NSString*)string{ + + NSScanner* scan = [NSScanner scannerWithString:string]; + + int val; + + return[scan scanInt:&val] && [scan isAtEnd]; + +} +-(void)setPath:(NSIndexPath *)path{ + _path = path; + _fillOutView.keyboardType = UIKeyboardTypeDefault; + + if(_path.row == 1 || _path.row == 3){ + _fillOutView.keyboardType = UIKeyboardTypeNumberPad; + } +} +- (BOOL)textFieldShouldReturn:(UITextField *)textField { + [textField resignFirstResponder]; + return YES; +} +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ + if(self.path.row == 4){ + if([string isEqualToString:@","] || [self isPureInt:string] || string.length == 0){ + return YES; + }else{ + return NO; + } + }else if(_path.row == 1 || _path.row == 3){ + if([self isPureInt:string] || string.length == 0){ + return YES; + }else{ + return NO; + } + } + + return YES; +} +-(NSString *)getContent{ + return self.fillOutView.text; +} +-(void)setText:(NSString *)text{ + _text = text; + _fillOutView.text = _text; +} +#pragma mark - 懒加载 +- (UILabel *)titilView{ + if(!_titilView){ + _titilView = [UILabel mew_getLabWithText:@"" font:kFontRegular(12) textColor:UIColorMewFromRGB(0x696D7A)]; + } + return _titilView; +} +-(UITextField *)fillOutView{ + if(!_fillOutView){ + _fillOutView = [UITextField new]; + _fillOutView.font = kFontRegular(13); + _fillOutView.textColor = UIColorMewFromRGB(0x2B2D33); + _fillOutView.textAlignment = NSTextAlignmentRight; + _fillOutView.delegate = self; + _fillOutView.returnKeyType = UIReturnKeyDone; + [_fillOutView addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged]; + } + return _fillOutView; +} +- (UIView *)lineView{ + if(!_lineView){ + _lineView = [UIView new]; + _lineView.backgroundColor = UIColorMewFromRGB(0xF8F8FA); + } + return _lineView; +} +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceFooterView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceFooterView.h new file mode 100644 index 0000000..88caaee --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceFooterView.h @@ -0,0 +1,31 @@ +// +// XPPrivilegeCardProduceFooterView.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import +#import "XPPrivilegeCardItemModel.h" +@class XPPrivilegeCardProduceFooterView; +@protocol XPPrivilegeCardProduceFooterViewDelegate +///取消 +-(void)xpPrivilegeCardProduceFooterViewCancelCreatPrivilegeCard:(XPPrivilegeCardProduceFooterView *_Nullable)view; +///确认 +-(void)xpPrivilegeCardProduceFooterViewCreatPrivilegeCard:(XPPrivilegeCardProduceFooterView *_Nullable)view; +///上传图片 +-(void)xpPrivilegeCardProduceFooterViewUploadPictures:(XPPrivilegeCardProduceFooterView *_Nullable)view; +///删除图片 +-(void)xpPrivilegeCardProduceFooterViewDelPictures:(XPPrivilegeCardProduceFooterView *_Nullable)view; +@end + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardProduceFooterView : UIView +@property(nonatomic,assign) int cardType; +@property(nonatomic,weak) iddelegate; +@property(nonatomic,strong) UIImage * _Nullable chooseImage; +@property(nonatomic,copy) NSString *photoUrl; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceFooterView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceFooterView.m new file mode 100644 index 0000000..2ff732b --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceFooterView.m @@ -0,0 +1,198 @@ +// +// XPPrivilegeCardProduceFooterView.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardProduceFooterView.h" + +@interface XPPrivilegeCardProduceFooterView() + +///标题 +@property(nonatomic,strong) UILabel *titleView; +///背景 +@property(nonatomic,strong) NetImageView *bgimageVeiw; + +///取消 +@property(nonatomic,strong) UIButton *cancelBtn; +///确认 +@property(nonatomic,strong) UIButton *verifyBtn; +///没上传图片login +@property(nonatomic,strong) UIImageView *iconView; +///没上传图片尺寸说明 +@property(nonatomic,strong) UILabel *phoneTitleView; +///删除图片,重新选择 +@property(nonatomic,strong)UIButton *delBtn; + +@end +@implementation XPPrivilegeCardProduceFooterView +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.titleView]; + [self addSubview:self.bgimageVeiw]; + [self.bgimageVeiw addSubview:self.iconView]; + [self.bgimageVeiw addSubview:self.phoneTitleView]; + [self.bgimageVeiw addSubview:self.delBtn]; + [self addSubview:self.cancelBtn]; + [self addSubview:self.verifyBtn]; +} +-(void)installConstraints{ + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(15)); + make.leading.mas_equalTo(kGetScaleWidth(32)); + }]; + [self.bgimageVeiw mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.titleView.mas_bottom).mas_offset(kGetScaleWidth(8)); + make.width.mas_equalTo(kGetScaleWidth(256)); + make.height.mas_equalTo(kGetScaleWidth(144)); + make.centerX.equalTo(self); + }]; + [self.delBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(kGetScaleWidth(16)); + make.top.mas_equalTo(kGetScaleWidth(8)); + make.trailing.mas_equalTo(-kGetScaleWidth(12)); + }]; + [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(60)); + make.height.mas_equalTo(kGetScaleWidth(44)); + make.centerX.equalTo(self.bgimageVeiw); + make.top.mas_equalTo(kGetScaleWidth(40)); + }]; + [self.phoneTitleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self.bgimageVeiw); + make.top.equalTo(self.iconView.mas_bottom).mas_offset(kGetScaleWidth(8)); + }]; + [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.bgimageVeiw.mas_bottom).mas_offset(kGetScaleWidth(20)); + make.width.mas_equalTo(kGetScaleWidth(128)); + make.height.mas_equalTo(kGetScaleWidth(42)); + make.leading.mas_equalTo(kGetScaleWidth(28)); + }]; + [self.verifyBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.width.height.equalTo(self.cancelBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(28)); + }]; +} + +-(void)setChooseImage:(UIImage *)chooseImage{ + _chooseImage = chooseImage; + _bgimageVeiw.image = _chooseImage; + _iconView.hidden = _chooseImage != nil; + _phoneTitleView.hidden = _chooseImage != nil; + _delBtn.hidden = _chooseImage == nil; + +} +-(void)setPhotoUrl:(NSString *)photoUrl{ + _photoUrl = photoUrl; + _bgimageVeiw.imageUrl = _photoUrl; + _iconView.hidden = _photoUrl.length != 0; + _phoneTitleView.hidden = _photoUrl.length != 0; + _delBtn.hidden = _photoUrl.length == 0; + +} + + + +-(void)cancelAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(xpPrivilegeCardProduceFooterViewCancelCreatPrivilegeCard:)]){ + [self.delegate xpPrivilegeCardProduceFooterViewCancelCreatPrivilegeCard:self]; + } +} +-(void)verifyAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(xpPrivilegeCardProduceFooterViewCreatPrivilegeCard:)]){ + [self.delegate xpPrivilegeCardProduceFooterViewCreatPrivilegeCard:self]; + } +} +-(void)uploadPictureAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(xpPrivilegeCardProduceFooterViewUploadPictures:)]){ + [self.delegate xpPrivilegeCardProduceFooterViewUploadPictures:self]; + } +} +-(void)delAtion{ + if(self.delegate && [self.delegate respondsToSelector:@selector(xpPrivilegeCardProduceFooterViewUploadPictures:)]){ + [self.delegate xpPrivilegeCardProduceFooterViewUploadPictures:self]; + } + +} +#pragma mark - 懒加载 + +- (UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel mew_getLabWithText:@"特权卡图片:" font:kFontRegular(12) textColor:UIColorMewFromRGB(0x696D7A)]; + } + return _titleView; +} +- (NetImageView *)bgimageVeiw{ + if(!_bgimageVeiw){ + _bgimageVeiw = [NetImageView new]; + _bgimageVeiw.backgroundColor = UIColorMewFromRGB(0xF8F8FA); + _bgimageVeiw.layer.cornerRadius = kGetScaleWidth(10); + _bgimageVeiw.layer.masksToBounds = YES; + _bgimageVeiw.contentMode = UIViewContentModeScaleAspectFill; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(uploadPictureAction)]; + _bgimageVeiw.userInteractionEnabled = YES; + [_bgimageVeiw addGestureRecognizer:tap]; + + } + return _bgimageVeiw; +} + +- (UIImageView *)iconView{ + if(!_iconView){ + _iconView = [UIImageView new]; + _iconView.image = kImage(@"room_Privilege_Card_no_image"); + + } + return _iconView; +} +- (UILabel *)phoneTitleView{ + if(!_phoneTitleView){ + _phoneTitleView = [UILabel mew_getLabWithText:@"图片比例:16:9" font:kFontRegular(13) textColor:UIColorMewFromRGB(0xCED1DB)]; + } + return _phoneTitleView; +} +- (UIButton *)cancelBtn{ + if(!_cancelBtn){ + _cancelBtn = [UIButton new]; + [_cancelBtn setTitle:@"取消" forState:UIControlStateNormal]; + _cancelBtn.titleLabel.font = kFontMedium(14); + [_cancelBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _cancelBtn.backgroundColor = UIColorMewRGBAlpha(0xFFDA24, 0.2); + _cancelBtn.layer.cornerRadius = kGetScaleWidth(42)/2; + _cancelBtn.layer.masksToBounds = YES; + [_cancelBtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _cancelBtn; +} +-(UIButton *)verifyBtn{ + if(!_verifyBtn){ + _verifyBtn = [UIButton new]; + [_verifyBtn setTitle:@"确认" forState:UIControlStateNormal]; + _verifyBtn.titleLabel.font = kFontMedium(14); + [_verifyBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _verifyBtn.backgroundColor = UIColorMewFromRGB(0xFFDA24); + _verifyBtn.layer.cornerRadius = kGetScaleWidth(42)/2; + _verifyBtn.layer.masksToBounds = YES; + [_verifyBtn addTarget:self action:@selector(verifyAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _verifyBtn; +} +- (UIButton *)delBtn{ + if(!_delBtn){ + _delBtn = [UIButton new]; + [_delBtn setBackgroundImage:kImage(@"room_Privilege_Card_choose_del") forState:UIControlStateNormal]; + [_delBtn addTarget:self action:@selector(delAtion) forControlEvents:UIControlEventTouchUpInside]; + [_delBtn mew_setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; + } + return _delBtn; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceView.h new file mode 100644 index 0000000..ac07327 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceView.h @@ -0,0 +1,32 @@ +// +// XPPrivilegeCardProduceView.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import + +#import "XPPrivilegeCardItemModel.h" +@protocol XPPrivilegeCardProduceViewDelegate + +///确认 +-(void)verifyCreatPrivilegeCardWithParameter:(NSDictionary *_Nonnull)parameter; +///上传图片 +-(void)uploadPictures; +///删除图片 +-(void)delPictures; +@end + + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardProduceView : UIView +@property(nonatomic,weak) iddelegate; +@property(nonatomic,assign) int cardType; +@property(nonatomic,strong) UIImage *chooseImage; + +@property(nonatomic,strong) XPPrivilegeCardItemModel *_Nullable cardModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceView.m new file mode 100644 index 0000000..ee26e7f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardProduceView.m @@ -0,0 +1,221 @@ +// +// XPPrivilegeCardProduceView.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardProduceView.h" +#import "XPPrivilegeCardProduceCell.h" +#import "XPPrivilegeCardProduceFooterView.h" + + +@interface XPPrivilegeCardProduceView() +@property(nonatomic,strong) UIButton *backBtn; +@property(nonatomic,strong) UILabel *titleView; +@property(nonatomic,strong) UIView *bgView; +@property(nonatomic,strong) UITableView *tableView; +@property(nonatomic,strong) XPPrivilegeCardProduceFooterView *footerView; +@property(nonatomic,copy) NSArray *titleList; +@property(nonatomic,copy) NSArray *placeholderList; +@property(nonatomic,copy) NSMutableArray *textList; + +@end +@implementation XPPrivilegeCardProduceView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; + [self addSubview:self.backBtn]; + [self addSubview:self.bgView]; + [self.bgView addSubview:self.titleView]; + [self.bgView addSubview:self.tableView]; + self.tableView.tableFooterView = self.footerView; +} +-(void)installConstraints{ + [self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self); + }]; + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(327)); + make.height.mas_equalTo(kGetScaleWidth(577)); + make.center.equalTo(self); + }]; + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(28)); + make.centerX.equalTo(self.bgView); + make.height.mas_equalTo(kGetScaleWidth(20)); + }]; + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.titleView.mas_bottom).mas_offset(kGetScaleWidth(9)); + make.trailing.leading.bottom.equalTo(self.bgView); + + }]; +} +-(void)dissAction{ + [self removeFromSuperview]; +} +-(void)setChooseImage:(UIImage *)chooseImage{ + _chooseImage = chooseImage; + _footerView.chooseImage = _chooseImage; +} + +- (void)setCardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + _cardModel = cardModel; + [self.textList removeAllObjects]; + if(_cardModel == nil){ + self.footerView.photoUrl = @""; + [self.tableView reloadData]; + return; + } + NSString *cardName = _cardModel.cardName.length > 0 ? _cardModel.cardName : @""; + NSString *dailyNum = _cardModel.dailyNum.length > 0 ? _cardModel.dailyNum : @""; + NSString *description = _cardModel.desc.length > 0 ? _cardModel.desc : @""; + NSString *effectTime = _cardModel.effectDay.length > 0 ? _cardModel.effectDay : @""; + NSString *erbanNoStr = _cardModel.erbanNoStr > 0 ? _cardModel.erbanNoStr : @""; + [self.textList addObject:cardName]; + [self.textList addObject:dailyNum]; + [self.textList addObject:description]; + [self.textList addObject:effectTime]; + [self.textList addObject:erbanNoStr]; + self.footerView.photoUrl = _cardModel.cardUrl; + [self.tableView reloadData]; +} +#pragma mark -UITableViewDelegate,UITableViewDataSource +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return self.titleList.count; +} +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + XPPrivilegeCardProduceCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPPrivilegeCardProduceCell class]) forIndexPath:indexPath]; + cell.title = self.titleList[indexPath.row]; + if(indexPath.row < self.textList.count){ + cell.text = self.textList[indexPath.row]; + cell.placeholder = self.placeholderList[indexPath.row]; + }else{ + cell.text = @""; + cell.placeholder = self.placeholderList[indexPath.row]; + } + cell.path = indexPath; + return cell; +} +#pragma mark -XPPrivilegeCardProduceFooterViewDelegate +-(void)verifyAction{ + NSArray *keyList = @[@"cardName",@"dailyNum",@"description",@"effectTime",@"erbanNoStr"]; + NSMutableDictionary *parameter = [NSMutableDictionary dictionary]; + BOOL isComplete = YES; + for (int i = 0; i < keyList.count; i++) { + XPPrivilegeCardProduceCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]]; + NSString *text = [cell getContent].length > 0 ? [cell getContent] : @""; + [parameter setValue:text forKey:keyList[i]]; + if(i != 2 && text.length == 0){ + isComplete = NO; + NSString *hint = i == 4 ? @"请填写使用者id":cell.placeholder; + [MewHUDTool showErrorWithMessage:hint]; + break; + } + } + if(isComplete == NO){ + return; + } + if(self.delegate && [self.delegate respondsToSelector:@selector(verifyCreatPrivilegeCardWithParameter:)]){ + [self.delegate verifyCreatPrivilegeCardWithParameter:parameter]; + } +} +-(void)uploadPictureAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(uploadPictures)]){ + [self.delegate uploadPictures]; + } +} +-(void)xpPrivilegeCardProduceFooterViewCancelCreatPrivilegeCard:(XPPrivilegeCardProduceFooterView *_Nullable)view{ + [self removeFromSuperview]; +} +///确认 +-(void)xpPrivilegeCardProduceFooterViewCreatPrivilegeCard:(XPPrivilegeCardProduceFooterView *_Nullable)view{ + [self verifyAction]; +} +///上传图片 +-(void)xpPrivilegeCardProduceFooterViewUploadPictures:(XPPrivilegeCardProduceFooterView *_Nullable)view{ + [self uploadPictureAction]; +} +-(void)xpPrivilegeCardProduceFooterViewDelPictures:(XPPrivilegeCardProduceFooterView *_Nullable)view{ + if(self.delegate && [self.delegate respondsToSelector:@selector(delPictures)]){ + [self.delegate delPictures]; + } +} + +#pragma mark - 懒加载 +- (UIButton *)backBtn{ + if(!_backBtn){ + _backBtn = [UIButton new]; + [_backBtn addTarget:self action:@selector(dissAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _backBtn; +} +-(UIView *)bgView{ + if(!_bgView){ + _bgView = [UIView new]; + _bgView.backgroundColor = [UIColor whiteColor]; + _bgView.layer.cornerRadius = kGetScaleWidth(20); + _bgView.layer.masksToBounds = YES; + } + return _bgView; +} +- (UILabel *)titleView{ + if(!_titleView){ + _titleView = [UILabel mew_getLabWithText:@"填写特权卡信息" font:kFontMedium(15) textColor:UIColorMewFromRGB(0x2B2D33)]; + } + return _titleView; +} + +- (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]; + _tableView.scrollEnabled = NO; + _tableView.rowHeight = kGetScaleWidth(49); + if (@available(iOS 11.0, *)) { + _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [_tableView registerClass:[XPPrivilegeCardProduceCell class] forCellReuseIdentifier:NSStringFromClass([XPPrivilegeCardProduceCell class])]; + + } + return _tableView; +} +- (XPPrivilegeCardProduceFooterView *)footerView{ + if(!_footerView){ + _footerView = [[XPPrivilegeCardProduceFooterView alloc]initWithFrame:CGRectMake(0, 0, kGetScaleWidth(327), kGetScaleWidth(270))]; + _footerView.delegate = self; + } + return _footerView; +} +- (NSArray *)titleList{ + if(!_titleList){ + _titleList = @[@"特权卡名称:",@"每日使用次数:",@"特权说明:",@"有效期:",@"使用者ID:"]; + } + return _titleList; +} +- (NSArray *)placeholderList{ + if(!_placeholderList){ + _placeholderList = @[@"请输入卡片名称",@"请输入每日可使用次数",@"选填,限制20个字符",@"请输入卡片有效天数",@"多个ID用“,”隔开"]; + } + return _placeholderList; +} +- (NSMutableArray *)textList{ + if(!_textList){ + _textList = [NSMutableArray array]; + } + return _textList; +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardTitlView.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardTitlView.h new file mode 100644 index 0000000..7968be3 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardTitlView.h @@ -0,0 +1,16 @@ +// +// XPPrivilegeCardTitlView.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardTitlView : JXCategoryTitleView + +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardTitlView.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardTitlView.m new file mode 100644 index 0000000..560c618 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/Subviews/XPPrivilegeCardTitlView.m @@ -0,0 +1,24 @@ +// +// XPPrivilegeCardTitlView.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardTitlView.h" + +@implementation XPPrivilegeCardTitlView + +- (void)layoutSubviews{ + [super layoutSubviews]; + + //部分使用者为了适配不同的手机屏幕尺寸,JXCategoryView的宽高比要求保持一样,所以它的高度就会因为不同宽度的屏幕而不一样。计算出来的高度,有时候会是位数很长的浮点数,如果把这个高度设置给UICollectionView就会触发内部的一个错误。所以,为了规避这个问题,在这里对高度统一向下取整。 + //如果向下取整导致了你的页面异常,请自己重新设置JXCategoryView的高度,保证为整数即可。 + + CGRect targetFrame = CGRectMake(0, 0, KScreenWidth - kGetScaleWidth(90), floor(self.bounds.size.height)); + self.collectionView.frame = targetFrame; + + +} + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardItemVC.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardItemVC.h new file mode 100644 index 0000000..97a7e2d --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardItemVC.h @@ -0,0 +1,36 @@ +// +// XPPrivilegeCardItemVC.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import +#import "MewMvpViewController.h" +#import +@class XPPrivilegeCardItemVC,XPPrivilegeCardItemModel; +typedef enum : NSUInteger { + XPPrivilegeCardItemVCType_all,///全部 + XPPrivilegeCardItemVCType_audit,///审核中 + XPPrivilegeCardItemVCType_use,///生效中 + XPPrivilegeCardItemVCType_no_push,///未通过 + XPPrivilegeCardItemVCType_out_time,///已过期 + +} XPPrivilegeCardItemVCType; +@protocol XPPrivilegeCardItemVCDelegate +///删除 +-(void)deleteExpiredPrivilegeCardWithVC:(XPPrivilegeCardItemVC *_Nullable)VC cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel; + +///重新编辑 +-(void)againEditPrivilegeCardWithCell:(XPPrivilegeCardItemVC *_Nullable)VC cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel; +@end + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardItemVC : MewMvpViewController +@property(nonatomic,copy) NSString *roomUid; +@property(nonatomic,copy) NSString *cardStatus; +@property(nonatomic,weak) iddelegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardItemVC.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardItemVC.m new file mode 100644 index 0000000..8e2fde4 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardItemVC.m @@ -0,0 +1,215 @@ +// +// XPPrivilegeCardItemVC.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardItemVC.h" +#import "XPPrivilegeCardPresenter.h" +#import "XPPrivilegeCardItemCell.h" +#import "XPPrivilegeCardProtocol.h" +#import +#import "MewWebViewController.h" +#import "MewHtmlUrl.h" +#import "XPPrivilegeCardConfirmView.h" +#import "SDPhotoBrowser.h" + +@interface XPPrivilegeCardItemVC () +@property(nonatomic,strong) UITableView *tableView; +@property(nonatomic,strong) NSMutableArray *cardList; +///协议 +@property(nonatomic,strong) YYLabel *agreementView; +@property(nonatomic,copy) NSString *photoUrl; +@end + +@implementation XPPrivilegeCardItemVC +- (void)dealloc{ + [[NSNotificationCenter defaultCenter]removeObserver:self]; +} +- (__kindof id)createPresenter { + return [[XPPrivilegeCardPresenter alloc] init]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self installUI]; + [self installConstraints]; + [self requestData]; +} +-(void)installUI{ + self.view.backgroundColor = UIColorMewFromRGB(0xF5F6FA); + [self.view addSubview:self.tableView]; + [self.view addSubview:self.agreementView]; + self.agreementView.attributedText = [self privacyAttributedStr]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(savePrivilegeCardSuccess) name:@"kSavePrivilegeCardSuccess" object:nil]; + MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)]; + header.stateLabel.font = [UIFont systemFontOfSize:10.0]; + header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0]; + header.stateLabel.textColor = [MewThemeColor mewSecondTextColor]; + header.lastUpdatedTimeLabel.textColor = [MewThemeColor mewSecondTextColor]; + self.tableView.mj_header = header; +} +-(void)headerRefresh{ + [self requestData]; +} +-(void)installConstraints{ + [self.agreementView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self.view); + make.bottom.mas_equalTo(-kGetScaleWidth(44)); + }]; + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.top.trailing.equalTo(self.view); + make.bottom.equalTo(self.agreementView.mas_top).mas_offset(-kGetScaleWidth(10)); + }]; +} +-(void)savePrivilegeCardSuccess{ + [self requestData]; +} +-(void)requestData{ + [self.presenter getPrivilegeCardListWithRoomUid:self.roomUid cardStatus:self.cardStatus]; +} +-(void)getPrivilegeCardListSuccess:(NSArray *)list{ + [self.cardList removeAllObjects]; + [self.tableView.mj_header endRefreshing]; + for (XPPrivilegeCardItemModel *cardModel in list) { + CGFloat cellHeight = cardModel.cardStatus.intValue == 2 ? kGetScaleWidth(350) : kGetScaleWidth(270); + CGFloat getHeight = [UILabel getLabelHeightWithText:cardModel.uidStr width:kGetScaleWidth(227) font:kFontMedium(13)] - kGetScaleWidth(18); + cardModel.cellHeight = cellHeight + getHeight + kGetScaleWidth(10); + cardModel.numAtt = [XPPrivilegeCardItemCell getTextAttWithText:[NSString stringWithFormat:@"每日次数:%@次",cardModel.dailyNum] subText:[NSString stringWithFormat:@"%@次",cardModel.dailyNum] textFont:kFontMedium(10) subTextFont:kFontMedium(11)]; + cardModel.nameAtt = [XPPrivilegeCardItemCell getTextAttWithText:[NSString stringWithFormat:@"名称:%@",cardModel.cardName] subText:cardModel.cardName textFont:kFontRegular(12) subTextFont:kFontMedium(13)]; + cardModel.instructionsAtt = [XPPrivilegeCardItemCell getTextAttWithText:[NSString stringWithFormat:@"说明:%@",cardModel.desc] subText:cardModel.desc textFont:kFontRegular(12) subTextFont:kFontMedium(13)]; + [self.cardList addObject:cardModel]; + } + [self.tableView reloadData]; + +} +-(void)getPrivilegeCardListFail{ + [self.tableView.mj_header endRefreshing]; +} +#pragma mark -UITableViewDelegate,UITableViewDataSource +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return self.cardList.count == 0 ? 1 : self.cardList.count; +} +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + if(self.cardList.count==0)return 300; + XPPrivilegeCardItemModel *cardModel = self.cardList[indexPath.row]; + return cardModel.cellHeight; +} +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + if(self.cardList.count == 0){ + MewEmptyTableViewCell*cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MewEmptyTableViewCell class]) forIndexPath:indexPath]; + cell.mewText = @"暂无特权卡"; + return cell; + } + XPPrivilegeCardItemCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPPrivilegeCardItemCell class]) forIndexPath:indexPath]; + XPPrivilegeCardItemModel *cardModel = self.cardList[indexPath.row]; + cell.type = cardModel.cardStatus.intValue + 1; + cell.cardModel = cardModel; + cell.delegate = self; + return cell; +} +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self.view; +} +#pragma mark - XPPrivilegeCardItemCellDelegate +///删除 +-(void)deleteExpiredPrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + XPPrivilegeCardConfirmView *confirmView = [[XPPrivilegeCardConfirmView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"确认将【%@】删除吗",cardModel.cardName] attributes:@{NSFontAttributeName:kFontRegular(14),NSForegroundColorAttributeName:UIColorMewFromRGB(0x696D7A)}]; + [textAtt addAttributes:@{NSFontAttributeName:kFontMedium(14),NSForegroundColorAttributeName:UIColorMewFromRGB(0x2B2D33)} range:[textAtt.string rangeOfString:[NSString stringWithFormat:@"【%@】",cardModel.cardName]]]; + confirmView.textAtt = textAtt; + @kWeakify(self); + confirmView.confirmHanle = ^{ + @kStrongify(self); + if(self.delegate && [self.delegate respondsToSelector:@selector(deleteExpiredPrivilegeCardWithVC:cardModel:)]){ + [self.delegate deleteExpiredPrivilegeCardWithVC:self cardModel:cardModel]; + } + }; + [TTPopup popupView:confirmView style:TTPopupStyleAlert]; +} +///查看原因 +-(void)checkCauseOfPrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + XPPrivilegeCardConfirmView *confirmView = [[XPPrivilegeCardConfirmView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) WithTitle:YES]; + confirmView.text = cardModel.checkReason; + [TTPopup popupView:confirmView style:TTPopupStyleAlert]; +} +///重新编辑 +-(void)againEditPrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + if(self.delegate && [self.delegate respondsToSelector:@selector(againEditPrivilegeCardWithCell:cardModel:)]){ + [self.delegate againEditPrivilegeCardWithCell:self cardModel:cardModel]; + } +} +///点击图片 +-(void)clickPicturePrivilegeCardWithCell:(XPPrivilegeCardItemCell *_Nullable)cell cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + self.photoUrl = cardModel.cardUrl; + SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init]; + browser.sourceImagesContainerView = self.tableView; + browser.delegate = self; + browser.imageCount = 1; + browser.currentImageIndex = 0; + browser.isMe = NO; + [browser show]; +} +#pragma mark - SDPhotoBrowserDelegate +- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index { + return [NSURL URLWithString:self.photoUrl]; +} + +- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index { + return [UIImageConstant defalutBannerPlaceholder]; +} +#pragma mark - 懒加载 +- (UITableView *)tableView { + if (!_tableView) { + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + _tableView.delegate = self; + _tableView.dataSource = self; + UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, kGetScaleWidth(10))]; + headerView.backgroundColor = UIColorMewFromRGB(0xF5F6FA); + _tableView.tableHeaderView = headerView; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _tableView.backgroundColor = [UIColor clearColor]; + if (@available(iOS 11.0, *)) { + _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [_tableView registerClass:[XPPrivilegeCardItemCell class] forCellReuseIdentifier:NSStringFromClass([XPPrivilegeCardItemCell class])]; + [_tableView registerClass:[MewEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([MewEmptyTableViewCell class])]; + + } + return _tableView; +} +- (NSMutableArray *)cardList{ + if(!_cardList){ + _cardList = [NSMutableArray array]; + } + return _cardList; +} +-(YYLabel *)agreementView{ + if(!_agreementView){ + _agreementView = [[YYLabel alloc] init]; + _agreementView.textAlignment = NSTextAlignmentCenter; + [_agreementView sizeToFit]; + } + return _agreementView; +} +- (NSMutableAttributedString *)privacyAttributedStr{ + NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"已阅读并同意"]; + attString.yy_color = UIColorMewFromRGB(0xA2A7B8); + attString.yy_font = kFontRegular(11); + NSString *userString = @"《用户特权卡使用说明》"; + NSMutableAttributedString *userAttString = [[NSMutableAttributedString alloc] initWithString:userString attributes:@{NSForegroundColorAttributeName:UIColorMewFromRGB(0x696D7A)}]; + @kWeakify(self); + [userAttString yy_setTextHighlightRange:NSMakeRange(0, userAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { + @kStrongify(self); + // 跳转用户协议 + MewWebViewController * webVC = [[MewWebViewController alloc] init]; + webVC.url = MewHtmlURLWithType(kPrivilegeCardURL); + [self.navigationController pushViewController:webVC animated:YES]; + } longPressAction:nil]; + + + [attString appendAttributedString:userAttString]; + return attString; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardVC.h b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardVC.h new file mode 100644 index 0000000..70ca86c --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardVC.h @@ -0,0 +1,16 @@ +// +// XPPrivilegeCardVC.h +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import +#import "MewMvpViewController.h" +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivilegeCardVC : MewMvpViewController +@property(nonatomic,copy) NSString *roomUid; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardVC.m b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardVC.m new file mode 100644 index 0000000..a553814 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/Room/View/PrivilegeCard/View/XPPrivilegeCardVC.m @@ -0,0 +1,512 @@ +// +// XPPrivilegeCardVC.m +// xplan-ios +// +// Created by duoban on 2023/7/24. +// + +#import "XPPrivilegeCardVC.h" +#import "XPPrivilegeCardPresenter.h" +#import +#import +#import +#import "XPPrivilegeCardItemVC.h" +#import "MewUploadPhoto.h" +#import "Api+Mine.h" +#import "XPPrivilegeCardTitlView.h" +#import "XPPrivilegeCardProduceView.h" +#import +#import "XPPrivilegeCardConfirmView.h" +#import "XPPrivilegeCardProtocol.h" +#import +#import "MovEncodeToMpegTool.h" +#import "XPPrivilegeCardVideoItemModel.h" +@interface XPPrivilegeCardVC () +///分页标题 +@property (nonatomic, strong) NSArray *titles; +///分页控件 +@property (nonatomic, strong) XPPrivilegeCardTitlView *titleView; +///分页lineView +@property (nonatomic, strong) JXCategoryListContainerView *contentView; +///新建 +@property(nonatomic,strong) UIButton *newBtn; +///图片的上传链接 +@property (nonatomic,strong) NSArray *uploadImageList; + +///新建 +@property(nonatomic,strong) XPPrivilegeCardProduceView *produceView; +///视频 +@property(nonatomic,strong) XPPrivilegeCardVideoItemModel *videoModel; +@end + +@implementation XPPrivilegeCardVC +- (__kindof id)createPresenter { + return [[XPPrivilegeCardPresenter alloc] init]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self installUI]; + [self installConstraints]; +} +-(void)installUI{ + self.title = @"特权卡"; + [self.view addSubview:self.titleView]; + [self.view addSubview:self.contentView]; + + [self.view addSubview:self.newBtn]; +} +-(void)installConstraints{ + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.view); + make.left.right.mas_equalTo(self.view); + make.height.mas_equalTo(kGetScaleWidth(62)); + }]; + + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.titleView.mas_bottom); + make.left.right.bottom.mas_equalTo(self.view); + }]; + + [self.newBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-kGetScaleWidth(15)); + make.width.mas_equalTo(kGetScaleWidth(60)); + make.height.mas_equalTo(kGetScaleWidth(28)); + make.centerY.equalTo(self.titleView); + }]; + +} +#pragma mark - JXCategoryViewDelegate +- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView { + return self.titles.count; +} + +- (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { + + UIViewController * list = (UIViewController *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:index]]; + if (list) { + return list; + } else { + XPPrivilegeCardItemVC *vc = [XPPrivilegeCardItemVC new]; + vc.roomUid = self.roomUid; + vc.delegate = self; + vc.cardStatus = index == 0 ? @"" : @(index-1).stringValue; + return vc; + } +} + + +-(void)creatViewAction{ + self.produceView.cardModel = nil; + self.uploadImageList = @[]; + [kWindow addSubview:self.produceView]; + + +} +#pragma mark - XPPrivilegeCardProduceViewDelegate +///确认 +-(void)verifyCreatPrivilegeCardWithParameter:(NSDictionary *_Nonnull)parameter{ + if(self.uploadImageList.count == 0 && self.produceView.cardModel.cardUrl.length == 0 && self.videoModel == nil){ + [self mew_showErrorToast:@"请选择特权卡图片或视频"]; + return; + } + NSString *cardName = parameter[@"cardName"]; + NSString *dailyNum = parameter[@"dailyNum"]; + NSString *description = parameter[@"description"]; + NSString *effectTime = parameter[@"effectTime"]; + NSString *erbanNoStr = parameter[@"erbanNoStr"]; + XPPrivilegeCardConfirmView *confirmView = [[XPPrivilegeCardConfirmView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + @kWeakify(self); + confirmView.text = @"确认卡片信息填写是否正确\n审核通过后卡片将生效"; + confirmView.confirmHanle = ^{ + @kStrongify(self); + [self mew_showLoading]; + if(self.produceView.cardModel.cardUrl.length > 0){ + [self.presenter savePrivilegeCardWittCardName:cardName dailyNum:dailyNum description:description effectDay:effectTime erbanNoStr:erbanNoStr cardUrl:self.produceView.cardModel.cardUrl roomUid:self.roomUid cardType:@(self.produceView.cardModel.cardType).stringValue duration:self.produceView.cardModel.duration > 0 ? @(self.produceView.cardModel.duration).stringValue : @"0" effectUrl:@""]; + return; + } + if(self.produceView.cardType == 2){ + [self uploadVideoWithData:self.videoModel.videoData finish:^(NSMutableDictionary *list) { + NSString *photoUlr = list[@"photoUrl"]; + NSString *videoUrl = list[@"videoUrl"]; + if(photoUlr.length == 0 || videoUrl.length == 0){ + [self mew_hideHUD]; + [self mew_showErrorToast:@"上传视频失败,请重新上传"]; + return; + } + [self.presenter savePrivilegeCardWittCardName:cardName dailyNum:dailyNum description:description effectDay:effectTime erbanNoStr:erbanNoStr cardUrl:photoUlr roomUid:self.roomUid cardType:@"2" duration:self.videoModel.duration effectUrl:videoUrl]; + }]; + return; + } + [self uploadAlbumPicList:self.uploadImageList finish:^(NSArray *list) { + if(list.count == 0){ + [self mew_hideHUD]; + [self mew_showErrorToast:@"上传图片失败,请重新上传"]; + return; + } + [self.presenter savePrivilegeCardWittCardName:cardName dailyNum:dailyNum description:description effectDay:effectTime erbanNoStr:erbanNoStr cardUrl:list.firstObject roomUid:self.roomUid cardType:self.produceView.cardType == 1 ? @"1":@"0" duration:@"0" effectUrl:@""]; + + }]; + }; + + [TTPopup popupView:confirmView style:TTPopupStyleAlert]; + +} +///上传图片 +-(void)uploadPictures{ + [self.view endEditing:YES]; + + + TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self]; + imagePickerVc.modalPresentationStyle = UIModalPresentationOverFullScreen; + imagePickerVc.allowPickingVideo = YES; + imagePickerVc.allowTakeVideo = NO; + imagePickerVc.allowPickingGif = YES; + imagePickerVc.maxImagesCount = 1; + imagePickerVc.naviBgColor = [MewThemeColor mewAppCellBackgroundColor]; + imagePickerVc.naviTitleColor = [MewThemeColor mewMainTextColor]; + imagePickerVc.barItemTextColor = [MewThemeColor mewMainTextColor]; + [self presentViewController:imagePickerVc animated:YES completion:nil]; +} +-(void)delPictures{ + self.uploadImageList = @[]; +} +# pragma mark - TZImagePickerControllerDelegate +- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray *)infos { + if(photos.count > 0){ + self.produceView.cardType = 0; + self.produceView.chooseImage = photos.firstObject; + } + self.uploadImageList = photos; + self.videoModel = nil; + +} +- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingVideo:(UIImage *)coverImage sourceAssets:(PHAsset *)asset{ + [self mew_showLoading]; + [MovEncodeToMpegTool convertMovToMp4FromPHAsset:asset andAVAssetExportPresetQuality:ExportPresetMediumQuality andMovEncodeToMpegToolResultBlock:^(NSURL * _Nullable mp4FileUrl, NSData * _Nullable mp4Data, NSError * _Nullable error) { + [self mew_hideHUD]; + if(error != nil){ + [self mew_hideHUD]; + [MewHUDTool showErrorWithMessage:@"获取视频失败,请重新选择!"]; + return; + } + CGFloat mbSize = mp4Data.length / (1024.0*1024.0); + if(mbSize > 5){ + [MewHUDTool showErrorWithMessage:@"上传文件最大不能超过5M"]; + return; + } + self.videoModel.videoData = mp4Data; + self.videoModel.duration = [NSString stringWithFormat:@"%.f",asset.duration * 1000]; + self.videoModel.videoPhoto = coverImage; + dispatch_async(dispatch_get_main_queue(), ^{ + self.produceView.cardType = 2; + self.produceView.chooseImage = self.videoModel.videoPhoto; + }); + + }]; +} + +- (UIImage*) thumbnailImageForVideo:(NSURL *)videoURL atTime:(NSTimeInterval)time { + + AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURL options:nil]; + NSParameterAssert(asset); + AVAssetImageGenerator *assetImageGenerator =[[AVAssetImageGenerator alloc] initWithAsset:asset]; + assetImageGenerator.appliesPreferredTrackTransform = YES; + assetImageGenerator.apertureMode = AVAssetImageGeneratorApertureModeEncodedPixels; + + CGImageRef thumbnailImageRef = NULL; + CFTimeInterval thumbnailImageTime = time; + NSError *thumbnailImageGenerationError = nil; + thumbnailImageRef = [assetImageGenerator copyCGImageAtTime:CMTimeMake(thumbnailImageTime, 60)actualTime:NULL error:&thumbnailImageGenerationError]; + + if(!thumbnailImageRef) + NSLog(@"thumbnailImageGenerationError %@",thumbnailImageGenerationError); + + UIImage*thumbnailImage = thumbnailImageRef ? [[UIImage alloc]initWithCGImage: thumbnailImageRef] : nil; + + return thumbnailImage; +} +- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingGifImage:(UIImage *)animatedImage sourceAssets:(PHAsset *)asset{ + if(asset != nil){ + NSArray *resourceList = [PHAssetResource assetResourcesForAsset:asset]; + [resourceList enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + PHAssetResource *resource = obj; + PHAssetResourceRequestOptions *option = [[PHAssetResourceRequestOptions alloc]init]; + option.networkAccessAllowed = YES; + // 首先,需要获取沙盒路径 + NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; + // 拼接图片名为resource.originalFilename的路径 + NSString *imageFilePath = [path stringByAppendingPathComponent:resource.originalFilename]; + __block NSData *dataGif = [[NSData alloc]init]; + [self mew_showLoading]; + [[PHAssetResourceManager defaultManager] writeDataForAssetResource:resource toFile:[NSURL fileURLWithPath:imageFilePath] options:option completionHandler:^(NSError * _Nullable error) { + [self mew_hideHUD]; + if (error) { + if(error.code == -1){//文件已存在 + dataGif = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:imageFilePath]]; + self.produceView.cardType = 1; + self.produceView.chooseImage = animatedImage; + self.uploadImageList = @[dataGif]; + self.videoModel = nil; + }else{ + [MewHUDTool showErrorWithMessage:@"获取gif动图失败,请重新选择!"]; + } + + } else { + dataGif = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:imageFilePath]]; + self.produceView.cardType = 1; + self.produceView.chooseImage = animatedImage; + self.uploadImageList = @[dataGif]; + self.videoModel = nil; + + } + }]; + + + }]; + + + } + +} +#pragma mark - XPPrivilegeCardProtocol +-(void)savePrivilegeCardSuccess{ + [self mew_hideHUD]; + [MewHUDTool showSuccessWithMessage:@"提交成功"]; + [self.produceView removeFromSuperview]; + [[NSNotificationCenter defaultCenter]postNotificationName:@"kSavePrivilegeCardSuccess" object:nil]; +} +-(void)deletePrivilegeCardSuccess{ + [MewHUDTool showSuccessWithMessage:@"删除成功"]; + [[NSNotificationCenter defaultCenter]postNotificationName:@"kSavePrivilegeCardSuccess" object:nil]; +} +///上传图片 +- (void)uploadAlbumPicList:(NSArray *)array finish:(void(^)(NSArray *list))finish { + + id obj = array.firstObject; + if(self.produceView.cardType == 1){ + [Api mew_UpLoadQiniuPhoto:^(MewBaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSString *key = data.data[@"key"]; + NSString *token = data.data[@"token"]; + [MewUploadPhoto mew_uploadGifImageData:(NSData *)obj named:key token:token success:^(NSString * _Nonnull key, NSDictionary * _Nonnull resp) { + NSString *path = resp[@"path"]; + if(path != nil){ + dispatch_async(dispatch_get_main_queue(), ^{ + finish(@[path]); + }); + } + } failure:^(NSNumber * _Nonnull resCode, NSString * _Nonnull message) { + dispatch_async(dispatch_get_main_queue(), ^{ + finish(@[]); + }); + }]; + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + finish(@[]); + }); + } + }]; + + return; + } + + + + + [Api mew_UpLoadQiniuPhoto:^(MewBaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSString *key = data.data[@"key"]; + NSString *token = data.data[@"token"]; + [MewUploadPhoto mew_uploadPhoto:(UIImage *)obj named:key token:token success:^(NSString * _Nonnull key, NSDictionary * _Nonnull resp) { + + NSString *path = resp[@"path"]; + if(path != nil){ + dispatch_async(dispatch_get_main_queue(), ^{ + finish(@[path]); + }); + } + } failure:^(NSNumber * _Nonnull resCode, NSString * _Nonnull message) { + dispatch_async(dispatch_get_main_queue(), ^{ + finish(@[]); + }); + + }]; + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + finish(@[]); + }); + } + }]; + + +} +///上传视频 +-(void)uploadVideoWithData:(NSData *)videoData finish:(void(^)(NSMutableDictionary *list))finish{ + dispatch_semaphore_t semaphore = dispatch_semaphore_create(1); + dispatch_queue_t queue = dispatch_get_global_queue(0, 0); + NSMutableDictionary *photoDic = [NSMutableDictionary dictionary]; + dispatch_async(queue, ^{ + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + [Api mew_UpLoadQiniuPhoto:^(MewBaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSString *key = data.data[@"key"]; + NSString *token = data.data[@"token"]; + [MewUploadPhoto mew_uploadPhoto:self.videoModel.videoPhoto named:key token:token success:^(NSString * _Nonnull key, NSDictionary * _Nonnull resp) { + dispatch_semaphore_signal(semaphore); + NSString *path = resp[@"path"]; + if(path != nil){ + [photoDic setValue:path forKey:@"photoUrl"]; + } + if(photoDic.allKeys.count == 2){ + dispatch_async(dispatch_get_main_queue(), ^{ + finish(photoDic); + }); + } + } failure:^(NSNumber * _Nonnull resCode, NSString * _Nonnull message) { + dispatch_semaphore_signal(semaphore); + [photoDic setValue:@"" forKey:@"photoUrl"]; + dispatch_async(dispatch_get_main_queue(), ^{ + finish(photoDic); + }); + + + }]; + } else { + dispatch_semaphore_signal(semaphore); + [photoDic setValue:@"" forKey:@"photoUrl"]; + dispatch_async(dispatch_get_main_queue(), ^{ + finish(photoDic); + }); + } + }]; + + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + [Api mew_UpLoadQiniuPhoto:^(MewBaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSString *key = data.data[@"key"]; + NSString *token = data.data[@"token"]; + [MewUploadPhoto mew_uploadGifImageData:videoData named:key token:token success:^(NSString * _Nonnull key, NSDictionary * _Nonnull resp) { + dispatch_semaphore_signal(semaphore); + NSString *path = resp[@"path"]; + if(path != nil){ + [photoDic setValue:path forKey:@"videoUrl"]; + } + if(photoDic.allKeys.count == 2){ + dispatch_async(dispatch_get_main_queue(), ^{ + finish(photoDic); + }); + } + } failure:^(NSNumber * _Nonnull resCode, NSString * _Nonnull message) { + dispatch_semaphore_signal(semaphore); + [photoDic setValue:@"" forKey:@"videoUrl"]; + if(photoDic.allKeys.count == 2){ + dispatch_async(dispatch_get_main_queue(), ^{ + finish(photoDic); + }); + } + + }]; + } else { + dispatch_semaphore_signal(semaphore); + [photoDic setValue:@"" forKey:@"videoUrl"]; + if(photoDic.allKeys.count == 2){ + dispatch_async(dispatch_get_main_queue(), ^{ + finish(photoDic); + }); + } + } + }]; + }); + + + + +} +-(void)savePrivilegeCardFail{ + [self mew_hideHUD]; +} +#pragma XPPrivilegeCardItemVCDelegate +///删除 +-(void)deleteExpiredPrivilegeCardWithVC:(XPPrivilegeCardItemVC *_Nullable)VC cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + [self.presenter deletePrivilegeCardWithID:cardModel.ID]; +} + +///重新编辑 +-(void)againEditPrivilegeCardWithCell:(XPPrivilegeCardItemVC *_Nullable)VC cardModel:(XPPrivilegeCardItemModel *_Nullable)cardModel{ + self.produceView.cardModel = cardModel; + self.uploadImageList = @[]; + [kWindow addSubview:self.produceView]; +} +#pragma mark - Getters And Setters +- (XPPrivilegeCardTitlView *)titleView { + if (!_titleView) { + _titleView = [[XPPrivilegeCardTitlView alloc] init]; + _titleView.delegate = self; + _titleView.titles = self.titles; + _titleView.backgroundColor = [UIColor clearColor]; + _titleView.titleColor = UIColorMewFromRGB(0xA2A7B8); + _titleView.titleSelectedColor = UIColorMewFromRGB(0x2B2D33); + _titleView.titleFont = kFontMedium(13); + _titleView.titleSelectedFont = kFontSemibold(14); + _titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter; + _titleView.contentScrollViewClickTransitionAnimationEnabled = NO; + _titleView.cellSpacing = kGetScaleWidth(15); + _titleView.cellWidth = kGetScaleWidth(39); + _titleView.averageCellSpacingEnabled = NO; + _titleView.defaultSelectedIndex = 0; + _titleView.listContainer = self.contentView; + + + JXCategoryIndicatorBackgroundView * indocator = [[JXCategoryIndicatorBackgroundView alloc] init]; + UIImage *image = [UIImage mew_gradientColorImageFromColors:@[UIColorMewFromRGB(0xFFDA24),UIColorMewFromRGB(0xFFDA24),UIColorMewFromRGB(0xFFDA24)] gradientType:MewGradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(12), kGetScaleWidth(4))]; + indocator.indicatorColor = [UIColor colorWithPatternImage:image]; + indocator.indicatorWidth = kGetScaleWidth(12); + indocator.indicatorHeight = kGetScaleWidth(4); + indocator.verticalMargin = -kGetScaleWidth(12); + indocator.indicatorWidthIncrement = 0; + [indocator mew_setCornerWithLeftTopCorner:kGetScaleWidth(2) rightTopCorner:0 bottomLeftCorner:kGetScaleWidth(2) bottomRightCorner:kGetScaleWidth(2) size:CGSizeMake(kGetScaleWidth(12), kGetScaleWidth(4))]; + _titleView.indicators = @[indocator]; + } + return _titleView; +} +- (NSArray *)titles{ + return @[@"全部",@"审核中",@"生效中",@"未通过",@"已过期"]; +} +- (JXCategoryListContainerView *)contentView { + if (!_contentView) { + _contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self]; + _contentView.defaultSelectedIndex = 0; + } + return _contentView; +} + +- (UIButton *)newBtn{ + if(!_newBtn){ + _newBtn = [UIButton new]; + [_newBtn setTitle:@"新建" forState:UIControlStateNormal]; + [_newBtn setTitleColor:UIColorMewFromRGB(0x2B2D33) forState:UIControlStateNormal]; + _newBtn.titleLabel.font = kFontMedium(13); + _newBtn.backgroundColor = UIColorMewFromRGB(0xFFDA24); + [_newBtn setImage:kImage(@"room_Privilege_Card_create") forState:UIControlStateNormal]; + [_newBtn setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0,kGetScaleWidth(7))]; + _newBtn.layer.cornerRadius = kGetScaleWidth(6); + _newBtn.layer.masksToBounds = YES; + [_newBtn addTarget:self action:@selector(creatViewAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _newBtn; +} +- (XPPrivilegeCardProduceView *)produceView{ + if(!_produceView){ + _produceView = [[XPPrivilegeCardProduceView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + _produceView.delegate = self; + + } + return _produceView; +} +- (XPPrivilegeCardVideoItemModel *)videoModel{ + if(!_videoModel){ + _videoModel = [[XPPrivilegeCardVideoItemModel alloc]init]; + } + return _videoModel; +} +@end