diff --git a/YuMi.xcodeproj/project.pbxproj b/YuMi.xcodeproj/project.pbxproj index ffafeff1..278c6baf 100644 --- a/YuMi.xcodeproj/project.pbxproj +++ b/YuMi.xcodeproj/project.pbxproj @@ -173,6 +173,7 @@ 2331C1B92A60F32D00E1D940 /* Api+CandyTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1A82A60F32D00E1D940 /* Api+CandyTree.m */; }; 2331C1BD2A60F69E00E1D940 /* UILabel+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1BC2A60F69E00E1D940 /* UILabel+Utils.m */; }; 2369F9912A89CE0E00563B48 /* PIUserSexView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2369F9902A89CE0E00563B48 /* PIUserSexView.m */; }; + 2369F9932A8B21EB00563B48 /* pi_treasure_fairy_gift_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 2369F9922A8B21EA00563B48 /* pi_treasure_fairy_gift_bg.svga */; }; 23942E912A86424500D0ECC2 /* XPLoginAuthCodeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */; }; 23B2AEC12A64E9C200543D17 /* LoginForgetEditView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC02A64E9C200543D17 /* LoginForgetEditView.m */; }; 23B2AEC42A6516C200543D17 /* LoginForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */; }; @@ -245,7 +246,6 @@ 23E9EA672A837BE400B792F2 /* XPTreasureFairyStoreView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9EA2A2A837BE400B792F2 /* XPTreasureFairyStoreView.m */; }; 23E9EA682A837BE400B792F2 /* Api+TreasureFairy.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9EA312A837BE400B792F2 /* Api+TreasureFairy.m */; }; 23E9EA6B2A83808000B792F2 /* ContentTreasureFairyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9EA6A2A83808000B792F2 /* ContentTreasureFairyModel.m */; }; - 23E9EA762A83813000B792F2 /* treasure_fairy_gift_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EA712A83813000B792F2 /* treasure_fairy_gift_bg.svga */; }; 23E9EA792A8385CC00B792F2 /* XPTreasureFairyGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9EA772A8385CB00B792F2 /* XPTreasureFairyGiftView.m */; }; 23E9EA7C2A83977400B792F2 /* MessageContentTreasureFairyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9EA7B2A83977400B792F2 /* MessageContentTreasureFairyView.m */; }; 23E9EA7F2A839B2F00B792F2 /* MessageTreasureFairyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9EA7E2A839B2F00B792F2 /* MessageTreasureFairyModel.m */; }; @@ -724,7 +724,6 @@ E824544E26F5BC1A00BE8163 /* XPMineModifPayPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = E824544D26F5BC1A00BE8163 /* XPMineModifPayPwdView.m */; }; E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545026F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m */; }; E824545326F5CEAD00BE8163 /* XPMineModifPayProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824545226F5CE9C00BE8163 /* XPMineModifPayProtocol.h */; }; - E824545626F5E51900BE8163 /* XPMineVerifIdentityViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */; }; E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545826F5E65900BE8163 /* XPMineVerifIdentityView.m */; }; E824545C26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545B26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m */; }; E824545E26F5EF2200BE8163 /* XPMineVerifIdentityProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824545D26F5EEFD00BE8163 /* XPMineVerifIdentityProtocol.h */; }; @@ -1008,7 +1007,6 @@ E87C0A9D27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = E87C0A9C27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m */; }; E87C0AA027D9DE6400CB2241 /* RoomFaceSendInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87C0A9F27D9DE6400CB2241 /* RoomFaceSendInfoModel.m */; }; E87C54BE2823CC5B0051AA11 /* XPMineResetLoginPwdPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E87C54BD2823CC5B0051AA11 /* XPMineResetLoginPwdPresenter.m */; }; - E87C54C22823CD6F0051AA11 /* XPMineResetLoginPwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87C54C12823CD6F0051AA11 /* XPMineResetLoginPwdViewController.m */; }; E87DF4B02A429B32009C1185 /* XPFirstRechargeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4AE2A429B32009C1185 /* XPFirstRechargeView.m */; }; E87DF4B32A429C6E009C1185 /* FirstChargeRoomWindowModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4B22A429C6E009C1185 /* FirstChargeRoomWindowModel.m */; }; E87DF4B72A42C2FD009C1185 /* XPFirstRechargeCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4B52A42C2FD009C1185 /* XPFirstRechargeCollectionView.m */; }; @@ -1672,6 +1670,7 @@ 23352A0D2A669D57001DB9B5 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; 2369F98F2A89CE0E00563B48 /* PIUserSexView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIUserSexView.h; sourceTree = ""; }; 2369F9902A89CE0E00563B48 /* PIUserSexView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIUserSexView.m; sourceTree = ""; }; + 2369F9922A8B21EA00563B48 /* pi_treasure_fairy_gift_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_treasure_fairy_gift_bg.svga; sourceTree = ""; }; 23942E8F2A86424500D0ECC2 /* XPLoginAuthCodeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginAuthCodeVC.h; sourceTree = ""; }; 23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginAuthCodeVC.m; sourceTree = ""; }; 23B2AEBF2A64E9C200543D17 /* LoginForgetEditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginForgetEditView.h; sourceTree = ""; }; @@ -1817,7 +1816,6 @@ 23E9EA322A837BE400B792F2 /* Api+TreasureFairy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+TreasureFairy.h"; sourceTree = ""; }; 23E9EA692A83808000B792F2 /* ContentTreasureFairyModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentTreasureFairyModel.h; sourceTree = ""; }; 23E9EA6A2A83808000B792F2 /* ContentTreasureFairyModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentTreasureFairyModel.m; sourceTree = ""; }; - 23E9EA712A83813000B792F2 /* treasure_fairy_gift_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = treasure_fairy_gift_bg.svga; sourceTree = ""; }; 23E9EA772A8385CB00B792F2 /* XPTreasureFairyGiftView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPTreasureFairyGiftView.m; sourceTree = ""; }; 23E9EA782A8385CC00B792F2 /* XPTreasureFairyGiftView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPTreasureFairyGiftView.h; sourceTree = ""; }; 23E9EA7A2A83977300B792F2 /* MessageContentTreasureFairyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentTreasureFairyView.h; sourceTree = ""; }; @@ -2611,8 +2609,6 @@ E824544F26F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdPresenter.h; sourceTree = ""; }; E824545026F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdPresenter.m; sourceTree = ""; }; E824545226F5CE9C00BE8163 /* XPMineModifPayProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayProtocol.h; sourceTree = ""; }; - E824545426F5E51900BE8163 /* XPMineVerifIdentityViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityViewController.h; sourceTree = ""; }; - E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityViewController.m; sourceTree = ""; }; E824545726F5E65900BE8163 /* XPMineVerifIdentityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityView.h; sourceTree = ""; }; E824545826F5E65900BE8163 /* XPMineVerifIdentityView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityView.m; sourceTree = ""; }; E824545A26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityPresenter.h; sourceTree = ""; }; @@ -3203,8 +3199,6 @@ E87C54BC2823CC5B0051AA11 /* XPMineResetLoginPwdPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetLoginPwdPresenter.h; sourceTree = ""; }; E87C54BD2823CC5B0051AA11 /* XPMineResetLoginPwdPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineResetLoginPwdPresenter.m; sourceTree = ""; }; E87C54BF2823CC940051AA11 /* XPMineResetLoginPwdProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetLoginPwdProtocol.h; sourceTree = ""; }; - E87C54C02823CD6F0051AA11 /* XPMineResetLoginPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetLoginPwdViewController.h; sourceTree = ""; }; - E87C54C12823CD6F0051AA11 /* XPMineResetLoginPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineResetLoginPwdViewController.m; sourceTree = ""; }; E87DF4AE2A429B32009C1185 /* XPFirstRechargeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPFirstRechargeView.m; sourceTree = ""; }; E87DF4AF2A429B32009C1185 /* XPFirstRechargeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPFirstRechargeView.h; sourceTree = ""; }; E87DF4B12A429C6E009C1185 /* FirstChargeRoomWindowModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstChargeRoomWindowModel.h; sourceTree = ""; }; @@ -4002,13 +3996,6 @@ path = Config; sourceTree = ""; }; - 14D8768129A751E100E1DD7F /* Image */ = { - isa = PBXGroup; - children = ( - ); - path = Image; - sourceTree = ""; - }; 14D8768429A752B500E1DD7F /* Network */ = { isa = PBXGroup; children = ( @@ -5058,7 +5045,7 @@ 23E9EA6C2A83813000B792F2 /* fairy */ = { isa = PBXGroup; children = ( - 23E9EA712A83813000B792F2 /* treasure_fairy_gift_bg.svga */, + 2369F9922A8B21EA00563B48 /* pi_treasure_fairy_gift_bg.svga */, ); path = fairy; sourceTree = ""; @@ -8432,7 +8419,6 @@ 23E9EB222A84E98300B792F2 /* pi_new_mine_info_sound_play.svga */, 23E9EAA22A84C80300B792F2 /* pi_new_loading.svga */, 23E9EA6C2A83813000B792F2 /* fairy */, - 14D8768129A751E100E1DD7F /* Image */, ); path = Resources; sourceTree = ""; @@ -9189,14 +9175,10 @@ E824543F26F58F9400BE8163 /* XPMinePayPwdViewController.m */, E824544926F5BBB800BE8163 /* XPMineModifPayPwdViewController.h */, E824544A26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m */, - E824545426F5E51900BE8163 /* XPMineVerifIdentityViewController.h */, - E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */, E824545F26F5F4E400BE8163 /* XPMineResetPayPwdViewController.h */, E824546026F5F4E400BE8163 /* XPMineResetPayPwdViewController.m */, E8E20BE0281695800033B688 /* XPMineLoginPasswordViewController.h */, E8E20BE1281695800033B688 /* XPMineLoginPasswordViewController.m */, - E87C54C02823CD6F0051AA11 /* XPMineResetLoginPwdViewController.h */, - E87C54C12823CD6F0051AA11 /* XPMineResetLoginPwdViewController.m */, E8E20BEA2816A5B90033B688 /* XPMineBlackListViewController.h */, E8E20BEB2816A5B90033B688 /* XPMineBlackListViewController.m */, 140A818B299CFF1C00841594 /* XPVendorCallViewController.h */, @@ -9713,6 +9695,7 @@ E80EC8BA28ACD84100D133C5 /* emoji.plist in Resources */, E8729EEC2A3B34D30076D80A /* index.html in Resources */, E80EC82328ACD84000D133C5 /* emoji_57@2x.png in Resources */, + 2369F9932A8B21EB00563B48 /* pi_treasure_fairy_gift_bg.svga in Resources */, E80EC87E28ACD84000D133C5 /* emoji_129@2x.png in Resources */, E80EC86828ACD84000D133C5 /* emoji_39@2x.png in Resources */, E80EC8B228ACD84100D133C5 /* emoji_140@2x.png in Resources */, @@ -9749,7 +9732,6 @@ E8729EEE2A3B34D30076D80A /* css in Resources */, E80EC8A628ACD84100D133C5 /* emoji_23@2x.png in Resources */, E80EC84328ACD84000D133C5 /* emoji_20@2x.png in Resources */, - 23E9EA762A83813000B792F2 /* treasure_fairy_gift_bg.svga in Resources */, E80EC88528ACD84000D133C5 /* emoji_62@2x.png in Resources */, E80EC84B28ACD84000D133C5 /* emoji_108@2x.png in Resources */, E80EC82D28ACD84000D133C5 /* emoji_24@2x.png in Resources */, @@ -10394,7 +10376,6 @@ 9B2EA7C02804037700ED17BF /* AnchorPKStageView.m in Sources */, E811FFF72742367B00918544 /* XPGiftEmptyCollectionViewCell.m in Sources */, 189DD67E26E1FD8900AB55B1 /* UIImage+Utils.m in Sources */, - E824545626F5E51900BE8163 /* XPMineVerifIdentityViewController.m in Sources */, E82D5C73276AE94800858D6D /* CarModel.m in Sources */, 23E9EA4C2A837BE400B792F2 /* XPTreasureFairyTrialsContentView.m in Sources */, E85E7B0B2A4EB0D200B6D00A /* XPGuildSetNamePresenter.m in Sources */, @@ -10788,7 +10769,6 @@ 9B0997A327F19DE500EB8F14 /* QGHWDShaders.metal in Sources */, E8778AF02988EF0600CF139B /* XPSessionSayHelloViewController.m in Sources */, 187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */, - E87C54C22823CD6F0051AA11 /* XPMineResetLoginPwdViewController.m in Sources */, E8098CA7282E00920090B9F0 /* Api+Monents.m in Sources */, E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */, 23E9EA332A837BE400B792F2 /* XPTreasureFailyPresenter.m in Sources */, diff --git a/YuMi/Appdelegate/AppDelegate.m b/YuMi/Appdelegate/AppDelegate.m index 94408d4a..d1a12b35 100644 --- a/YuMi/Appdelegate/AppDelegate.m +++ b/YuMi/Appdelegate/AppDelegate.m @@ -12,6 +12,7 @@ #import #import #import +#import @import Firebase; UIKIT_EXTERN NSString * const kOpenRoomNotification; @@ -46,6 +47,34 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; NSInteger count = [NIMSDK sharedSDK].conversationManager.allUnreadCount; [[UIApplication sharedApplication] setApplicationIconBadgeNumber:count]; } +- (void)applicationDidBecomeActive:(UIApplication *)application { + [self getAdvertisingTrackingAuthority]; +} +- (void)getAdvertisingTrackingAuthority { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if (@available(iOS 14, *)) { + ATTrackingManagerAuthorizationStatus status = ATTrackingManager.trackingAuthorizationStatus; + switch (status) { + case ATTrackingManagerAuthorizationStatusDenied: + NSLog(@"用户拒绝IDFA"); + break; + case ATTrackingManagerAuthorizationStatusAuthorized: + NSLog(@"用户允许IDFA"); + break; + case ATTrackingManagerAuthorizationStatusNotDetermined: { + NSLog(@"用户未做选择或未弹窗IDFA"); + //请求弹出用户授权框,只会在程序运行是弹框1次,除非卸载app重装,通地图、相机等权限弹框一样 + [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { + NSLog(@"app追踪IDFA权限:%lu",(unsigned long)status); + }]; + } + break; + default: + break; + } + } + }); +} - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { // 上传devicetoken至云信服务器。 diff --git a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/Contents.json deleted file mode 100644 index d462a977..00000000 --- a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "mine_guild_guild_header_bg@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "mine_guild_guild_header_bg@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/mine_guild_guild_header_bg@2x.png b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/mine_guild_guild_header_bg@2x.png deleted file mode 100644 index 21a46d5c..00000000 Binary files a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/mine_guild_guild_header_bg@2x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/mine_guild_guild_header_bg@3x.png b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/mine_guild_guild_header_bg@3x.png deleted file mode 100644 index d759ba60..00000000 Binary files a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_header_bg.imageset/mine_guild_guild_header_bg@3x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@2x.png b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@2x.png index 9e32e485..a62f76b6 100644 Binary files a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@2x.png and b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@3x.png b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@3x.png index 20393fb4..2aef98f9 100644 Binary files a/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@3x.png and b/YuMi/Assets.xcassets/jm/Guild/mine_guild_guild_section_manager.imageset/mine_guild_guild_section_manager@3x.png differ diff --git a/YuMi/Assets.xcassets/low/home_name.imageset/Contents.json b/YuMi/Assets.xcassets/low/home_name.imageset/Contents.json index c3f83b86..3274eabe 100644 --- a/YuMi/Assets.xcassets/low/home_name.imageset/Contents.json +++ b/YuMi/Assets.xcassets/low/home_name.imageset/Contents.json @@ -1,16 +1,15 @@ { "images" : [ { + "filename" : "home_name.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "home_name@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "home_name@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/YuMi/Assets.xcassets/low/home_name.imageset/home_name.png b/YuMi/Assets.xcassets/low/home_name.imageset/home_name.png new file mode 100644 index 00000000..be9d42ba Binary files /dev/null and b/YuMi/Assets.xcassets/low/home_name.imageset/home_name.png differ diff --git a/YuMi/Assets.xcassets/low/home_name.imageset/home_name@2x.png b/YuMi/Assets.xcassets/low/home_name.imageset/home_name@2x.png deleted file mode 100644 index 56a26271..00000000 Binary files a/YuMi/Assets.xcassets/low/home_name.imageset/home_name@2x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/low/home_name.imageset/home_name@3x.png b/YuMi/Assets.xcassets/low/home_name.imageset/home_name@3x.png deleted file mode 100644 index 5248f5cc..00000000 Binary files a/YuMi/Assets.xcassets/low/home_name.imageset/home_name@3x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@2x.png b/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@2x.png index 3733e971..39d5c333 100644 Binary files a/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@2x.png and b/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@2x.png differ diff --git a/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@3x.png b/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@3x.png index 5d456ca0..d9df3d3e 100644 Binary files a/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@3x.png and b/YuMi/Assets.xcassets/low/home_search_input_search.imageset/home_search_input_search@3x.png differ diff --git a/YuMi/Info.plist b/YuMi/Info.plist index 3b277cfc..ddf0f8a3 100644 --- a/YuMi/Info.plist +++ b/YuMi/Info.plist @@ -88,6 +88,8 @@ NSCameraUsageDescription “Piko”需要您的同意,才可以访问进行拍照并上传您的图片,然后展示在您的个人主页上,便于他人查看 + NSUserTrackingUsageDescription + 请允许我们获取您的IDFA权限,可以为您提供个性化活动和服务。未经您的允许,您的信息将不作其他用途 NSLocalNetworkUsageDescription 此App将可发现和连接到您所用网络上的设备。 NSMicrophoneUsageDescription diff --git a/YuMi/Modules/YMLogin/Model/LoginAreaModel.h b/YuMi/Modules/YMLogin/Model/LoginAreaModel.h index adcd25b6..7d42477f 100644 --- a/YuMi/Modules/YMLogin/Model/LoginAreaModel.h +++ b/YuMi/Modules/YMLogin/Model/LoginAreaModel.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,copy) NSString *name; @property (nonatomic,copy) NSString *abbr; @property (nonatomic,copy) NSString *phone_area_code; -@property (nonatomic,copy) NSString *phoneAreaCode; +@property (nonatomic,copy) NSString *pi_phoneAreaCode; @property (nonatomic,copy) NSString *seq; @property (nonatomic,copy) NSString *status; @property (nonatomic,copy) NSString *region; diff --git a/YuMi/Modules/YMLogin/Model/LoginAreaModel.m b/YuMi/Modules/YMLogin/Model/LoginAreaModel.m index a552d633..15a006b4 100644 --- a/YuMi/Modules/YMLogin/Model/LoginAreaModel.m +++ b/YuMi/Modules/YMLogin/Model/LoginAreaModel.m @@ -8,5 +8,7 @@ #import "LoginAreaModel.h" @implementation LoginAreaModel - ++ (NSDictionary *)replacedKeyFromPropertyName { + return @{@"pi_phoneAreaCode":@"phoneAreaCode"}; +} @end diff --git a/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.h b/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.h index 32c56d9d..54819b75 100644 --- a/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.h +++ b/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface LoginForgetPasswordViewController : MvpViewController -@property (nonatomic,copy) NSString *phoneAreaCode; +@property (nonatomic,copy) NSString *pi_phoneAreaCode; @property (nonatomic,assign) BOOL isLogout; @end diff --git a/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.m b/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.m index f18f4a9c..8ae55ecf 100644 --- a/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.m +++ b/YuMi/Modules/YMLogin/View/LoginForgetPasswordViewController.m @@ -47,7 +47,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.phoneAreaCode = @"852"; + self.pi_phoneAreaCode = @"852"; [self initSubViews]; [self initSubViewConstraints]; [self initEvents]; @@ -108,7 +108,7 @@ } #pragma mark - XPChooseAreaCodeVCDelegate -(void)chooseAreaCodeSuccess:(NSString *)code{ - self.phoneAreaCode = code; + self.pi_phoneAreaCode = code; self.phoneView.areaCode = [NSString stringWithFormat:@"+%@",code]; } #pragma mark - LoginForgetPasswordProtocol @@ -147,7 +147,7 @@ #pragma mark - Event Response - (void)finishButtonAction:(UIButton *)sender { [self.view endEditing:YES]; - [self.presenter resetPassword:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phoneView.textField.text] newPwd:self.passwordView.textField.text smsCode:self.codeView.textField.text phoneAreaCode:self.phoneAreaCode]; + [self.presenter resetPassword:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phoneView.textField.text] newPwd:self.passwordView.textField.text smsCode:self.codeView.textField.text phoneAreaCode:self.pi_phoneAreaCode]; } - (void)authCodeButtonAction:(UIButton *)sender { @@ -157,7 +157,7 @@ } [self.view endEditing:YES]; [self showLoading]; - [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phoneView.textField.text] type:GetSmsType_Reset_Password phoneAreaCode:self.phoneAreaCode]; + [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phoneView.textField.text] type:GetSmsType_Reset_Password phoneAreaCode:self.pi_phoneAreaCode]; } -(void)chooseAreaCodeAction{ diff --git a/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.h b/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.h index 69ca2e2c..df7d9892 100644 --- a/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.h +++ b/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.h @@ -20,7 +20,7 @@ typedef NS_ENUM(NSUInteger, VerifCodeType){ ///输入的手机号 @property (nonatomic,copy) NSString *phone; -@property (nonatomic,copy) NSString *phoneAreaCode; +@property (nonatomic,copy) NSString *pi_phoneAreaCode; ///类型 @property (nonatomic,assign) VerifCodeType type; @end diff --git a/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.m b/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.m index 022c1fb2..8334f866 100644 --- a/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.m +++ b/YuMi/Modules/YMLogin/View/LoginVerifCodeViewController.m @@ -169,7 +169,7 @@ - (void)httpRequestPhoneSmsCode { - [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phone] type:GetSmsType_Regist phoneAreaCode:self.phoneAreaCode]; + [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phone] type:GetSmsType_Regist phoneAreaCode:self.pi_phoneAreaCode]; } @@ -192,7 +192,7 @@ self.isLoginSuccess = NO; [XNDJTDDLoadingTool showLoadingInView:self.view]; self.code = self.textField.text; - [self.presenter loginWithPhone:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phone] code:self.textField.text phoneAreaCode:self.phoneAreaCode]; + [self.presenter loginWithPhone:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phone] code:self.textField.text phoneAreaCode:self.pi_phoneAreaCode]; } - (void)disMissVC { diff --git a/YuMi/Modules/YMLogin/View/NewLogin/XPForgetPwdViewController.m b/YuMi/Modules/YMLogin/View/NewLogin/XPForgetPwdViewController.m index 3fb533cb..2b48ccba 100644 --- a/YuMi/Modules/YMLogin/View/NewLogin/XPForgetPwdViewController.m +++ b/YuMi/Modules/YMLogin/View/NewLogin/XPForgetPwdViewController.m @@ -31,7 +31,7 @@ @property (nonatomic, strong) XPLoginInputView *pwdInputView; /// 确定按钮 @property (nonatomic, strong) UIButton *sureBtn; -@property (nonatomic,copy) NSString *phoneAreaCode; +@property (nonatomic,copy) NSString *pi_phoneAreaCode; @end @@ -44,7 +44,7 @@ } - (void)viewDidLoad { - self.phoneAreaCode = @"852"; + self.pi_phoneAreaCode = @"852"; [super viewDidLoad]; [self createUI]; @@ -126,7 +126,7 @@ NSString *phone = self.phoneInputView.inputTextField.text; NSString *smsCode = self.codeInputView.inputTextField.text; NSString *password = self.pwdInputView.inputTextField.text; - [self.presenter resetPassword:phone newPwd:password smsCode:smsCode phoneAreaCode:@""]; + [self.presenter resetPassword:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,phone] newPwd:password smsCode:smsCode phoneAreaCode:self.pi_phoneAreaCode]; } #pragma mark - XPLoginInputViewDelegate @@ -137,7 +137,7 @@ [self showErrorToast:YMLocalizedString(@"XPForgetPwdViewController0")]; return; } - [self.presenter phoneSmsCode:phone type:GetSmsType_Reset_Password phoneAreaCode:self.phoneAreaCode]; + [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,phone] type:GetSmsType_Reset_Password phoneAreaCode:self.pi_phoneAreaCode]; } @@ -149,7 +149,7 @@ - (void)chooseAreaCodeSuccess:(NSString *)code { if (code.length > 0) { - self.phoneAreaCode = code; + self.pi_phoneAreaCode = code; [self.phoneInputView.areaCodeBtn setTitle:[NSString stringWithFormat:@"+%@", code] forState:UIControlStateNormal]; } } diff --git a/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAraeViewController.m b/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAraeViewController.m index 14fea97f..6a97cb7b 100644 --- a/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAraeViewController.m +++ b/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAraeViewController.m @@ -108,7 +108,7 @@ LoginAreaModel *codeModel = self.listData[indexPath.section][indexPath.row]; if(self.delegate && [self.delegate respondsToSelector:@selector(chooseAreaCodeSuccess:)]){ - [self.delegate chooseAreaCodeSuccess:codeModel.phoneAreaCode ?: codeModel.phone_area_code]; + [self.delegate chooseAreaCodeSuccess:codeModel.pi_phoneAreaCode ?: codeModel.phone_area_code]; } [self.navigationController popViewControllerAnimated:YES]; } diff --git a/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAreaTableViewCell.m b/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAreaTableViewCell.m index e782b7d3..645da8b0 100644 --- a/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAreaTableViewCell.m +++ b/YuMi/Modules/YMLogin/View/NewLogin/XPLoginAreaTableViewCell.m @@ -44,11 +44,11 @@ - (void)setAreaModel:(LoginAreaModel *)areaModel{ _areaModel = areaModel; _areaVeiw.text = _areaModel.name; - if(_areaModel.phoneAreaCode == nil){ + if(_areaModel.pi_phoneAreaCode == nil){ _codeView.text = _areaModel.phone_area_code; return; } - _codeView.text = _areaModel.phoneAreaCode; + _codeView.text = _areaModel.pi_phoneAreaCode; } #pragma mark - 懒加载 diff --git a/YuMi/Modules/YMLogin/View/NewLogin/XPLoginPhoneViewController.m b/YuMi/Modules/YMLogin/View/NewLogin/XPLoginPhoneViewController.m index 39e9ef3b..36e023b6 100644 --- a/YuMi/Modules/YMLogin/View/NewLogin/XPLoginPhoneViewController.m +++ b/YuMi/Modules/YMLogin/View/NewLogin/XPLoginPhoneViewController.m @@ -51,7 +51,7 @@ @property (nonatomic, strong) UIButton *loginBtn; ///区号 -@property (nonatomic,copy) NSString *phoneAreaCode; +@property (nonatomic,copy) NSString *pi_phoneAreaCode; ///类型,0,密码,1.手机 @property(nonatomic,assign) int selectType; @end @@ -67,7 +67,7 @@ - (void)viewDidLoad { self.selectType = 0; - self.phoneAreaCode = @"852"; + self.pi_phoneAreaCode = @"852"; [super viewDidLoad]; [self createUI]; [self racBind]; @@ -190,8 +190,8 @@ NSString *phone = self.phoneInputView.inputTextField.text; NSString *smsCode = self.codeInputView.inputTextField.text; - NSString * phoneStr = [NSString stringWithFormat:@"%@%@",self.phoneAreaCode, phone]; - [self.presenter loginWithPhone:phoneStr code:smsCode phoneAreaCode:self.phoneAreaCode]; + NSString * phoneStr = [NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode, phone]; + [self.presenter loginWithPhone:phoneStr code:smsCode phoneAreaCode:self.pi_phoneAreaCode]; } - (void)forgetBtnClicked { @@ -207,7 +207,7 @@ [self showErrorToast:YMLocalizedString(@"XPLoginPhoneViewController0")]; return; } - [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,phone] type:GetSmsType_Regist phoneAreaCode:self.phoneAreaCode]; + [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,phone] type:GetSmsType_Regist phoneAreaCode:self.pi_phoneAreaCode]; } - (void)areaListAction { @@ -218,7 +218,7 @@ - (void)chooseAreaCodeSuccess:(NSString *)code { if (code.length > 0) { - self.phoneAreaCode = code; + self.pi_phoneAreaCode = code; [self.phoneInputView.areaCodeBtn setTitle:[NSString stringWithFormat:@"+%@", code] forState:UIControlStateNormal]; } } diff --git a/YuMi/Modules/YMLogin/View/XPLoginBindPhoneResultViewController.m b/YuMi/Modules/YMLogin/View/XPLoginBindPhoneResultViewController.m index 8750e8b7..77019247 100644 --- a/YuMi/Modules/YMLogin/View/XPLoginBindPhoneResultViewController.m +++ b/YuMi/Modules/YMLogin/View/XPLoginBindPhoneResultViewController.m @@ -46,7 +46,7 @@ self.title = YMLocalizedString(@"XPLoginBindPhoneResultViewController0"); NSMutableAttributedString *titleAtt = [[NSMutableAttributedString alloc]initWithString:YMLocalizedString(@"XPLoginBindPhoneResultViewController1") attributes:@{NSFontAttributeName:kFontSemibold(16),NSForegroundColorAttributeName:[DJDKMIMOMColor inputTextColor]}]; NSString *phone = self.userInfo.phone.length > 0 ? self.userInfo.phone : @""; - NSAttributedString *phoneAtt = [[NSAttributedString alloc]initWithString:[NSString stringWithFormat:@"\n%@ %@",self.userInfo.phoneAreaCode, phone] attributes:@{NSFontAttributeName:kFontSemibold(16),NSForegroundColorAttributeName:UIColorFromRGB(0x9168FA)}]; + NSAttributedString *phoneAtt = [[NSAttributedString alloc]initWithString:[NSString stringWithFormat:@"\n%@ %@",self.userInfo.pi_phoneAreaCode, phone] attributes:@{NSFontAttributeName:kFontSemibold(16),NSForegroundColorAttributeName:UIColorFromRGB(0x9168FA)}]; [titleAtt appendAttributedString:phoneAtt]; self.phoneLabel.attributedText = titleAtt; } diff --git a/YuMi/Modules/YMLogin/View/XPLoginVerifBindPhoneViewController.m b/YuMi/Modules/YMLogin/View/XPLoginVerifBindPhoneViewController.m index 402cc3e7..b6da12bf 100644 --- a/YuMi/Modules/YMLogin/View/XPLoginVerifBindPhoneViewController.m +++ b/YuMi/Modules/YMLogin/View/XPLoginVerifBindPhoneViewController.m @@ -34,7 +34,7 @@ ///验证码 @property (nonatomic,strong) LoginForgetEditView *codeView; ///手机区号 -@property (nonatomic,copy)NSString *phoneAreaCode; +@property (nonatomic,copy)NSString *pi_phoneAreaCode; // 确认按钮 @property (nonatomic, strong) UIButton *confirmBtn; // 重新绑定手机 @@ -53,7 +53,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.phoneAreaCode = @"852"; + self.pi_phoneAreaCode = @"852"; [self initSubViews]; [self initSubViewConstraints]; [self setConfigs]; @@ -126,7 +126,7 @@ #pragma mark - XPChooseAreaCodeVCDelegate -(void)chooseAreaCodeSuccess:(NSString *)code{ - self.phoneAreaCode = code; + self.pi_phoneAreaCode = code; self.phoneView.areaCode = [NSString stringWithFormat:@"+%@",code]; } -(void)chooseAreaCodeAction{ @@ -147,7 +147,7 @@ return YES; }] subscribeNext:^(id _Nullable x) { @strongify(self); - [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phoneView.textField.text] type:self.bindingPhoneNumType == XPBindingPhoneNumTypeConfirm ? GetSmsType_Unbind_Phone : GetSmsType_Bind_Phone phoneAreaCode:self.phoneAreaCode]; + [self.presenter phoneSmsCode:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phoneView.textField.text] type:self.bindingPhoneNumType == XPBindingPhoneNumTypeConfirm ? GetSmsType_Unbind_Phone : GetSmsType_Bind_Phone phoneAreaCode:self.pi_phoneAreaCode]; }]; // // 绑定和验证 @@ -167,9 +167,9 @@ @strongify(self) [self.view endEditing:YES]; if (self.bindingPhoneNumType == XPBindingPhoneNumTypeConfirm) { - [self.presenter checkMoblieCodeWithMoblie:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phoneView.textField.text] code:self.codeView.textField.text phoneAreaCode:self.phoneAreaCode]; + [self.presenter checkMoblieCodeWithMoblie:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phoneView.textField.text] code:self.codeView.textField.text phoneAreaCode:self.pi_phoneAreaCode]; } else { - [self.presenter bindkMoblieCodeWithMoblie:[NSString stringWithFormat:@"%@%@",self.phoneAreaCode,self.phoneView.textField.text] code:self.codeView.textField.text phoneAreaCode:self.phoneAreaCode]; + [self.presenter bindkMoblieCodeWithMoblie:[NSString stringWithFormat:@"%@%@",self.pi_phoneAreaCode,self.phoneView.textField.text] code:self.codeView.textField.text phoneAreaCode:self.pi_phoneAreaCode]; } } error:^(NSError * _Nullable error) { diff --git a/YuMi/Modules/YMMessage/View/Session/Content/MessageContentText.m b/YuMi/Modules/YMMessage/View/Session/Content/MessageContentText.m index 43e79498..911de35d 100644 --- a/YuMi/Modules/YMMessage/View/Session/Content/MessageContentText.m +++ b/YuMi/Modules/YMMessage/View/Session/Content/MessageContentText.m @@ -64,14 +64,25 @@ NSMutableAttributedString * attribute = [faceManager attributedStringByText:messageText font:[UIFont systemFontOfSize:13]]; _messageText.attributedText = attribute; } + [_messageText.superview layoutIfNeeded]; + if(_messageText.frame.size.width > _messageText.preferredMaxLayoutWidth){ + [_messageText mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(_messageText.preferredMaxLayoutWidth); + }]; + } +} +-(void)aa{ + NSLog(@"%f,%f",self.messageText.frame.size.width,(CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2)); } - - (YYLabel *)messageText { if (!_messageText) { _messageText = [[YYLabel alloc]initWithFrame:CGRectZero]; _messageText.preferredMaxLayoutWidth = CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2; _messageText.textColor = DJDKMIMOMColor.mainTextColor; _messageText.numberOfLines = 0; + _messageText.userInteractionEnabled = YES; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(aa)]; + [_messageText addGestureRecognizer:tap]; } return _messageText; } diff --git a/YuMi/Modules/YMMessage/View/Session/Content/MessageContentTextClickable.m b/YuMi/Modules/YMMessage/View/Session/Content/MessageContentTextClickable.m index 82429a47..4e811962 100644 --- a/YuMi/Modules/YMMessage/View/Session/Content/MessageContentTextClickable.m +++ b/YuMi/Modules/YMMessage/View/Session/Content/MessageContentTextClickable.m @@ -43,6 +43,11 @@ @property (nonatomic, strong) UILabel * messageText; ///获取的模型 @property (nonatomic,strong) ContentSecretaryModel *contentInfo; +///分割线 +@property (nonatomic,strong) UIView * lineView; + +///查看详情 +@property (nonatomic,strong) UIButton *checkButton; @end @implementation MessageContentTextClickable @@ -50,23 +55,63 @@ - (void)initSubViews { [super initSubViews]; [self.backView addSubview:self.messageText]; - UITapGestureRecognizer * tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(event:)]; - [self addGestureRecognizer:tapGesture]; + [self.backView addSubview:self.lineView]; + [self.backView addSubview:self.checkButton]; } - (void)initSubViewConstraints { [super initSubViewConstraints]; + [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(280); + make.bottom.mas_equalTo(self.checkButton); + }]; [self.messageText mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self.backView).insets(UIEdgeInsetsMake(0, 0, 0, 0)); + make.top.left.right.equalTo(self.backView); + }]; + [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.backView); + make.height.mas_equalTo(0.5); + make.top.mas_equalTo(self.messageText.mas_bottom).offset(5); + }]; + + [self.checkButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.backView); + make.top.mas_equalTo(self.lineView.mas_bottom).offset(10); + make.height.mas_equalTo(20); + }]; } - (void)render:(nonnull MessageBaseModel *)message { MessageTextClickModel * textModel = (MessageTextClickModel *)message; _messageText.attributedText = textModel.attributedText; + _contentInfo = textModel.contentInfo; + + CGFloat oneHeight = [YMLocalizedString(@"MessageContentTweetView0") boundingRectWithSize:CGSizeMake(240, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin + attributes:[self messageTextAttibutes:[UIFont systemFontOfSize:16] color:[DJDKMIMOMColor mainTextColor]] context:nil].size.height + 2.5; + + CGFloat titleHeight = [textModel.attributedText.string boundingRectWithSize:CGSizeMake(240, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin + attributes:[self messageTextAttibutes:[UIFont systemFontOfSize:16] color:[DJDKMIMOMColor mainTextColor]] context:nil].size.height; + if (titleHeight <= oneHeight * 2) { + [self.messageText mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(titleHeight + 5); + }]; + } else{ + [self.messageText mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(oneHeight * 2); + }]; + } } - -- (void)event:(UITapGestureRecognizer *)gesture { +- (NSDictionary *)messageTextAttibutes:(UIFont *)font color:(UIColor *)color { + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + [paragraphStyle setLineSpacing:2.5]; + return @{ + NSFontAttributeName:font, + NSParagraphStyleAttributeName: paragraphStyle, + NSForegroundColorAttributeName:color + }; +} +- (void)checkButtonAction:(UIButton *)gesture { SecretaryRouterType type = self.contentInfo.routerType; NSString * value = self.contentInfo.routerValue; switch (type) { @@ -214,5 +259,21 @@ } return _messageText; } - +- (UIView *)lineView { + if (!_lineView) { + _lineView = [[UIView alloc] init]; + _lineView.backgroundColor = [DJDKMIMOMColor dividerColor]; + } + return _lineView; +} +- (UIButton *)checkButton { + if (!_checkButton) { + _checkButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_checkButton setTitle:YMLocalizedString(@"MessageContentTweetView1") forState:UIControlStateNormal]; + [_checkButton setTitleColor:UIColorFromRGB(0x4C5AF1) forState:UIControlStateNormal]; + _checkButton.titleLabel.font = [UIFont systemFontOfSize:14]; + [_checkButton addTarget:self action:@selector(checkButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _checkButton; +} @end diff --git a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.h b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.h index 60abd8d5..466a5daa 100644 --- a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.h +++ b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.h @@ -6,11 +6,14 @@ // #import "MessageBaseModel.h" +#import "ContentSecretaryModel.h" NS_ASSUME_NONNULL_BEGIN @interface MessageTextClickModel : MessageBaseModel @property (nonatomic,strong) NSAttributedString *attributedText; +///获取的模型 +@property (nonatomic,strong) ContentSecretaryModel *contentInfo; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.m b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.m index 928b7b0b..236c27e7 100644 --- a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.m +++ b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageTextClickModel.m @@ -20,16 +20,19 @@ if (attachment.first == CustomMessageType_Secretary) { if (attachment.second == Custom_Message_Sub_Secretary_Router) { messageText = attachment.data[@"msg"]; + self.contentInfo = [ContentSecretaryModel modelWithJSON:attachment.data]; } } } if (!messageText) { messageText = YMLocalizedString(@"MessageTextClickModel0"); } - CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_PADDING * 2, MAXFLOAT); CGSize msgSize = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[self messageTextAttibutes] context:nil].size; + if(self.contentInfo.routerType > 0){ + msgSize = CGSizeMake(msgSize.width, msgSize.height+35); + } self.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[self messageTextAttibutes]]; self.height = msgSize.height + MESSAGE_PADDING * 2 + CONTENT_PADDING_V_TOTAL; self.contentSize = CGSizeMake(msgSize.width + MESSAGE_PADDING * 2, msgSize.height + MESSAGE_PADDING * 2); diff --git a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m index 07ebee71..04246c95 100644 --- a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m @@ -63,6 +63,7 @@ [self.stackView addArrangedSubview:self.sexImageView]; [self.stackView addArrangedSubview:self.experImageView]; [self.stackView addArrangedSubview:self.charmImageView]; + } - (void)initSubViewConstraints { @@ -111,7 +112,8 @@ _fansInfo = fansInfo; if (_fansInfo) { self.avatarImageView.imageUrl = _fansInfo.avatar; - self.nickLabel.text = _fansInfo.nick; + NSString *text = _fansInfo.nick.length > 6 ? [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:6]]:_fansInfo.nick; + self.nickLabel.text = text; self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : YMLocalizedString(@"XPMineAttentionTableViewCell0"); if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) { self.experImageView.hidden = NO; diff --git a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFansTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFansTableViewCell.m index 1e15f3e4..fe63138b 100644 --- a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFansTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFansTableViewCell.m @@ -112,8 +112,9 @@ _fansInfo = fansInfo; if (_fansInfo) { self.avatarImageView.imageUrl = _fansInfo.avatar; - - self.nickLabel.text = _fansInfo.nick; + NSString *text = _fansInfo.nick.length > 5 ? [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]]:_fansInfo.nick; + self.nickLabel.text = text; + self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : YMLocalizedString(@"XPMineFansTableViewCell0"); if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) { self.experImageView.hidden = NO; diff --git a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFriendTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFriendTableViewCell.m index 4777cd6c..bd495285 100644 --- a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFriendTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineFriendTableViewCell.m @@ -90,7 +90,8 @@ _userInfo = userInfo; if (_userInfo) { self.avatarImageView.imageUrl = _userInfo.avatar; - self.nickLabel.text = _userInfo.nick; + NSString *text = _userInfo.nick.length > 5 ? [NSString stringWithFormat:@"%@...",[_userInfo.nick substringToIndex:5]]:_userInfo.nick; + self.nickLabel.text = text; self.signLabel.text = _userInfo.userDesc && _userInfo.userDesc.length > 0? _userInfo.userDesc : YMLocalizedString(@"XPMineFriendTableViewCell0"); if (self.isInRoom) { self.experImageView.hidden = NO; diff --git a/YuMi/Modules/YMMine/View/Guild/View/Cell/Income/XPNewMineHallIncomeCell.m b/YuMi/Modules/YMMine/View/Guild/View/Cell/Income/XPNewMineHallIncomeCell.m index c2e43ad4..20021aaa 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Cell/Income/XPNewMineHallIncomeCell.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Cell/Income/XPNewMineHallIncomeCell.m @@ -161,6 +161,7 @@ -(UILabel *)typeView{ if(!_typeView){ _typeView = [UILabel labelInitWithText:YMLocalizedString(@"XPGuildIncomeSectionView5") font:kFontMedium(14) textColor:UIColorFromRGB(0x2B2D33)]; + _typeView.hidden = YES; } return _typeView; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.h b/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.h index fc6cc875..42426482 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.h +++ b/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.h @@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, ClanMemberTableViewCellType) { ///是否是最后的一个 @property (nonatomic,assign) BOOL isLast; @property (nonatomic,strong) ClanMemberInfoModel *memberInfo; +@property(nonatomic,assign) BOOL pi_IsClan; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.m b/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.m index 921c870c..319e45cf 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Guild/View/Cell/XPClanMemberTableViewCell.m @@ -42,6 +42,7 @@ @property (nonatomic,strong) CAShapeLayer *shapeLayer; ///右边按钮的 @property (nonatomic,strong) UIButton *rightButton; + @end @implementation XPClanMemberTableViewCell @@ -70,6 +71,7 @@ [self.nickStackView addArrangedSubview:self.sexImageView]; [self.nickStackView addArrangedSubview:self.experImageView]; [self.nickStackView addArrangedSubview:self.charmImageView]; + } - (void)initSubViewConstraints { @@ -101,11 +103,13 @@ make.bottom.mas_equalTo(0); }]; [self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(24); + make.width.mas_equalTo(28); + make.height.mas_equalTo(14); }]; [self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(24); + make.width.mas_equalTo(28); + make.height.mas_equalTo(14); }]; [self.nickStackView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -272,7 +276,12 @@ } } } - +- (void)setPi_IsClan:(BOOL)pi_IsClan{ + _pi_IsClan = pi_IsClan; + [self.backView mas_updateConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.contentView).inset(0); + }]; +} - (void)setCellType:(ClanMemberTableViewCellType)cellType { _cellType = cellType; switch (_cellType) { @@ -377,7 +386,7 @@ _nickStackView.axis = UILayoutConstraintAxisHorizontal; _nickStackView.distribution = UIStackViewDistributionFill; _nickStackView.alignment = UIStackViewAlignmentFill; - _nickStackView.spacing = 7; + _nickStackView.spacing = 2; } return _nickStackView; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGoldIncomeRecordVC.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGoldIncomeRecordVC.m index 0dcd52b4..98d3aa2d 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGoldIncomeRecordVC.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPMineGoldIncomeRecordVC.m @@ -30,13 +30,13 @@ #import "XPGuildTimeMonthPickerView.h" #import "XPGoldIncomeSectionView.h" #import "XPMineGuildIncomeDetailViewController.h" -//#import "XPIncomeRecordGoldDetailsPickViewView.h" +#import "XPIncomeRecordGoldDetailsPickViewView.h" ///P #import "XPClanPresenter.h" #import "XPClanProtocol.h" -@interface XPMineGoldIncomeRecordVC () +@interface XPMineGoldIncomeRecordVC () ///列表 @property (nonatomic,strong) UITableView *tableView; ///头部的view @@ -211,10 +211,11 @@ #pragma mark - XPGuildIncomeHeaderViewDelegate - (void)xPGuildIncomeHeaderView:(XPGuildIncomeHeaderView *)view didChooseTime:(UIButton *)sender { -// XPIncomeRecordGoldDetailsPickViewView *pickViewView = [[XPIncomeRecordGoldDetailsPickViewView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) curDate:self.startDate]; -// pickViewView.delegate = self; -// [kWindow addSubview:pickViewView]; + XPIncomeRecordGoldDetailsPickViewView *pickViewView = [[XPIncomeRecordGoldDetailsPickViewView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) curDate:self.startDate]; + pickViewView.delegate = self; + [kWindow addSubview:pickViewView]; } +#pragma mark - XPIncomeRecordGoldDetailsPickViewViewDelegat - (void)didClickSureActionWtihStartDate:(NSDate *)startDate endDate:(NSDate *)endDate{ self.pi_startTimeStr = [PLTimeUtil getYYMMDDWithDate:startDate]; self.pi_endTimeStr = [PLTimeUtil getYYMMDDWithDate:endDate]; diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m index 0db5621a..b0bcc80e 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineGuildIncomeRecordViewController.m @@ -100,7 +100,7 @@ #pragma mark - Private Method - (void)initSubViews { - self.view.backgroundColor = [UIColor whiteColor]; + self.view.backgroundColor = UIColorFromRGB(0xF5F6FA); [self.view addSubview:self.headerView]; [self.view addSubview:self.tableView]; } @@ -225,12 +225,12 @@ XPGuildIncomeSectionView * sectionView = [[XPGuildIncomeSectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 47)]; GuildIncomeType type = GuildIncomeType_Anchor;; - sectionView.incomeType = type ; return sectionView; } else { XPGuildAnchorIncomeSectionView * sectionView = [[XPGuildAnchorIncomeSectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 47)]; sectionView.isHost = YES; + return sectionView; } } @@ -412,6 +412,7 @@ if (!_headerView) { _headerView = [[XPNewGuildIncomeHeaderView alloc] init]; _headerView.delegate = self; + _headerView.backgroundColor = UIColorFromRGB(0xF5F6FA); } return _headerView; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m index 07d2abe3..2108cd6c 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m +++ b/YuMi/Modules/YMMine/View/Guild/View/IncomeStatis/XPNewMineHallIncomeVC.m @@ -167,7 +167,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - return self.datasource.count > 0 ? kGetScaleWidth(222) : 400; + return self.datasource.count > 0 ? kGetScaleWidth(232) : 400; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.h b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.h index b583d484..ce252632 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.h +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.h @@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,weak) id delegate; ///顶部是否切圆角 @property (nonatomic,assign) BOOL isTopCor; +@property(nonatomic,assign) BOOL pi_IsClan; ///显示标题 @property (nonatomic,copy) NSString *title; ///隐藏搜索 默认隐藏 diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.m b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.m index e5e6b8dd..c9f38ce1 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPClanSectionView.m @@ -23,6 +23,7 @@ @property (nonatomic,strong) UIButton *searchButton; ///管理 @property (nonatomic,strong) UIButton *managerButton; +@property(nonatomic,strong) UILabel *managerView; @end @implementation XPClanSectionView @@ -42,9 +43,12 @@ [self addSubview:self.backView]; [self.backView addSubview:self.titleLabel]; [self.backView addSubview:self.moreStackView]; + [self.moreStackView addArrangedSubview:self.searchButton]; [self.moreStackView addArrangedSubview:self.managerButton]; + [self.moreStackView addArrangedSubview:self.managerView]; + self.managerView.hidden = YES; } - (void)initSubViewConstraints { @@ -83,7 +87,14 @@ [self.delegate xPClanSectionView:self didClickManager:sender]; } } - +- (void)setPi_IsClan:(BOOL)pi_IsClan{ + _pi_IsClan = pi_IsClan; + [self.backView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self).inset(0); + make.top.bottom.mas_equalTo(self); + }]; + self.managerView.hidden = NO; +} #pragma mark - Getters And Setters - (void)setTitle:(NSString *)title { _title = title; @@ -96,7 +107,8 @@ _isTopCor = isTopCor; if (_isTopCor) { CAShapeLayer * layer = [CAShapeLayer layer]; - layer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth - 30, 37) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)].CGPath; + CGFloat width = _pi_IsClan ? 0 : 30; + layer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth - width, 37) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)].CGPath; self.backView.layer.mask = layer; } } @@ -162,5 +174,10 @@ return _managerButton; } - +- (UILabel *)managerView{ + if(!_managerView){ + _managerView = [UILabel labelInitWithText:YMLocalizedString(@"XPClanSectionView0") font:kFontMedium(14) textColor:UIColorFromRGB(0x8A8CAB)]; + } + return _managerView; +} @end diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGoldIncomeSectionView.m b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGoldIncomeSectionView.m index 37662d6e..34e67894 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGoldIncomeSectionView.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGoldIncomeSectionView.m @@ -1,8 +1,8 @@ // // XPGoldIncomeSectionView.m -// YuMi +// xplan-ios // -// Created by YuMi on 2022/12/16. +// Created by duoban on 2022/12/16. // #import "XPGoldIncomeSectionView.h" @@ -125,27 +125,21 @@ } return _bgItemView; } - -- (UILabel *)roomView { - if (!_roomView) { - _roomView = [[UILabel alloc] init]; - _roomView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; - _roomView.textColor = [DJDKMIMOMColor inputTextColor]; - _roomView.text = YMLocalizedString(@"XPGoldIncomeSectionView0"); - } - return _roomView; +- (UILabel *)roomView{ + if (!_roomView){ + _roomView = [UILabel labelInitWithText:YMLocalizedString(@"XPGoldIncomeSectionView0") font:kFontMedium(12) textColor:[DJDKMIMOMColor inputTextColor]]; + _roomView.textAlignment = NSTextAlignmentCenter; + + } + return _roomView; } - -- (UILabel *)memberView { - if (!_memberView) { - _memberView = [[UILabel alloc] init]; - _memberView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; - _memberView.textColor = [DJDKMIMOMColor inputTextColor]; - _memberView.text = YMLocalizedString(@"XPIncomeRecordGoldDetailsHeadView1"); - } - return _memberView; +-(UILabel *)memberView{ + if (!_memberView){ + _memberView = [UILabel labelInitWithText:YMLocalizedString(@"XPIncomeRecordGoldDetailsHeadView1") font:kFontMedium(12) textColor:[DJDKMIMOMColor inputTextColor]]; + _memberView.textAlignment = NSTextAlignmentCenter; + } + return _memberView; } - -(XPIncomeRecordGoldDetailsHeadItemView *)diamondView{ if (!_diamondView){ _diamondView = [[XPIncomeRecordGoldDetailsHeadItemView alloc]initWithFrame:CGRectZero]; @@ -154,18 +148,14 @@ } return _diamondView; } - -- (UILabel *)exchangeGoldView { - if (!_exchangeGoldView) { - _exchangeGoldView = [[UILabel alloc] init]; - _exchangeGoldView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; - _exchangeGoldView.textColor = [DJDKMIMOMColor inputTextColor]; - _exchangeGoldView.text = YMLocalizedString(@"XPIncomeRecordGoldDetailsHeadView3"); - } - return _exchangeGoldView; +- (UILabel *)exchangeGoldView{ + if (!_exchangeGoldView){ + _exchangeGoldView = [UILabel labelInitWithText:YMLocalizedString(@"XPIncomeRecordGoldDetailsHeadView3") font:kFontMedium(12) textColor:[DJDKMIMOMColor inputTextColor]]; + _exchangeGoldView.textAlignment = NSTextAlignmentCenter; + + } + return _exchangeGoldView; } - - -(XPIncomeRecordGoldDetailsHeadItemView *)settlementView{ if (!_settlementView){ _settlementView = [[XPIncomeRecordGoldDetailsHeadItemView alloc]initWithFrame:CGRectZero]; diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m index 75bae294..bb9df34f 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildHeaderView.m @@ -88,9 +88,10 @@ } - (void)initSubViewConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(KScreenWidth); - make.bottom.mas_equalTo(self.stackView.mas_bottom).offset(15); + make.bottom.mas_equalTo(self.stackView.mas_bottom); }]; CGFloat kBackScale = 274.0 / 375.0; diff --git a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildIncomeHeaderView.m b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildIncomeHeaderView.m index 4b676e81..3f1fd2ac 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildIncomeHeaderView.m +++ b/YuMi/Modules/YMMine/View/Guild/View/SubViews/XPGuildIncomeHeaderView.m @@ -141,6 +141,7 @@ [self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.totalLabel); + make.right.equalTo(self.backImageView.mas_right).mas_offset(-kGetScaleWidth(5)); make.centerY.mas_equalTo(self.arrowButton); }]; } @@ -158,7 +159,8 @@ if (_totalIncome == nil) { _totalIncome = @"0"; } - NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPGuildIncomeHeaderView2"), [NSString getDealNumwithstring:_totalIncome]]; + NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPGuildIncomeHeaderView2"), _totalIncome]; + self.coinLabel.text = title; } @@ -264,6 +266,7 @@ _coinLabel = [[UILabel alloc] init]; _coinLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium]; _coinLabel.textColor = [UIColor whiteColor]; + _coinLabel.numberOfLines = 2; } return _coinLabel; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m b/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m index 936399c2..ba5dc053 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/XPMineClanViewController.m @@ -111,11 +111,12 @@ #pragma mark - Private Method - (void)initSubViews { + [self.view addSubview:self.headerView]; [self.view addSubview:self.tableView]; [self.view addSubview:self.navView]; [self.navView addSubview:self.backButton]; [self.navView addSubview:self.titleLabel]; - self.tableView.tableHeaderView = self.headerView; + } - (void)initSubViewConstraints { @@ -143,42 +144,49 @@ #pragma mark - UITableViewDelegate And UITableViewDataSource - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.datasource.count; + return self.datasource.count + 1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if(indexPath.row == 0){ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class]) forIndexPath:indexPath]; + cell.backgroundColor = [UIColor clearColor]; + cell.contentView.backgroundColor = [UIColor clearColor]; + if(!self.sectionView.superview){ + [cell.contentView addSubview:self.sectionView]; + } + return cell; + } XPClanMemberTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])]; if (cell == nil) { cell = [[XPClanMemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])]; } + self.sectionView.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineClanViewController1"), self.datasource.count]; cell.cellType = ClanMemberTableViewCellType_Normal; - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; - cell.isLast = (self.datasource.count -1) == indexPath.row; + ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row-1]; + cell.isLast = (self.datasource.count -1) == indexPath.row-1; + cell.memberInfo = memberInfo; return cell; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - return 66; + if(self.headerView.clanRoomList.count == 0 && indexPath.row == 0){ + self.sectionView.frame = CGRectMake(0, 25, KScreenWidth, 37); + return 62; + } + if(indexPath.row == 0){ + self.sectionView.frame = CGRectMake(0, 10, KScreenWidth, 37); + return 47; + } + return 66; } -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - return 37; + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ + return self.headerView; } -- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - if (section == 0 && self.isRequest) { - if (self.sectionView == nil) { - XPClanSectionView * sectionView = [[XPClanSectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 37)]; - sectionView.isTopCor = YES; - sectionView.delegate = self; - self.sectionView = sectionView; - } - self.sectionView.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineClanViewController1"), self.datasource.count]; - return self.sectionView; - } - return [UIView new]; -} - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ return 0.01f; @@ -191,7 +199,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (self.datasource.count > 0) { - ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; + ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row-1]; XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = memberInfo.uid.integerValue; [self.navigationController pushViewController:userInfoVC animated:YES]; @@ -238,6 +246,7 @@ - (void)getClanRoomListSuccess:(NSArray *)array { self.headerView.clanRoomList = array; + [self.tableView reloadData]; } #pragma mark - XPGuildHeaderViewDelegate @@ -314,7 +323,14 @@ } return _titleLabel; } - +- (XPClanSectionView *)sectionView{ + if(!_sectionView){ + _sectionView = [[XPClanSectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 37)]; + _sectionView.isTopCor = YES; + _sectionView.delegate = self; + } + return _sectionView; +} - (UITableView *)tableView { if (!_tableView) { _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; @@ -330,6 +346,7 @@ _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } [_tableView registerClass:[XPClanMemberTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])]; + [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; } return _tableView; } diff --git a/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m b/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m index 2f7d6b0b..57b35840 100644 --- a/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m +++ b/YuMi/Modules/YMMine/View/Guild/View/XPMineGuildViewController.m @@ -65,8 +65,8 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; @property (nonatomic,strong) UILabel *idLabel; ///背景图 @property (nonatomic,strong) NetImageView *backImageView; -///显示一个蒙层 -@property (nonatomic,strong) UIImageView *shadowImageView; + + ///当前页数 @property (nonatomic,assign) int page; ///是否有更多的数据 @@ -175,7 +175,13 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; #pragma mark - Private Method - (void)initSubViews { [self.view addSubview:self.backImageView]; - [self.view addSubview:self.shadowImageView]; + UIView *view = [UIView new]; + view.backgroundColor = [UIColor whiteColor]; + [self.view addSubview:view]; + [view mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.equalTo(self.view); + make.height.mas_equalTo(KScreenHeight - 297); + }]; [self.view addSubview:self.tableView]; @@ -185,7 +191,8 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; [self.navView addSubview:self.titleLabel]; [self.navView addSubview:self.rightStackView]; - [self.backImageView addSubview:self.shadowImageView]; + + [self.rightStackView addArrangedSubview:self.exitButton]; [self.rightStackView addArrangedSubview:self.editButton]; @@ -283,12 +290,10 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.top.mas_equalTo(self.view); - make.height.mas_equalTo(250); - }]; - - [self.shadowImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self.backImageView); + make.height.mas_equalTo(390); }]; + + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(70, 70)); @@ -333,9 +338,10 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; if (cell == nil) { cell = [[XPClanMemberTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPClanMemberTableViewCell class])]; } + cell.pi_IsClan = YES; cell.cellType = ClanMemberTableViewCellType_Normal; + cell.pi_IsClan = YES; ClanMemberInfoModel * memberInfo = [self.datasource safeObjectAtIndex1:indexPath.row]; - cell.isLast = (self.datasource.count -1) == indexPath.row; cell.memberInfo = memberInfo; return cell; } @@ -353,6 +359,7 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; if (self.sectionView == nil) { XPClanSectionView * sectionView = [[XPClanSectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 37)]; sectionView.delegate = self; + sectionView.pi_IsClan = YES; sectionView.isTopCor = YES; self.sectionView = sectionView; } @@ -465,7 +472,9 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; self.currentUserClanInfo = currentUserClanInfo; self.avatarImageView.imageUrl = clanDetailInfo.hall.ownerAvatar; self.idLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineGuildViewController6"),clanDetailInfo.hall.ownerErbanNo]; - self.backImageView.imageUrl = clanDetailInfo.hall.ownerAvatar; + [self.backImageView loadImageWithUrl:clanDetailInfo.hall.ownerAvatar completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) { + self.backImageView.image = [self setBlurImage:image]; + }]; self.titleLabel.text = clanDetailInfo.hall.hallName; if (clanDetailInfo.manageHall) { self.sectionView.isHiddenSearch = NO; @@ -663,6 +672,38 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; managerList.guildId = self.clanDetailInfo.hall.hallId; [self.navigationController pushViewController:managerList animated:YES]; } +-(UIImage *)setBlurImage:(UIImage *)image{ + + + CIContext *context = [CIContext contextWithOptions:nil]; + CIImage * sourceImage = [CIImage imageWithCGImage:image.CGImage];//将图片转换成CIImage + + ///图片仿射滤镜 + + CIFilter * clamp = [CIFilter filterWithName:@"CIAffineClamp"];//设置绘制类型 + + [clamp setValue:sourceImage forKey:kCIInputImageKey];//设置要绘制的图片 + + CIImage *clampResult = [clamp valueForKey:kCIOutputImageKey]; + + ///高斯模糊滤镜 + + CIFilter* gaussianBlur = [CIFilter filterWithName:@"CIGaussianBlur"]; + + [gaussianBlur setValue:clampResult forKey:kCIInputImageKey]; + + [gaussianBlur setValue:[NSNumber numberWithFloat:1] forKey:@"inputRadius"];//设置模糊值 + + CIImage * gaussianBlurResult = [gaussianBlur valueForKey:kCIOutputImageKey]; + + ///转化获取图片 + + CGImageRef cgImage = [context createCGImage:gaussianBlurResult fromRect:[sourceImage extent]]; + + UIImage * resultImage = [UIImage imageWithCGImage:cgImage]; + return resultImage; + +} #pragma mark - Getters And Setters - (UIView *)navView { @@ -776,14 +817,7 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess; return _backImageView; } -- (UIImageView *)shadowImageView { - if (!_shadowImageView) { - _shadowImageView = [[UIImageView alloc] init]; - _shadowImageView.userInteractionEnabled = YES; - _shadowImageView.image = [UIImage imageNamed:@"mine_guild_guild_header_bg"]; - } - return _shadowImageView; -} + - (UITableView *)tableView { diff --git a/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordVC.m b/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordVC.m index 708ad618..ce63e1a3 100644 --- a/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordVC.m +++ b/YuMi/Modules/YMMine/View/IncomeRecord/XPIncomeRecordVC.m @@ -77,7 +77,7 @@ } #pragma mark - XPIncomeRecordProtocol - (void)requestQueryWithRoomTypeFail{ - self.goldView.hidden = NO; + } -(void)getExchangeDiamondInformation:(XPExchangeDiamondsModel *)model{ [self hideHUD]; @@ -163,7 +163,6 @@ if (!_goldView){ _goldView = [[XPIncomeRecordView alloc]initWithFrame:CGRectZero type:IncomeRecord_Gold]; _goldView.delegate = self; - _goldView.hidden = YES; } return _goldView; } diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoDesViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoDesViewController.m index b825ca2f..00e419de 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoDesViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoDesViewController.m @@ -89,10 +89,13 @@ static NSInteger maxCount = 60; @weakify(self); RAC(self.completionBtn, enabled) = [RACSignal combineLatest:@[self.useDescTextView.rac_textSignal] reduce:^id _Nonnull(NSString *text){ @strongify(self); - self.limitLabel.text = [NSString stringWithFormat:@"%ld",(maxCount - text.length)]; + self.limitLabel.text = [NSString stringWithFormat:@"%ld",(maxCount - text.length)]; if (text.length > maxCount) { + self.useDescTextView.text = [text substringToIndex:maxCount]; [self showErrorToast:[NSString stringWithFormat:YMLocalizedString(@"XPMineUserInfoDesViewController1"), maxCount]]; + self.limitLabel.text = @"0"; } + return @(text.length > 0 && text.length <= maxCount); }]; } diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineLoginPasswordViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineLoginPasswordViewController.m index 5a03e7b7..b24193d1 100644 --- a/YuMi/Modules/YMMine/View/Setting/XPMineLoginPasswordViewController.m +++ b/YuMi/Modules/YMMine/View/Setting/XPMineLoginPasswordViewController.m @@ -23,7 +23,7 @@ ///VC #import "XPMineSettingViewController.h" #import "LoginForgetPasswordViewController.h" -#import "XPMineResetLoginPwdViewController.h" + @interface XPMineLoginPasswordViewController () ///容器 diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineModifPayPwdViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineModifPayPwdViewController.m index 9d37492d..b01111a8 100644 --- a/YuMi/Modules/YMMine/View/Setting/XPMineModifPayPwdViewController.m +++ b/YuMi/Modules/YMMine/View/Setting/XPMineModifPayPwdViewController.m @@ -20,7 +20,6 @@ #import "XPMineModifPayProtocol.h" ///VC #import "XPMineSettingViewController.h" -#import "XPMineVerifIdentityViewController.h" @interface XPMineModifPayPwdViewController () ///容器 @@ -122,10 +121,8 @@ }]; - return; - XPMineVerifIdentityViewController * VC= [[XPMineVerifIdentityViewController alloc] init]; - VC.userInfo = self.userInfo; - [self.navigationController pushViewController:VC animated:YES]; + + } - (void)submitBtnAction:(UIButton *)sender { diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineResetLoginPwdViewController.h b/YuMi/Modules/YMMine/View/Setting/XPMineResetLoginPwdViewController.h deleted file mode 100644 index 3f127046..00000000 --- a/YuMi/Modules/YMMine/View/Setting/XPMineResetLoginPwdViewController.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// YMMineResetLoginPwdViewController.h -// YUMI -// -// Created by YUMI on 2022/5/5. -// - -#import "MvpViewController.h" - -NS_ASSUME_NONNULL_BEGIN -@class UserInfoModel; -@interface XPMineResetLoginPwdViewController : MvpViewController -///用户信息 -@property (nonatomic,strong) UserInfoModel *userInfo; -@end - -NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineResetLoginPwdViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineResetLoginPwdViewController.m deleted file mode 100644 index 5eb668c5..00000000 --- a/YuMi/Modules/YMMine/View/Setting/XPMineResetLoginPwdViewController.m +++ /dev/null @@ -1,199 +0,0 @@ -// -// YMMineResetLoginPwdViewController.m -// YUMI -// -// Created by YUMI on 2022/5/5. -// - -#import "XPMineResetLoginPwdViewController.h" -///Third -#import -///Tool -#import "DJDKMIMOMColor.h" -#import "CountDownHelper.h" -#import "YUMIMacroUitls.h" -#import "UIImage+Utils.h" -///Model -#import "UserInfoModel.h" -///View -#import "XPMineVerifIdentityView.h" -#import "XPMineModifPayPwdView.h" -///P -#import "XPMineResetLoginPwdPresenter.h" -#import "XPMineResetLoginPwdProtocol.h" - -@interface XPMineResetLoginPwdViewController () -///容器 -@property (nonatomic,strong) UIStackView *stackView; -///手机号 -@property (nonatomic,strong) XPMineVerifIdentityView *phoneView; -///验证码 -@property (nonatomic,strong) XPMineVerifIdentityView *smsCodeView; -///当前密码 -@property (nonatomic,strong) XPMineModifPayPwdView *currentPwdView; -///下一步 -@property (nonatomic,strong) UIButton *nextButton; -@end - -@implementation XPMineResetLoginPwdViewController - -- (void)deallocm { - [[CountDownHelper shareHelper] stopCountDown]; -} - -- (XPMineResetLoginPwdPresenter *)createPresenter { - return [[XPMineResetLoginPwdPresenter alloc] init];; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - [self initSubViews]; - [self initSubViewConstraints]; - [self initEvents]; -} - -- (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; - [[CountDownHelper shareHelper] stopCountDown]; -} - -#pragma mark - Private Method -- (void)initSubViews { - self.title = YMLocalizedString(@"XPMineResetLoginPwdViewController0"); - self.phoneView.contentTextField.text = self.userInfo.phone; - self.phoneView.contentTextField.enabled = self.userInfo.phone.length > 0; - [CountDownHelper shareHelper].delegate = self; - [self.view addSubview:self.stackView]; - [self.view addSubview:self.nextButton]; - - [self.stackView addArrangedSubview:self.phoneView]; - [self.stackView addArrangedSubview:self.smsCodeView]; - [self.stackView addArrangedSubview:self.currentPwdView]; -} - -- (void)initSubViewConstraints { - [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.top.mas_equalTo(self.view); - }]; - - [self.nextButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.stackView.mas_bottom).offset(45); - make.right.mas_equalTo(self.view).offset(-32); - make.left.mas_equalTo(self.view).offset(32); - make.height.mas_equalTo(45); - }]; -} - -- (void)initEvents { - @kWeakify(self); - self.smsCodeView.smsCodeBlock = ^(UIButton * _Nonnull sender) { - @kStrongify(self); - if (self.phoneView.contentTextField.text.length > 0) { - [self.presenter phoneSmsCode:self.phoneView.contentTextField.text type:GetSmsType_Reset_Password phoneAreaCode:@""]; - } else { - [self showErrorToast:YMLocalizedString(@"XPMineResetLoginPwdViewController1")]; - } - }; -} -#pragma mark - XPMineVerifIdentityProtocol -- (void)phoneSmsCodeSuccess { - self.smsCodeView.smsCodeButton.enabled = NO; - [self showSuccessToast:YMLocalizedString(@"XPMineResetLoginPwdViewController2")]; - [[CountDownHelper shareHelper] openCountdownWithTime:60]; -} - -- (void)resetLoginPasswordSuccess { - [self showErrorToast:YMLocalizedString(@"XPMineResetLoginPwdViewController3")]; - [self.presenter logoutCurrentAccount]; -} - -- (void)logoutCurrentAccountSuccess { - [self.navigationController popToRootViewControllerAnimated:NO]; -} - - -#pragma mark - CountDownHelperDelegate -///倒计时进行中 -- (void)onCountdownOpen:(int)time { - [self.smsCodeView.smsCodeButton setTitle:[NSString stringWithFormat:YMLocalizedString(@"XPMineResetLoginPwdViewController4"), time] forState:UIControlStateDisabled]; -} -///倒计时结束 -- (void)onCountdownFinish { - self.smsCodeView.smsCodeButton.enabled= YES; - [self.smsCodeView.smsCodeButton setTitle:YMLocalizedString(@"XPMineResetLoginPwdViewController5") forState:UIControlStateNormal]; -} - -#pragma mark - Event Response -- (void)nextButtonAction:(UIButton *)sender { - [self.presenter resetLoginPassword:self.userInfo.phone smsCode:self.smsCodeView.contentTextField.text newPwd:self.currentPwdView.contentTextField.text]; -} - -- (void)textFieldDidChange:(UITextField *)textFiled { - if (self.phoneView.contentTextField.text.length > 0 && self.smsCodeView.contentTextField.text.length > 0 && self.currentPwdView.contentTextField.text.length >= 6) { - self.nextButton.enabled = YES; - } else { - self.nextButton.enabled = NO; - } -} - -#pragma mark - Getters And Setters -- (UIButton *)nextButton { - if (!_nextButton) { - _nextButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_nextButton setTitleColor:[DJDKMIMOMColor confirmButtonTextColor] forState:UIControlStateNormal]; - [_nextButton setTitleColor:[DJDKMIMOMColor disableButtonTextColor] forState:UIControlStateDisabled]; - [_nextButton setTitle:YMLocalizedString(@"XPMineResetLoginPwdViewController6") forState:UIControlStateNormal]; - _nextButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18]; - _nextButton.layer.masksToBounds = YES; - _nextButton.layer.cornerRadius = 45/2; - _nextButton.enabled = NO; - [_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor], [DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; - [_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor disableButtonColor], [DJDKMIMOMColor disableButtonColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled]; - [_nextButton addTarget:self action:@selector(nextButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - } - return _nextButton; -} - -- (UIStackView *)stackView { - if (!_stackView) { - _stackView = [[UIStackView alloc] init]; - _stackView.axis = UILayoutConstraintAxisVertical; - _stackView.distribution = UIStackViewDistributionFill; - _stackView.alignment = UIStackViewAlignmentFill; - _stackView.spacing = 0; - } - return _stackView; -} - -- (XPMineVerifIdentityView *)phoneView { - if (!_phoneView) { - _phoneView = [[XPMineVerifIdentityView alloc] init]; - _phoneView.type = XPMineVerifIdentityType_Phone; - _phoneView.placeholder = YMLocalizedString(@"XPMineResetLoginPwdViewController7"); - _phoneView.contentTextField.secureTextEntry = NO; - _phoneView.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor]; - } - return _phoneView; -} - -- (XPMineVerifIdentityView *)smsCodeView { - if (!_smsCodeView) { - _smsCodeView = [[XPMineVerifIdentityView alloc] init]; - _smsCodeView.type = XPMineVerifIdentityType_Sms; - _smsCodeView.placeholder = YMLocalizedString(@"XPMineResetLoginPwdViewController8"); - _smsCodeView.contentTextField.secureTextEntry = NO; - _smsCodeView.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor]; - } - return _smsCodeView; -} - -- (XPMineModifPayPwdView *)currentPwdView { - if (!_currentPwdView) { - _currentPwdView = [[XPMineModifPayPwdView alloc] init]; - _currentPwdView.placeholder = YMLocalizedString(@"XPMineResetLoginPwdViewController9"); - [_currentPwdView.contentTextField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged]; - } - return _currentPwdView; -} - -@end diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineVerifIdentityViewController.h b/YuMi/Modules/YMMine/View/Setting/XPMineVerifIdentityViewController.h deleted file mode 100644 index 1ba9063c..00000000 --- a/YuMi/Modules/YMMine/View/Setting/XPMineVerifIdentityViewController.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// XPMineVerifIdentityViewController.h -// xplan-ios -// -// Created by 冯硕 on 2021/9/18. -// 验证身份 - -#import "MvpViewController.h" - -NS_ASSUME_NONNULL_BEGIN -@class UserInfoModel; -@interface XPMineVerifIdentityViewController : MvpViewController -///用户信息 -@property (nonatomic,strong) UserInfoModel *userInfo; -@end - -NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Setting/XPMineVerifIdentityViewController.m b/YuMi/Modules/YMMine/View/Setting/XPMineVerifIdentityViewController.m deleted file mode 100644 index 65a61509..00000000 --- a/YuMi/Modules/YMMine/View/Setting/XPMineVerifIdentityViewController.m +++ /dev/null @@ -1,177 +0,0 @@ -// -// XPMineVerifIdentityViewController.m -// xplan-ios -// -// Created by 冯硕 on 2021/9/18. -// - -#import "XPMineVerifIdentityViewController.h" -///Third -#import -#import -///Tool - -#import "CountDownHelper.h" -#import "UIImage+Utils.h" -///Model -#import "UserInfoModel.h" -///View -#import "XPMineVerifIdentityView.h" -///P -#import "XPMineVerifIdentityPresenter.h" -#import "XPMineVerifIdentityProtocol.h" -///VC -#import "XPMineResetPayPwdViewController.h" - -@interface XPMineVerifIdentityViewController () -///容器 -@property (nonatomic,strong) UIStackView *stackView; -///手机号 -@property (nonatomic,strong) XPMineVerifIdentityView *phoneView; -///验证码 -@property (nonatomic,strong) XPMineVerifIdentityView *smsCodeView; -///下一步 -@property (nonatomic,strong) UIButton *nextButton; -@end - -@implementation XPMineVerifIdentityViewController -- (void)dealloc { - [[CountDownHelper shareHelper] stopCountDown]; -} -- (XPMineVerifIdentityPresenter *)createPresenter { - return [[XPMineVerifIdentityPresenter alloc] init];; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - [self initSubViews]; - [self initSubViewConstraints]; - [self initEvents]; -} - -- (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; - [[CountDownHelper shareHelper] stopCountDown]; -} - -#pragma mark - Private Method -- (void)initSubViews { - self.title = YMLocalizedString(@"XPMineVerifIdentityViewController0"); - self.phoneView.contentTextField.text = self.userInfo.phone; - self.phoneView.contentTextField.enabled = self.userInfo.phone.length > 0; - [CountDownHelper shareHelper].delegate = self; - [self.view addSubview:self.stackView]; - [self.view addSubview:self.nextButton]; - - [self.stackView addArrangedSubview:self.phoneView]; - [self.stackView addArrangedSubview:self.smsCodeView]; -} - -- (void)initSubViewConstraints { - [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) { - make.leading.trailing.top.mas_equalTo(self.view); - }]; - - [self.nextButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.stackView.mas_bottom).offset(45); - make.trailing.mas_equalTo(self.view).offset(-32); - make.leading.mas_equalTo(self.view).offset(32); - make.height.mas_equalTo(45); - }]; -} - -- (void)initEvents { - @weakify(self); - RAC(self.nextButton, enabled) = [RACSignal combineLatest:@[self.phoneView.contentTextField.rac_textSignal, self.smsCodeView.contentTextField.rac_textSignal] reduce:^id _Nonnull(NSString *phone, NSString * code){ - return @(phone.length > 0 && code.length > 0); - }]; - - self.smsCodeView.smsCodeBlock = ^(UIButton * _Nonnull sender) { - @strongify(self); - if (self.phoneView.contentTextField.text.length > 0) { - [self.presenter phoneSmsCode:self.phoneView.contentTextField.text type:GetSmsType_Unbind_Phone phoneAreaCode:@""]; - } else { - [self showErrorToast:YMLocalizedString(@"XPMineVerifIdentityViewController1")]; - } - }; -} -#pragma mark - XPMineVerifIdentityProtocol -- (void)phoneSmsCodeSuccess { - self.smsCodeView.smsCodeButton.enabled = NO; - [self showSuccessToast:YMLocalizedString(@"XPMineVerifIdentityViewController2")]; - [[CountDownHelper shareHelper] openCountdownWithTime:60]; -} - -- (void)checkMoblieCodeWithMoblieSuccess { - [self showErrorToast:YMLocalizedString(@"XPMineVerifIdentityViewController3")]; - [[CountDownHelper shareHelper] stopCountDown]; - XPMineResetPayPwdViewController * vc = [[XPMineResetPayPwdViewController alloc] init]; - [self.navigationController pushViewController:vc animated:YES]; -} - -#pragma mark - CountDownHelperDelegate -///倒计时进行中 -- (void)onCountdownOpen:(int)time { - [self.smsCodeView.smsCodeButton setTitle:[NSString stringWithFormat:YMLocalizedString(@"XPMineVerifIdentityViewController4"), time] forState:UIControlStateDisabled]; -} -///倒计时结束 -- (void)onCountdownFinish { - self.smsCodeView.smsCodeButton.enabled= YES; - [self.smsCodeView.smsCodeButton setTitle:YMLocalizedString(@"XPMineVerifIdentityViewController5") forState:UIControlStateNormal]; -} - -#pragma mark - Event Response -- (void)nextButtonAction:(UIButton *)sender { - [self.presenter checkMoblieCodeWithMoblie:self.phoneView.contentTextField.text code:self.smsCodeView.contentTextField.text phoneAreaCode:@""]; -} - -#pragma mark - Getters And Setters -- (UIButton *)nextButton { - if (!_nextButton) { - _nextButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_nextButton setTitleColor:[DJDKMIMOMColor confirmButtonTextColor] forState:UIControlStateNormal]; - [_nextButton setTitleColor:[DJDKMIMOMColor disableButtonTextColor] forState:UIControlStateDisabled]; - [_nextButton setTitle:YMLocalizedString(@"XPMineVerifIdentityViewController6") forState:UIControlStateNormal]; - _nextButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18]; - _nextButton.layer.masksToBounds = YES; - _nextButton.layer.cornerRadius = 45/2; - _nextButton.enabled = NO; - [_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor], [DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; - [_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor disableButtonColor], [DJDKMIMOMColor disableButtonColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled]; - [_nextButton addTarget:self action:@selector(nextButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - } - return _nextButton; -} - -- (UIStackView *)stackView { - if (!_stackView) { - _stackView = [[UIStackView alloc] init]; - _stackView.axis = UILayoutConstraintAxisVertical; - _stackView.distribution = UIStackViewDistributionFill; - _stackView.alignment = UIStackViewAlignmentFill; - _stackView.spacing = 0; - } - return _stackView; -} - -- (XPMineVerifIdentityView *)phoneView { - if (!_phoneView) { - _phoneView = [[XPMineVerifIdentityView alloc] init]; - _phoneView.type = XPMineVerifIdentityType_Phone; - _phoneView.placeholder = YMLocalizedString(@"XPMineVerifIdentityViewController7"); - _phoneView.contentTextField.secureTextEntry = NO; - } - return _phoneView; -} - -- (XPMineVerifIdentityView *)smsCodeView { - if (!_smsCodeView) { - _smsCodeView = [[XPMineVerifIdentityView alloc] init]; - _smsCodeView.type = XPMineVerifIdentityType_Sms; - _smsCodeView.placeholder = YMLocalizedString(@"XPMineVerifIdentityViewController8"); - _smsCodeView.contentTextField.secureTextEntry = NO; - } - return _smsCodeView; -} - -@end diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m index 50fcf0d8..d2a8b5ce 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m @@ -329,11 +329,13 @@ }]; [self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.height.mas_equalTo(25); + make.height.mas_equalTo(20); + make.width.mas_equalTo(34); }]; [self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.height.mas_equalTo(25); + make.height.mas_equalTo(20); + make.width.mas_equalTo(34); }]; [self.newUserImageView mas_makeConstraints:^(MASConstraintMaker *make) { diff --git a/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m b/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m index 73cef8bb..09588ec0 100644 --- a/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m +++ b/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m @@ -367,7 +367,7 @@ //charmRank 魅力等级 if (userInfo.userLevelVo.charmUrl) { [attributedString appendAttributedString:[self createUrlImageAttribute:userInfo.userLevelVo.charmUrl]]; - [attributedString appendAttributedString:[self createSapceAttribute:2]]; + [attributedString appendAttributedString:[self createSapceAttribute:4]]; } // constellation 星座 diff --git a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsTooBarView.m b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsTooBarView.m index 8d4bcb85..dd39b9c5 100644 --- a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsTooBarView.m +++ b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsTooBarView.m @@ -332,6 +332,7 @@ self.likeButton.selected = _monentsInfo.isLike; self.likeLabel.text = _monentsInfo.likeCount.length > 0 ? _monentsInfo.likeCount : @"0"; self.commentLabel.text = _monentsInfo.commentCount.length > 0 ? _monentsInfo.commentCount : @"0"; + self.reportButton.hidden = _monentsInfo.dynamicId == nil; } } diff --git a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m index fe2afe22..565ab9d2 100644 --- a/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m +++ b/YuMi/Modules/YMMonents/View/SubViews/XPMonentsUserInfoView.m @@ -145,11 +145,11 @@ }]; [self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(20); + make.width.mas_equalTo(34); }]; [self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(20); + make.width.mas_equalTo(34); }]; [self.namePlateView mas_makeConstraints:^(MASConstraintMaker *make) { diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m index 6d4aa2a4..4ce74835 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m @@ -419,8 +419,6 @@ } #pragma mark - 夺宝精灵横幅 - (void)receiveTreasureFairyGiftHighLevel:(AttachmentModel *)attatchment { - if ([self isInSudGame]) {return;} - if ([self isInSudGame]) {return;} PIBaseAnimationViewModel *giftModel = [PIBaseAnimationViewModel new]; giftModel.data = attatchment.data; @@ -434,6 +432,7 @@ } - (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment { + self.isPlayOfB = YES; CGFloat kscale = (CGFloat)60 / (CGFloat)375; CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15); XPTreasureFairyGiftView *treasureView = [[XPTreasureFairyGiftView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth , KScreenWidth * kscale)]; @@ -1504,6 +1503,8 @@ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ [self createLicneseHourRankAnimation:model]; + }else if(model.type == GiftBannerType_Fairy){ + [self createTreasureFairyBannerAnimation:model]; } } diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPTreasureFairyGiftView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPTreasureFairyGiftView.m index 0d1e43bd..37f1291d 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPTreasureFairyGiftView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPTreasureFairyGiftView.m @@ -130,7 +130,7 @@ self.backImageView.hidden = YES; self.treasureView.hidden = NO; @kWeakify(self); - [self.parser parseWithNamed:@"treasure_fairy_gift_bg" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { + [self.parser parseWithNamed:@"pi_treasure_fairy_gift_bg" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { @kStrongify(self); self.treasureView.loops = 1; self.treasureView.clearsAfterStop = NO; diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m index 5d235946..28351ab0 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeViewController.m @@ -33,7 +33,7 @@ ///P #import "XPCandyTreePresenter.h" #import "XPCandyTreeProtocol.h" - +#import "Api+Room.h" #define KitemHeight (20 + 5) UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey; @@ -90,6 +90,8 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey; @property (nonatomic,weak) idhostDelegate; ///是否正在采摘 @property (nonatomic,assign) BOOL isPicking; + + @end @implementation XPCandyTreeViewController @@ -120,8 +122,14 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey; [self initSubViewConstraints]; self.numberCandy = 1; [self.presenter getCandyTreeInfo]; + [self getRoomInfo]; +} +-(void)getRoomInfo{ + [Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + RoomInfoModel *roomInfo = [RoomInfoModel modelWithJSON:data.data]; + self.pickLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPCandyTreeViewController0"),roomInfo.findLoveDrawSwitchVo.price]; + } uid:@(self.hostDelegate.getRoomInfo.uid).stringValue intoUid:[AccountInfoStorage instance].getUid]; } - - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; } @@ -326,8 +334,7 @@ UIKIT_EXTERN NSString * const kRoomReceivedCandyNotificationKey; [self.rankStackView addArrangedSubview:self.rankImageView]; - RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; - self.pickLabel.text = [NSString stringWithFormat:YMLocalizedString(@"XPCandyTreeViewController0"),roomInfo.findLoveDrawSwitchVo.price]; + // @kWeakify(self); // [self.parser parseWithNamed:@"candyTree" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { // @kStrongify(self); diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m index c4c49980..79bb7793 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m @@ -907,7 +907,7 @@ - (XPMessageInfoModel *)createShareOrAttentionRoomAttribute:(AttachmentModel *)attachment sendInfo:(XPMessageRemoteExtModel *)sendInfo uid:(NSString *)uid messageInfo:(XPMessageInfoModel *)messageInfo{ NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; NSDictionary *data = attachment.data; - NSString *nick = [NSString stringWithFormat:@"%@",data[@"nick"]]; + NSString *nick = [NSString stringWithFormat:@"%@",data[@"data"][@"nick"]]; [attribute appendAttributedString:[self createTextAttribute:nick color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]]; NSString *tipString = @""; if (attachment.second == Custom_Message_Sub_Room_Tip_ShareRoom) { diff --git a/YuMi/Modules/YMRoom/View/SendRedPacket/XPRoomSendRedPacketViewController.m b/YuMi/Modules/YMRoom/View/SendRedPacket/XPRoomSendRedPacketViewController.m index f5d539d0..10caf3db 100644 --- a/YuMi/Modules/YMRoom/View/SendRedPacket/XPRoomSendRedPacketViewController.m +++ b/YuMi/Modules/YMRoom/View/SendRedPacket/XPRoomSendRedPacketViewController.m @@ -23,7 +23,6 @@ #import "XPMineRechargeViewController.h" #import "XPIAPRechargeViewController.h" #import "XPRoomHalfWebView.h" -#import "XPMineVerifIdentityViewController.h" ///P #import "XPRoomRedPacketPresenter.h" #import "XPRoomRedPacketProtocol.h" @@ -362,9 +361,10 @@ } - (void)xPRoomRedPacketPwdViewPwdForgetBtnClick { - XPMineVerifIdentityViewController * VC = [[XPMineVerifIdentityViewController alloc] init]; - VC.userInfo = self.hostDelegate.getUserInfo; - [self.navigationController pushViewController:VC animated:YES]; + XPMinePayPwdViewController *vc = [[XPMinePayPwdViewController alloc] init]; + vc.userInfo = self.hostDelegate.getUserInfo; + [self.navigationController pushViewController:vc animated:YES]; + } #pragma mark - Event Response diff --git a/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m b/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m index f82c79ee..d1d8b546 100644 --- a/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m +++ b/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m @@ -308,14 +308,10 @@ make.right.mas_equalTo(self.closeButton.mas_left).offset(-5); }]; - [self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.height.mas_equalTo(20); - }]; - [self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.height.mas_equalTo(20); - }]; + + [self.newUserImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.width.height.mas_equalTo(15); }]; @@ -550,12 +546,27 @@ } } if (userInfo.userLevelVo.experUrl) { - self.experImageView.imageUrl = userInfo.userLevelVo.experUrl; + [self.experImageView loadImageWithUrl:userInfo.userLevelVo.experUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) { + self.experImageView.image = image; + CGFloat width = image.size.width*20/ (image.size.height > 0 ? image.size.height : 1); + [self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(20); + make.width.mas_equalTo(width); + }]; + }];; } self.experImageView.hidden = userInfo.userLevelVo.experUrl.length <= 0; if (userInfo.userLevelVo.charmUrl) { - self.charmImageView.imageUrl = userInfo.userLevelVo.charmUrl; + + [self.charmImageView loadImageWithUrl:userInfo.userLevelVo.charmUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) { + self.charmImageView.image = image; + CGFloat width = image.size.width*20/ (image.size.height > 0 ? image.size.height : 1); + [self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(20); + make.width.mas_equalTo(width); + }]; + }];; } self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0; self.copysIdImageView.hidden = NO; diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index 468cbbfd..89cdb9b9 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -1124,7 +1124,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出 if(message.messageType == NIMMessageTypeCustom) { NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { - AttachmentModel * attachment = obj.attachment; + AttachmentModel * attachment = (AttachmentModel *)obj.attachment; if (attachment.first == CustomMessageType_User_UpGrade) { ContentLevelUpgradeModel * levelInfo = [ContentLevelUpgradeModel modelWithDictionary:attachment.data]; if (attachment.second == Custom_Message_Sub_User_UpGrade_Exper) { @@ -1273,7 +1273,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出 } else if (message.messageType == NIMMessageTypeCustom) { NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { - AttachmentModel * attachment = obj.attachment; + AttachmentModel * attachment = (AttachmentModel *)obj.attachment; [self.stageView handleNIMCustomMessage:message]; [self.animationView handleNIMCustomMessage:message]; [self.menuContainerView handleNIMCustomMessage:message]; diff --git a/YuMi/Modules/YMTabbar/Protocol/MainProtocol.h b/YuMi/Modules/YMTabbar/Protocol/MainProtocol.h index 93e4432a..8e7ddafa 100644 --- a/YuMi/Modules/YMTabbar/Protocol/MainProtocol.h +++ b/YuMi/Modules/YMTabbar/Protocol/MainProtocol.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MainProtocol - +@optional - (void)autoLoginSuccess; - (void)getUserInfoSuccess:(UserInfoModel *)userInfo; diff --git a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h index e667ee6a..07c28ce0 100644 --- a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h +++ b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h @@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)receiveCandyTreeGiftHighLevle:(AttachmentModel *)attatchment; - (void)receiveLuckyGiftBigPrize:(AttachmentModel *)attachment; -(void)receiveRoomGraffitiStarKitchen:(AttachmentModel *)attacment; +- (void)receiveTreasureFairyGiftHighLevel:(AttachmentModel *)attatchment ; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m index 2da57aa3..6acb6fdb 100644 --- a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m +++ b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m @@ -60,6 +60,7 @@ #import "PIBaseAnimationViewModel.h" #import "PIFullScreenBannerAnimation.h" #import "XPSkillCardPlayerManager.h" +#import "XPTreasureFairyGiftView.h" @interface PIFullScreenBannerAnimation() ///礼物飘屏 PresentAchieveAbstractMatrix @property(nonatomic,strong) NSMutableArray *animationListA; @@ -176,6 +177,8 @@ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ [self createLicneseHourRankAnimation:model]; + }else if(model.type == GiftBannerType_Fairy){ + [self createTreasureFairyBannerAnimation:model]; } } @@ -201,11 +204,80 @@ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ [self createLicneseHourRankAnimation:model]; + }else if(model.type == GiftBannerType_Fairy){ + [self createTreasureFairyBannerAnimation:model]; } } - +#pragma mark - 夺宝精灵横幅 +- (void)receiveTreasureFairyGiftHighLevel:(AttachmentModel *)attatchment { + PIBaseAnimationViewModel *giftModel = [PIBaseAnimationViewModel new]; + giftModel.data = attatchment.data; + giftModel.second = attatchment.second; + giftModel.first = attatchment.first; + giftModel.type = GiftBannerType_Fairy; + if (self.animationListB.count == 0 && self.isPlayOfB == NO) { + [self createTreasureFairyBannerAnimation:giftModel]; + } + [self.animationListB addObject:giftModel]; + +} +- (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment { + CGFloat kscale = (CGFloat)60 / (CGFloat)375; + self.isPlayOfB = YES; + CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15); + XPTreasureFairyGiftView *treasureView = [[XPTreasureFairyGiftView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth , KScreenWidth * kscale)]; + //最大礼物 + if ((attatchment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5) || (attatchment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3)) { + treasureView.isMaxLargeGift = YES; + }else{ + treasureView.isMaxLargeGift = NO; + } + if ((attatchment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4) || (attatchment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5)) { + treasureView.isDrawGift = YES; //抽奖 + }else{ + treasureView.isDrawGift = NO; //召唤 + } + treasureView.treasureInfo = attatchment.data; + [kWindow addSubview:treasureView]; + POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter]; + springAnimation.springSpeed = 12; + springAnimation.springBounciness = 10.f; + springAnimation.fromValue = [NSValue valueWithCGPoint:treasureView.center]; + springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(treasureView.frame.size.width / 2, treasureView.center.y)]; + [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { + if (finished) { + POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter]; + moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, treasureView.center.y)]; + moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, treasureView.center.y)]; + moveAnimation.beginTime = CACurrentMediaTime() + 3; + moveAnimation.duration = 0.5; + moveAnimation.repeatCount = 1; + moveAnimation.removedOnCompletion = YES; + @kWeakify(self); + [moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { + @kStrongify(self); + if (finished) { + [treasureView removeFromSuperview]; + self.isPlayOfB = NO; + if (self.animationListB.count > 0) { + [self.animationListB removeObjectAtIndex:0]; + } +// if(self. isAnimationListAFinish == YES){ +// +// [self playAnimationWithModel]; +// self.isAnimationListAFinish = NO; +// return; +// } + [self playAnimationWithModel]; + } + }]; + [treasureView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"]; + } + }]; + [treasureView pop_addAnimation:springAnimation forKey:@"candyTreespingOutAnimation"]; +} #pragma mark - 福袋中 四级奖品 - (void)receiveLuckyGiftBigPrize:(AttachmentModel *)attachment { diff --git a/YuMi/Modules/YMTabbar/View/TabbarViewController.m b/YuMi/Modules/YMTabbar/View/TabbarViewController.m index 070f3027..e12e636c 100644 --- a/YuMi/Modules/YMTabbar/View/TabbarViewController.m +++ b/YuMi/Modules/YMTabbar/View/TabbarViewController.m @@ -286,7 +286,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; /// -(void)requestGiftList{ [self dealWithDefaultSvga]; -// /保存时间,一天只请求一次 +///所有礼物接口,缓存礼物,保存时间,一天只请求一次 NSString *time = [NSDate getNowTimeTimestamp]; NSString *curTime = [NSDate timestampSwitchTime:[time integerValue] andFormatter:@"yyyy-MM-dd"]; NSDictionary *timeDic = [[NSUserDefaults standardUserDefaults]valueForKey:@"kRequestGiftList"]; @@ -323,10 +323,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; } -(void)dealWithDefaultSvga{ + ///寻爱之旅动效 NSArray *loveList = @[@"https://image.hfighting.com/candyTree_light.svga",@"https://image.hfighting.com/candyTree_open.svga",@"https://image.hfighting.com/candyTree_transform.svga"]; for (NSString *url in loveList) { [self dealWithGiftListWithUrl:url fileName:url isSvga:YES]; } + ///夺宝精灵动效 NSArray *elfList = @[@"https://image.hfighting.com/treasure_fairy_trials_middle.mp4",@"https://image.hfighting.com/treasure_fairy_ten.mp4",@"https://image.hfighting.com/treasure_fairy_trials_high.mp4",@"https://image.hfighting.com/treasure_fairy_one.mp4"]; for (NSString *url in elfList) { [self dealWithGiftListWithUrl:url fileName:url isSvga:NO]; @@ -510,7 +512,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; #pragma mark - NIMChatManagerDelegate - (void)onRecvMessages:(NSArray *)messages { - if (self.parentMode || ![ClientConfig shareConfig].canOpen) { + if (self.parentMode || ![ClientConfig shareConfig].canOpen || [AccountInfoStorage instance].getTicket.length == 0) { return; } for (NIMMessage * message in messages) { @@ -518,7 +520,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; if(message.messageType == NIMMessageTypeCustom) { NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { - AttachmentModel * attachment = obj.attachment; + AttachmentModel * attachment = (AttachmentModel *)obj.attachment; if (attachment.first == CustomMessageType_FindNew && attachment.second == Custom_Message_Find_New_Greet_New_User) { FindNewGreetMessageModel * greetInfo = [FindNewGreetMessageModel modelWithDictionary:attachment.data]; if (greetInfo.uid.integerValue != [AccountInfoStorage instance].getUid.integerValue) { @@ -595,6 +597,9 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; }else if(attachment.first == CustomMessageType_Look_Love && attachment.second == Custom_Message_Sub_Look_Love_InRoom_NeedAllMicSend){ if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; [self.roomAnimation receiveCandyTreeGiftHighLevle:attachment]; + }else if (attachment.first == CustomMessageType_Treasure_Fairy && (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L1 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L2 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3)) { //夺宝精灵 + if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; + [self.roomAnimation receiveTreasureFairyGiftHighLevel:attachment]; } } } diff --git a/YuMi/Resources/fairy/pi_treasure_fairy_gift_bg.svga b/YuMi/Resources/fairy/pi_treasure_fairy_gift_bg.svga new file mode 100644 index 00000000..f1e9d7a8 Binary files /dev/null and b/YuMi/Resources/fairy/pi_treasure_fairy_gift_bg.svga differ diff --git a/YuMi/Structure/Base/BaseViewController.h b/YuMi/Structure/Base/BaseViewController.h index 0347a109..31946886 100644 --- a/YuMi/Structure/Base/BaseViewController.h +++ b/YuMi/Structure/Base/BaseViewController.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol BaseViewControllerProtocol - +@optional /** 成功 toast */ diff --git a/YuMi/Structure/MVP/Model/UserInfoModel.h b/YuMi/Structure/MVP/Model/UserInfoModel.h index cc2d508d..689632a5 100644 --- a/YuMi/Structure/MVP/Model/UserInfoModel.h +++ b/YuMi/Structure/MVP/Model/UserInfoModel.h @@ -135,7 +135,7 @@ NS_ASSUME_NONNULL_BEGIN ///用户的动态 @property (nonatomic,strong) NSArray *dynamicInfo; ///区号 -@property (nonatomic,copy) NSString *phoneAreaCode; +@property (nonatomic,copy) NSString *pi_phoneAreaCode; ///声音卡 @property (nonatomic,strong) XPSoundCardModel *audioCard; diff --git a/YuMi/Structure/MVP/Protocol/BaseMvpProtocol.h b/YuMi/Structure/MVP/Protocol/BaseMvpProtocol.h index 90ed87af..b92d19ba 100644 --- a/YuMi/Structure/MVP/Protocol/BaseMvpProtocol.h +++ b/YuMi/Structure/MVP/Protocol/BaseMvpProtocol.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @class BaseModel; @protocol BaseMvpProtocol - +@optional - (void)tokenInvalid; - (void)completeUserInfo; - (void)accountCanceled:(NSDictionary *)data; diff --git a/YuMi/Structure/PrefixHeader.pch b/YuMi/Structure/PrefixHeader.pch index 79413a1d..128f8f2e 100644 --- a/YuMi/Structure/PrefixHeader.pch +++ b/YuMi/Structure/PrefixHeader.pch @@ -41,4 +41,5 @@ #import "StatisticsServiceHelper.h" #import "YUMIConstant.h" #import "YUMINNNN.h" +#import "NSObject+MJExtension.h" #endif /* PrefixHeader_pch */ diff --git a/YuMi/zh-Hans.lproj/Localizable.strings b/YuMi/zh-Hans.lproj/Localizable.strings index 4f244da0..0342f686 100644 --- a/YuMi/zh-Hans.lproj/Localizable.strings +++ b/YuMi/zh-Hans.lproj/Localizable.strings @@ -518,7 +518,8 @@ "XPMineRechargeViewController1" = "出现未知错误,请重新尝试"; "XPMineRechargeViewController2" = "《用户充值协议"; "XPMineRechargeViewController3" = "已阅读并同意"; - +///XPGoldIncomeSectionView +"XPGoldIncomeSectionView0"="排名"; ///XPMinePayPwdViewController.m "XPMinePayPwdViewController0" = "设置支付密码"; "XPMinePayPwdViewController1" = "获取手机号失败"; @@ -1371,7 +1372,7 @@ "XPRoomMessageParser75" = "%d麦"; "XPRoomMessageParser76" = "自由麦"; "XPRoomMessageParser77" = "厉害了 "; -"XPRoomMessageParser78" = "摘下糖果获得"; +"XPRoomMessageParser78" = "通过寻爱之旅获取"; "XPRoomMessageParser79" = "(仅自己可见)"; "XPRoomMessageParser80" = "贵族降临!恭喜"; "XPRoomMessageParser81" = "开通贵族系统,获得"; @@ -2304,7 +2305,8 @@ "XPMineGuildViewController10" = "退出将解散关係,此操作%@,您真的要退出吗?"; "XPMineGuildViewController11" = "退出房间"; "XPMineGuildViewController12"="加入公会"; - +///XPClanSectionView +"XPClanSectionView0"="管理"; ///XPGuildSuperAdminMenuView.m "XPGuildSuperAdminMenuView0" = "设置管理的房间"; "XPGuildSuperAdminMenuView1" = "移除超管身份"; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index 38341f0e..ccdd4f6a 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -1378,7 +1378,7 @@ "XPRoomMessageParser75" = "%d麥"; "XPRoomMessageParser76" = "自由麥"; "XPRoomMessageParser77" = "厲害了 "; -"XPRoomMessageParser78" = "摘下糖果獲得"; +"XPRoomMessageParser78" = "通過尋愛之旅獲取"; "XPRoomMessageParser79" = "(僅自己可見)"; "XPRoomMessageParser80" = "貴族降臨!恭喜"; "XPRoomMessageParser81" = "開通貴族系統,獲得"; @@ -2794,6 +2794,8 @@ "XPTreasureFairyTrialsRecordView2"="投入精靈"; "XPTreasureFairyTrialsRecordView3"="獲得獎勵"; "XPTreasureFairyTrialsRecordView4"="試煉記錄"; +///XPClanSectionView +"XPClanSectionView0"="管理"; ///XPTreasureFairyTrialsView "XPTreasureFairyTrialsView0"="試\n煉\n記\n錄"; ///XPTreasureFairyViewController @@ -2858,7 +2860,8 @@ "XPLoginAuthCodeVC1"="請輸入授權碼"; "XPLoginAuthCodeVC2"="綁定授權碼成功"; "XPLoginAuthCodeVC3"="完成"; - +///XPGoldIncomeSectionView +"XPGoldIncomeSectionView0"="排名"; ///PIUserSexView.m "PIUserSexView0" = "男生"; "PIUserSexView1" = "女生";