diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index c01d6c0c..2bd19380 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -648,6 +648,9 @@ E896EFAC2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFAB2771AEFE00AD2CC1 /* XPMineFriendTableViewCell.m */; }; E896EFAF2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFAE2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m */; }; E896EFB22771C93B00AD2CC1 /* XPMineFriendNumberView.m in Sources */ = {isa = PBXBuildFile; fileRef = E896EFB12771C93B00AD2CC1 /* XPMineFriendNumberView.m */; }; + E897ABFC28AF2E71003B3587 /* XPSailingGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = E897ABFB28AF2E71003B3587 /* XPSailingGiftView.m */; }; + E897ABFF28AF39B4003B3587 /* XPSailingAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = E897ABFE28AF39B4003B3587 /* XPSailingAnimationView.m */; }; + E897AC0128AF6B90003B3587 /* sailing_prize.svga in Resources */ = {isa = PBXBuildFile; fileRef = E897AC0028AF6B90003B3587 /* sailing_prize.svga */; }; E8998D7A2859784200C68558 /* XPSVGAPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = E8998D792859784200C68558 /* XPSVGAPlayer.m */; }; E8998D8028597B0300C68558 /* XPRoomLuckyBigPrizeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8998D7F28597B0300C68558 /* XPRoomLuckyBigPrizeView.m */; }; E8998D82285982EE00C68558 /* lucky_gift_streamer.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8998D81285982EE00C68558 /* lucky_gift_streamer.svga */; }; @@ -2222,6 +2225,11 @@ E896EFAE2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendEmptyTableViewCell.m; sourceTree = ""; }; E896EFB02771C93B00AD2CC1 /* XPMineFriendNumberView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFriendNumberView.h; sourceTree = ""; }; E896EFB12771C93B00AD2CC1 /* XPMineFriendNumberView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFriendNumberView.m; sourceTree = ""; }; + E897ABFA28AF2E71003B3587 /* XPSailingGiftView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingGiftView.h; sourceTree = ""; }; + E897ABFB28AF2E71003B3587 /* XPSailingGiftView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingGiftView.m; sourceTree = ""; }; + E897ABFD28AF39B4003B3587 /* XPSailingAnimationView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSailingAnimationView.h; sourceTree = ""; }; + E897ABFE28AF39B4003B3587 /* XPSailingAnimationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSailingAnimationView.m; sourceTree = ""; }; + E897AC0028AF6B90003B3587 /* sailing_prize.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = sailing_prize.svga; sourceTree = ""; }; E8998D782859784200C68558 /* XPSVGAPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSVGAPlayer.h; sourceTree = ""; }; E8998D792859784200C68558 /* XPSVGAPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSVGAPlayer.m; sourceTree = ""; }; E8998D7E28597B0300C68558 /* XPRoomLuckyBigPrizeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomLuckyBigPrizeView.h; sourceTree = ""; }; @@ -5427,6 +5435,10 @@ E8751E6528A6465A0056EF44 /* XPSailingRankSubView.m */, E8AB633128AE51470023B0D2 /* XPSailingPrizeView.h */, E8AB633228AE51470023B0D2 /* XPSailingPrizeView.m */, + E897ABFA28AF2E71003B3587 /* XPSailingGiftView.h */, + E897ABFB28AF2E71003B3587 /* XPSailingGiftView.m */, + E897ABFD28AF39B4003B3587 /* XPSailingAnimationView.h */, + E897ABFE28AF39B4003B3587 /* XPSailingAnimationView.m */, ); path = View; sourceTree = ""; @@ -6006,6 +6018,7 @@ E8A1E45C276220B100B294CA /* Sources */ = { isa = PBXGroup; children = ( + E897AC0028AF6B90003B3587 /* sailing_prize.svga */, 9B8DE0E7289CFE8100FB6EC2 /* compound_gift_banner.svga */, E852D7372862C615001465ED /* room_lucky_gift_bg.svga */, E8998D81285982EE00C68558 /* lucky_gift_streamer.svga */, @@ -7468,6 +7481,7 @@ buildActionMask = 2147483647; files = ( 9B8DE0E8289CFE8100FB6EC2 /* compound_gift_banner.svga in Resources */, + E897AC0128AF6B90003B3587 /* sailing_prize.svga in Resources */, E8E859E128264D7B00EE4857 /* images in Resources */, E8E859E028264D7B00EE4857 /* css in Resources */, E8937AC7276C3EDE00B2C7E1 /* svga_member_in_lv40.svga in Resources */, @@ -7949,6 +7963,7 @@ E8C1671228067F6C00ECB15C /* XPGuildChooseManagerRoomTableViewCell.m in Sources */, E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */, E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */, + E897ABFC28AF2E71003B3587 /* XPSailingGiftView.m in Sources */, E8998D8028597B0300C68558 /* XPRoomLuckyBigPrizeView.m in Sources */, 9BA8A48027C65098000365A3 /* XPSkillCardVoiceView.m in Sources */, E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */, @@ -8099,6 +8114,7 @@ E883E82E28153BDF0000005D /* XPGuildAnchorIncomeSectionView.m in Sources */, 9B17F71827BD150600440843 /* SVGAParserManager.m in Sources */, E8751E5928A62A390056EF44 /* Api+Sailing.m in Sources */, + E897ABFF28AF39B4003B3587 /* XPSailingAnimationView.m in Sources */, E80DE40D2775ABA500BE5BCB /* XPFirstRechargeFlowLayout.m in Sources */, 9B39C88928854AB300564D17 /* XPHomeLiveRecordCell.m in Sources */, 9BE01AE128937DBC00B50299 /* XPDressUpShopCardViewController.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailiing_enter.imageset/Contents.json similarity index 71% rename from xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/Contents.json rename to xplan-ios/Assets.xcassets/Room/Sailing/room_sailiing_enter.imageset/Contents.json index 79baf1e0..4bbcc50a 100644 --- a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/Contents.json +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailiing_enter.imageset/Contents.json @@ -5,12 +5,11 @@ "scale" : "1x" }, { - "filename" : "room_sailing_prize_more@2x.png", + "filename" : "room_sailiing_enter.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "room_sailing_prize_more@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailiing_enter.imageset/room_sailiing_enter.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailiing_enter.imageset/room_sailiing_enter.png new file mode 100644 index 00000000..772f2a4e Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailiing_enter.imageset/room_sailiing_enter.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/Contents.json new file mode 100644 index 00000000..1ef18477 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_sailing_animation_gift_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_sailing_animation_gift_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/room_sailing_animation_gift_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/room_sailing_animation_gift_bg@2x.png new file mode 100644 index 00000000..d42c0aa4 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/room_sailing_animation_gift_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/room_sailing_animation_gift_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/room_sailing_animation_gift_bg@3x.png new file mode 100644 index 00000000..85aab03d Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_animation_gift_bg.imageset/room_sailing_animation_gift_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@2x.png index 42b53094..d6546fc0 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@2x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@3x.png index bb481994..ffa03fab 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@3x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore.imageset/room_sailing_explore@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@2x.png index 5e20cad5..d83399e5 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@2x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@3x.png index c302da6e..25e720eb 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@3x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_explore_bg.imageset/room_sailing_explore_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/Contents.json new file mode 100644 index 00000000..3be00047 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_sailing_prize_cowry_large@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_sailing_prize_cowry_large@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/room_sailing_prize_cowry_large@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/room_sailing_prize_cowry_large@2x.png new file mode 100644 index 00000000..6d9aede8 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/room_sailing_prize_cowry_large@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/room_sailing_prize_cowry_large@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/room_sailing_prize_cowry_large@3x.png new file mode 100644 index 00000000..4b5bd39a Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_cowry_large.imageset/room_sailing_prize_cowry_large@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/Contents.json new file mode 100644 index 00000000..6a6b1f02 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_sailing_prize_crowy@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_sailing_prize_crowy@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/room_sailing_prize_more@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/room_sailing_prize_crowy@2x.png similarity index 100% rename from xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/room_sailing_prize_more@2x.png rename to xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/room_sailing_prize_crowy@2x.png diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/room_sailing_prize_more@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/room_sailing_prize_crowy@3x.png similarity index 100% rename from xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_more.imageset/room_sailing_prize_more@3x.png rename to xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_crowy.imageset/room_sailing_prize_crowy@3x.png diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/Contents.json new file mode 100644 index 00000000..8ce23d86 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_sailing_prize_normal_large@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_sailing_prize_normal_large@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/room_sailing_prize_normal_large@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/room_sailing_prize_normal_large@2x.png new file mode 100644 index 00000000..496d54ab Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/room_sailing_prize_normal_large@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/room_sailing_prize_normal_large@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/room_sailing_prize_normal_large@3x.png new file mode 100644 index 00000000..9e4daa88 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_normal_large.imageset/room_sailing_prize_normal_large@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/Contents.json index 11a3e7b5..211cacd6 100644 --- a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/Contents.json +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "room_sailing_prize_one@2x.png", + "filename" : "room_sailing_prize_normal@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "room_sailing_prize_one@3x.png", + "filename" : "room_sailing_prize_normal@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_one@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_normal@2x.png similarity index 100% rename from xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_one@2x.png rename to xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_normal@2x.png diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_one@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_normal@3x.png similarity index 100% rename from xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_one@3x.png rename to xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_prize_one.imageset/room_sailing_prize_normal@3x.png diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/Contents.json new file mode 100644 index 00000000..ecf82d76 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_sailing_sailing@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_sailing_sailing@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/room_sailing_sailing@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/room_sailing_sailing@2x.png new file mode 100644 index 00000000..b825c3e0 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/room_sailing_sailing@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/room_sailing_sailing@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/room_sailing_sailing@3x.png new file mode 100644 index 00000000..14cbfac6 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_sailing.imageset/room_sailing_sailing@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@2x.png index 9c9e736c..fee24b41 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@2x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@3x.png index 48e06a6e..113dbdd8 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@3x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_normal.imageset/room_sailing_tips_normal@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@2x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@2x.png index 8868ad8e..606753fb 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@2x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@3x.png b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@3x.png index 3942fb60..f4f96e9d 100644 Binary files a/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@3x.png and b/xplan-ios/Assets.xcassets/Room/Sailing/room_sailing_tips_select.imageset/room_sailing_tips_select@3x.png differ diff --git a/xplan-ios/Main/IM/Model/AttachmentModel.h b/xplan-ios/Main/IM/Model/AttachmentModel.h index c5b43308..9d47513c 100644 --- a/xplan-ios/Main/IM/Model/AttachmentModel.h +++ b/xplan-ios/Main/IM/Model/AttachmentModel.h @@ -66,6 +66,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) { CustomMessageType_First_Recharge_Reward = 76, ///访客记录 CustomMessageType_First_VisitorRecord = 78, + ///航海 + CustomMessageType_Room_Sailing = 81, ///跨房PK CustomMessageType_Across_Room_PK = 83, ///贵族VIP @@ -354,6 +356,20 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubVisitorRecord) { Custom_Message_Sub_Visitor_Record = 781, }; +///first == CustomMessageType_Room_Sailing +typedef NS_ENUM(NSInteger, CustomMessageSubSailing) { + //自己可见 一级礼物(最小) + Custom_Message_Sub_Sailing_Me = 811, + //当前房间可见 二级礼物 + Custom_Message_Sub_Sailing_InRoom = 812, + //所有房间可见 三级礼物 + Custom_Message_Sub_Sailing_AllRoom = 813, + //所有房间可见+小秘书 四级礼物(最大) + Custom_Message_Sub_Sailing_AllRoom_Notify = 814, + //开箱子开到全麦送 (服务端发) + Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend = 815, +}; + ///first = CustomMessageType_Across_Room_PK typedef NS_ENUM(NSUInteger, CustomMessageSubAcrossRoomPK) { /// 收到跨房PK邀请 diff --git a/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m b/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m index 198eca9c..82a460bc 100644 --- a/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m +++ b/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m @@ -238,6 +238,7 @@ if (roomInfo.type == RoomType_MiniGame) { self.firstRechargeImageView.hidden = YES; self.candyTreeImageView.hidden = YES; + self.sailingImageView.hidden = YES; if (self.isLoadActivity) { [self configLittleGameActivity]; } else { @@ -269,6 +270,12 @@ } else { self.joinDatingView.hidden = YES; } + + if ([ClientConfig shareConfig].configInfo.linearlyPoolOpenLevel <= self.hostDelegate.getUserInfo.userLevelVo.experLevelSeq) { + self.sailingImageView.hidden = NO; + } else { + self.sailingImageView.hidden = YES; + } } } @@ -392,8 +399,8 @@ } - (void)sailTapRecognizer { - XPSailingViewController * sailingVC = [[XPSailingViewController alloc] init]; - sailingVC.modalPresentationStyle = UIModalPresentationOverFullScreen; + NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid]; + XPSailingViewController * sailingVC = [[XPSailingViewController alloc] initWithRoomUid:roomUid]; [self.hostDelegate.getCurrentNav presentViewController:sailingVC animated:YES completion:nil]; } @@ -485,7 +492,7 @@ - (UIImageView *)sailingImageView { if (!_sailingImageView) { _sailingImageView = [[UIImageView alloc] init]; - _sailingImageView.image = [UIImage imageNamed:@"room_first_recharge_enter"]; + _sailingImageView.image = [UIImage imageNamed:@"room_sailiing_enter"]; _sailingImageView.userInteractionEnabled = YES; UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sailTapRecognizer)]; [_sailingImageView addGestureRecognizer:tap]; diff --git a/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m b/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m index 57ff1a22..50f50321 100644 --- a/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m +++ b/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m @@ -52,6 +52,7 @@ #import "XPRoomLicneseHourRankView.h" #import "XPRoomLuckyBigPrizeView.h" #import "XPRoomGiftCompoundView.h" +#import "XPSailingAnimationView.h" @interface XPRoomAnimationView () ///展示的不同层级 @@ -121,6 +122,8 @@ @property (nonatomic,strong) SVGAImageView *datingEffectView; #pragma mark - 跨房PK @property (nonatomic, strong) NSMutableArray *acrossRoomPKQueue; +#pragma mark - 航海 +@property (nonatomic, strong) NSMutableArray *sailingQueue; ///幸运礼物动画是否在播放 @property (nonatomic,assign) BOOL isLuckyGiftAnimation; @end @@ -272,7 +275,9 @@ [self receiveLicneseHourRank:attachment]; } else if (attachment.first == CustomMessageType_Gift_Compound && attachment.second == Custom_Message_Sub_Gift_Compound) {///魔法小屋合成礼物 [self receiveGiftCompound:attachment]; - } + } else if(attachment.first == CustomMessageType_Room_Sailing) { + [self receiveRoomSailing:attachment]; + } } } @@ -614,6 +619,51 @@ [candyTreeView pop_addAnimation:springAnimation forKey:@"candyTreespingOutAnimation"]; } +#pragma mark - 航海横幅 +- (void)receiveRoomSailing:(AttachmentModel *)attachment { + if ([self isInSudGame]) {return;} + if (self.sailingQueue.count == 0) { + [self createSailingBannerAnimation:attachment]; + } + [self.sailingQueue addObject:attachment]; +} + +- (void)createSailingBannerAnimation:(AttachmentModel *)attatchment { + CGFloat kscale = (CGFloat)60 / (CGFloat)375; + XPSailingAnimationView *sailingView = [[XPSailingAnimationView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight + 15, KScreenWidth, KScreenWidth * kscale)]; + sailingView.prizeInfo = attatchment.data; + [self.middleLevelView addSubview:sailingView]; + POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter]; + springAnimation.springSpeed = 12; + springAnimation.springBounciness = 10.f; + springAnimation.fromValue = [NSValue valueWithCGPoint:sailingView.center]; + springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(sailingView.frame.size.width / 2, sailingView.center.y)]; + [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { + if (finished) { + POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter]; + moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, sailingView.center.y)]; + moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, sailingView.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) { + [sailingView removeFromSuperview]; + [self.sailingQueue removeObjectAtIndex:0]; + if (self.sailingQueue.count > 0) { + [self createSailingBannerAnimation:self.sailingQueue.firstObject]; + } + } + }]; + [sailingView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"]; + } + }]; + [sailingView pop_addAnimation:springAnimation forKey:@"candyTreespingOutAnimation"]; +} + #pragma mark - 贵族升级 - (void)receiveNobleLevelUp:(AttachmentModel *)attachment { if (self.nobleLevelUpQueue.count == 0) { @@ -1765,5 +1815,12 @@ return _acrossRoomPKQueue; } +- (NSMutableArray *)sailingQueue { + if (!_sailingQueue) { + _sailingQueue = [NSMutableArray array]; + } + return _sailingQueue; +} + @end diff --git a/xplan-ios/Main/Room/View/MessageContainerView/Tool/XPRoomMessageParser.m b/xplan-ios/Main/Room/View/MessageContainerView/Tool/XPRoomMessageParser.m index e9338b12..13f8655e 100644 --- a/xplan-ios/Main/Room/View/MessageContainerView/Tool/XPRoomMessageParser.m +++ b/xplan-ios/Main/Room/View/MessageContainerView/Tool/XPRoomMessageParser.m @@ -35,6 +35,7 @@ #import "CandyTreeResultModel.h" #import "XPGiftBigPrizeModel.h" #import "XPGiftCompoundModel.h" +#import "RoomSailingPrizeModel.h" #import "NetImageView.h" @@ -111,7 +112,9 @@ return [self createRoomLuckyBigPrizeAttribute:attachment]; } else if(first == CustomMessageType_Gift_Compound) {///礼物合成 return [self createRoomGiftCompoundAttribute:attachment]; - } + } else if(first == CustomMessageType_Room_Sailing) {///航海 + return [self createRoomSailingAttribute:attachment]; + } return nil; } @@ -267,6 +270,21 @@ return nil; } +#pragma mark - 航海 +- (NSAttributedString *)createRoomSailingAttribute:(AttachmentModel *)attachment { + RoomSailingPrizeModel *info = [RoomSailingPrizeModel modelWithDictionary:attachment.data]; + NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; + [attribute appendAttributedString:[self createTextAttribute:@"厉害了! " color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]]; + [attribute appendAttributedString:[self createTextAttribute:info.nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]]; + [attribute appendAttributedString:[self createTextAttribute:@"在航海冒险中获得" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]]; + [attribute appendAttributedString:[self createTextAttribute:info.prizeName color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]]; + if (info.prizeNum>1) { + [attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"x%d", info.prizeNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]]; + } + [self attributeAddHihtLight:attribute uid:info.uid.integerValue]; + return attribute; +} + #pragma mark - 礼物合成 - (NSAttributedString *)createRoomGiftCompoundAttribute:(AttachmentModel *)attachment { XPGiftCompoundModel *info = [XPGiftCompoundModel modelWithDictionary:attachment.data]; diff --git a/xplan-ios/Main/Room/View/MessageContainerView/XPRoomMessageContainerView.m b/xplan-ios/Main/Room/View/MessageContainerView/XPRoomMessageContainerView.m index e92654f3..546a81a2 100644 --- a/xplan-ios/Main/Room/View/MessageContainerView/XPRoomMessageContainerView.m +++ b/xplan-ios/Main/Room/View/MessageContainerView/XPRoomMessageContainerView.m @@ -28,6 +28,8 @@ #import "XPMessageRemoteExtModel.h" #import "RoomPKChooseUserModel.h" #import "CandyTreeResultModel.h" +#import "RoomSailingPrizeModel.h" +#import "UserInfoModel.h" ///View #import "XPRoomMessageTableViewCell.h" #import "XPRoomMessageHeaderView.h" @@ -366,6 +368,11 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; } } return NO; + } else if(attachment.first == CustomMessageType_Room_Sailing && (attachment.second == Custom_Message_Sub_Sailing_AllRoom_Notify || attachment.second == Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend)) { + RoomSailingPrizeModel * prizeModel = [RoomSailingPrizeModel modelWithDictionary:attachment.data]; + if (self.hostDelegate.getUserInfo.userLevelVo.experLevelSeq > prizeModel.userLevelLimit) { + return YES; + } } return [[[self supportMessageDic] objectForKey:@(attachment.first)] containsObject:@(attachment.second)]; } @@ -466,7 +473,15 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; nil], @(CustomMessageType_Gift_Compound): [NSSet setWithObjects:@(Custom_Message_Sub_Gift_Compound), - nil] + nil], + @(CustomMessageType_Room_Sailing): + [NSSet setWithObjects: + @(Custom_Message_Sub_Sailing_Me), + @(Custom_Message_Sub_Sailing_InRoom), + @(Custom_Message_Sub_Sailing_AllRoom), + @(Custom_Message_Sub_Sailing_AllRoom_Notify), + @(Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend), + nil] }; } diff --git a/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeListModel.h b/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeListModel.h index 65cf6580..73267658 100644 --- a/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeListModel.h +++ b/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeListModel.h @@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,strong) NSArray *prizeItemList; ///剩余钥匙数 @property (nonatomic,assign) NSInteger remainKeyNum; +///是否有元宝礼物 +@property (nonatomic,assign) BOOL specialStatus; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeModel.h b/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeModel.h index a90e5d91..1dc6a20b 100644 --- a/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeModel.h +++ b/xplan-ios/Main/Room/View/Sailing/Model/RoomSailingPrizeModel.h @@ -40,6 +40,11 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) SailingPrizeLevel prizeLevel;//奖品等级 @property (nonatomic, assign) NSInteger referenceId;//相关实体id @property (nonatomic, assign) NSInteger prizeId;//奖品id +@property (nonatomic,copy) NSString *nick; +///等级限制 大于这个等级才能加到公屏 +@property (nonatomic,assign) NSInteger userLevelLimit; +///用户的uid +@property (nonatomic,copy) NSString *uid; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/Sailing/Presenter/XPSailingPresenter.m b/xplan-ios/Main/Room/View/Sailing/Presenter/XPSailingPresenter.m index c70f31a0..778f56b2 100644 --- a/xplan-ios/Main/Room/View/Sailing/Presenter/XPSailingPresenter.m +++ b/xplan-ios/Main/Room/View/Sailing/Presenter/XPSailingPresenter.m @@ -33,7 +33,7 @@ [[self getView] openSailingSuccess:listModel]; } fail:^(NSInteger code, NSString * _Nullable msg) { [[self getView] openSailingFail:msg]; - } showLoading:YES] uid:uid keyNum:keyNumStr sendMessage:sendMessageStr roomUid:roomUid]; + } ] uid:uid keyNum:keyNumStr sendMessage:sendMessageStr roomUid:roomUid]; } @end diff --git a/xplan-ios/Main/Room/View/Sailing/View/Cell/XPSailingPrizeCollectionViewCell.m b/xplan-ios/Main/Room/View/Sailing/View/Cell/XPSailingPrizeCollectionViewCell.m index cc9362b4..4257427e 100644 --- a/xplan-ios/Main/Room/View/Sailing/View/Cell/XPSailingPrizeCollectionViewCell.m +++ b/xplan-ios/Main/Room/View/Sailing/View/Cell/XPSailingPrizeCollectionViewCell.m @@ -66,6 +66,7 @@ _logoImageView = [[NetImageView alloc] initWithConfig:config]; _logoImageView.layer.masksToBounds = YES; _logoImageView.layer.cornerRadius = 8; + _logoImageView.contentMode = UIViewContentModeScaleAspectFill; } return _logoImageView; } diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingAnimationView.h b/xplan-ios/Main/Room/View/Sailing/View/XPSailingAnimationView.h new file mode 100644 index 00000000..bd11ddda --- /dev/null +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingAnimationView.h @@ -0,0 +1,15 @@ +// +// XPSailingAnimationView.h +// xplan-ios +// +// Created by 冯硕 on 2022/8/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface XPSailingAnimationView : UIView +@property (nonatomic,strong) NSDictionary *prizeInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingAnimationView.m b/xplan-ios/Main/Room/View/Sailing/View/XPSailingAnimationView.m new file mode 100644 index 00000000..ebda51ea --- /dev/null +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingAnimationView.m @@ -0,0 +1,95 @@ +// +// XPSailingAnimationView.m +// xplan-ios +// +// Created by 冯硕 on 2022/8/19. +// + +#import "XPSailingAnimationView.h" +///Third +#import +#import "XPMacro.h" +#import "ThemeColor.h" +#import "RoomSailingPrizeModel.h" +#import "NSObject+MJExtension.h" +@interface XPSailingAnimationView () +///背景图 +@property (nonatomic,strong) UIImageView *backImageView; +///显示文本内容 +@property (nonatomic,strong) UILabel *titleLabel; +@end + +@implementation XPSailingAnimationView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.backImageView]; + [self.backImageView addSubview:self.titleLabel]; +} + +- (void)initSubViewConstraints { + [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self); + }]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.backImageView).offset(89); + make.top.mas_equalTo(self.backImageView).offset(29); + make.right.mas_lessThanOrEqualTo(self.backImageView); + }]; +} + +- (NSAttributedString *)createAttribute:(NSString * )text color:(UIColor *)color fontSize:(CGFloat)fonSize { + NSDictionary * attribute = @{NSFontAttributeName:[UIFont systemFontOfSize:fonSize], NSForegroundColorAttributeName:color}; + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:text attributes:attribute]; + return attr; +} + +#pragma mark - Getters And Setters +- (void)setPrizeInfo:(NSDictionary *)prizeInfo { + _prizeInfo = prizeInfo; + if (_prizeInfo) { + RoomSailingPrizeModel * info = [RoomSailingPrizeModel modelWithDictionary:_prizeInfo]; + NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; + CGFloat fontSize = 12; + [attribute appendAttributedString:[self createAttribute:@"厉害了! " color:[UIColor whiteColor] fontSize:fontSize]]; + NSString * nick = info.nick; + if (nick.length > 6) { + nick = [nick substringToIndex:6]; + } + [attribute appendAttributedString:[self createAttribute:nick color:UIColorFromRGB(0xFFFE95) fontSize:fontSize]]; + [attribute appendAttributedString:[self createAttribute:@"在航海冒险中获得 " color:[UIColor whiteColor] fontSize:fontSize]]; + [attribute appendAttributedString:[self createAttribute:info.prizeName color:[ThemeColor appEmphasizeColor] fontSize:fontSize]]; + if (info.prizeNum > 1) { + [attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", info.prizeNum] color:[UIColor whiteColor] fontSize:fontSize]]; + } + self.titleLabel.attributedText = attribute; + } +} + +- (UIImageView *)backImageView { + if (!_backImageView) { + _backImageView = [[UIImageView alloc] init]; + _backImageView.userInteractionEnabled = YES; + _backImageView.image = [UIImage imageNamed:@"room_sailing_animation_gift_bg"]; + } + return _backImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + } + return _titleLabel; +} + + +@end diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingGiftView.h b/xplan-ios/Main/Room/View/Sailing/View/XPSailingGiftView.h new file mode 100644 index 00000000..e867f9ef --- /dev/null +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingGiftView.h @@ -0,0 +1,16 @@ +// +// XPSailingGiftView.h +// xplan-ios +// +// Created by 冯硕 on 2022/8/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class RoomSailingPrizeModel; +@interface XPSailingGiftView : UIView +@property (nonatomic,strong) RoomSailingPrizeModel *prizeInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingGiftView.m b/xplan-ios/Main/Room/View/Sailing/View/XPSailingGiftView.m new file mode 100644 index 00000000..7fa3c9e1 --- /dev/null +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingGiftView.m @@ -0,0 +1,88 @@ +// +// XPSailingGiftView.m +// xplan-ios +// +// Created by 冯硕 on 2022/8/19. +// + +#import "XPSailingGiftView.h" +///Third +#import +#import "RoomSailingPrizeModel.h" +#import "XPCandyTreeAnimationModel.h" + +@interface XPSailingGiftView () +///礼物背景 +@property (nonatomic,strong) UIImageView *backImageView; +///显示文字 +@property (nonatomic,strong) UILabel *titleLabel; +///动画完成 +@property (nonatomic,copy) void(^FinishBlock)(BOOL finish); +@end + +@implementation XPSailingGiftView + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.backImageView]; + [self addSubview:self.titleLabel]; +} + +- (void)initSubViewConstraints { + [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self); + make.height.mas_equalTo(19); + }]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.backImageView.mas_left).offset(3); + make.centerY.mas_equalTo(self.backImageView); + }]; +} +#pragma mark - Getters And Setters +- (void)setPrizeInfo:(RoomSailingPrizeModel *)prizeInfo { + _prizeInfo = prizeInfo; + if (_prizeInfo) { + NSString * backImage= @"candy_tree_levle_third"; + if(_prizeInfo.prizeLevel == SailingPrizeLevelThree) { + backImage = @"candy_tree_levle_fourth"; + } else if(_prizeInfo.prizeLevel == SailingPrizeLevelFour) { + backImage = @"candy_tree_levle_fifth"; + } + self.backImageView.image = [UIImage imageNamed:backImage]; + if (_prizeInfo.prizeName.length > 7) { + _prizeInfo.prizeName = [_prizeInfo.prizeName substringToIndex:7]; + } + NSString * giftTitle = [NSString stringWithFormat:@"%@ x %d", _prizeInfo.prizeName, _prizeInfo.prizeNum]; + self.titleLabel.text = giftTitle; + } + [self layoutIfNeeded]; +} + +- (UIImageView *)backImageView { + if (!_backImageView) { + _backImageView = [[UIImageView alloc] init]; + _backImageView.userInteractionEnabled = YES; + } + return _backImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:10]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [UIColor whiteColor]; + } + return _titleLabel; +} + +@end diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.h b/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.h index 293ef839..66ed4024 100644 --- a/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.h +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.h @@ -8,9 +8,10 @@ #import NS_ASSUME_NONNULL_BEGIN -@class RoomSailingPrizeModel; +@class RoomSailingPrizeListModel; @interface XPSailingPrizeView : UIView -@property (nonatomic,strong) NSArray *prizeItemList; +@property (nonatomic,strong) RoomSailingPrizeListModel * prizeInfo; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.m b/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.m index 5cc9273a..d9cfa2c9 100644 --- a/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.m +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingPrizeView.m @@ -11,7 +11,7 @@ ///Tool #import "ThemeColor.h" ///Model -#import "RoomSailingPrizeModel.h" +#import "RoomSailingPrizeListModel.h" ///View #import "XPSailingPrizeCollectionViewCell.h" @@ -21,12 +21,6 @@ @property (nonatomic,strong) UIImageView *backImageView; ///列表 @property (nonatomic,strong) UICollectionView *collectionView; -///提示 -@property (nonatomic,strong) UIStackView *tipsStackView; -/// -@property (nonatomic,strong) UIButton *boxButton; -/// -@property (nonatomic,strong) UILabel *tipLabel; @end @@ -45,10 +39,6 @@ - (void)initSubViews { [self addSubview:self.backImageView]; [self.backImageView addSubview:self.collectionView]; - [self.backImageView addSubview:self.tipsStackView]; - - [self.tipsStackView addArrangedSubview:self.boxButton]; - [self.tipsStackView addArrangedSubview:self.tipLabel]; } - (void)initSubViewConstraints { @@ -60,48 +50,35 @@ [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.backImageView).offset(75); make.left.right.mas_equalTo(self.backImageView); - make.bottom.mas_equalTo(self.tipsStackView.mas_top).offset(-10); - }]; - - [self.tipsStackView mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.mas_equalTo(self.backImageView); - make.bottom.mas_equalTo(self.backImageView).offset(-16.5); - make.height.mas_equalTo(10); - }]; - - [self.boxButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(10); + make.bottom.mas_equalTo(self).offset(-10); }]; } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - return self.prizeItemList.count; + return self.prizeInfo.prizeItemList.count; } - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { XPSailingPrizeCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPSailingPrizeCollectionViewCell class]) forIndexPath:indexPath]; - cell.prizeModel = [self.prizeItemList objectAtIndex:indexPath.row]; + cell.prizeModel = [self.prizeInfo.prizeItemList objectAtIndex:indexPath.row]; return cell; } - -#pragma mark - Event Response -- (void)boxButtonAction:(UIButton *)sender { - sender.selected = !sender.selected; -} - #pragma mark - Getters And Setters -- (void)setPrizeItemList:(NSArray *)prizeItemList { - _prizeItemList = prizeItemList; +- (void)setPrizeInfo:(RoomSailingPrizeListModel *)prizeInfo{ + _prizeInfo = prizeInfo; [self.collectionView reloadData]; - if (_prizeItemList.count == 1) { - self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_one"]; - } else { - if (_prizeItemList.count > 5) { - self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_one"]; - } else { - self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_more"]; + if (_prizeInfo.specialStatus) { + if (_prizeInfo.prizeItemList.count > 5) { + self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_cowry_large"]; + }else { + self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_crowy"]; + } + } else { + if (prizeInfo.prizeItemList.count > 5) { + self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_normal_large"]; + }else { + self.backImageView.image = [UIImage imageNamed:@"room_sailing_prize_one"]; } - } } @@ -130,37 +107,4 @@ return _collectionView; } -- (UIStackView *)tipsStackView { - if (!_tipsStackView) { - _tipsStackView = [[UIStackView alloc] init]; - _tipsStackView.axis = UILayoutConstraintAxisHorizontal; - _tipsStackView.distribution = UIStackViewDistributionFill; - _tipsStackView.alignment = UIStackViewAlignmentFill; - _tipsStackView.spacing = 5; - } - return _tipsStackView; -} - -- (UIButton *)boxButton { - if (!_boxButton) { - _boxButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_boxButton setImage:[UIImage imageNamed:@"room_sailing_tips_normal"] forState:UIControlStateNormal]; - [_boxButton setImage:[UIImage imageNamed:@"room_sailing_tips_select"] forState:UIControlStateSelected]; - [_boxButton addTarget:self action:@selector(boxButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - } - return _boxButton; -} - -- (UILabel *)tipLabel { - if (!_tipLabel) { - _tipLabel = [[UILabel alloc] init]; - _tipLabel.font = [UIFont systemFontOfSize:10]; - _tipLabel.textColor = UIColorFromRGB(0xE9C57B); - _tipLabel.text = @"下次不用提示"; - } - return _tipLabel; -} - - - @end diff --git a/xplan-ios/Main/Room/View/Sailing/View/XPSailingViewController.m b/xplan-ios/Main/Room/View/Sailing/View/XPSailingViewController.m index 85facda5..8f4168e6 100644 --- a/xplan-ios/Main/Room/View/Sailing/View/XPSailingViewController.m +++ b/xplan-ios/Main/Room/View/Sailing/View/XPSailingViewController.m @@ -9,28 +9,41 @@ ///Third #import #import +#import ///Tool #import "ThemeColor.h" #import "XPMacro.h" #import "TTPopup.h" #import "XPHtmlUrl.h" +#import "UIButton+EnlargeTouchArea.h" ///Model #import "RoomSailingInfoModel.h" #import "RoomSailingPrizeListModel.h" #import "AttachmentModel.h" +#import "AccountInfoStorage.h" ///View #import "XPSailingRankView.h" #import "XPRoomHalfWebView.h" #import "XPSailingPrizeView.h" +#import "XPSailingGiftView.h" ///P #import "XPSailingPresenter.h" #import "XPSailingProtocol.h" +NSString * const kSailingPrizeAlertKey = @"kSailingPrizeAlertKey"; + +#define KitemHeight (20 + 5) @interface XPSailingViewController () ///顶部的View @property (nonatomic,strong) UIView * topView; ///背景图 @property (nonatomic,strong) UIImageView *backImageView; +/// +@property (nonatomic,strong) UIImageView *sailingImageView; +///动画管理类 +@property (strong, nonatomic) SVGAParser *parser; +///航海特效 +@property (nonatomic,strong) SVGAImageView *sailingView; ///排行榜 @property (nonatomic,strong) UIButton *rankButton; ///h获取燃油 @@ -55,6 +68,14 @@ @property (nonatomic,strong) UIButton *exploreButton; ///消耗燃油 @property (nonatomic,strong) UILabel *consumLabel; +///提示 +@property (nonatomic,strong) UIStackView *tipsStackView; +/// +@property (nonatomic,strong) UIButton *boxButton; +/// +@property (nonatomic,strong) UILabel *tipLabel; + +@property (nonatomic,strong) UIView * animationView; @property (nonatomic,assign) NSInteger exploreCount; ///航海的信息 @property (nonatomic,strong) RoomSailingInfoModel *sailingInfo; @@ -73,6 +94,7 @@ - (instancetype)initWithRoomUid:(NSString *)roomUid { if (self = [super init]) { self.roomUid = roomUid; + self.modalPresentationStyle = UIModalPresentationOverFullScreen; [[NIMSDK sharedSDK].systemNotificationManager addDelegate:self]; } return self; @@ -97,16 +119,24 @@ [self.view addSubview:self.topView]; [self.view addSubview:self.backImageView]; + [self.backImageView addSubview:self.sailingView]; + [self.backImageView addSubview:self.sailingImageView]; [self.backImageView addSubview:self.rankButton]; [self.backImageView addSubview:self.getFuleButton]; [self.backImageView addSubview:self.recordButton]; [self.backImageView addSubview:self.contentImageView]; [self.contentImageView addSubview:self.descriptionButton]; + [self.contentImageView addSubview:self.animationView]; [self.contentImageView addSubview:self.fuleButton]; [self.contentImageView addSubview:self.numberView]; [self.contentImageView addSubview:self.exploreButton]; - [self.contentImageView addSubview:self.consumLabel]; + [self.contentImageView addSubview:self.tipsStackView]; + + [self.exploreButton addSubview:self.consumLabel]; + + [self.tipsStackView addArrangedSubview:self.boxButton]; + [self.tipsStackView addArrangedSubview:self.tipLabel]; [self.numberView addArrangedSubview:self.reduButton]; [self.numberView addArrangedSubview:self.textField]; @@ -124,6 +154,14 @@ make.height.mas_equalTo(515); }]; + [self.sailingView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.backImageView); + }]; + + [self.sailingImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.backImageView); + }]; + [self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(41, 32)); make.top.mas_equalTo(self.backImageView).offset(129); @@ -159,34 +197,63 @@ [self.numberView mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(self.contentImageView); - make.top.mas_equalTo(self.contentImageView).offset(77); - make.height.mas_equalTo(30); + make.top.mas_equalTo(self.contentImageView).offset(77 * kScreenScale); + make.height.mas_equalTo(30 * kScreenScale); }]; [self.reduButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(27); - make.height.mas_equalTo(27); + make.width.mas_equalTo(30 * kScreenScale);; }]; [self.addButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(27); - make.height.mas_equalTo(27); + make.width.mas_equalTo(30 * kScreenScale); }]; [self.textField mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(75); - make.height.mas_equalTo(30); + make.width.mas_equalTo(75 * kScreenScale); }]; [self.exploreButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(150, 47)); + make.size.mas_equalTo(CGSizeMake(150 * kScreenScale, 47 * kScreenScale)); make.centerX.mas_equalTo(self.contentImageView); - make.top.mas_equalTo(self.numberView.mas_bottom).offset(12); + make.top.mas_equalTo(self.numberView.mas_bottom).offset(12 * kScreenScale); }]; [self.consumLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.exploreButton); + make.bottom.mas_equalTo(self.exploreButton.mas_bottom).offset(-7 * kScreenScale); + }]; + + [self.animationView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contentImageView).offset(10); + make.bottom.mas_equalTo(self.contentImageView).offset(-50); + make.width.mas_equalTo(150); + make.height.mas_equalTo(KitemHeight * 5); + }]; + + [self.tipsStackView mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(self.contentImageView); - make.top.mas_equalTo(self.exploreButton.mas_bottom).offset(1); + make.bottom.mas_equalTo(self.contentImageView).offset(-20); + make.height.mas_equalTo(10); + }]; + + [self.boxButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(10); + }]; +} + +- (void)startSailingSVGA { + @kWeakify(self); + [self.parser parseWithNamed:@"sailing_prize" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { + @kStrongify(self); + self.sailingView.layer.masksToBounds = YES; + self.sailingView.contentMode = UIViewContentModeScaleAspectFill; + self.sailingView.loops = 1; + self.sailingView.clearsAfterStop = YES; + self.sailingView.videoItem = videoItem; + [self.sailingView startAnimation]; + } failureBlock:^(NSError * _Nonnull error) { + }]; } @@ -198,24 +265,65 @@ } - (void)openSailingSuccess:(RoomSailingPrizeListModel *)model { + [self.sailingView stopAnimation]; + self.sailingImageView.hidden = NO; self.sailingInfo.keyNum = model.remainKeyNum; NSString * fuleStr = [NSString stringWithFormat:@"%ld", self.sailingInfo.keyNum]; [self.fuleButton setTitle:fuleStr forState:UIControlStateNormal]; self.exploreButton.userInteractionEnabled = YES; - if (model.prizeItemList.count > 0) { + NSString * key = [NSString stringWithFormat:@"%@_%@", kSailingPrizeAlertKey, [AccountInfoStorage instance].getUid]; + if (![[NSUserDefaults standardUserDefaults] boolForKey:key] && model.prizeItemList.count > 0) { CGFloat height = 180; if (model.prizeItemList.count> 5) { - height = height + 70 + 10; + height = 255; } XPSailingPrizeView * prizeView = [[XPSailingPrizeView alloc] initWithFrame:CGRectMake(0, 0, 283, height)]; - prizeView.prizeItemList = model.prizeItemList; + prizeView.prizeInfo = model; [TTPopup popupView:prizeView style:TTPopupStyleAlert]; } + [model.prizeItemList enumerateObjectsUsingBlock:^(RoomSailingPrizeModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (obj.prizeLevel > 2) { + ///取消所有的延迟加载的方法 + [NSObject cancelPreviousPerformRequestsWithTarget:self]; + + XPSailingGiftView * newAnimaView = [[XPSailingGiftView alloc] init]; + newAnimaView.prizeInfo = obj; + NSString * giftTitle = [NSString stringWithFormat:@"%@ x %d", obj.prizeName, obj.prizeNum]; + CGFloat widht = [giftTitle boundingRectWithSize:CGSizeMake(200, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10]} context:nil].size.width + 10; + newAnimaView.frame = CGRectMake(0, 4 * (KitemHeight), widht, KitemHeight); + [self.animationView addSubview:newAnimaView]; + + if (self.animationView.subviews.count > 5) { + [self.animationView.subviews.firstObject removeFromSuperview]; + } + for (int i=0; i < self.animationView.subviews.count; i++) { + XPSailingGiftView * view = [self.animationView.subviews objectAtIndex:i]; + NSInteger offsetY= (self.animationView.subviews.count - i) * KitemHeight; + [UIView animateWithDuration:0.1 animations:^{ + CGRect rect = view.frame; + rect.origin.y = KitemHeight * 5 - offsetY; + view.frame = rect; + } completion:^(BOOL finished) { + if (i == (self.animationView.subviews.count -1)) { + [self.animationView.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + [self performSelector:@selector(giftViewRemoveFromSuperView:) withObject:obj afterDelay:3]; + }]; + } + }]; + } + } + }]; +} + +- (void)giftViewRemoveFromSuperView:(UIView *)view { + [view removeFromSuperview]; } - (void)openSailingFail:(NSString *)message { + [self.sailingView stopAnimation]; + self.sailingImageView.hidden = NO; self.exploreButton.userInteractionEnabled = YES; } @@ -277,13 +385,24 @@ }]; } else { - NSString * roomUid = [NSString stringWithFormat:@""]; + self.sailingImageView.hidden = YES; + [self startSailingSVGA]; + NSString * roomUid = self.roomUid; [self.presenter openSailing:roomUid sendMessage:YES keyNum:self.textField.text.integerValue]; self.exploreButton.userInteractionEnabled = NO; } } - +- (void)boxButtonAction:(UIButton *)sender { + sender.selected = !sender.selected; + if (sender.selected) { + NSString * key = [NSString stringWithFormat:@"%@_%@", kSailingPrizeAlertKey, [AccountInfoStorage instance].getUid]; + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:key]; + } else { + NSString * key = [NSString stringWithFormat:@"%@_%@", kSailingPrizeAlertKey, [AccountInfoStorage instance].getUid]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key]; + } +} #pragma mark - NIMSystemNotificationManagerDelegate - (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification { if (notification.receiverType == NIMSessionTypeP2P) { @@ -310,7 +429,9 @@ } else { self.addButton.enabled = YES; } - self.textField.text = [self.levelArray objectAtIndex:_exploreCount]; + NSString * count = [self.levelArray objectAtIndex:_exploreCount]; + self.textField.text = count; + self.consumLabel.text = [NSString stringWithFormat:@"消耗%@燃油连续探索", count]; } - (UIView *)topView { @@ -390,6 +511,7 @@ [_fuleButton setTitle:@"0" forState:UIControlStateNormal]; [_fuleButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; _fuleButton.titleLabel.font = [UIFont systemFontOfSize:10]; + _fuleButton.titleEdgeInsets = UIEdgeInsetsMake(0, 15, 0, 0); [_fuleButton setTitleColor:[ThemeColor colorWithHexString:@"#643B29"] forState:UIControlStateNormal]; [_fuleButton setBackgroundImage:[UIImage imageNamed:@"room_sailing_rule_bg"] forState:UIControlStateNormal]; } @@ -401,7 +523,7 @@ _numberView = [[UIStackView alloc] init]; _numberView.axis = UILayoutConstraintAxisHorizontal; _numberView.distribution = UIStackViewDistributionFill; - _numberView.alignment = UIStackViewAlignmentCenter; + _numberView.alignment = UIStackViewAlignmentFill; _numberView.spacing = 6; } return _numberView; @@ -428,6 +550,7 @@ _addButton = [UIButton buttonWithType:UIButtonTypeCustom]; [_addButton setImage:[UIImage imageNamed:@"room_sailing_add"] forState:UIControlStateNormal]; [_addButton setImage:[UIImage imageNamed:@"room_sailing_add"] forState:UIControlStateSelected]; + [_addButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; [_addButton addTarget:self action:@selector(addButtonAction:) forControlEvents:UIControlEventTouchUpInside]; } return _addButton; @@ -438,6 +561,7 @@ _reduButton = [UIButton buttonWithType:UIButtonTypeCustom]; [_reduButton setImage:[UIImage imageNamed:@"room_sailing_redu"] forState:UIControlStateNormal]; [_reduButton setImage:[UIImage imageNamed:@"room_sailing_redu"] forState:UIControlStateSelected]; + [_reduButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; [_reduButton addTarget:self action:@selector(reduButtonAction:) forControlEvents:UIControlEventTouchUpInside]; } return _reduButton; @@ -464,4 +588,72 @@ return _consumLabel; } +- (UIView *)animationView { + if (!_animationView) { + _animationView = [[UIView alloc] init]; + _animationView.backgroundColor = [UIColor clearColor]; + } + return _animationView; +} + +- (SVGAImageView *)sailingView { + if (!_sailingView) { + _sailingView = [[SVGAImageView alloc]init]; + _sailingView.backgroundColor = [UIColor clearColor]; + _sailingView.userInteractionEnabled = NO; + } + return _sailingView; +} + +- (SVGAParser *)parser { + if (!_parser) { + _parser = [[SVGAParser alloc]init]; + } + return _parser; +} + +- (UIImageView *)sailingImageView { + if (!_sailingImageView) { + _sailingImageView = [[UIImageView alloc] init]; + _sailingImageView.userInteractionEnabled = YES; + _sailingImageView.image = [UIImage imageNamed:@"room_sailing_sailing"]; + } + return _sailingImageView; +} + +- (UIStackView *)tipsStackView { + if (!_tipsStackView) { + _tipsStackView = [[UIStackView alloc] init]; + _tipsStackView.axis = UILayoutConstraintAxisHorizontal; + _tipsStackView.distribution = UIStackViewDistributionFill; + _tipsStackView.alignment = UIStackViewAlignmentFill; + _tipsStackView.spacing = 5; + } + return _tipsStackView; +} + +- (UIButton *)boxButton { + if (!_boxButton) { + _boxButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_boxButton setImage:[UIImage imageNamed:@"room_sailing_tips_normal"] forState:UIControlStateNormal]; + [_boxButton setImage:[UIImage imageNamed:@"room_sailing_tips_select"] forState:UIControlStateSelected]; + [_boxButton addTarget:self action:@selector(boxButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + [_boxButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; + NSString * key = [NSString stringWithFormat:@"%@_%@", kSailingPrizeAlertKey, [AccountInfoStorage instance].getUid]; + _boxButton.selected = ![[NSUserDefaults standardUserDefaults] boolForKey:key]; + } + return _boxButton; +} + +- (UILabel *)tipLabel { + if (!_tipLabel) { + _tipLabel = [[UILabel alloc] init]; + _tipLabel.font = [UIFont systemFontOfSize:10]; + _tipLabel.textColor = UIColorFromRGB(0xE9C57B); + _tipLabel.text = @"显示中奖窗口"; + } + return _tipLabel; +} + + @end diff --git a/xplan-ios/Main/Room/View/XPMiniRoomView.m b/xplan-ios/Main/Room/View/XPMiniRoomView.m index ae214976..d68922ea 100644 --- a/xplan-ios/Main/Room/View/XPMiniRoomView.m +++ b/xplan-ios/Main/Room/View/XPMiniRoomView.m @@ -32,6 +32,8 @@ #import "RoomFaceSendInfoModel.h" #import "MicroInviteExtModel.h" #import "Music+CoreDataClass.h" +#import "RoomPKChooseUserModel.h" +#import "RoomSailingPrizeModel.h" ///View #import "XPRoomViewController.h" #import "XPNoteView.h" @@ -236,6 +238,21 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey; } } } + }else if (attachment.first == CustomMessageType_Room_PK && attachment.second == Custom_Message_Sub_Room_PK_Manager_Up_Mic) { + if (attachment.data && [attachment.data allKeys].count > 0) { + for (NSDictionary * dic in [attachment.data allValues]) { + RoomPKChooseUserModel * userModel = [RoomPKChooseUserModel modelWithDictionary:dic]; + if (userModel.groupType == GroupType_Red || userModel.groupType == GroupType_Blue) { + return YES; + } + } + } + return NO; + } else if(attachment.first == CustomMessageType_Room_Sailing && (attachment.second == Custom_Message_Sub_Sailing_AllRoom_Notify || attachment.second == Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend)) { + RoomSailingPrizeModel * prizeModel = [RoomSailingPrizeModel modelWithDictionary:attachment.data]; + if (self.userInfo.userLevelVo.experLevelSeq > prizeModel.userLevelLimit) { + return YES; + } } return [[[self supportMessageDic] objectForKey:@(attachment.first)] containsObject:@(attachment.second)]; } @@ -333,7 +350,18 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey; @(CustomMessageType_LuckyBag): [NSSet setWithObjects: @(Custom_Message_Sub_Room_Gift_LuckBag_Server), - nil] + nil], + @(CustomMessageType_Gift_Compound): + [NSSet setWithObjects:@(Custom_Message_Sub_Gift_Compound), + nil], + @(CustomMessageType_Room_Sailing): + [NSSet setWithObjects: + @(Custom_Message_Sub_Sailing_Me), + @(Custom_Message_Sub_Sailing_InRoom), + @(Custom_Message_Sub_Sailing_AllRoom), + @(Custom_Message_Sub_Sailing_AllRoom_Notify), + @(Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend), + nil] }; } diff --git a/xplan-ios/Main/Tabbar/ClientDataModel.h b/xplan-ios/Main/Tabbar/ClientDataModel.h index 8981d3e1..c98211fb 100644 --- a/xplan-ios/Main/Tabbar/ClientDataModel.h +++ b/xplan-ios/Main/Tabbar/ClientDataModel.h @@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,assign) NSInteger findNewbieCharmLevel; ///送礼物隐藏座驾动画的值 @property (nonatomic,assign) double hideCarEffectGiftPrice; +//航海等级限制 +@property (nonatomic, assign) NSInteger linearlyPoolOpenLevel; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Sources/sailing_prize.svga b/xplan-ios/Sources/sailing_prize.svga new file mode 100644 index 00000000..67acb0e1 Binary files /dev/null and b/xplan-ios/Sources/sailing_prize.svga differ