diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index cdb88103..0ab96d6e 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -419,6 +419,8 @@ E84150C227747BF700A7F548 /* FirstRechargeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C127747BF700A7F548 /* FirstRechargeModel.m */; }; E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */; }; E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */; }; + E84843AF27F59E7E0050D365 /* XPRoomPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */; }; + E84843B227F5A0740050D365 /* XPRomPKResultTitleLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */; }; E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */; }; E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E412727EE0A008818C6 /* XPRoomMessageHeaderView.m */; }; E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E452727EF9D008818C6 /* XPRoomMessageParser.m */; }; @@ -1655,6 +1657,10 @@ E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstRechargeRewardModel.m; sourceTree = ""; }; E841ED5F280FB0BD00904808 /* ContentLevelUpgradeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentLevelUpgradeModel.h; sourceTree = ""; }; E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLevelUpgradeModel.m; sourceTree = ""; }; + E84843AD27F59E7E0050D365 /* XPRoomPKResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKResultView.h; sourceTree = ""; }; + E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKResultView.m; sourceTree = ""; }; + E84843B027F5A0740050D365 /* XPRomPKResultTitleLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRomPKResultTitleLabel.h; sourceTree = ""; }; + E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRomPKResultTitleLabel.m; sourceTree = ""; }; E84B0E3D2727EDF6008818C6 /* XPRoomMessageTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageTableViewCell.h; sourceTree = ""; }; E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageTableViewCell.m; sourceTree = ""; }; E84B0E402727EE0A008818C6 /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = ""; }; @@ -4030,6 +4036,8 @@ E81AF32427F1D5B8003B9E43 /* XPRoomPKProgressView.m */, E80A086327F318620027B30C /* XPRoomPKPlayingView.h */, E80A086427F318620027B30C /* XPRoomPKPlayingView.m */, + E84843AD27F59E7E0050D365 /* XPRoomPKResultView.h */, + E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */, ); path = View; sourceTree = ""; @@ -4175,6 +4183,8 @@ E8A88D2627E8193400CA8837 /* XPRoomPKSelectUserView.m */, E81AF32627F1EE69003B9E43 /* XPRoomPKPanelUserView.h */, E81AF32727F1EE69003B9E43 /* XPRoomPKPanelUserView.m */, + E84843B027F5A0740050D365 /* XPRomPKResultTitleLabel.h */, + E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */, ); path = SubViews; sourceTree = ""; @@ -6891,6 +6901,7 @@ 9BCF58562798FE86008401A4 /* XPSkillCardPropModel.m in Sources */, E8AC721E26F472BF007D6E91 /* XPMineSettingProtocol.h in Sources */, 9BC5C91F277C902B007C8719 /* XPReleaseRadioView.m in Sources */, + E84843AF27F59E7E0050D365 /* XPRoomPKResultView.m in Sources */, E83DB47A27462C4500D8CBD1 /* XPGiftBigPrizeModel.m in Sources */, E8A03DF3276328FC0098D9EA /* CandyTreeRecordModel.m in Sources */, E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */, @@ -7497,6 +7508,7 @@ E8ACEFF827C9034C00F66D1A /* XPHomeListEmptyTableViewCell.m in Sources */, E89D60BA271D643A001F8895 /* Api+Room.m in Sources */, E872308926E89BE000B90D4F /* LoginPhoneViewController.m in Sources */, + E84843B227F5A0740050D365 /* XPRomPKResultTitleLabel.m in Sources */, E8C6FFEA2755040B004DC9F0 /* XPHomeSearchNavView.m in Sources */, E8E859C628264C2300EE4857 /* HTTPAsyncFileResponse.m in Sources */, E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/Contents.json new file mode 100644 index 00000000..9823298b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_blue_victory_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_blue_victory_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/room_pk_result_blue_victory_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/room_pk_result_blue_victory_bg@2x.png new file mode 100644 index 00000000..c79a37bc Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/room_pk_result_blue_victory_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/room_pk_result_blue_victory_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/room_pk_result_blue_victory_bg@3x.png new file mode 100644 index 00000000..a7a313c7 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_blue_victory_bg.imageset/room_pk_result_blue_victory_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/Contents.json new file mode 100644 index 00000000..5a1b0b58 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_bottom_loser_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_bottom_loser_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/room_pk_result_bottom_loser_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/room_pk_result_bottom_loser_bg@2x.png new file mode 100644 index 00000000..13d8322a Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/room_pk_result_bottom_loser_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/room_pk_result_bottom_loser_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/room_pk_result_bottom_loser_bg@3x.png new file mode 100644 index 00000000..3eb7f231 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_loser_bg.imageset/room_pk_result_bottom_loser_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/Contents.json new file mode 100644 index 00000000..e10f8c6b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_bottom_win_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_bottom_win_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/room_pk_result_bottom_win_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/room_pk_result_bottom_win_bg@2x.png new file mode 100644 index 00000000..f72ed2de Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/room_pk_result_bottom_win_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/room_pk_result_bottom_win_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/room_pk_result_bottom_win_bg@3x.png new file mode 100644 index 00000000..8be9f7e0 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_bottom_win_bg.imageset/room_pk_result_bottom_win_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/Contents.json new file mode 100644 index 00000000..cc5d67db --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_content_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_content_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/room_pk_result_content_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/room_pk_result_content_bg@2x.png new file mode 100644 index 00000000..b8b3993a Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/room_pk_result_content_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/room_pk_result_content_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/room_pk_result_content_bg@3x.png new file mode 100644 index 00000000..938678d2 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_content_bg.imageset/room_pk_result_content_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/Contents.json new file mode 100644 index 00000000..a3394497 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_loser_result_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_loser_result_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/room_pk_result_loser_result_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/room_pk_result_loser_result_bg@2x.png new file mode 100644 index 00000000..3608c803 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/room_pk_result_loser_result_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/room_pk_result_loser_result_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/room_pk_result_loser_result_bg@3x.png new file mode 100644 index 00000000..d5da7d9d Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_loser_result_bg.imageset/room_pk_result_loser_result_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/Contents.json new file mode 100644 index 00000000..38e63429 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_red_victory_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_red_victory_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/room_pk_result_red_victory_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/room_pk_result_red_victory_bg@2x.png new file mode 100644 index 00000000..c75b35ad Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/room_pk_result_red_victory_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/room_pk_result_red_victory_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/room_pk_result_red_victory_bg@3x.png new file mode 100644 index 00000000..42631c24 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_red_victory_bg.imageset/room_pk_result_red_victory_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/Contents.json new file mode 100644 index 00000000..e2bc7639 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_top_draw_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_top_draw_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/room_pk_result_top_draw_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/room_pk_result_top_draw_bg@2x.png new file mode 100644 index 00000000..4f56814f Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/room_pk_result_top_draw_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/room_pk_result_top_draw_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/room_pk_result_top_draw_bg@3x.png new file mode 100644 index 00000000..fdb874cb Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_draw_bg.imageset/room_pk_result_top_draw_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/Contents.json new file mode 100644 index 00000000..2132b788 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_top_loser_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_top_loser_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/room_pk_result_top_loser_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/room_pk_result_top_loser_bg@2x.png new file mode 100644 index 00000000..ffc13e4f Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/room_pk_result_top_loser_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/room_pk_result_top_loser_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/room_pk_result_top_loser_bg@3x.png new file mode 100644 index 00000000..e5326e95 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_loser_bg.imageset/room_pk_result_top_loser_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/Contents.json new file mode 100644 index 00000000..2404e55b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_top_win_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_top_win_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/room_pk_result_top_win_bg@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/room_pk_result_top_win_bg@2x.png new file mode 100644 index 00000000..d9e88e30 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/room_pk_result_top_win_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/room_pk_result_top_win_bg@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/room_pk_result_top_win_bg@3x.png new file mode 100644 index 00000000..430e3378 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_top_win_bg.imageset/room_pk_result_top_win_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/Contents.json new file mode 100644 index 00000000..15f0c7e2 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_pk_result_user_mvp@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_pk_result_user_mvp@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/room_pk_result_user_mvp@2x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/room_pk_result_user_mvp@2x.png new file mode 100644 index 00000000..b0bf2912 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/room_pk_result_user_mvp@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/room_pk_result_user_mvp@3x.png b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/room_pk_result_user_mvp@3x.png new file mode 100644 index 00000000..c08f2153 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_result_user_mvp.imageset/room_pk_result_user_mvp@3x.png differ diff --git a/xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRomPKResultTitleLabel.h b/xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRomPKResultTitleLabel.h new file mode 100644 index 00000000..10d696e5 --- /dev/null +++ b/xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRomPKResultTitleLabel.h @@ -0,0 +1,21 @@ +// +// XPRomPKResultTitleLabel.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/31. +// + +#import +#import "XPEnum.h" +NS_ASSUME_NONNULL_BEGIN + +@interface XPRomPKResultTitleLabel : UIView +///类型 +@property (nonatomic,assign) GroupType groupType; +///显示标题 +@property (nonatomic,copy) NSString *title; +///显示内容 +@property (nonatomic,copy) NSString *content; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRomPKResultTitleLabel.m b/xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRomPKResultTitleLabel.m new file mode 100644 index 00000000..8aebd47e --- /dev/null +++ b/xplan-ios/Main/Room/View/RoomPK/View/SubViews/XPRomPKResultTitleLabel.m @@ -0,0 +1,92 @@ +// +// XPRomPKResultTitleLabel.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/31. +// + +#import "XPRomPKResultTitleLabel.h" +///Third +#import +#import "ThemeColor.h" + +@interface XPRomPKResultTitleLabel () +///显示标题 +@property (nonatomic,strong) UILabel *titleLabel; +///显示内容 +@property (nonatomic,strong) UILabel *contentLabel; +@end + +@implementation XPRomPKResultTitleLabel + +- (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.titleLabel]; + [self addSubview:self.contentLabel]; +} + +- (void)initSubViewConstraints { + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self); + make.centerY.mas_equalTo(self); + }]; + + [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.titleLabel.mas_right).offset(10); + make.centerY.mas_equalTo(self.titleLabel); + }]; +} + +#pragma mark - Getters And Setters +- (void)setGroupType:(GroupType)groupType { + _groupType = groupType; + if (_groupType == GroupTyp_Red) { + self.contentLabel.textColor = UIColorFromRGB(0xfd4d0e); + } else if(_groupType == GroupType_Blue) { + self.contentLabel.textColor = UIColorFromRGB(0x59b9fb); + } +} + +- (void)setContent:(NSString *)content { + _content = content; + if (_content) { + self.contentLabel.text = _content; + } +} + +- (void)setTitle:(NSString *)title { + _title = title; + if (_title) { + self.titleLabel.text = _title; + } +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.font = [UIFont systemFontOfSize:14]; + _titleLabel.textColor = [UIColor whiteColor]; + } + return _titleLabel; +} + +- (UILabel *)contentLabel { + if (!_contentLabel) { + _contentLabel = [[UILabel alloc] init]; + _contentLabel.font = [UIFont systemFontOfSize:14]; + } + return _contentLabel; +} + + +@end diff --git a/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKProgressView.m b/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKProgressView.m index bf96c953..52d01e13 100644 --- a/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKProgressView.m +++ b/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKProgressView.m @@ -31,6 +31,7 @@ #import "XPRoomPKSelectUserView.h" #import "XPRoomPKPlayingView.h" #import "XPRoomPKPlayingView.h" +#import "XPRoomPKResultView.h" @interface XPRoomPKProgressView () ///背景 @@ -99,16 +100,20 @@ - (void)handleRoomPKCustomMessage:(AttachmentModel *)attachment { if (attachment.second == Custom_Message_Sub_Room_PK_Start) { RoomPKInfoModel * pkInfo = [RoomPKInfoModel modelWithDictionary:attachment.data]; - self.pkDetailInfo.roomPK = pkInfo;; + self.pkDetailInfo.roomPK = pkInfo; + self.beginButton.hidden = YES; [self startRoomPKCountDown:pkInfo.duration]; [self handleRoomPKInfoChangeState]; }else if (attachment.second == Custom_Message_Sub_Room_PK_Mode_Open){ RoomPKInfoModel * pkInfo = [RoomPKInfoModel modelWithDictionary:attachment.data]; self.pkDetailInfo.roomPK = pkInfo; + [self handleRoomPKInfoChangeState]; } else if(attachment.second == Custom_Message_Sub_Room_PK_Re_Start) { RoomPKInfoModel * pkInfo = [RoomPKInfoModel modelWithDictionary:attachment.data]; self.pkDetailInfo.roomPK = pkInfo; + [self handleRoomPKInfoChangeState]; } else if(attachment.second == Custom_Message_Sub_Room_PK_Result) { + [TTPopup dismiss]; RoomPKInfoModel * pkInfo = [RoomPKInfoModel modelWithDictionary:attachment.data]; self.isReceivePKResult = YES; @@ -121,8 +126,15 @@ [self clearRoomPKTeamData]; self.pkDetailInfo.roomPK = pkInfo; [self resetRoomPKGroupType]; + } } + if (pkInfo.pkStatus == RoomPKStatusType_End) { + XPRoomPKResultView * result = [[XPRoomPKResultView alloc] init]; + result.roomPKResultInfoModel = pkInfo; + [TTPopup popupView:result style:TTPopupStyleAlert]; + } + [self handleRoomPKInfoChangeState]; } else if(attachment.second == Custom_Message_Sub_Room_PK_Mode_Close) { [self stopRoomPKCountDown]; [self clearRoomPKTeamData]; @@ -553,12 +565,12 @@ if (self.pkDetailInfo) { switch (_pkDetailInfo.roomPK.pkStatus) { case RoomPKStatusType_End: - + self.beginButton.hidden = self.isManager ? NO : YES; break; case RoomPKStatusType_Playing: { [TTPopup dismiss]; - self.beginButton.hidden = self.isManager ? NO : YES; + self.beginButton.hidden = YES; self.roomPKPlayingView.pkDetailInfo = self.pkDetailInfo; self.roomPKPlayingView.redChooseArray = self.redChooseArray; self.roomPKPlayingView.blueChooseArray = self.blueChooseArray; @@ -567,7 +579,7 @@ } break; case RoomPKStatusType_ReStart: - + self.beginButton.hidden = self.isManager ? NO : YES; break; default: diff --git a/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKResultView.h b/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKResultView.h new file mode 100644 index 00000000..9e86b122 --- /dev/null +++ b/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKResultView.h @@ -0,0 +1,16 @@ +// +// XPRoomPKResultView.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/31. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class RoomPKInfoModel; +@interface XPRoomPKResultView : UIView +@property (nonatomic,strong) RoomPKInfoModel *roomPKResultInfoModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKResultView.m b/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKResultView.m new file mode 100644 index 00000000..dbecdbdf --- /dev/null +++ b/xplan-ios/Main/Room/View/RoomPK/View/XPRoomPKResultView.m @@ -0,0 +1,774 @@ +// +// XPRoomPKResultView.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/31. +// + +#import "XPRoomPKResultView.h" +///Third +#import +///Tool +#import "XPMacro.h" +#import "NetImageView.h" +#import "AccountInfoStorage.h" +#import "ThemeColor.h" +///Model +#import "RoomPKInfoModel.h" +///View +#import "XPRomPKResultTitleLabel.h" + +#define kRedTeamColor UIColorFromRGB(0xfd4d0e) +#define kBlueTeamColor UIColorFromRGB(0x59b9fb) + + +@interface XPRoomPKResultView () +/// +@property (nonatomic,strong) UIImageView *topImageView; +/// +@property (nonatomic,strong) UIImageView *bottomImageView; +///背景 +@property (nonatomic,strong) UIImageView *contentImageView; +///第一个人 +@property (nonatomic,strong) NetImageView *firstUserView; +///第二个人 +@property (nonatomic,strong) NetImageView *secondUserView; +///第三个人 +@property (nonatomic,strong) NetImageView *thirdUserView; +///第四个人 +@property (nonatomic,strong) NetImageView *fourthUserView; +///第五个人 +@property (nonatomic,strong) NetImageView *fifthUserView; +///是否是MVP +@property (nonatomic,strong) UIImageView *mvpImageView; +///容器 +@property (nonatomic,strong) UIStackView *stackView; +///选手的容器 +@property (nonatomic,strong) UIView * pkUserContaierView; +///PK选手 +@property (nonatomic,strong) UILabel *pkUserLabel; +///战斗值 +@property (nonatomic,strong) XPRomPKResultTitleLabel *fightScoreLable; +///守护者 +@property (nonatomic,strong) XPRomPKResultTitleLabel *guardPersonLable; +///守护值 +@property (nonatomic,strong) XPRomPKResultTitleLabel *guardScoreLable; +///红队后者蓝队战绩 +@property (nonatomic,strong) UIButton *resultButton; +///查看对方的战绩 +@property (nonatomic,strong) UIButton *checkButton; +///存放用户的数组 +@property (nonatomic,strong) NSArray *userViewArray; +///查看其他的 +@property (nonatomic,assign) BOOL isChecOther; +@end + +@implementation XPRoomPKResultView + +- (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.contentImageView]; + [self addSubview:self.topImageView]; + [self addSubview:self.bottomImageView]; + + [self.contentImageView addSubview:self.stackView]; + [self.contentImageView addSubview:self.resultButton]; + [self.contentImageView addSubview:self.checkButton]; + + [self.stackView addArrangedSubview:self.pkUserContaierView]; + [self.stackView addArrangedSubview:self.fightScoreLable]; + [self.stackView addArrangedSubview:self.guardPersonLable]; + [self.stackView addArrangedSubview:self.guardScoreLable]; + + [self.pkUserContaierView addSubview:self.pkUserLabel]; + [self.pkUserContaierView addSubview:self.firstUserView]; + [self.pkUserContaierView addSubview:self.secondUserView]; + [self.pkUserContaierView addSubview:self.thirdUserView]; + [self.pkUserContaierView addSubview:self.fourthUserView]; + [self.pkUserContaierView addSubview:self.fifthUserView]; + [self.pkUserContaierView addSubview:self.mvpImageView]; + self.userViewArray = @[self.firstUserView, self.secondUserView, self.thirdUserView, self.fourthUserView, self.fifthUserView]; +} + +- (void)initSubViewConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(KScreenWidth); + make.bottom.mas_equalTo(self.bottomImageView.mas_bottom); + }]; + + [self.topImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.top.mas_equalTo(self); + make.width.mas_equalTo(375); + make.height.mas_equalTo(243); + }]; + + [self.contentImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.topImageView).offset(97); + make.left.right.mas_equalTo(self); + make.height.mas_equalTo(170); // 根据类型变化 + }]; + + [self.bottomImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.contentImageView.mas_bottom).offset(-6); + make.centerX.mas_equalTo(self); + make.width.mas_equalTo(375); + make.height.mas_equalTo(16); + }]; + + [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.contentImageView).offset(48); + make.left.mas_equalTo(self.contentImageView).offset(20); + make.right.mas_equalTo(self.contentImageView); + }]; + + [self.pkUserContaierView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(35); + }]; + + [self.fightScoreLable mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(15); + }]; + + [self.guardScoreLable mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(15); + }]; + + [self.guardPersonLable mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(15); + }]; + + [self.resultButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.bottom.mas_equalTo(self.checkButton.mas_top).offset(-10); + make.width.mas_equalTo(230); + make.height.mas_equalTo(30); + }]; + + [self.checkButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(16); + make.left.right.mas_equalTo(self.contentImageView); + make.bottom.mas_equalTo(self.contentImageView.mas_bottom).offset(-15); + }]; + + [self.pkUserLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.centerY.mas_equalTo(self.pkUserContaierView); + }]; + + [self.firstUserView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(35, 35)); + make.left.mas_equalTo(self.pkUserLabel.mas_right).offset(10); + make.centerY.mas_equalTo(self.pkUserContaierView); + }]; + + [self.secondUserView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstUserView); + make.left.mas_equalTo(self.firstUserView.mas_right).offset(5); + }]; + + [self.thirdUserView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstUserView); + make.left.mas_equalTo(self.secondUserView.mas_right).offset(5); + }]; + + [self.fourthUserView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstUserView); + make.left.mas_equalTo(self.thirdUserView.mas_right).offset(5); + }]; + + [self.fifthUserView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstUserView); + make.left.mas_equalTo(self.fourthUserView.mas_right).offset(5); + }]; + + [self.mvpImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.firstUserView); + make.top.mas_equalTo(self.firstUserView.mas_top).offset(-3); + make.width.mas_equalTo(35); + make.height.mas_equalTo(17); + }]; +} + +- (void)loadTeamMemberUserAvatar:(NSArray *)members mvpUserId:(NSInteger)mvpUserId{ + self.mvpImageView.hidden = YES; + for (int i = 0; i< self.userViewArray.count; i++) { + NetImageView * imageView = [self.userViewArray objectAtIndex:i]; + if (i < members.count) { + RoomPKTeamUserModel * userInfo = [members objectAtIndex:i]; + imageView.imageUrl = userInfo.avatar; + imageView.hidden = NO; + if (mvpUserId == userInfo.uid.integerValue) { + self.mvpImageView.hidden = NO; + [self.mvpImageView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(imageView); + make.top.mas_equalTo(self.firstUserView.mas_top).offset(3); + make.width.mas_equalTo(35); + make.height.mas_equalTo(17); + }]; + } + } else { + imageView.hidden = YES; + } + } +} + +#pragma mark - Event Response +- (void)checkButtonAction:(UIButton *)sender { + self.isChecOther = !self.isChecOther; + if (self.roomPKResultInfoModel) { + RoomPKTeamModel * redTeam; + RoomPKTeamModel * blueTeam; + GroupType myType = GroupType_default; + for (RoomPKTeamModel * teamInfo in _roomPKResultInfoModel.teams) { + if (myType == GroupType_default) { + for (RoomPKTeamUserModel * userInfo in teamInfo.teamMembers) { + if (userInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) { + myType = teamInfo.team; + break; + } + } + } + + if (teamInfo.team == GroupTyp_Red) { + redTeam = teamInfo; + } else if(teamInfo.team == GroupType_Blue) { + blueTeam = teamInfo; + } + } + if (myType == GroupTyp_Red) {///我是红队的 + [self handleMyInRedPKTeam:redTeam bluePKTeam:blueTeam]; + } else if(myType == GroupType_Blue) {///我是蓝队的 + [self handleMyInBluePKTeam:redTeam bluePKTeam:blueTeam]; + } else { + [self handleMyInAudiencePKTeam:redTeam bluePKTeam:blueTeam]; + } + } +} + +#pragma mark - Getters And Setters +- (void)setRoomPKResultInfoModel:(RoomPKInfoModel *)roomPKResultInfoModel { + _roomPKResultInfoModel = roomPKResultInfoModel; + if (_roomPKResultInfoModel) { + RoomPKTeamModel * redTeam; + RoomPKTeamModel * blueTeam; + GroupType myType = GroupType_default; + for (RoomPKTeamModel * teamInfo in _roomPKResultInfoModel.teams) { + if (teamInfo.team == GroupTyp_Red) { + redTeam = teamInfo; + } else if(teamInfo.team == GroupType_Blue) { + blueTeam = teamInfo; + } + + if (myType == GroupType_default) { + for (RoomPKTeamUserModel * userInfo in teamInfo.teamMembers) { + if (userInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) { + myType = teamInfo.team; + break; + } + } + } + } + if (myType == GroupTyp_Red) {///我是红队的 + [self handleMyInRedPKTeam:redTeam bluePKTeam:blueTeam]; + } else if(myType == GroupType_Blue) {///我是蓝队的 + [self handleMyInBluePKTeam:redTeam bluePKTeam:blueTeam]; + } else { + [self handleMyInAudiencePKTeam:redTeam bluePKTeam:blueTeam]; + } + } +} + +// 自己是红队时布局 +- (void)handleMyInRedPKTeam:(RoomPKTeamModel *)redPKTeam bluePKTeam:(RoomPKTeamModel *)bluePKTeam { + if (self.isChecOther) { // 查看对方战绩 + + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw) { // win + // 看到的是 平局 + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_draw_bg"]; + } else if(self.roomPKResultInfoModel.result == RoomPKResultType_Blue) { // loser + // 看到的是 蓝队 win + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_win_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_win_bg"]; + } else { + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_loser_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + } + + [self.resultButton setTitle:@"· 蓝队战绩 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + self.fightScoreLable.groupType = GroupType_Blue; + self.guardScoreLable.groupType = GroupType_Blue; + self.guardPersonLable.groupType = GroupType_Blue; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.score]; + if (bluePKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", bluePKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.protecScore]; + [self loadTeamMemberUserAvatar:bluePKTeam.teamMembers mvpUserId:bluePKTeam.mvp]; + CGFloat bgHeight = 224; + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw || self.roomPKResultInfoModel.voteMode == RoomPKVoteModeType_NumberPerson) { + self.guardScoreLable.hidden = YES; + self.guardPersonLable.hidden = YES; + } else { + self.guardScoreLable.hidden = NO; + self.guardPersonLable.hidden = NO; + bgHeight = 264; + } + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(bgHeight); // 根据类型变化 + }]; + + return; + } + + if (self.roomPKResultInfoModel.result == RoomPKResultType_Red) { // win + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_win_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_win_bg"]; + [self.resultButton setTitle:@"· 您胜利了 ·" forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看蓝队战绩>" forState:UIControlStateNormal]; + } else if (self.roomPKResultInfoModel.result == RoomPKResultType_Blue) { // loser + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_loser_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + [self.resultButton setTitle:@"· 您失败了 ·" forState:UIControlStateNormal]; + } else { // 平局 + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_draw_bg"]; + [self.resultButton setTitle:@"· 势均力敌 ·" forState:UIControlStateNormal]; + } + [self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + self.fightScoreLable.groupType = GroupTyp_Red; + self.guardScoreLable.groupType = GroupTyp_Red; + self.guardPersonLable.groupType = GroupTyp_Red; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score]; + if (redPKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.protecScore]; + [self loadTeamMemberUserAvatar:redPKTeam.teamMembers mvpUserId:redPKTeam.mvp]; + + CGFloat bgHeight = 224; + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw || self.roomPKResultInfoModel.voteMode == RoomPKVoteModeType_NumberPerson) { + self.guardScoreLable.hidden = YES; + self.guardPersonLable.hidden = YES; + } else { + self.guardScoreLable.hidden = NO; + self.guardPersonLable.hidden = NO; + bgHeight = 264; + } + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(bgHeight); // 根据类型变化 + }]; +} + +// 自己是蓝队时布局 +- (void)handleMyInBluePKTeam:(RoomPKTeamModel *)redPKTeam bluePKTeam:(RoomPKTeamModel *)bluePKTeam { + if (self.isChecOther) { // 查看对方战绩 + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw) { // win + // 看到的是 平局 + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_draw_bg"]; + } else if(self.roomPKResultInfoModel.result == RoomPKResultType_Blue) { // loser + // 看到的是 蓝队 win + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_loser_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + } else { + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_win_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_win_bg"]; + } + + [self.resultButton setTitle:@"· 红队战绩 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + self.fightScoreLable.groupType = GroupTyp_Red; + self.guardScoreLable.groupType = GroupTyp_Red; + self.guardPersonLable.groupType = GroupTyp_Red; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score]; + if (redPKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.protecScore]; + [self loadTeamMemberUserAvatar:redPKTeam.teamMembers mvpUserId:redPKTeam.mvp]; + CGFloat bgHeight = 224; + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw || self.roomPKResultInfoModel.voteMode == RoomPKVoteModeType_NumberPerson) { + self.guardScoreLable.hidden = YES; + self.guardPersonLable.hidden = YES; + } else { + self.guardScoreLable.hidden = NO; + self.guardPersonLable.hidden = NO; + bgHeight = 264; + } + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(bgHeight); // 根据类型变化 + }]; + return; + } + + if (self.roomPKResultInfoModel.result == RoomPKResultType_Blue) { // win + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_win_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_win_bg"]; + [self.resultButton setTitle:@"· 您胜利啦! ·" forState:UIControlStateNormal]; + } else if (self.roomPKResultInfoModel.result == RoomPKResultType_Red) { // loser + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_loser_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + [self.resultButton setTitle:@"· 你失败啦! ·" forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看红队战绩>" forState:UIControlStateNormal]; + } else { // 平局 + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_draw_bg"]; + [self.resultButton setTitle:@"· 势均力敌 ·" forState:UIControlStateNormal]; + } + + [self.resultButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看红队战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + + self.fightScoreLable.groupType = GroupType_Blue; + self.guardScoreLable.groupType = GroupType_Blue; + self.guardPersonLable.groupType = GroupType_Blue; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.score]; + if (bluePKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", bluePKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.protecScore]; + [self loadTeamMemberUserAvatar:bluePKTeam.teamMembers mvpUserId:bluePKTeam.mvp]; + CGFloat bgHeight = 204; + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw || self.roomPKResultInfoModel.voteMode == RoomPKVoteModeType_NumberPerson) { + self.guardScoreLable.hidden = YES; + self.guardPersonLable.hidden = YES; + } else { + self.guardScoreLable.hidden = NO; + self.guardPersonLable.hidden = NO; + bgHeight = 264; + } + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(bgHeight); // 根据类型变化 + }]; +} + +// 观众时的布局 +- (void)handleMyInAudiencePKTeam:(RoomPKTeamModel *)redPKTeam bluePKTeam:(RoomPKTeamModel *)bluePKTeam { + // 观众弹的是胜利方, 点击查看其它的则是查看失败方, 平局没有查看对方的情况 + if (self.isChecOther) { // 查看失败方战绩 + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_loser_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + if (self.roomPKResultInfoModel.result == RoomPKResultType_Blue) { + [self.resultButton setTitle:@"· 红队战绩 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + self.fightScoreLable.groupType = GroupTyp_Red; + self.guardScoreLable.groupType = GroupTyp_Red; + self.guardPersonLable.groupType = GroupTyp_Red; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score]; + if (redPKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.protecScore]; + } else { + [self.resultButton setTitle:@"· 蓝队战绩 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + self.fightScoreLable.groupType = GroupType_Blue; + self.guardScoreLable.groupType = GroupType_Blue; + self.guardPersonLable.groupType = GroupType_Blue; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.score]; + if (bluePKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", bluePKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.protecScore]; + } + CGFloat bgHeight = 204; + if (self.roomPKResultInfoModel.voteMode == RoomPKVoteModeType_GiftValue) { + self.guardScoreLable.hidden = NO; + self.guardPersonLable.hidden = NO; + bgHeight = 264; + } else { // RoomPKVoteModeType_NumberPerson + self.guardScoreLable.hidden = YES; + self.guardPersonLable.hidden = YES; + bgHeight = 204; + } + + [self loadTeamMemberUserAvatar:bluePKTeam.teamMembers mvpUserId:bluePKTeam.mvp]; + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(bgHeight); // 根据类型变化 + }]; + return; // 返回 + } + + // 弹胜利方的框 + if (self.roomPKResultInfoModel.result == RoomPKResultType_Blue) { // win + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_win_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_win_bg"]; + [self.resultButton setTitle:@"· 蓝队胜利 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看红队战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + + self.fightScoreLable.groupType = GroupType_Blue; + self.guardScoreLable.groupType = GroupType_Blue; + self.guardPersonLable.groupType = GroupType_Blue; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.score]; + if (bluePKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", bluePKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", bluePKTeam.protecScore]; + [self loadTeamMemberUserAvatar:bluePKTeam.teamMembers mvpUserId:bluePKTeam.mvp]; + } else if (self.roomPKResultInfoModel.result == RoomPKResultType_Red) { // loser + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_loser_bg"]; + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + [self.resultButton setTitle:@"· 红队胜利 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看蓝队战绩>" forState:UIControlStateNormal]; + [self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal]; + + self.fightScoreLable.groupType = GroupTyp_Red; + self.guardScoreLable.groupType = GroupTyp_Red; + self.guardPersonLable.groupType = GroupTyp_Red; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score]; + if (redPKTeam.protector.nick.length) { + self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick]; + } else { + self.guardPersonLable.content = @"无"; + } + self.guardScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.protecScore]; + [self loadTeamMemberUserAvatar:redPKTeam.teamMembers mvpUserId:redPKTeam.mvp]; + } else { // 平局 + self.bottomImageView.image = [UIImage imageNamed:@"room_pk_result_bottom_loser_bg"]; + self.topImageView.image = [UIImage imageNamed:@"room_pk_result_top_draw_bg"]; + [self.resultButton setTitle:@"· 势均力敌 ·" forState:UIControlStateNormal]; + [self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal]; + self.checkButton.hidden = YES; + self.fightScoreLable.groupType = GroupTyp_Red; + self.pkUserContaierView.hidden = YES; + self.fightScoreLable.content = @"本局平局 战斗值"; + self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score]; + [self loadTeamMemberUserAvatar:redPKTeam.teamMembers mvpUserId:redPKTeam.mvp]; + } + + CGFloat bgHeight = 200; + if (self.roomPKResultInfoModel.result == RoomPKResultType_Draw || self.roomPKResultInfoModel.voteMode == RoomPKVoteModeType_NumberPerson) { + self.guardScoreLable.hidden = YES; + self.guardPersonLable.hidden = YES; + } else { + self.guardScoreLable.hidden = NO; + self.guardPersonLable.hidden = NO; + bgHeight = 264; + } + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(bgHeight); // 根据类型变化 + }]; +} + +- (UIImageView *)topImageView { + if (!_topImageView) { + _topImageView = [[UIImageView alloc] init]; + _topImageView.userInteractionEnabled = YES; + } + return _topImageView; +} + +- (UIImageView *)contentImageView { + if (!_contentImageView) { + _contentImageView = [[UIImageView alloc] init]; + _contentImageView.userInteractionEnabled = YES; + _contentImageView.image = [UIImage imageNamed:@"room_pk_result_content_bg"]; + } + return _contentImageView; +} + +- (UIImageView *)bottomImageView { + if (!_bottomImageView) { + _bottomImageView = [[UIImageView alloc] init]; + _bottomImageView.userInteractionEnabled = YES; + } + return _bottomImageView; +} + +- (UIStackView *)stackView { + if (!_stackView) { + _stackView = [[UIStackView alloc] init]; + _stackView.axis = UILayoutConstraintAxisVertical; + _stackView.distribution = UIStackViewDistributionFill; + _stackView.alignment = UIStackViewAlignmentFill; + _stackView.spacing = 10; + } + return _stackView; +} + +- (UIView *)pkUserContaierView { + if (!_pkUserContaierView) { + _pkUserContaierView = [[UIView alloc] init]; + _pkUserContaierView.backgroundColor = [UIColor clearColor]; + } + return _pkUserContaierView; +} + +- (UILabel *)pkUserLabel { + if (!_pkUserLabel) { + _pkUserLabel = [[UILabel alloc] init]; + _pkUserLabel.font = [UIFont systemFontOfSize:14]; + _pkUserLabel.textColor = [UIColor whiteColor]; + _pkUserLabel.text = @"PK选手:"; + } + return _pkUserLabel; +} + +- (XPRomPKResultTitleLabel *)fightScoreLable { + if (!_fightScoreLable) { + _fightScoreLable = [[XPRomPKResultTitleLabel alloc] init]; + _fightScoreLable.title = @"战斗值:"; + } + return _fightScoreLable; +} + +- (XPRomPKResultTitleLabel *)guardPersonLable { + if (!_guardPersonLable) { + _guardPersonLable = [[XPRomPKResultTitleLabel alloc] init]; + _guardPersonLable.title = @"守护者:"; + } + return _guardPersonLable; +} + +- (XPRomPKResultTitleLabel *)guardScoreLable { + if (!_guardScoreLable) { + _guardScoreLable = [[XPRomPKResultTitleLabel alloc] init]; + _guardScoreLable.title = @"守护值:"; + } + return _guardScoreLable; +} + +- (UIButton *)resultButton { + if (!_resultButton) { + _resultButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_resultButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _resultButton.titleLabel.font = [UIFont systemFontOfSize:16]; + [_resultButton setBackgroundImage:[UIImage imageNamed:@"room_pk_result_loser_result_bg"] forState:UIControlStateNormal]; + } + return _resultButton; +} + +- (UIButton *)checkButton { + if (!_checkButton) { + _checkButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_checkButton setTitle:@"查看对方战绩" forState:UIControlStateNormal]; + [_checkButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _checkButton.titleLabel.font = [UIFont systemFontOfSize:15]; + _checkButton.layer.masksToBounds = YES; + _checkButton.layer.cornerRadius = 10; + [_checkButton addTarget:self action:@selector(checkButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _checkButton; +} + +- (NetImageView *)firstUserView { + if (!_firstUserView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _firstUserView = [[NetImageView alloc] initWithConfig:config]; + _firstUserView.layer.masksToBounds = YES; + _firstUserView.layer.cornerRadius = 35/2; + _firstUserView.layer.borderWidth = 1; + _firstUserView.userInteractionEnabled = YES; + } + return _firstUserView; +} + +- (NetImageView *)secondUserView { + if (!_secondUserView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _secondUserView = [[NetImageView alloc] initWithConfig:config]; + _secondUserView.layer.masksToBounds = YES; + _secondUserView.layer.cornerRadius = 35/2; + _secondUserView.layer.borderWidth = 1; + _secondUserView.userInteractionEnabled = YES; + } + return _secondUserView; +} + + +- (NetImageView *)thirdUserView { + if (!_thirdUserView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _thirdUserView = [[NetImageView alloc] initWithConfig:config]; + _thirdUserView.layer.masksToBounds = YES; + _thirdUserView.layer.cornerRadius = 35/2; + _thirdUserView.layer.borderWidth = 1; + _thirdUserView.userInteractionEnabled = YES; + } + return _thirdUserView; +} + +- (NetImageView *)fourthUserView { + if (!_fourthUserView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _fourthUserView = [[NetImageView alloc] initWithConfig:config]; + _fourthUserView.layer.masksToBounds = YES; + _fourthUserView.layer.cornerRadius = 35/2; + _fourthUserView.layer.borderWidth = 1; + _fourthUserView.userInteractionEnabled = YES; + } + return _fourthUserView; +} + +- (NetImageView *)fifthUserView { + if (!_fifthUserView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _fifthUserView = [[NetImageView alloc] initWithConfig:config]; + _fifthUserView.layer.masksToBounds = YES; + _fifthUserView.layer.cornerRadius = 35/2; + _fifthUserView.layer.borderWidth = 1; + _fifthUserView.userInteractionEnabled = YES; + } + return _fifthUserView; +} + +- (UIImageView *)mvpImageView { + if (!_mvpImageView) { + _mvpImageView = [[UIImageView alloc] init]; + _mvpImageView.userInteractionEnabled = YES; + _mvpImageView.image = [UIImage imageNamed:@"room_pk_result_user_mvp"]; + _mvpImageView.hidden = YES; + } + return _mvpImageView; +} + + + +@end