diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 41d2f87c..7b496ca3 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -168,6 +168,9 @@ 9B8585F52788699400D7D5C6 /* FBKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B8585F42788699400D7D5C6 /* FBKVOController.m */; }; 9B85B6D7279FDABA00A0A1AC /* XPUserCardSkillCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B85B6D6279FDABA00A0A1AC /* XPUserCardSkillCardView.m */; }; 9B85B6DA279FDC5200A0A1AC /* XPUserCardSkillCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B85B6D9279FDC5200A0A1AC /* XPUserCardSkillCollectionViewCell.m */; }; + 9B85F3502806A34B006EDF51 /* anchorPK_progress.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9B85F34F2806A34B006EDF51 /* anchorPK_progress.svga */; }; + 9B85F3532806AB9A006EDF51 /* XPAnchorPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B85F3522806AB9A006EDF51 /* XPAnchorPKResultView.m */; }; + 9B85F3562806DD8A006EDF51 /* XPAnchorPKFinishView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B85F3552806DD8A006EDF51 /* XPAnchorPKFinishView.m */; }; 9B92A3392797BE4500AD168F /* XPMineSkillTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A3382797BE4500AD168F /* XPMineSkillTipView.m */; }; 9B92A33C2797E38100AD168F /* XPMineHeadItemTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A33B2797E38100AD168F /* XPMineHeadItemTableViewCell.m */; }; 9B92A3442797EE6500AD168F /* XPMatchManagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A3432797EE6500AD168F /* XPMatchManagePresenter.m */; }; @@ -950,6 +953,11 @@ 9B85B6D6279FDABA00A0A1AC /* XPUserCardSkillCardView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardSkillCardView.m; sourceTree = ""; }; 9B85B6D8279FDC5200A0A1AC /* XPUserCardSkillCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardSkillCollectionViewCell.h; sourceTree = ""; }; 9B85B6D9279FDC5200A0A1AC /* XPUserCardSkillCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardSkillCollectionViewCell.m; sourceTree = ""; }; + 9B85F34F2806A34B006EDF51 /* anchorPK_progress.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchorPK_progress.svga; sourceTree = ""; }; + 9B85F3512806AB9A006EDF51 /* XPAnchorPKResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorPKResultView.h; sourceTree = ""; }; + 9B85F3522806AB9A006EDF51 /* XPAnchorPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorPKResultView.m; sourceTree = ""; }; + 9B85F3542806DD8A006EDF51 /* XPAnchorPKFinishView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAnchorPKFinishView.h; sourceTree = ""; }; + 9B85F3552806DD8A006EDF51 /* XPAnchorPKFinishView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorPKFinishView.m; sourceTree = ""; }; 9B92A3372797BE4500AD168F /* XPMineSkillTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSkillTipView.h; sourceTree = ""; }; 9B92A3382797BE4500AD168F /* XPMineSkillTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSkillTipView.m; sourceTree = ""; }; 9B92A33A2797E38100AD168F /* XPMineHeadItemTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineHeadItemTableViewCell.h; sourceTree = ""; }; @@ -2598,18 +2606,10 @@ 9B1B72A82800319B003FACE9 /* Presenter */, 9B1B72A528003185003FACE9 /* View */, 9B1B72A42800317F003FACE9 /* Api */, - 9B1B72A328003153003FACE9 /* Model */, ); path = AnchorPK; sourceTree = ""; }; - 9B1B72A328003153003FACE9 /* Model */ = { - isa = PBXGroup; - children = ( - ); - path = Model; - sourceTree = ""; - }; 9B1B72A42800317F003FACE9 /* Api */ = { isa = PBXGroup; children = ( @@ -2643,6 +2643,10 @@ 9B2EA7CB2804245500ED17BF /* XPAnchorPKPanelUserView.m */, 9B3A1DF2280571000058E2DD /* XPAnchorPKInviteView.h */, 9B3A1DF3280571000058E2DD /* XPAnchorPKInviteView.m */, + 9B85F3512806AB9A006EDF51 /* XPAnchorPKResultView.h */, + 9B85F3522806AB9A006EDF51 /* XPAnchorPKResultView.m */, + 9B85F3542806DD8A006EDF51 /* XPAnchorPKFinishView.h */, + 9B85F3552806DD8A006EDF51 /* XPAnchorPKFinishView.m */, ); path = SubViews; sourceTree = ""; @@ -4433,6 +4437,7 @@ isa = PBXGroup; children = ( E88863C2278E7BCC004BCFAB /* crossRoomPk_progress.svga */, + 9B85F34F2806A34B006EDF51 /* anchorPK_progress.svga */, E8937ABF276C3ECF00B2C7E1 /* enterroom */, E8DEC98927637EA50078CB70 /* candyTree_open.svga */, E8DEC98A27637EA50078CB70 /* candyTree_transform.svga */, @@ -5310,6 +5315,7 @@ 9B0997A127F19D8A00EB8F14 /* README.md in Resources */, 189DD53926DE255600AB55B1 /* Assets.xcassets in Resources */, E8DEC98C27637EA50078CB70 /* candyTree_transform.svga in Resources */, + 9B85F3502806A34B006EDF51 /* anchorPK_progress.svga in Resources */, 186A52E726FC559700D67B2C /* yw_1222_0769.jpg in Resources */, E8937ACB276C3EDE00B2C7E1 /* svga_member_in_lv60.svga in Resources */, 186A52E326FC559200D67B2C /* RPSDK.bundle in Resources */, @@ -5789,6 +5795,7 @@ E8F9168427EC913C00F10D8F /* XPHomeLittleGameViewController.m in Sources */, E8E5E1B327C397A400F457D8 /* HomeMenuInfoModel.m in Sources */, E8AEAEF027141C430017FCE0 /* XPRoomMenuContainerView.m in Sources */, + 9B85F3532806AB9A006EDF51 /* XPAnchorPKResultView.m in Sources */, E8DEC99527648FA50078CB70 /* ClientConfig.m in Sources */, E880B3A6278BD69900A83B0D /* XPAcrossRoomPKTableViewCell.m in Sources */, E8EEB90926FC579A007C6EBA /* XPMineUserInfoEditTableViewCell.m in Sources */, @@ -5944,6 +5951,7 @@ E88863C9278EBA43004BCFAB /* XPAcrossRoomPKForceEndResultView.m in Sources */, E896EFB22771C93B00AD2CC1 /* XPMineFriendNumberView.m in Sources */, 9BB5495F2782E9DB0090CD26 /* NobleAuthInfo.m in Sources */, + 9B85F3562806DD8A006EDF51 /* XPAnchorPKFinishView.m in Sources */, E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */, E80CBDEA27D0C53F001E1EC2 /* XPWeakTimer.m in Sources */, 189DD55026DE37F900AB55B1 /* MvpViewController.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/Contents.json new file mode 100644 index 00000000..56da8719 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_prize_KO@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_prize_KO@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/anchorPK_prize_KO@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/anchorPK_prize_KO@2x.png new file mode 100644 index 00000000..760f922c Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/anchorPK_prize_KO@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/anchorPK_prize_KO@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/anchorPK_prize_KO@3x.png new file mode 100644 index 00000000..5ffd3390 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_KO.imageset/anchorPK_prize_KO@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/Contents.json new file mode 100644 index 00000000..717a36f0 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_prize_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_prize_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/anchorPK_prize_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/anchorPK_prize_bg@2x.png new file mode 100644 index 00000000..5c9a62a0 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/anchorPK_prize_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/anchorPK_prize_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/anchorPK_prize_bg@3x.png new file mode 100644 index 00000000..8234c4c7 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_bg.imageset/anchorPK_prize_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/Contents.json new file mode 100644 index 00000000..a4981591 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_prize_onLook_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_prize_onLook_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/anchorPK_prize_onLook_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/anchorPK_prize_onLook_bg@2x.png new file mode 100644 index 00000000..3852fecd Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/anchorPK_prize_onLook_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/anchorPK_prize_onLook_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/anchorPK_prize_onLook_bg@3x.png new file mode 100644 index 00000000..0861a4ea Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_prize_onLook_bg.imageset/anchorPK_prize_onLook_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/Contents.json new file mode 100644 index 00000000..cdc3d34d --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_contribute_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_contribute_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/anchorPK_result_contribute_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/anchorPK_result_contribute_bg@2x.png new file mode 100644 index 00000000..98b49c7b Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/anchorPK_result_contribute_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/anchorPK_result_contribute_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/anchorPK_result_contribute_bg@3x.png new file mode 100644 index 00000000..8fa3ce57 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_contribute_bg.imageset/anchorPK_result_contribute_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/Contents.json new file mode 100644 index 00000000..1726a64e --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_fail_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_fail_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/anchorPK_result_fail_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/anchorPK_result_fail_bg@2x.png new file mode 100644 index 00000000..2d6fb2d9 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/anchorPK_result_fail_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/anchorPK_result_fail_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/anchorPK_result_fail_bg@3x.png new file mode 100644 index 00000000..b58d6990 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_bg.imageset/anchorPK_result_fail_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/Contents.json new file mode 100644 index 00000000..3da54f5d --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_fail_headWear@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_fail_headWear@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/anchorPK_result_fail_headWear@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/anchorPK_result_fail_headWear@2x.png new file mode 100644 index 00000000..d32a6489 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/anchorPK_result_fail_headWear@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/anchorPK_result_fail_headWear@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/anchorPK_result_fail_headWear@3x.png new file mode 100644 index 00000000..628fb932 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_headWear.imageset/anchorPK_result_fail_headWear@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/Contents.json new file mode 100644 index 00000000..fedf871d --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_fail_title_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_fail_title_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/anchorPK_result_fail_title_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/anchorPK_result_fail_title_bg@2x.png new file mode 100644 index 00000000..1747a09b Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/anchorPK_result_fail_title_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/anchorPK_result_fail_title_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/anchorPK_result_fail_title_bg@3x.png new file mode 100644 index 00000000..ff41fba6 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_fail_title_bg.imageset/anchorPK_result_fail_title_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/Contents.json new file mode 100644 index 00000000..97ef0e83 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_mvp_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_mvp_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/anchorPK_result_mvp_icon@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/anchorPK_result_mvp_icon@2x.png new file mode 100644 index 00000000..56dc830a Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/anchorPK_result_mvp_icon@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/anchorPK_result_mvp_icon@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/anchorPK_result_mvp_icon@3x.png new file mode 100644 index 00000000..471a2e02 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_mvp_icon.imageset/anchorPK_result_mvp_icon@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/Contents.json new file mode 100644 index 00000000..6b187ab9 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_tie_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_tie_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/anchorPK_result_tie_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/anchorPK_result_tie_bg@2x.png new file mode 100644 index 00000000..72904a48 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/anchorPK_result_tie_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/anchorPK_result_tie_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/anchorPK_result_tie_bg@3x.png new file mode 100644 index 00000000..16464392 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_bg.imageset/anchorPK_result_tie_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/Contents.json new file mode 100644 index 00000000..f977dfd2 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_tie_headWear@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_tie_headWear@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/anchorPK_result_tie_headWear@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/anchorPK_result_tie_headWear@2x.png new file mode 100644 index 00000000..08f39df1 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/anchorPK_result_tie_headWear@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/anchorPK_result_tie_headWear@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/anchorPK_result_tie_headWear@3x.png new file mode 100644 index 00000000..d341ae70 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_headWear.imageset/anchorPK_result_tie_headWear@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/Contents.json new file mode 100644 index 00000000..d86a5ea8 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_tie_title_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_tie_title_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/anchorPK_result_tie_title_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/anchorPK_result_tie_title_bg@2x.png new file mode 100644 index 00000000..9b25d545 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/anchorPK_result_tie_title_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/anchorPK_result_tie_title_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/anchorPK_result_tie_title_bg@3x.png new file mode 100644 index 00000000..10ebf0d0 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_tie_title_bg.imageset/anchorPK_result_tie_title_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/Contents.json new file mode 100644 index 00000000..0eaa2b66 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_win_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_win_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/anchorPK_result_win_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/anchorPK_result_win_bg@2x.png new file mode 100644 index 00000000..abbb0c5e Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/anchorPK_result_win_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/anchorPK_result_win_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/anchorPK_result_win_bg@3x.png new file mode 100644 index 00000000..02947da4 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_bg.imageset/anchorPK_result_win_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/Contents.json new file mode 100644 index 00000000..42f9c2c7 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_win_headWear@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_win_headWear@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/anchorPK_result_win_headWear@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/anchorPK_result_win_headWear@2x.png new file mode 100644 index 00000000..5e34b7a8 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/anchorPK_result_win_headWear@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/anchorPK_result_win_headWear@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/anchorPK_result_win_headWear@3x.png new file mode 100644 index 00000000..13995b23 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_headWear.imageset/anchorPK_result_win_headWear@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/Contents.json new file mode 100644 index 00000000..821f1836 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPK_result_win_title_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPK_result_win_title_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/anchorPK_result_win_title_bg@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/anchorPK_result_win_title_bg@2x.png new file mode 100644 index 00000000..0bd3843d Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/anchorPK_result_win_title_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/anchorPK_result_win_title_bg@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/anchorPK_result_win_title_bg@3x.png new file mode 100644 index 00000000..b2f46bec Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPK_result_win_title_bg.imageset/anchorPK_result_win_title_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/Contents.json new file mode 100644 index 00000000..feccb0d9 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "anchorPk_result_close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "anchorPk_result_close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/anchorPk_result_close@2x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/anchorPk_result_close@2x.png new file mode 100644 index 00000000..04e02213 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/anchorPk_result_close@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/anchorPk_result_close@3x.png b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/anchorPk_result_close@3x.png new file mode 100644 index 00000000..0069145d Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/Anchor/AnchorPk/anchorPk_result_close.imageset/anchorPk_result_close@3x.png differ diff --git a/xplan-ios/Main/RTC/RtcImpl/RtcInterface.h b/xplan-ios/Main/RTC/RtcImpl/RtcInterface.h index becf1792..ee4c75bf 100644 --- a/xplan-ios/Main/RTC/RtcImpl/RtcInterface.h +++ b/xplan-ios/Main/RTC/RtcImpl/RtcInterface.h @@ -41,6 +41,13 @@ NS_ASSUME_NONNULL_BEGIN 加入频道(房间),TRTC 进房需要动态签名。 */ - (BOOL)joinChannel:(NSString *)channelId sign:(NSString *)sign completion:(void(^ __nullable)(void))completion; + +///发起跨房通话 +- (void)connectOtherRoom:(NSString *)roomUId userId:(NSString *)userId; + +///退出跨房通话 +- (void)disconnectOtherRoom; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m b/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m index d6065aeb..1752f5bc 100644 --- a/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m +++ b/xplan-ios/Main/RTC/RtcImpl/TRTCRtcImpl.m @@ -47,6 +47,40 @@ return YES; } +///发起跨房通话 +- (void)connectOtherRoom:(NSString *)roomUid userId:(NSString *)uid { + NSMutableDictionary *jsonDict = [[NSMutableDictionary alloc] init]; + [jsonDict setObject:@([roomUid intValue]) forKey:@"roomId"]; + [jsonDict setObject:uid forKey:@"userId"]; + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:jsonDict options:NSJSONWritingPrettyPrinted error:nil]; + NSString* jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + [self.engine connectOtherRoom:jsonString]; +} + +///退出跨房通话 +- (void)disconnectOtherRoom { + [self.engine disconnectOtherRoom]; +} + +///发起跨房通话回调 +- (void)onConnectOtherRoom:(NSString *)userId errCode:(TXLiteAVError)errCode errMsg:(NSString *)errMsg { + if (errCode == ERR_NULL) { +// self.delegate + } +} + +///退出跨房通话回调 +- (void)onDisconnectOtherRoom:(TXLiteAVError)errCode errMsg:(NSString *)errMsg { + +} + +- (void)onUserAudioAvailable:(NSString *)userId available:(BOOL)available { + NSLog(@"成功userid:%@", userId); + if (available) { + + } +} + - (BOOL)muteRemote:(BOOL)mute { [self.engine muteAllRemoteAudio:mute]; return YES; diff --git a/xplan-ios/Main/RTC/RtcManager.h b/xplan-ios/Main/RTC/RtcManager.h index 42ed8112..409c2801 100644 --- a/xplan-ios/Main/RTC/RtcManager.h +++ b/xplan-ios/Main/RTC/RtcManager.h @@ -100,6 +100,12 @@ typedef enum : NSUInteger { */ - (void)exitRoom; +///发起跨房PK +- (void)connectOtherRoom:(NSString *)roomUid userId:(NSString *)uid; + +///退出跨房通话 +- (void)disconnectOtherRoom; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/RTC/RtcManager.m b/xplan-ios/Main/RTC/RtcManager.m index 5beb4465..31a08828 100644 --- a/xplan-ios/Main/RTC/RtcManager.m +++ b/xplan-ios/Main/RTC/RtcManager.m @@ -96,6 +96,16 @@ }]; } +///发起跨房通话 +- (void)connectOtherRoom:(NSString *)roomUid userId:(NSString *)uid { + [self.engine connectOtherRoom:roomUid userId:uid]; +} + +///退出跨房通话 +- (void)disconnectOtherRoom { + [self.engine disconnectOtherRoom]; +} + - (void)destory { [self.engine destory]; } diff --git a/xplan-ios/Main/Room/Api/Api+Room.h b/xplan-ios/Main/Room/Api/Api+Room.h index 173fd6a0..e0ad614a 100644 --- a/xplan-ios/Main/Room/Api/Api+Room.h +++ b/xplan-ios/Main/Room/Api/Api+Room.h @@ -154,11 +154,6 @@ NS_ASSUME_NONNULL_BEGIN /// @param teamUid 房间uid + (void)requestFansTeamTask:(HttpRequestHelperCompletion)completion teamUid:(NSString *)teamUid; -/// 结束个播房PK -/// @param completion 完成 -/// @param roundId PK场次id -+ (void)requestEndAnchorRoomPk:(HttpRequestHelperCompletion)completion roundId:(NSString *)roundId; - @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/Api/Api+Room.m b/xplan-ios/Main/Room/Api/Api+Room.m index a3f1454e..a2fe43a0 100644 --- a/xplan-ios/Main/Room/Api/Api+Room.m +++ b/xplan-ios/Main/Room/Api/Api+Room.m @@ -174,11 +174,5 @@ [self makeRequest:@"anchorFansTeam/getFansTaskInfo" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, teamUid, nil]; } -/// 结束个播房PK -/// @param completion 完成 -/// @param roundId PK场次id -+ (void)requestEndAnchorRoomPk:(HttpRequestHelperCompletion)completion roundId:(NSString *)roundId { - [self makeRequest:@"crossroompkround/endSingleRoomPk" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roundId, nil]; -} @end diff --git a/xplan-ios/Main/Room/Model/RoomInfoModel.h b/xplan-ios/Main/Room/Model/RoomInfoModel.h index 510f8d0b..b24d80b0 100644 --- a/xplan-ios/Main/Room/Model/RoomInfoModel.h +++ b/xplan-ios/Main/Room/Model/RoomInfoModel.h @@ -30,8 +30,6 @@ typedef NS_ENUM(NSInteger, RoomModeType){ RoomModeType_Open_Blind = 5, ///开启跨房PK RoomModeType_Open_AcrossRoomPK_mode = 7, - ///开启个播PK - RoomModeType_Open_AnchorPK_Mode = 8, }; typedef NS_ENUM(NSInteger, PermitRoomType) { @@ -128,6 +126,8 @@ typedef NS_ENUM(NSInteger, RoomDatingStateChangeType) { @property (nonatomic, assign) int64_t mgId; ///小游戏名称 @property (nonatomic, copy) NSString *mgName; +///pk场次id(本地字段) +@property (nonatomic, assign) NSInteger roundId; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPanelModel.h b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPanelModel.h index 8f0f7bf0..2800ea8e 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPanelModel.h +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPanelModel.h @@ -13,6 +13,12 @@ typedef NS_ENUM(NSUInteger, AcrossRoomPkType) { AcrossRoomPkTypeAnchor, ///个播PK }; +///PK处于什么阶段 +typedef NS_ENUM(NSUInteger, AcrossRoomPkStateType) { + AcrossRoomPkStateTypePking = 1,//PK中 + AcrossRoomPkStateTypePenalty, //惩罚阶段 +}; + @class AcrossRoomPkRankModel; @interface AcrossRoomPKPanelModel : NSObject ///当前时间 @@ -49,12 +55,16 @@ typedef NS_ENUM(NSUInteger, AcrossRoomPkType) { @property (nonatomic, copy) NSString * cUid; ///结束时间戳 @property (nonatomic, assign) long long endTime; +///惩罚结束时间戳 +@property (nonatomic, assign) long long penaltyEndTime; /// 赢家uid @property (nonatomic, copy) NSString * winUid; ///是否异常结束 @property (nonatomic, assign) BOOL isForce; ///PK类型 1:牌照房 2:个播房 @property (nonatomic, assign) AcrossRoomPkType pkType; +//PK进行状态(1:pk中 2:惩罚中) +@property (nonatomic, assign) AcrossRoomPkStateType pkState; ///场次id @property (nonatomic, assign) NSInteger roundId; @end diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h index 1e25a857..abcc6036 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/Model/AcrossRoomPKPrizeModel.h @@ -9,6 +9,10 @@ NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(NSUInteger, AcrossRoomPKType) { + AcrossRoomPKTypeNormal = 0, + AcrossRoomPKTypeAnchor, +}; @interface AcrossRoomPKPrizeModel : NSObject ///赢方UID @property (nonatomic, copy) NSString * winUid; @@ -24,6 +28,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString *failTitle; ///描述 @property (nonatomic, copy) NSString *msg; +///PK类型(0 :普通PK, 1:个播PK) +@property (nonatomic, assign) AcrossRoomPKType pkType; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m index f8076ff8..5d885717 100644 --- a/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m +++ b/xplan-ios/Main/Room/View/AcrossRoomPK/View/SubViews/XPAcrossRoomPKPrizeView.m @@ -114,6 +114,34 @@ self.redRoomTitleLabel.text = data.winTitle; self.blueRoomTitleLabel.text = data.failTitle; self.titleLabel.text = data.msg; + if (data.pkType == AcrossRoomPKTypeAnchor) { + self.titleLabel.numberOfLines = 0; + self.titleLabel.font = [UIFont systemFontOfSize:10]; + self.titleLabel.textAlignment = NSTextAlignmentCenter; + self.bgImageView.image = [UIImage imageNamed:@"anchorPK_prize_bg"]; + self.middleImageView.image = [UIImage imageNamed:@"anchorPK_prize_KO"]; + [self.onLookBtn setBackgroundImage:[UIImage imageNamed:@"anchorPK_prize_onLook_bg"] forState:UIControlStateNormal]; + [self.onLookBtn setTitle:@"去围观" forState:UIControlStateNormal]; + self.onLookBtn.layer.masksToBounds = NO; + self.onLookBtn.layer.borderWidth = 0; + [self.onLookBtn mas_remakeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(58); + make.height.mas_equalTo(20); + make.right.mas_equalTo(-70); + make.bottom.mas_equalTo(-14); + }]; + [self.titleLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.onLookBtn); + make.width.mas_equalTo(152); + make.bottom.mas_equalTo(self.onLookBtn.mas_top).mas_offset(-5); + }]; + [self.redRoomTitleLabel mas_updateConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.redHeadImageView.mas_bottom).mas_offset(4); + }]; + [self.blueRoomTitleLabel mas_updateConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.blueHeadImageView.mas_bottom).mas_offset(4); + }]; + } } #pragma mark - getters and setters diff --git a/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKFinishView.h b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKFinishView.h new file mode 100644 index 00000000..960ceb5f --- /dev/null +++ b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKFinishView.h @@ -0,0 +1,19 @@ +// +// XPAnchorPKFinishView.h +// xplan-ios +// +// Created by GreenLand on 2022/4/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AcrossRoomPKPanelModel; +@interface XPAnchorPKFinishView : UIView + +@property (nonatomic, strong) AcrossRoomPKPanelModel *data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKFinishView.m b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKFinishView.m new file mode 100644 index 00000000..b5237c62 --- /dev/null +++ b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKFinishView.m @@ -0,0 +1,236 @@ +// +// XPAnchorPKFinishView.m +// xplan-ios +// +// Created by GreenLand on 2022/4/13. +// + +#import "XPAnchorPKFinishView.h" +///Third +#import +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "XPMacro.h" +#import "UIImage+Utils.h" +#import "TTPopup.h" +///Model +#import "AcrossRoomPKPanelModel.h" + +@interface XPAnchorPKFinishView () + +///标题 +@property (nonatomic, strong) UILabel *titleLabel; +///背景 +@property (nonatomic, strong) UIImageView *backgroundImageView; +///我方头像 +@property (nonatomic, strong) NetImageView *redAvatarImageView; +///对方头像 +@property (nonatomic, strong) NetImageView *blueAvatarImageView; +///vs图标 +@property (nonatomic, strong) UIImageView *vsImageView; +///红方pk值背景 +@property (nonatomic, strong) UIImageView *redValueBgImageView; +///蓝方pk值背景 +@property (nonatomic, strong) UIImageView *blueValueBgImageView; +///红方PK值 +@property (nonatomic, strong) UILabel *redValueLabel; +///蓝方PK值 +@property (nonatomic, strong) UILabel *blueValueLabel; +///关闭 +@property (nonatomic, strong) UIButton *closeBtn; + +@end + +@implementation XPAnchorPKFinishView + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.backgroundImageView]; + [self addSubview:self.titleLabel]; + [self addSubview:self.redAvatarImageView]; + [self addSubview:self.blueAvatarImageView]; + [self addSubview:self.vsImageView]; + [self addSubview:self.redValueBgImageView]; + [self addSubview:self.blueValueBgImageView]; + [self addSubview:self.redValueLabel]; + [self addSubview:self.blueValueLabel]; + [self addSubview:self.closeBtn]; +} + +- (void)initSubViewConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(300); + make.height.mas_equalTo(306); + make.bottom.mas_equalTo(self.backgroundImageView.mas_bottom); + }]; + [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(0); + }]; + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.top.mas_equalTo(self.backgroundImageView).mas_offset(64); + make.height.mas_equalTo(21); + }]; + [self.redAvatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(52); + make.width.height.mas_equalTo(80); + make.left.mas_equalTo(24); + }]; + [self.vsImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.centerY.mas_equalTo(self.redAvatarImageView); + make.width.mas_equalTo(64); + make.height.mas_equalTo(74); + }]; + [self.blueAvatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.redAvatarImageView); + make.width.height.mas_equalTo(80); + make.right.mas_equalTo(-24); + }]; + [self.redValueBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.redAvatarImageView.mas_bottom).mas_offset(6); + make.height.mas_equalTo(26); + make.width.mas_equalTo(101); + make.centerX.mas_equalTo(self.redAvatarImageView); + }]; + [self.blueValueBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.redValueBgImageView); + make.height.mas_equalTo(26); + make.width.mas_equalTo(101); + make.centerX.mas_equalTo(self.blueAvatarImageView); + }]; + [self.redValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.centerY.mas_equalTo(self.redValueBgImageView); + }]; + [self.blueValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.centerY.mas_equalTo(self.blueValueBgImageView); + }]; + [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.top.mas_equalTo(self.backgroundImageView); + make.width.height.mas_equalTo(32); + }]; +} + +#pragma mark - Event Response +- (void)onCloseBtnClick:(UIButton *)button { + [TTPopup dismiss]; +} + +- (void)setData:(AcrossRoomPkRankModel *)data { +// self.redAvatarImageView.imageUrl = data.a +// self.titleLabel.text = data.nick ? data.nick : @""; +// self.contentLabel.text = [NSString stringWithFormat:@"PK值:%@", data.amount? data.amount : @""]; +// self.headImageView.imageUrl = data.avatar; +} + +#pragma mark - Getters And Setters +- (UIImageView *)backgroundImageView { + if (!_backgroundImageView) { + _backgroundImageView = [[UIImageView alloc] init]; + _backgroundImageView.image = [UIImage imageNamed:@"anchorPK_invite_bg"]; + } + return _backgroundImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.text = @"PK结束"; + _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.font = [UIFont systemFontOfSize:15]; + } + return _titleLabel; +} + +- (UIButton *)closeBtn { + if (!_closeBtn) { + _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + [_closeBtn addTarget:self action:@selector(onCloseBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + [_closeBtn setBackgroundImage:[UIImage imageNamed:@"anchorPk_result_close"] forState:UIControlStateNormal]; + } + return _closeBtn; +} + +- (NetImageView *)redAvatarImageView { + if (!_redAvatarImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _redAvatarImageView = [[NetImageView alloc] initWithConfig:config]; + _redAvatarImageView.layer.masksToBounds = YES; + _redAvatarImageView.layer.cornerRadius = 80 / 2; + _redAvatarImageView.layer.borderWidth = 2; + _redAvatarImageView.layer.borderColor = UIColorFromRGB(0xFE6464).CGColor; + } + return _redAvatarImageView; +} + +- (NetImageView *)blueAvatarImageView { + if (!_blueAvatarImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _blueAvatarImageView = [[NetImageView alloc] initWithConfig:config]; + _blueAvatarImageView.layer.masksToBounds = YES; + _blueAvatarImageView.layer.cornerRadius = 80 / 2; + _blueAvatarImageView.layer.borderWidth = 2; + _blueAvatarImageView.layer.borderColor = UIColorFromRGB(0x3794FE).CGColor; + } + return _blueAvatarImageView; +} + +- (UIImageView *)redValueBgImageView { + if (!_redValueBgImageView) { + _redValueBgImageView = [[UIImageView alloc] init]; + _redValueBgImageView.image = [UIImage imageNamed:@"anchorPK_invite_bg"]; + } + return _redValueBgImageView; +} + +- (UIImageView *)blueValueBgImageView { + if (!_blueValueBgImageView) { + _blueValueBgImageView = [[UIImageView alloc] init]; + _blueValueBgImageView.image = [UIImage imageNamed:@"anchorPK_invite_bg"]; + } + return _blueValueBgImageView; +} + +- (UILabel *)redValueLabel { + if (!_redValueLabel) { + _redValueLabel = [[UILabel alloc] init]; + _redValueLabel.font = [UIFont systemFontOfSize:12]; + _redValueLabel.textColor = UIColorFromRGB(0xFF0000); + _redValueLabel.textAlignment = NSTextAlignmentCenter; + } + return _redValueLabel; +} + +- (UILabel *)blueValueLabel { + if (!_blueValueLabel) { + _blueValueLabel = [[UILabel alloc] init]; + _blueValueLabel.font = [UIFont systemFontOfSize:12]; + _blueValueLabel.textColor = UIColorFromRGB(0x0060D1); + _blueValueLabel.textAlignment = NSTextAlignmentCenter; + } + return _blueValueLabel; +} + +- (UIImageView *)vsImageView { + if (!_vsImageView) { + _vsImageView = [[UIImageView alloc] init]; + _vsImageView.image = [UIImage imageNamed:@"anchorPk_panel_vs"]; + } + return _vsImageView; +} + +@end diff --git a/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKResultView.h b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKResultView.h new file mode 100644 index 00000000..4da657c2 --- /dev/null +++ b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKResultView.h @@ -0,0 +1,19 @@ +// +// XPAnchorPKResultView.h +// xplan-ios +// +// Created by GreenLand on 2022/4/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AcrossRoomPKPanelModel; +@interface XPAnchorPKResultView : UIView + +@property (nonatomic, strong) AcrossRoomPKPanelModel *data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m new file mode 100644 index 00000000..50288717 --- /dev/null +++ b/xplan-ios/Main/Room/View/AnchorPK/View/SubViews/XPAnchorPKResultView.m @@ -0,0 +1,437 @@ +// +// XPAnchorPKResultView.m +// xplan-ios +// +// Created by GreenLand on 2022/4/13. +// + +#import "XPAnchorPKResultView.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "TTPopup.h" +#import "XPMacro.h" +///Model +#import "AcrossRoomPKPanelModel.h" + +@interface XPAnchorPKResultContributeView : UIView + +///背景 +@property (nonatomic, strong) UIImageView *bgImageView; +///mvpIcon +@property (nonatomic, strong) UIImageView *mvpIconView; +///头像 +@property (nonatomic, strong) NetImageView *headImageView; +///显示标题 +@property (nonatomic,strong) UILabel *titleLabel; +///内容 +@property (nonatomic,strong) UILabel *contentLabel; + +@property (nonatomic, strong) AcrossRoomPkRankModel *data; + +@end + +@implementation XPAnchorPKResultContributeView + +- (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.bgImageView]; + [self addSubview:self.headImageView]; + [self addSubview:self.mvpIconView]; + [self addSubview:self.titleLabel]; + [self addSubview:self.contentLabel]; +} + +- (void)initSubViewConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(40); + make.width.mas_equalTo(159); + }]; + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(0); + }]; + + [self.headImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self); + make.left.mas_equalTo(16); + make.width.height.mas_equalTo(34); + }]; + [self.mvpIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(32); + make.height.mas_equalTo(12); + make.centerX.mas_equalTo(self.headImageView); + make.bottom.mas_equalTo(self.headImageView).mas_offset(1); + }]; + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.headImageView).mas_offset(2); + make.left.mas_equalTo(self.headImageView.mas_right).mas_offset(8); + make.height.mas_equalTo(13); + make.right.mas_equalTo(0); + }]; + + [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.titleLabel); + make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(4); + make.height.mas_equalTo(11); + }]; +} + +#pragma mark - Getters And Setters +- (void)setData:(AcrossRoomPkRankModel *)data { + + self.titleLabel.text = data.nick ? data.nick : @""; + self.contentLabel.text = [NSString stringWithFormat:@"PK值:%@", data.amount? data.amount : @""]; + self.headImageView.imageUrl = data.avatar; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.font = [UIFont systemFontOfSize:12]; + _titleLabel.text = @""; + } + return _titleLabel; +} + +- (UILabel *)contentLabel { + if (!_contentLabel) { + _contentLabel = [[UILabel alloc] init]; + _contentLabel.textColor = [UIColor whiteColor]; + _contentLabel.font = [UIFont systemFontOfSize:10]; + } + return _contentLabel; +} + +- (UIImageView *)bgImageView { + if (!_bgImageView) { + _bgImageView = [[UIImageView alloc] init]; + _bgImageView.image = [UIImage imageNamed:@"anchorPK_result_contribute_bg"]; + } + return _bgImageView; +} + +- (UIImageView *)mvpIconView { + if (!_mvpIconView) { + _mvpIconView = [[UIImageView alloc] init]; + _mvpIconView.image = [UIImage imageNamed:@"anchorPK_result_mvp_icon"]; + _mvpIconView.hidden = YES; + } + return _mvpIconView; +} + +- (NetImageView *)headImageView { + if (!_headImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _headImageView = [[NetImageView alloc] initWithConfig:config]; + _headImageView.layer.masksToBounds = YES; + _headImageView.layer.cornerRadius = 17; + _headImageView.layer.borderColor = [UIColor whiteColor].CGColor; + _headImageView.layer.borderWidth = 0.5; + } + return _headImageView; +} + +@end + +@interface XPAnchorPKResultView() + +/** bgImageView */ +@property (nonatomic, strong) UIImageView *bgImageView; +///关闭 +@property (nonatomic, strong) UIButton *closeBtn; +///内容view +@property (nonatomic, strong) UIView *mainView; +///头饰 +@property (nonatomic, strong) UIImageView *headWearImageView; +///头像 +@property (nonatomic, strong) NetImageView *avatarImageView; +///厅名 +@property (nonatomic, strong) UILabel *roomTitleLabel; +///pk值 +@property (nonatomic, strong) UILabel *pkValueLabel; +///贡献标题背景 +@property (nonatomic, strong) UIImageView *contributeTitleBgImageView; +///贡献榜标题 +@property (nonatomic, strong) UILabel *contributeTitleLabel; +///无人送礼tip +@property (nonatomic, strong) UILabel *noneContrbuteLabel; +///倒计时 +@property (strong, nonatomic) dispatch_source_t timer; + +@end + +@implementation XPAnchorPKResultView + +- (void)dealloc { + NSLog(@"销毁了"); + if (self.timer) { + dispatch_source_cancel(self.timer); + self.timer = nil; + } +} + +#pragma mark - life cycle + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self initView]; + [self initConstrations]; + } + return self; +} + +- (void)initView { + [self addSubview:self.bgImageView]; + [self addSubview:self.closeBtn]; + [self addSubview:self.mainView]; + [self addSubview:self.avatarImageView]; + [self addSubview:self.headWearImageView]; + + [self.mainView addSubview:self.roomTitleLabel]; + [self.mainView addSubview:self.pkValueLabel]; + [self.mainView addSubview:self.contributeTitleBgImageView]; + [self.mainView addSubview:self.contributeTitleLabel]; + [self.mainView addSubview:self.noneContrbuteLabel]; +} + +- (void)initConstrations { + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(0); + make.top.mas_equalTo(47); + make.height.mas_equalTo(370); + }]; + [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.top.mas_equalTo(self.bgImageView.mas_bottom).mas_offset(23); + make.width.mas_equalTo(72); + make.height.mas_equalTo(32); + }]; + [self.mainView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.bgImageView); + }]; + [self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.centerX.mas_equalTo(self); + make.width.mas_equalTo(148); + make.height.mas_equalTo(114); + }]; + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(27); + make.width.height.mas_equalTo(64); + make.centerX.mas_equalTo(self); + }]; + [self.roomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.headWearImageView.mas_bottom).mas_offset(15); + make.centerX.mas_equalTo(self.avatarImageView); + make.height.mas_equalTo(15); + }]; + [self.pkValueLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.avatarImageView); + make.top.mas_equalTo(self.roomTitleLabel.mas_bottom).offset(8); + make.height.mas_equalTo(13); + }]; + [self.contributeTitleBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.pkValueLabel.mas_bottom).mas_offset(17); + make.centerX.mas_equalTo(self.mainView); + make.width.mas_equalTo(160); + make.height.mas_equalTo(24); + }]; + [self.contributeTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.centerY.mas_equalTo(self.contributeTitleBgImageView); + }]; + [self.noneContrbuteLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.pkValueLabel.mas_bottom).mas_offset(92); + make.centerX.mas_equalTo(self); + }]; +} + + +- (void)setData:(AcrossRoomPKPanelModel *)data { + if (data.winUid == data.cUid) {//赢 + self.bgImageView.image = [UIImage imageNamed:@"anchorPK_result_win_bg"]; + self.headWearImageView.image = [UIImage imageNamed:@"anchorPK_result_win_headWear"]; + self.contributeTitleBgImageView.image = [UIImage imageNamed:@"anchorPK_result_win_title_bg"]; + } else if (data.winUid == data.aUid) {//输 + self.bgImageView.image = [UIImage imageNamed:@"anchorPK_result_fail_bg"]; + self.headWearImageView.image = [UIImage imageNamed:@"anchorPK_result_fail_headWear"]; + self.contributeTitleBgImageView.image = [UIImage imageNamed:@"anchorPK_result_fail_title_bg"]; + } else {//平局 + self.bgImageView.image = [UIImage imageNamed:@"anchorPK_result_tie_bg"]; + self.headWearImageView.image = [UIImage imageNamed:@"anchorPK_result_tie_headWear"]; + self.contributeTitleBgImageView.image = [UIImage imageNamed:@"anchorPK_result_tie_title_bg"]; + } + self.avatarImageView.imageUrl = data.cAvatar; + self.roomTitleLabel.text = data.cTitle; + self.pkValueLabel.text = [NSString stringWithFormat:@"PK值:%lld", data.cAmount]; + if (data.csRank.count > 0) {//有贡献 + self.contributeTitleBgImageView.hidden = NO; + self.contributeTitleLabel.hidden = NO; + self.noneContrbuteLabel.hidden = YES; + for (int i = 0; i +#import ///Tool #import "ThemeColor.h" #import "NetImageView.h" @@ -30,6 +31,8 @@ @property (nonatomic, strong) UIImageView *redStarImageView; ///蓝方⭐️ @property (nonatomic, strong) UIImageView *blueStarImageView; +///PK状态 +@property (nonatomic, strong) UILabel *pkStateLabel; ///显示倒计时 @property (nonatomic, strong) UILabel *timeLabel; ///最大的容器 @@ -44,11 +47,13 @@ ///红方的礼物值 @property (nonatomic, strong) UILabel *redCountLabel; ///蓝方的进度图片 -@property (nonatomic, strong) UIImageView *buleCountImageView; +@property (nonatomic, strong) UIImageView *blueCountImageView; ///蓝方的礼物值 -@property (nonatomic, strong) UILabel *buleCountLabel; -///中间分割图片 -@property (nonatomic, strong) UIImageView *middleImageView; +@property (nonatomic, strong) UILabel *blueCountLabel; +///动画管理类 +@property (strong, nonatomic) SVGAParser *parser; +///中间进度的动画 +@property (nonatomic, strong) SVGAImageView *svgDisplayView; #pragma mark - 队伍的队友的view ///红方的贡献用户容器 @property (nonatomic,strong) UIStackView *redContributeStackView; @@ -98,21 +103,22 @@ - (void)initSubViews { self.userInteractionEnabled = NO; [self addSubview:self.backImageView]; - - [self.backImageView addSubview:self.timeLabel]; + [self.backImageView addSubview:self.stackView]; + [self.stackView addArrangedSubview:self.pkStateLabel]; + [self.stackView addArrangedSubview:self.timeLabel]; ///进度条 [self.backImageView addSubview:self.progressView]; [self.progressView addSubview:self.progressContentView]; [self.progressContentView addSubview:self.redCountImageView]; - [self.progressContentView addSubview:self.buleCountImageView]; + [self.progressContentView addSubview:self.blueCountImageView]; + [self.progressContentView addSubview:self.svgDisplayView]; ///贡献榜 [self.backImageView addSubview:self.redContributeStackView]; [self.backImageView addSubview:self.blueContributeStackView]; [self.progressContentView addSubview:self.redCountLabel]; - [self.progressContentView addSubview:self.buleCountLabel]; + [self.progressContentView addSubview:self.blueCountLabel]; [self.backImageView addSubview:self.redStarImageView]; [self.backImageView addSubview:self.blueStarImageView]; - [self.backImageView addSubview:self.middleImageView]; [self addSubview:self.otherAvatarImageView]; [self addSubview:self.otherResultImageView]; @@ -120,6 +126,14 @@ [self.otherStackView addArrangedSubview:self.otherNickLabel]; [self.otherStackView addArrangedSubview:self.followButton]; [self initUserSubViews]; + [self.parser parseWithNamed:@"anchorPK_progress" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { + self.svgDisplayView.loops = INT_MAX; + self.svgDisplayView.clearsAfterStop = NO; + self.svgDisplayView.videoItem = videoItem; + [self.svgDisplayView startAnimation]; + } failureBlock:^(NSError * _Nonnull error) { + + }]; } - (void)initUserSubViews { @@ -154,9 +168,10 @@ make.height.mas_equalTo(84); make.centerX.mas_equalTo(self); }]; - [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.backImageView).mas_offset(3); + [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.backImageView); make.centerX.mas_equalTo(self); + make.height.mas_equalTo(21); }]; [self.redStarImageView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -186,7 +201,7 @@ make.left.mas_equalTo(0); make.height.mas_equalTo(16); make.top.mas_equalTo(0); - make.right.mas_equalTo(self.buleCountImageView.mas_left); + make.right.mas_equalTo(self.blueCountImageView.mas_left); }]; [self.redCountLabel mas_makeConstraints:^(MASConstraintMaker *make) { @@ -194,23 +209,23 @@ make.centerY.mas_equalTo(self.progressContentView); }]; - [self.buleCountImageView mas_makeConstraints:^(MASConstraintMaker *make) { + [self.blueCountImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(0); make.height.mas_equalTo(self.redCountImageView); make.centerY.mas_equalTo(self.redCountImageView); make.width.mas_equalTo(305 * 0.5); }]; - [self.buleCountLabel mas_makeConstraints:^(MASConstraintMaker *make) { + [self.blueCountLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(self.progressContentView.mas_right).offset(-17); make.centerY.mas_equalTo(self.progressContentView); }]; - [self.middleImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.mas_equalTo(self.buleCountImageView.mas_left); - make.centerY.mas_equalTo(self.progressView); + [self.svgDisplayView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.blueCountImageView.mas_left); + make.centerY.mas_equalTo(self.redCountImageView); make.height.mas_equalTo(26); - make.width.mas_equalTo(40); + make.width.mas_equalTo(25); }]; [self.redContributeStackView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -260,8 +275,11 @@ dispatch_source_cancel(self.timer); self.timer = nil; dispatch_async(dispatch_get_main_queue(), ^{ - self.timeLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightBold]; - self.timeLabel.text = @"PK结果计算中"; + if (self.pkPanelInfo.pkState == AcrossRoomPkStateTypePking) { + self.timeLabel.text = @"结果计算中"; + } else { + self.timeLabel.text = @"00:00"; + } }); } else { dispatch_async(dispatch_get_main_queue(), ^{ @@ -291,7 +309,7 @@ if (time <= 30) { self.timeLabel.textColor = UIColorFromRGB(0xFF87A1); } else { - self.timeLabel.textColor = UIColorFromRGB(0xFFF600); + self.timeLabel.textColor = UIColorFromRGB(0xFFFFFF); } } @@ -310,17 +328,31 @@ - (void)setPkPanelInfo:(AcrossRoomPKPanelModel *)pkPanelInfo { _pkPanelInfo = pkPanelInfo; if (_pkPanelInfo) { - [Timestamp getInternetDateWithSuccess:^(NSTimeInterval timeInterval) { - timeInterval = timeInterval * 1000; - long aTime = (pkPanelInfo.endTime - timeInterval) / 1000; - [self openCountdownWithTime:aTime]; - } failure:^(NSError * _Nonnull error) { - NSDate *datenow = [NSDate date];//现在时间 - long time2 = (long)([datenow timeIntervalSince1970]*1000); - long aTime = (pkPanelInfo.endTime - time2) / 1000; - [self openCountdownWithTime:aTime]; - }]; - + if (pkPanelInfo.pkState == AcrossRoomPkStateTypePenalty) { + self.pkStateLabel.text = @"惩罚时间"; + [Timestamp getInternetDateWithSuccess:^(NSTimeInterval timeInterval) { + timeInterval = timeInterval * 1000; + long aTime = (pkPanelInfo.penaltyEndTime - timeInterval) / 1000; + [self openCountdownWithTime:aTime]; + } failure:^(NSError * _Nonnull error) { + NSDate *datenow = [NSDate date];//现在时间 + long time2 = (long)([datenow timeIntervalSince1970]*1000); + long aTime = (pkPanelInfo.penaltyEndTime - time2) / 1000; + [self openCountdownWithTime:aTime]; + }]; + } else { + self.pkStateLabel.text = @"PK"; + [Timestamp getInternetDateWithSuccess:^(NSTimeInterval timeInterval) { + timeInterval = timeInterval * 1000; + long aTime = (pkPanelInfo.endTime - timeInterval) / 1000; + [self openCountdownWithTime:aTime]; + } failure:^(NSError * _Nonnull error) { + NSDate *datenow = [NSDate date];//现在时间 + long time2 = (long)([datenow timeIntervalSince1970]*1000); + long aTime = (pkPanelInfo.endTime - time2) / 1000; + [self openCountdownWithTime:aTime]; + }]; + } if (_pkPanelInfo.cTitle.length > 7) { _pkPanelInfo.cTitle = [NSString stringWithFormat:@"%@…", [_pkPanelInfo.cTitle substringToIndex:7]]; } @@ -330,7 +362,7 @@ } self.redCountLabel.text = [NSString stringWithFormat:@"%lld", _pkPanelInfo.cAmount]; - self.buleCountLabel.text = [NSString stringWithFormat:@"%lld", _pkPanelInfo.aAmount]; + self.blueCountLabel.text = [NSString stringWithFormat:@"%lld", _pkPanelInfo.aAmount]; for (int i = 0; i<_pkPanelInfo.csRank.count; i++) { AcrossRoomPkRankModel * rankModel = [_pkPanelInfo.csRank objectAtIndex:i]; if (i >= self.redContributeStackView.subviews.count) { @@ -353,14 +385,14 @@ _pkPanelInfo.aPercent = 1; } CGFloat width = 305; - [self.buleCountImageView mas_updateConstraints:^(MASConstraintMaker *make) { + [self.blueCountImageView mas_updateConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(width * _pkPanelInfo.aPercent); }]; self.otherAvatarImageView.imageUrl = pkPanelInfo.aAvatar; self.otherNickLabel.text = pkPanelInfo.aTitle; } else { self.redCountLabel.text = @"0"; - self.buleCountLabel.text = @"0"; + self.blueCountLabel.text = @"0"; for (int i = 0; i 0) { [self startAcrossRoomPKAnimation:self.acrossRoomPKQueue.firstObject]; diff --git a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m index 6d23f248..3f914edd 100644 --- a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -24,6 +24,7 @@ #import "XCCurrentVCStackManager.h" #import "XPConstant.h" #import "Api+RoomSetting.h" +#import "RtcManager.h" ///Model #import "RoomInfoModel.h" #import "MicroQueueModel.h" @@ -50,11 +51,15 @@ #import "XPAcrossRoomPKForceEndResultView.h" #import "XPAnchorPKInviteView.h" #import "XPAnchorPKRuleView.h" +#import "XPAnchorPKResultView.h" +#import "XPAnchorPKFinishView.h" #import "XPSendGiftView.h" #import "XPUserCardViewController.h" #import "XPRoomViewController.h" #import "XPLittleGameMiniStageView.h" #import "XPLittleGameRoomListView.h" +#import "XPAcrossRoomPKPrizeView.h" +#import "AcrossRoomPKPrizeModel.h" ///个播PK #import "XPAnchorFansTeamEntranceView.h" #import "XPAnchorFansTeamViewController.h" @@ -326,6 +331,7 @@ [Api getAcrossRoomPKDetail:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { if (code == 200) { AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:data.data]; + self.delegate.getRoomInfo.roundId = acrossPKPanelInfo.roundId; if (acrossPKPanelInfo.pkType == AcrossRoomPkTypeAnchor) { if (acrossPKPanelInfo.aUid.integerValue > 0) { if (!self.anchorPKPanelView.superview) { @@ -350,9 +356,6 @@ self.acrossPKPanelView.pkPanelInfo = acrossPKPanelInfo; } } -// [Api requestEndAnchorRoomPk:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { -// NSLog(@"%@", msg); -// } roundId:[NSString stringWithFormat:@"%ld", acrossPKPanelInfo.roundId]]; } else { [XCHUDTool showErrorWithMessage:msg]; } @@ -501,7 +504,7 @@ } break; ///个播跨房PK - case Custom_Message_Sub_AnchorPK_Invite: + case Custom_Message_Sub_AnchorPK_Invite://收到个播PK邀请 { NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId]; @@ -520,10 +523,9 @@ } } }]; - } break; - case Custom_Message_Sub_AnchorPK_Accept: + case Custom_Message_Sub_AnchorPK_Accept://对方接受个播PK邀请 { NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId]; @@ -543,12 +545,17 @@ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [inviteResutView removeFromSuperview]; }); + NSNumber *aRoomId = (NSNumber *)attachment.data[@"aRoomId"]; + NSNumber *aUid = (NSNumber *)attachment.data[@"aUid"]; + NSString *otherRoomId = [NSString stringWithFormat:@"%@", aRoomId]; + NSString *otherUid =[NSString stringWithFormat:@"%@", aUid]; + [[RtcManager instance] connectOtherRoom:otherRoomId userId:otherUid]; } } }]; } break; - case Custom_Message_Sub_AnchorPK_Reject: + case Custom_Message_Sub_AnchorPK_Reject://对方拒绝个播PK邀请 { NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init]; request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId]; @@ -573,7 +580,7 @@ }]; } break; - case Custom_Message_Sub_AnchorPK_Panel: + case Custom_Message_Sub_AnchorPK_Panel://个播PK面板消息 { if (!self.anchorPKPanelView.superview) { [self addSubview:self.anchorPKPanelView]; @@ -586,7 +593,7 @@ self.anchorPKPanelView.pkPanelInfo = acrossPKPanelInfo; } break; - case Custom_Message_Sub_AnchorPK_End: + case Custom_Message_Sub_AnchorPK_End://个播PK结束,进入惩罚阶段 { if (!self.anchorPKPanelView.superview) { [self addSubview:self.anchorPKPanelView]; @@ -597,22 +604,19 @@ } AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:attachment.data]; self.anchorPKPanelView.pkPanelInfo = acrossPKPanelInfo; + XPAnchorPKResultView *view = [[XPAnchorPKResultView alloc] initWithFrame:CGRectMake(0, 0, 300, 472)]; + view.data = acrossPKPanelInfo; + [TTPopup popupView:view style:TTPopupStyleAlert]; } break; - case Custom_Message_Sub_AnchorPK_Finish: + case Custom_Message_Sub_AnchorPK_Finish://个播PK完成 { [self.anchorPKPanelView resetAcrossPKViewData]; [self.anchorPKPanelView removeFromSuperview]; - AcrossRoomPKPanelModel * model = [AcrossRoomPKPanelModel modelWithJSON:attachment.data]; - if (model.isForce) { - XPAcrossRoomPKForceEndResultView *view = [[XPAcrossRoomPKForceEndResultView alloc] initWithFrame:CGRectMake(0, 0, 281, 208)]; - view.data = model; - [TTPopup popupView:view style:TTPopupStyleAlert]; - } else { - XPAcrossRoomPKResultView *view = [[XPAcrossRoomPKResultView alloc] initWithFrame:CGRectMake(0, 0, 320, 453)]; - view.data = model; - [TTPopup popupView:view style:TTPopupStyleAlert]; - } + self.anchorPKPanelView = nil; + [[RtcManager instance] disconnectOtherRoom]; + XPAnchorPKFinishView *view = [[XPAnchorPKFinishView alloc] init]; + [TTPopup popupView:view style:TTPopupStyleAlert]; } break; default: diff --git a/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.h b/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.h index fbe96ddd..ddd4d2dc 100644 --- a/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.h +++ b/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.h @@ -59,6 +59,11 @@ NS_ASSUME_NONNULL_BEGIN /// @param roomUid 房主的uid + (void)getUserVipRoomTrumpet:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid; +/// 结束个播房PK +/// @param completion 完成 +/// @param roundId PK场次id ++ (void)requestEndAnchorRoomPk:(HttpRequestHelperCompletion)completion roundId:(NSString *)roundId; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.m b/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.m index f64a8d40..00efe23b 100644 --- a/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.m +++ b/xplan-ios/Main/Room/View/MoreView/Api/Api+MoreMenu.m @@ -74,4 +74,10 @@ [self makeRequest:@"vip/getUserVipRoomHorn" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, roomUid, nil]; } +/// 结束个播房PK +/// @param completion 完成 +/// @param roundId PK场次id ++ (void)requestEndAnchorRoomPk:(HttpRequestHelperCompletion)completion roundId:(NSString *)roundId { + [self makeRequest:@"crossroompkround/endSingleRoomPk" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roundId, nil]; +} @end diff --git a/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.h b/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.h index fb530d49..67e65c96 100644 --- a/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.h +++ b/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.h @@ -42,6 +42,9 @@ NS_ASSUME_NONNULL_BEGIN /// 获取房间贵族小喇叭信息 - (void)getRoomgetUserVipRoomTrumpet:(NSString *)roomUid; +///结束个播跨房PK +- (void)requestFinishAnchorPK:(NSString *)roundId; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m b/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m index 12ac531a..d0500d96 100644 --- a/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m +++ b/xplan-ios/Main/Room/View/MoreView/Presenter/XPMoreMenuPresenter.m @@ -184,4 +184,10 @@ }] roomUid:roomUid]; } +///结束个播跨房PK +- (void)requestFinishAnchorPK:(NSString *)roundId { + [Api requestEndAnchorRoomPk:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { +// NSLog(@"%@", msg); + } roundId:roundId]; +} @end diff --git a/xplan-ios/Main/Room/View/MoreView/View/XPRoomMoreMenuViewController.m b/xplan-ios/Main/Room/View/MoreView/View/XPRoomMoreMenuViewController.m index 1a128b21..672d4b27 100644 --- a/xplan-ios/Main/Room/View/MoreView/View/XPRoomMoreMenuViewController.m +++ b/xplan-ios/Main/Room/View/MoreView/View/XPRoomMoreMenuViewController.m @@ -298,8 +298,11 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey; break; case RoomMoreMenuType_Room_Anchor_PK_Close: { - [self showErrorToast:@"主播正在PK中!"]; +// [self showErrorToast:@"主播正在PK中!"]; [self dismissViewControllerAnimated:NO completion:nil]; + if (self.roomInfo.roundId) { + [self.presenter requestFinishAnchorPK:[NSString stringWithFormat:@"%ld", self.roomInfo.roundId]]; + } } break; diff --git a/xplan-ios/Main/Room/View/XPRoomViewController.m b/xplan-ios/Main/Room/View/XPRoomViewController.m index 89278dd9..069474f7 100644 --- a/xplan-ios/Main/Room/View/XPRoomViewController.m +++ b/xplan-ios/Main/Room/View/XPRoomViewController.m @@ -275,10 +275,16 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey; [self.stageView removeFromSuperview]; self.stageView = nil; self.stageView = [[SocialStageView alloc] initWithDelegate:self]; - } else if (self.roomInfo.type == RoomType_Anchor && ![self.stageView isKindOfClass:[AnchorStageView class]]) { - [self.stageView removeFromSuperview]; - self.stageView = nil; - self.stageView = [[AnchorStageView alloc] initWithDelegate:self]; + } else if (self.roomInfo.type == RoomType_Anchor) { + if (self.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode && ![self.stageView isKindOfClass:[AnchorPKStageView class]]) { + [self.stageView removeFromSuperview]; + self.stageView = nil; + self.stageView = [[AnchorPKStageView alloc] initWithDelegate:self]; + } else if(self.roomInfo.roomModeType == RoomModeType_Normal_Mode && ![self.stageView isKindOfClass:[AnchorStageView class]]) { + [self.stageView removeFromSuperview]; + self.stageView = nil; + self.stageView = [[AnchorStageView alloc] initWithDelegate:self]; + } } else if(self.roomInfo.type == RoomType_MiniGame && ![self.stageView isKindOfClass:[LittleGameStageView class]]) { [self.stageView removeFromSuperview]; self.stageView = nil; diff --git a/xplan-ios/Sources/anchorPK_progress.svga b/xplan-ios/Sources/anchorPK_progress.svga new file mode 100644 index 00000000..5d0c16c4 Binary files /dev/null and b/xplan-ios/Sources/anchorPK_progress.svga differ