開黑點單 & Bug fix
This commit is contained in:
@@ -535,6 +535,14 @@
|
||||
54C3895F2C2189DD00FD47B1 /* XPHomeMinePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C3895E2C2189DD00FD47B1 /* XPHomeMinePresenter.m */; };
|
||||
54C389622C23BD1600FD47B1 /* HomeRankAvatarModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C389612C23BD1600FD47B1 /* HomeRankAvatarModel.m */; };
|
||||
54C389672C24464600FD47B1 /* HomeMineRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C389662C24464600FD47B1 /* HomeMineRoomModel.m */; };
|
||||
54C9A10D2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A10C2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.m */; };
|
||||
54C9A1102C3D3E1700C6D970 /* XPMineGameMateOrderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A10F2C3D3E1700C6D970 /* XPMineGameMateOrderView.m */; };
|
||||
54C9A1132C3D5A2300C6D970 /* XPGameOrdersListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1122C3D5A2300C6D970 /* XPGameOrdersListViewController.m */; };
|
||||
54C9A1162C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1152C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.m */; };
|
||||
54C9A11C2C3D9EDD00C6D970 /* Api+GameOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A11B2C3D9EDD00C6D970 /* Api+GameOrder.m */; };
|
||||
54C9A11F2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */; };
|
||||
54C9A1222C3E6C3200C6D970 /* MessageGameOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1212C3E6C3200C6D970 /* MessageGameOrderModel.m */; };
|
||||
54C9A1252C3E74AE00C6D970 /* MessageGameOrderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */; };
|
||||
54F469352C29711400A83655 /* XPMomentUserDataViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469342C29711400A83655 /* XPMomentUserDataViewController.m */; };
|
||||
54F469382C29C3B400A83655 /* XPMineAlbumTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469372C29C3B400A83655 /* XPMineAlbumTableViewCell.m */; };
|
||||
54F4693B2C2A984D00A83655 /* MedalModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F4693A2C2A984D00A83655 /* MedalModel.m */; };
|
||||
@@ -2607,6 +2615,22 @@
|
||||
54C389642C24448900FD47B1 /* XPHomeMineProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeMineProtocol.h; sourceTree = "<group>"; };
|
||||
54C389652C24464600FD47B1 /* HomeMineRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeMineRoomModel.h; sourceTree = "<group>"; };
|
||||
54C389662C24464600FD47B1 /* HomeMineRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeMineRoomModel.m; sourceTree = "<group>"; };
|
||||
54C9A10B2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineDataGameMateTableViewCell.h; sourceTree = "<group>"; };
|
||||
54C9A10C2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineDataGameMateTableViewCell.m; sourceTree = "<group>"; };
|
||||
54C9A10E2C3D3E1700C6D970 /* XPMineGameMateOrderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineGameMateOrderView.h; sourceTree = "<group>"; };
|
||||
54C9A10F2C3D3E1700C6D970 /* XPMineGameMateOrderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineGameMateOrderView.m; sourceTree = "<group>"; };
|
||||
54C9A1112C3D5A2300C6D970 /* XPGameOrdersListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGameOrdersListViewController.h; sourceTree = "<group>"; };
|
||||
54C9A1122C3D5A2300C6D970 /* XPGameOrdersListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGameOrdersListViewController.m; sourceTree = "<group>"; };
|
||||
54C9A1142C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGameOrdersListTableViewCell.h; sourceTree = "<group>"; };
|
||||
54C9A1152C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGameOrdersListTableViewCell.m; sourceTree = "<group>"; };
|
||||
54C9A11A2C3D9EDD00C6D970 /* Api+GameOrder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+GameOrder.h"; sourceTree = "<group>"; };
|
||||
54C9A11B2C3D9EDD00C6D970 /* Api+GameOrder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+GameOrder.m"; sourceTree = "<group>"; };
|
||||
54C9A11D2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineGamePartnerInfoModel.h; sourceTree = "<group>"; };
|
||||
54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineGamePartnerInfoModel.m; sourceTree = "<group>"; };
|
||||
54C9A1202C3E6C3200C6D970 /* MessageGameOrderModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageGameOrderModel.h; sourceTree = "<group>"; };
|
||||
54C9A1212C3E6C3200C6D970 /* MessageGameOrderModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageGameOrderModel.m; sourceTree = "<group>"; };
|
||||
54C9A1232C3E74AE00C6D970 /* MessageGameOrderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageGameOrderView.h; sourceTree = "<group>"; };
|
||||
54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageGameOrderView.m; sourceTree = "<group>"; };
|
||||
54F469332C29711400A83655 /* XPMomentUserDataViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentUserDataViewController.h; sourceTree = "<group>"; };
|
||||
54F469342C29711400A83655 /* XPMomentUserDataViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentUserDataViewController.m; sourceTree = "<group>"; };
|
||||
54F469362C29C3B400A83655 /* XPMineAlbumTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAlbumTableViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -5293,6 +5317,8 @@
|
||||
235714762BEC9E5E004C81D6 /* MSSessionContextHeadlinesView.m */,
|
||||
234E50A32BF5E556005CB6D5 /* MessageContentChatHallHeadView.h */,
|
||||
234E50A42BF5E556005CB6D5 /* MessageContentChatHallHeadView.m */,
|
||||
54C9A1232C3E74AE00C6D970 /* MessageGameOrderView.h */,
|
||||
54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */,
|
||||
);
|
||||
path = Content;
|
||||
sourceTree = "<group>";
|
||||
@@ -7567,6 +7593,8 @@
|
||||
235714882BECC38F004C81D6 /* MessageHeadlinesTextModel.m */,
|
||||
235714902BEDC9B1004C81D6 /* MSSessionPublicChatHalImageModel.h */,
|
||||
235714912BEDC9B1004C81D6 /* MSSessionPublicChatHalImageModel.m */,
|
||||
54C9A1202C3E6C3200C6D970 /* MessageGameOrderModel.h */,
|
||||
54C9A1212C3E6C3200C6D970 /* MessageGameOrderModel.m */,
|
||||
);
|
||||
path = SesssionModel;
|
||||
sourceTree = "<group>";
|
||||
@@ -10718,6 +10746,8 @@
|
||||
children = (
|
||||
E8E70D7C26F2F19D00F03460 /* Api+Mine.h */,
|
||||
E8E70D7D26F2F19D00F03460 /* Api+Mine.m */,
|
||||
54C9A11A2C3D9EDD00C6D970 /* Api+GameOrder.h */,
|
||||
54C9A11B2C3D9EDD00C6D970 /* Api+GameOrder.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
@@ -10747,6 +10777,8 @@
|
||||
E8EEB90B26FC5EBC007C6EBA /* XPMineUserInfoEditModel.m */,
|
||||
9B734F74288A92FB00CBDAA9 /* XPMineFuntionItemModel.h */,
|
||||
9B734F75288A92FB00CBDAA9 /* XPMineFuntionItemModel.m */,
|
||||
54C9A11D2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.h */,
|
||||
54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -10766,6 +10798,8 @@
|
||||
E8E70D7F26F2F39000F03460 /* SubViews */,
|
||||
E8E70D7526F2F15100F03460 /* XPMineViewController.h */,
|
||||
E8E70D7626F2F15100F03460 /* XPMineViewController.m */,
|
||||
54C9A1112C3D5A2300C6D970 /* XPGameOrdersListViewController.h */,
|
||||
54C9A1122C3D5A2300C6D970 /* XPGameOrdersListViewController.m */,
|
||||
23CEFB6A2AFB803B00576D89 /* PISwitchingEnvironmentVC.h */,
|
||||
23CEFB6B2AFB803B00576D89 /* PISwitchingEnvironmentVC.m */,
|
||||
23E9EA932A84BE4800B792F2 /* XPGiftUserDataViewController.h */,
|
||||
@@ -10948,6 +10982,8 @@
|
||||
236B2E552AA18E12003967A8 /* XPMIneGameCollectionViewCell.m */,
|
||||
236B2E562AA18E12003967A8 /* XPMineGameTableViewCell.h */,
|
||||
236B2E572AA18E12003967A8 /* XPMineGameTableViewCell.m */,
|
||||
54C9A1142C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.h */,
|
||||
54C9A1152C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
@@ -11016,6 +11052,10 @@
|
||||
E8D34D6628084E88009C4835 /* XPMineUserInfoGiftWallCollectionViewCell.m */,
|
||||
E873EB00280922720071030D /* XPMineUserInfoEmptyCollectionViewCell.h */,
|
||||
E873EB01280922720071030D /* XPMineUserInfoEmptyCollectionViewCell.m */,
|
||||
54C9A10B2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.h */,
|
||||
54C9A10C2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.m */,
|
||||
54C9A10E2C3D3E1700C6D970 /* XPMineGameMateOrderView.h */,
|
||||
54C9A10F2C3D3E1700C6D970 /* XPMineGameMateOrderView.m */,
|
||||
);
|
||||
path = MineInfo;
|
||||
sourceTree = "<group>";
|
||||
@@ -11585,6 +11625,7 @@
|
||||
E8AFF7E3298CA1E500FBDE32 /* SessionSayHelloCountModel.m in Sources */,
|
||||
E8998D7A2859784200C68558 /* XPSVGAPlayer.m in Sources */,
|
||||
23FE47D82BB3CEAF00F09D23 /* PINobleCenterTitleView.m in Sources */,
|
||||
54C9A1252C3E74AE00C6D970 /* MessageGameOrderView.m in Sources */,
|
||||
9BD9A18427A0F128004186FE /* XPMineVisitorItemModel.m in Sources */,
|
||||
E852D73E28631C18001465ED /* XPMonentsCommentTableViewCell.m in Sources */,
|
||||
54F4693B2C2A984D00A83655 /* MedalModel.m in Sources */,
|
||||
@@ -11673,6 +11714,7 @@
|
||||
23CEFC502AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m in Sources */,
|
||||
E87E545429AA05EA00EBE52B /* XPFootPrintNavView.m in Sources */,
|
||||
E8252FEE27687DF1002B3164 /* ActivityInfoModel.m in Sources */,
|
||||
54C9A1222C3E6C3200C6D970 /* MessageGameOrderModel.m in Sources */,
|
||||
E84BF7D1277BFCDD00EF8877 /* RoomTagModel.m in Sources */,
|
||||
E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */,
|
||||
1427218E29A75F6F00C7C423 /* HTTPMessage.m in Sources */,
|
||||
@@ -11712,6 +11754,7 @@
|
||||
E8E20BEC2816A5B90033B688 /* XPMineBlackListViewController.m in Sources */,
|
||||
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */,
|
||||
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */,
|
||||
54C9A11F2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m in Sources */,
|
||||
2331C1B12A60F32D00E1D940 /* XPCandyTreeGiftView.m in Sources */,
|
||||
9B1B72BC28003E06003FACE9 /* XPAnchorPKTableViewCell.m in Sources */,
|
||||
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */,
|
||||
@@ -11808,6 +11851,7 @@
|
||||
E852D7412863249F001465ED /* XPMonentsReplyTableViewCell.m in Sources */,
|
||||
237B94BC2A984DA7007853E3 /* XPTrumpetPresenter.m in Sources */,
|
||||
239D0FFA2C05BE9B002977CE /* MSRoomGameVictoryCell.m in Sources */,
|
||||
54C9A1162C3D5C9000C6D970 /* XPGameOrdersListTableViewCell.m in Sources */,
|
||||
23E9EA942A84BE4800B792F2 /* XPGiftUserDataViewController.m in Sources */,
|
||||
2331C16D2A5EB71000E1D940 /* XPNobleSettingNavView.m in Sources */,
|
||||
E8AEAED6271412EC0017FCE0 /* XPRoomViewController.m in Sources */,
|
||||
@@ -11933,6 +11977,7 @@
|
||||
236B2E492AA07D06003967A8 /* XPCreateLittleGameCollectionViewCell.m in Sources */,
|
||||
2305EF042AD6B11700AD403C /* PIRoomPhotoAlbumChoosePhotoTypeView.m in Sources */,
|
||||
2305EEF02AD677F200AD403C /* PIRoomPhotoAlbumVC.m in Sources */,
|
||||
54C9A1132C3D5A2300C6D970 /* XPGameOrdersListViewController.m in Sources */,
|
||||
14B880E7299A4B62005FCA1B /* XPLoginPhoneViewController.m in Sources */,
|
||||
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
|
||||
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
|
||||
@@ -12300,6 +12345,7 @@
|
||||
E81A6546283519CA00F55894 /* MonentsTopicModel.m in Sources */,
|
||||
E86E79D028A4E0B2006DAF48 /* ContentRistAlertModel.m in Sources */,
|
||||
9BFE0D922899042600F53C24 /* XPTaskCompleteTipView.m in Sources */,
|
||||
54C9A10D2C3D2FD300C6D970 /* XPMineDataGameMateTableViewCell.m in Sources */,
|
||||
23B8D8DE2B860B8800CA472F /* PIHoemCategoryCollectionView.m in Sources */,
|
||||
9BE01AE728938AB600B50299 /* XPDressUpShopCardTableViewCell.m in Sources */,
|
||||
E82E75062828E76400C25EF7 /* XPCoreDataManager.m in Sources */,
|
||||
@@ -12380,6 +12426,7 @@
|
||||
E8998D852859B4FA00C68558 /* XPMineUserInfoGiftView.m in Sources */,
|
||||
23FE47E72BB4378700F09D23 /* PINobleCenterListModel.m in Sources */,
|
||||
186A536B26FC6F2E00D67B2C /* XPShareItemCell.m in Sources */,
|
||||
54C9A11C2C3D9EDD00C6D970 /* Api+GameOrder.m in Sources */,
|
||||
237B94C02A984DA7007853E3 /* Api+RoomTrumpet.m in Sources */,
|
||||
23E45C052AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.m in Sources */,
|
||||
9B42869228C1AED4009034D2 /* XPReceiveRedPacketModel.m in Sources */,
|
||||
@@ -12426,6 +12473,7 @@
|
||||
E81DCCD0282B63FD0039E5C5 /* XPMonentsRecommendViewController.m in Sources */,
|
||||
9B7D804A2753783D003DAC0C /* SessionViewController.m in Sources */,
|
||||
E85E7BA92A4EC99300B6D00A /* XPMineConfirmGiveDiamondView.m in Sources */,
|
||||
54C9A1102C3D3E1700C6D970 /* XPMineGameMateOrderView.m in Sources */,
|
||||
E85E7BA72A4EC99300B6D00A /* XPMineGiveDiamondPasswordView.m in Sources */,
|
||||
2331C1742A5EB71000E1D940 /* XPNobleCenterResidueView.m in Sources */,
|
||||
E80E2377299A47F60013FD40 /* AESUtils.m in Sources */,
|
||||
|
21
YuMi/Assets.xcassets/jm/mine_game_gold_icon.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_gold_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_gold_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_game_gold_icon.imageset/mine_game_gold_icon@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/mine_game_gold_icon.imageset/mine_game_gold_icon@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
21
YuMi/Assets.xcassets/jm/mine_game_order_bg.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_order_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_order_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_game_order_bg.imageset/mine_game_order_bg@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/mine_game_order_bg.imageset/mine_game_order_bg@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 215 KiB |
21
YuMi/Assets.xcassets/jm/mine_game_order_icon.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_order_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_order_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_game_order_icon.imageset/mine_game_order_icon@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/mine_game_order_icon.imageset/mine_game_order_icon@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
21
YuMi/Assets.xcassets/jm/mine_game_order_increase_icon.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_order_increase_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_order_increase_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_game_order_increase_icon.imageset/mine_game_order_increase_icon@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/mine_game_order_increase_icon.imageset/mine_game_order_increase_icon@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
21
YuMi/Assets.xcassets/jm/mine_game_order_line.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_order_line.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_order_line@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_game_order_line.imageset/mine_game_order_line@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/mine_game_order_line.imageset/mine_game_order_line@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 189 B |
21
YuMi/Assets.xcassets/jm/mine_game_order_reduce_icon.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/jm/mine_game_order_reduce_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_game_order_reduce_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_game_order_reduce_icon.imageset/mine_game_order_reduce_icon@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/mine_game_order_reduce_icon.imageset/mine_game_order_reduce_icon@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -14,7 +14,6 @@
|
||||
#import <FBSDKShareKit/FBSDKShareKit.h>
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
///Tool
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "TTPopup.h"
|
||||
#import "XPFirebbaseEvent.h"
|
||||
///View
|
||||
|
@@ -126,6 +126,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
|
||||
CustomMessageType_Chat_Room_Game = 109,
|
||||
///家族新协议
|
||||
CustomMessageType_New_Hall = 110,
|
||||
///游戏陪玩开黑
|
||||
CustomMessageType_Game_Order = 112,
|
||||
};
|
||||
|
||||
|
||||
@@ -686,8 +688,15 @@ typedef NS_ENUM(NSUInteger, CustomMessageTypeNewHall) {
|
||||
Custom_Message_Sub_New_Hall_Remove_Manager = 1106,//移除管理员
|
||||
Custom_Message_Sub_New_Hall_Create = 1107,//加入成员
|
||||
Custom_Message_Sub_New_Hall_Dismiss = 1108,//移除成员
|
||||
|
||||
};
|
||||
|
||||
///开黑邀请
|
||||
//first = 103,
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageTypeGameOrder) {
|
||||
///所有房间
|
||||
Custom_Message_Sub_Game_order = 1121,
|
||||
};
|
||||
|
||||
@interface AttachmentModel : PIBaseModel<NIMCustomAttachment>
|
||||
@property (nonatomic,assign) int first;
|
||||
@property (nonatomic,assign) int second;
|
||||
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessageGameOrderView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "MessageContentCustomView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageGameOrderView : MessageContentCustomView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,183 @@
|
||||
//
|
||||
// MessageGameOrderView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "MessageGameOrderView.h"
|
||||
#import "MessageGameOrderModel.h"
|
||||
|
||||
@interface MessageGameOrderView()
|
||||
|
||||
///当前的消息
|
||||
@property (nonatomic,strong) NIMMessage *message;
|
||||
|
||||
@property (nonatomic, strong) UIView *line;
|
||||
@property (nonatomic, strong) NetImageView *bgImageView;
|
||||
@property (nonatomic, strong) NetImageView *avatarImageView;
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
@property (nonatomic, strong) UILabel *subTitleLabel;
|
||||
@property (nonatomic, strong) UILabel *gameNameLabel;
|
||||
@property (nonatomic, strong) UILabel *roundLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MessageGameOrderView
|
||||
|
||||
- (void)initSubViews {
|
||||
[super initSubViews];
|
||||
|
||||
[self addSubview:self.bgImageView];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.subTitleLabel];
|
||||
|
||||
_line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 92, 0.5)];
|
||||
_line.backgroundColor = UIColorRGBAlpha(0xc1c4db, 0.2);
|
||||
[self addSubview:_line];
|
||||
|
||||
[self addSubview:self.avatarImageView];
|
||||
[self addSubview:self.gameNameLabel];
|
||||
[self addSubview:self.roundLabel];
|
||||
}
|
||||
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[super initSubViewConstraints];
|
||||
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self).insets(UIEdgeInsetsMake(MESSAGE_PADDING, MESSAGE_PADDING, MESSAGE_PADDING, MESSAGE_PADDING));
|
||||
make.top.left.right.mas_equalTo(self);
|
||||
make.height.mas_equalTo(95);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(8);
|
||||
make.left.mas_equalTo(9.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(-9.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(9.5);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(8);
|
||||
make.left.mas_equalTo(9.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(-9.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(9.5);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.subTitleLabel.mas_bottom).offset(4);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(-9.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(9.5);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.line.mas_bottom).offset(4);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(-9.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(9.5);
|
||||
}
|
||||
make.width.height.mas_equalTo(45);
|
||||
}];
|
||||
[self.gameNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.line.mas_bottom).offset(11.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.avatarImageView.mas_left).offset(-5);
|
||||
make.left.mas_equalTo(9.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(5);
|
||||
make.right.mas_equalTo(-9.5);
|
||||
}
|
||||
}];
|
||||
[self.roundLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.gameNameLabel.mas_bottom).offset(7);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.avatarImageView.mas_left).offset(-5);
|
||||
make.left.mas_equalTo(9.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(5);
|
||||
make.right.mas_equalTo(-9.5);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)render:(nonnull MessageGameOrderModel *)model {
|
||||
self.message = model.message;
|
||||
|
||||
self.bgImageView.imageUrl = model.bgURLPath;
|
||||
self.avatarImageView.imageUrl = model.logoURLPath;
|
||||
self.gameNameLabel.text = model.title;
|
||||
self.roundLabel.text = [NSString stringWithFormat:@"%ld局", (long)model.round];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (NetImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
_bgImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_bgImageView.layer.masksToBounds = YES;
|
||||
_bgImageView.layer.cornerRadius = 8;
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 8;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel labelInitWithText:@"開黑邀請"
|
||||
font:kFontMedium(12)
|
||||
textColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)subTitleLabel {
|
||||
if (!_subTitleLabel) {
|
||||
_subTitleLabel = [UILabel labelInitWithText:@"和我一起玩遊戲吧~"
|
||||
font:kFontMedium(11)
|
||||
textColor:[UIColor colorWithWhite:1 alpha:0.6]];;
|
||||
}
|
||||
return _subTitleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)gameNameLabel {
|
||||
if (!_gameNameLabel) {
|
||||
_gameNameLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(13)
|
||||
textColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _gameNameLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)roundLabel {
|
||||
if (!_roundLabel) {
|
||||
_roundLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(11)
|
||||
textColor:[UIColor colorWithWhite:1 alpha:0.6]];
|
||||
}
|
||||
return _roundLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// MessageGameOrderModel.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "MessageBaseModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageGameOrderModel : MessageBaseModel
|
||||
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
@property (nonatomic, copy) NSString *bgURLPath;
|
||||
@property (nonatomic, copy) NSString *logoURLPath;
|
||||
@property (nonatomic, assign) NSInteger round;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// MessageGameOrderModel.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "MessageGameOrderModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
|
||||
@implementation MessageGameOrderModel
|
||||
|
||||
- (instancetype)initWithMessage:(NIMMessage *)message {
|
||||
if (self = [super init]) {
|
||||
self.message = message;
|
||||
self.isHiddenAvatar = NO;
|
||||
self.messageType = SessionMessageType_Custom;
|
||||
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
NSDictionary *gameInfos = (NSDictionary *)attachment.data;
|
||||
|
||||
self.title = [gameInfos objectForKey:@"gameName"];
|
||||
self.round = [[gameInfos objectForKey:@"inning"] integerValue];
|
||||
self.bgURLPath = [gameInfos objectForKey:@"gamePic"];
|
||||
self.logoURLPath = [gameInfos objectForKey:@"gameLogo"];
|
||||
|
||||
self.height = 98;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)cellContent:(MessageBaseModel *)model {
|
||||
return @"MessageGameOrderView";
|
||||
}
|
||||
|
||||
@end
|
@@ -78,6 +78,7 @@
|
||||
#import "MessagePresenter.h"
|
||||
#import "MessageProtocol.h"
|
||||
#import "Api+Message.h"
|
||||
#import "MessageGameOrderModel.h"
|
||||
|
||||
@interface SessionViewController ()<MessageProtocol, UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate, MessageCellDelegate, TZImagePickerControllerDelegate, SessionNavViewDelegate, SessionRiskViewDelegate,QInputBarViewDelegate, QInputBarViewDataSource,InputBoardDataSource ,InputBoardDelegate , QEmotionBoardViewDelegate, QinputPhotoViewDelegate, SessionUserInfoTableViewCellDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>
|
||||
|
||||
@@ -201,15 +202,7 @@
|
||||
|
||||
#pragma mark - 提前加载相册中的图片
|
||||
- (void)loadAlbumPhotos {
|
||||
@kWeakify(self);
|
||||
[YYUtility checkAssetsLibrayAvailable:^{
|
||||
|
||||
|
||||
} denied:^{
|
||||
|
||||
} restriction:^{
|
||||
|
||||
}];
|
||||
[YYUtility checkAssetsLibrayAvailable:^{ } denied:^{ } restriction:^{ }];
|
||||
}
|
||||
|
||||
#pragma mark - cell的样式
|
||||
@@ -251,7 +244,6 @@
|
||||
model = [[MessageGuildModel alloc] initWithMessage:message];
|
||||
}else if(attachment.first == CustomMessageType_New_Hall) {
|
||||
model = [[MessageGuildModel alloc] initWithMessage:message];
|
||||
|
||||
} else if(attachment.first == CustomMessageType_Member_Online && attachment.second == Custom_Message_Type_Attention_Member_Online) {
|
||||
model = [[MessageOpenLiveModel alloc] initWithMessage:message];
|
||||
} else if(attachment.first == CustomMessageType_Application_Share && attachment.second == Custom_Message_Sub_Application_Share_Room) {
|
||||
@@ -278,6 +270,9 @@
|
||||
model = [[MessageTreasureFairyModel alloc] initWithMessage:message];
|
||||
}else if(attachment.first == CustomMessageType_Service_Reply){
|
||||
model = [[PIMessageContentServiceReplyModel alloc]initWithMessage:message];
|
||||
}else if(attachment.first == CustomMessageType_Game_Order &&
|
||||
attachment.second == Custom_Message_Sub_Game_order){
|
||||
model = [[MessageGameOrderModel alloc] initWithMessage:message];
|
||||
}else {
|
||||
model = [[MessageUnSupportModel alloc] initWithMessage:message];
|
||||
}
|
||||
@@ -652,7 +647,7 @@
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
}
|
||||
cell.delegate = self;
|
||||
[cell renderWithMessage:[self.messages xpSafeObjectAtIndex:indexPath.row]];
|
||||
[cell renderWithMessage:message];
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
@@ -1080,8 +1075,6 @@
|
||||
}
|
||||
[self showErrorToast:msg];
|
||||
} content:@"" toUid:self.session.sessionId];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
16
YuMi/Modules/YMMine/Api/Api(GameOrder).h
Normal file
16
YuMi/Modules/YMMine/Api/Api(GameOrder).h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Api(GameOrder).h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api_GameOrder_ : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
YuMi/Modules/YMMine/Api/Api(GameOrder).m
Normal file
12
YuMi/Modules/YMMine/Api/Api(GameOrder).m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Api(GameOrder).m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "Api(GameOrder).h"
|
||||
|
||||
@implementation Api_GameOrder_
|
||||
|
||||
@end
|
44
YuMi/Modules/YMMine/Api/Api+GameOrder.h
Normal file
44
YuMi/Modules/YMMine/Api/Api+GameOrder.h
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// Api+GameOrder.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (GameOrder)
|
||||
/// 用戶的遊戲配置信息
|
||||
/// @param completion 完成
|
||||
/// @param uid uid
|
||||
+ (void)requestGamePartnerInfoList:(HttpRequestHelperCompletion)completion
|
||||
uid:(NSString *)uid;
|
||||
/// 訂單紀錄
|
||||
/// @param completion 完成
|
||||
/// @param uid uid
|
||||
/// @param currSize 當前頁
|
||||
/// @param pageSize 每頁數
|
||||
/// @param searchType 0 我发起的, 1 我收到的
|
||||
+ (void)requestGameOrderRecord:(HttpRequestHelperCompletion)completion
|
||||
currSize:(NSInteger)currSize
|
||||
pageSize:(NSInteger)pageSize
|
||||
searchType:(NSInteger)searchType
|
||||
uid:(NSString *)uid;
|
||||
|
||||
/// 發起邀請
|
||||
/// @param completion 完成
|
||||
/// @param uid uid
|
||||
/// @param gameId 遊戲ID
|
||||
/// @param gameUid 陪玩師 UID
|
||||
/// @param inning 局數
|
||||
+ (void)requestGameOrder:(HttpRequestHelperCompletion)completion
|
||||
gameId:(NSInteger)gameId
|
||||
gameUid:(NSInteger)gameUid
|
||||
inning:(NSInteger)inning
|
||||
uid:(NSString *)uid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
39
YuMi/Modules/YMMine/Api/Api+GameOrder.m
Normal file
39
YuMi/Modules/YMMine/Api/Api+GameOrder.m
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Api+GameOrder.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "Api+GameOrder.h"
|
||||
|
||||
@implementation Api (GameOrder)
|
||||
|
||||
+ (void)requestGamePartnerInfoList:(HttpRequestHelperCompletion)completion
|
||||
uid:(NSString *)uid {
|
||||
[self makeRequest:@"gamePartnerInfo/list"
|
||||
method:HttpRequestHelperMethodGET
|
||||
completion:completion, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
+ (void)requestGameOrderRecord:(HttpRequestHelperCompletion)completion
|
||||
currSize:(NSInteger)currSize
|
||||
pageSize:(NSInteger)pageSize
|
||||
searchType:(NSInteger)searchType
|
||||
uid:(NSString *)uid {
|
||||
[self makeRequest:@"gamePartnerOrder/record"
|
||||
method:HttpRequestHelperMethodGET
|
||||
completion:completion, __FUNCTION__, @(currSize).stringValue, @(pageSize).stringValue, @(searchType).stringValue, uid, nil];
|
||||
}
|
||||
|
||||
+ (void)requestGameOrder:(HttpRequestHelperCompletion)completion
|
||||
gameId:(NSInteger)gameId
|
||||
gameUid:(NSInteger)gameUid
|
||||
inning:(NSInteger)inning
|
||||
uid:(NSString *)uid {
|
||||
[self makeRequest:@"gamePartnerOrder/submit"
|
||||
method:HttpRequestHelperMethodPOST
|
||||
completion:completion, __FUNCTION__, @(gameId).stringValue, @(gameUid).stringValue, @(inning).stringValue, uid, nil];
|
||||
}
|
||||
|
||||
@end
|
58
YuMi/Modules/YMMine/Model/XPMineGamePartnerInfoModel.h
Normal file
58
YuMi/Modules/YMMine/Model/XPMineGamePartnerInfoModel.h
Normal file
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// XPMineGamePartnerInfoModel.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "PIBaseModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineGamePartnerInfoTagModel : PIBaseModel
|
||||
@property (nonatomic, assign) NSInteger seq;
|
||||
@property (nonatomic, copy) NSString *tagName;
|
||||
@property (nonatomic, copy) NSString *tagVal;
|
||||
@end
|
||||
|
||||
@interface XPMineGameOrderRecoredModel : PIBaseModel
|
||||
|
||||
@property (nonatomic, copy) NSString *orderTime;
|
||||
@property (nonatomic, assign) NSInteger amount;
|
||||
@property (nonatomic, copy) NSString *toNick;
|
||||
@property (nonatomic, assign) NSInteger toUid;
|
||||
@property (nonatomic, copy) NSString *toAvatar;
|
||||
@property (nonatomic, copy) NSString *fromAvatar;
|
||||
@property (nonatomic, copy) NSString *fromNick;
|
||||
@property (nonatomic, assign) NSInteger fromUid;
|
||||
@property (nonatomic, copy) NSString *gameName;
|
||||
@property (nonatomic, assign) NSInteger gameId;
|
||||
@property (nonatomic, copy) NSString *gameLogo;
|
||||
@property (nonatomic, copy) NSString *gamePic;
|
||||
@property (nonatomic, copy) NSString *orderNo;
|
||||
@property (nonatomic, assign) NSInteger inning;
|
||||
@property (nonatomic, assign) NSInteger income;
|
||||
@property (nonatomic, assign) NSInteger price;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@interface XPMineGamePartnerInfoModel : PIBaseModel
|
||||
@property (nonatomic, copy) NSString *background;
|
||||
@property (nonatomic, assign) NSInteger finishNum;
|
||||
@property (nonatomic, assign) NSInteger gameId;
|
||||
@property (nonatomic, copy) NSString *gameName;
|
||||
@property (nonatomic, copy) NSString *logo;
|
||||
@property (nonatomic, copy) NSString *pic;
|
||||
@property (nonatomic, assign) NSInteger price;
|
||||
@property (nonatomic, assign) NSInteger uid;
|
||||
@property (nonatomic, copy) NSString *proficiency;
|
||||
//@property (nonatomic, copy) NSArray <XPMineGamePartnerInfoTagModel*>* tags;
|
||||
|
||||
+ (XPMineGamePartnerInfoModel *)modelFromRecord:(XPMineGameOrderRecoredModel *)record;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
42
YuMi/Modules/YMMine/Model/XPMineGamePartnerInfoModel.m
Normal file
42
YuMi/Modules/YMMine/Model/XPMineGamePartnerInfoModel.m
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// XPMineGamePartnerInfoModel.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/10.
|
||||
//
|
||||
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
|
||||
@implementation XPMineGamePartnerInfoTagModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineGameOrderRecoredModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineGamePartnerInfoModel
|
||||
+ (NSDictionary *)objectClassInArray{
|
||||
return @{
|
||||
@"tags":XPMineGamePartnerInfoTagModel.class
|
||||
};
|
||||
}
|
||||
|
||||
+ (XPMineGamePartnerInfoModel *)modelFromRecord:(XPMineGameOrderRecoredModel *)record {
|
||||
XPMineGamePartnerInfoModel *model = [[XPMineGamePartnerInfoModel alloc] init];
|
||||
model.background = record.gamePic;
|
||||
model.gameId = record.gameId;
|
||||
model.gameName = record.gameName;
|
||||
model.logo = record.gameLogo;
|
||||
model.pic = record.gamePic;
|
||||
model.price = record.price;
|
||||
model.uid = record.toUid;
|
||||
return model;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@@ -33,7 +33,8 @@ typedef NS_ENUM(NSInteger, XPMineItemType) {
|
||||
XPMineItemType_DressUp_Market = 73, ///装扮商场
|
||||
XPMineItemType_My_Dressup = 74,///我的装扮
|
||||
XPMineItemType_My_Set = 75,///设置
|
||||
XPMineItemType_My_Gift = 77///我的转赠
|
||||
XPMineItemType_My_Gift = 77,///我的转赠
|
||||
XPMineItemType_My_Game_Order = 78,///我的陪玩點單
|
||||
};
|
||||
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
@class UserInfoModel;
|
||||
@class UserInfoModel, XPMineGamePartnerInfoModel, XPMineGameOrderRecoredModel;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineUserDataPresenter : BaseMvpPresenter
|
||||
@@ -34,6 +34,20 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId;
|
||||
///屏蔽
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId;
|
||||
|
||||
- (void)loadGamePartnerInfoList:(void(^)(NSArray<XPMineGamePartnerInfoModel *> *infos))success uid:(NSInteger)uid;
|
||||
|
||||
- (void)loadGameOrderRecord:(void(^)(NSArray <XPMineGameOrderRecoredModel *>* orderRecords))success
|
||||
failure:(void(^)(NSString *msg))failure
|
||||
page:(NSInteger)currentPage
|
||||
type:(NSInteger)searchType;
|
||||
|
||||
- (void)submitOrder:(void(^)(void))success
|
||||
failure:(void(^)(NSString *msg))failure
|
||||
gameId:(NSInteger)gameId
|
||||
gameUid:(NSInteger)gameUid
|
||||
inning:(NSInteger)inning;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -16,6 +16,9 @@
|
||||
#import "Api+Monents.h"
|
||||
#import "Api+Room.h"
|
||||
#import "XPMonentsMineProtocol.h"
|
||||
#import "Api+GameOrder.h"
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
|
||||
@implementation XPMineUserDataPresenter
|
||||
|
||||
/// 获取会长和当前用户家族详细的信息
|
||||
@@ -24,8 +27,10 @@
|
||||
RACSubject* owner = [RACSubject subject];
|
||||
RACSubject* currentUser = [RACSubject subject];
|
||||
|
||||
@kWeakify(self);
|
||||
[[RACSignal combineLatest:@[owner, currentUser] reduce:^id(ClanDetailInfoModel* ownerClanInfo, ClanDetailInfoModel* currentUserClanInfo){
|
||||
[[self getView] getClanDetailInfoSuccess:ownerClanInfo currentUserClanInfo:currentUserClanInfo];
|
||||
@kStrongify(self);
|
||||
// [[self getView] getClanDetailInfoSuccess:ownerClanInfo currentUserClanInfo:currentUserClanInfo];
|
||||
return nil;
|
||||
}] subscribeError:^(NSError * _Nullable error) {
|
||||
|
||||
@@ -51,14 +56,16 @@
|
||||
}
|
||||
|
||||
|
||||
/// 用户申请加入公会
|
||||
/// @param hallId 公会的id
|
||||
- (void)memberApplyHall:(NSString *)hallId {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api memberApplyHall:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] memberApplyHallSuccess];
|
||||
} showLoading:YES] hallId:hallId uid:uid];
|
||||
}
|
||||
///// 用户申请加入公会
|
||||
///// @param hallId 公会的id
|
||||
//- (void)memberApplyHall:(NSString *)hallId {
|
||||
// @kWeakify(self);
|
||||
// NSString *uid = [AccountInfoStorage instance].getUid;
|
||||
// [Api memberApplyHall:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
// @kStrongify(self);
|
||||
// [[self getView] memberApplyHallSuccess];
|
||||
// } showLoading:YES] hallId:hallId uid:uid];
|
||||
//}
|
||||
|
||||
- (void)getUserInfo:(NSString *)uid success:(void(^)(UserInfoModel * info))success {
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -74,9 +81,11 @@
|
||||
/// @param likedUid 点赞人的uid
|
||||
/// @param worldId 话题的id
|
||||
- (void)likeMonent:(NSString *)dynamicId status:(BOOL)status likedUid:(NSString *)likedUid worldId:(NSString *)worldId {
|
||||
@kWeakify(self);
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * statusStr = status ? @"1" : @"0";
|
||||
[Api monentsLike:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
[[self getView] likeMonentsSuccess:dynamicId status:status];
|
||||
} showLoading:YES] dynamicId:dynamicId uid:uid status:statusStr likedUid:likedUid worldId:worldId];
|
||||
}
|
||||
@@ -85,14 +94,68 @@
|
||||
/// @param dynamicId 动态id
|
||||
/// @param worldId 话题id
|
||||
- (void)deleteMonents:(NSString *)dynamicId worldId:(NSString *)worldId {
|
||||
@kWeakify(self);
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api monentsDelete:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
[[self getView] deleteMonentsSuccess:dynamicId];
|
||||
} uid:uid dynamicId:dynamicId worldId:worldId];
|
||||
}
|
||||
- (void)requesstShieldingWtihType:(NSString *)type objId:(NSString *)objId{
|
||||
@kWeakify(self);
|
||||
[Api requesstShielding:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
[[self getView] requesstShieldingSuccess:objId];
|
||||
}] type:type objId:objId];
|
||||
}
|
||||
|
||||
- (void)loadGamePartnerInfoList:(void(^)(NSArray<XPMineGamePartnerInfoModel *> *infos))success uid:(NSInteger)uid{
|
||||
[Api requestGamePartnerInfoList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSArray *models = [XPMineGamePartnerInfoModel modelsWithArray:data.data];
|
||||
// XPMineGamePartnerInfoModel *model = [XPMineGamePartnerInfoModel modelWithDictionary:data.data];
|
||||
if (success) {
|
||||
success(models);
|
||||
}
|
||||
}
|
||||
} uid:@(uid).stringValue];
|
||||
}
|
||||
|
||||
- (void)loadGameOrderRecord:(void(^)(NSArray <XPMineGameOrderRecoredModel *>* orderRecords))success
|
||||
failure:(void(^)(NSString *msg))failure
|
||||
page:(NSInteger)currentPage
|
||||
type:(NSInteger)searchType {
|
||||
[Api requestGameOrderRecord:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
if (success) {
|
||||
NSArray *records = [XPMineGameOrderRecoredModel modelsWithArray:data.data];
|
||||
success(records);
|
||||
}
|
||||
} else {
|
||||
if (failure) {
|
||||
failure(msg);
|
||||
}
|
||||
}
|
||||
} currSize:currentPage pageSize:20 searchType:searchType uid:[AccountInfoStorage instance].getUid];
|
||||
}
|
||||
|
||||
|
||||
- (void)submitOrder:(void(^)(void))success
|
||||
failure:(void(^)(NSString *msg))failure
|
||||
gameId:(NSInteger)gameId
|
||||
gameUid:(NSInteger)gameUid
|
||||
inning:(NSInteger)inning {
|
||||
[Api requestGameOrder:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
} else {
|
||||
if (failure) {
|
||||
failure(msg);
|
||||
}
|
||||
}
|
||||
} gameId:gameId gameUid:gameUid inning:inning uid:[AccountInfoStorage instance].getUid];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -11,9 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class ClanDetailInfoModel;
|
||||
@protocol XPMineUserDataProtocol <NSObject>
|
||||
///获取家族详情成功
|
||||
- (void)getClanDetailInfoSuccess:(ClanDetailInfoModel *)clanDetailInfo currentUserClanInfo:(ClanDetailInfoModel *)currentUserClanInfo;
|
||||
//- (void)getClanDetailInfoSuccess:(ClanDetailInfoModel *)clanDetailInfo currentUserClanInfo:(ClanDetailInfoModel *)currentUserClanInfo;
|
||||
///申请加入公会成功
|
||||
- (void)memberApplyHallSuccess;
|
||||
//- (void)memberApplyHallSuccess;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPMineDataGameMateTableViewCell.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class XPMineGamePartnerInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineDataGameMateTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) XPMineGamePartnerInfoModel *cellModel;
|
||||
|
||||
@property (nonatomic, copy) void(^didTapOrder)(XPMineGamePartnerInfoModel *model);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,227 @@
|
||||
//
|
||||
// XPMineDataGameMateTableViewCell.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import "XPMineDataGameMateTableViewCell.h"
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
|
||||
@interface XPMineDataGameMateTableViewCell()
|
||||
|
||||
@property (nonatomic, strong) NetImageView *bgImageView;
|
||||
@property (nonatomic, strong) NetImageView *logoImageView;
|
||||
@property (nonatomic, strong) UILabel *nameLabel;
|
||||
@property (nonatomic, strong) UILabel *levelLabel;
|
||||
@property (nonatomic, strong) UILabel *priceLabel;
|
||||
@property (nonatomic, strong) UIButton *orderButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineDataGameMateTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||
[self setup];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
}
|
||||
|
||||
- (void)setCellModel:(XPMineGamePartnerInfoModel *)cellModel {
|
||||
_cellModel = cellModel;
|
||||
self.bgImageView.imageUrl = cellModel.background;
|
||||
self.logoImageView.imageUrl = cellModel.logo;
|
||||
self.nameLabel.text = cellModel.gameName;
|
||||
self.levelLabel.text = cellModel.proficiency;
|
||||
|
||||
self.orderButton.hidden = cellModel.uid == [AccountInfoStorage instance].getUid.integerValue;
|
||||
|
||||
[self updatePriceContent];
|
||||
}
|
||||
|
||||
- (void)updatePriceContent {
|
||||
NSTextAttachment *coinAttachment = [[NSTextAttachment alloc] init];
|
||||
coinAttachment.image = kImage(@"mine_game_gold_icon");
|
||||
coinAttachment.bounds = CGRectMake(2, -0.5, 9, 9);
|
||||
NSAttributedString *coin = [NSAttributedString attributedStringWithAttachment:coinAttachment];
|
||||
NSAttributedString *price = [[NSAttributedString alloc] initWithString:@(self.cellModel.price).stringValue
|
||||
attributes:@{
|
||||
NSFontAttributeName: self.priceLabel.font,
|
||||
NSForegroundColorAttributeName: self.priceLabel.textColor
|
||||
}];
|
||||
NSMutableAttributedString *mutableAttributedString = [[NSMutableAttributedString alloc] initWithAttributedString:coin];
|
||||
[mutableAttributedString insertAttributedString:price atIndex:0];
|
||||
self.priceLabel.attributedText = mutableAttributedString.copy;
|
||||
}
|
||||
|
||||
- (void)setup {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
|
||||
[self.contentView addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 0, 10, 0));
|
||||
}];
|
||||
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorRGBAlpha(0x161616, 0.9), UIColorRGBAlpha(0x1f1f1f, 0.8), UIColorRGBAlpha(0x1a1a1a, 0.3)]
|
||||
gradientType:isMSRTL() ? GradientTypeLeftToRight : GradientTypeLeftToRight
|
||||
imgSize:CGSizeMake(370, 68)];
|
||||
UIImageView *mask = [[UIImageView alloc] initWithImage:image];
|
||||
mask.alpha = 0.4;
|
||||
mask.backgroundColor = [UIColor clearColor];
|
||||
mask.opaque = YES;
|
||||
mask.layer.cornerRadius = 8;
|
||||
mask.layer.masksToBounds = YES;
|
||||
[self.contentView addSubview:mask];
|
||||
[mask mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.bgImageView);
|
||||
}];
|
||||
|
||||
[self.contentView addSubview:self.logoImageView];
|
||||
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(50, 50));
|
||||
make.centerY.mas_equalTo(self.bgImageView);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.bgImageView).offset(-14);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.bgImageView).offset(14);
|
||||
}
|
||||
}];
|
||||
|
||||
UIStackView *mainStack = [[UIStackView alloc] init];
|
||||
mainStack.axis = UILayoutConstraintAxisHorizontal;
|
||||
mainStack.spacing = 12.5;
|
||||
mainStack.alignment = UIStackViewAlignmentCenter;
|
||||
mainStack.distribution = UIStackViewDistributionFill;
|
||||
[self.contentView addSubview:mainStack];
|
||||
[mainStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.mas_equalTo(self.bgImageView);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.logoImageView.mas_left).offset(-12.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.logoImageView.mas_right).offset(12.5);
|
||||
}
|
||||
}];
|
||||
|
||||
UIStackView *titleStack = [[UIStackView alloc] init];
|
||||
titleStack.axis = UILayoutConstraintAxisVertical;
|
||||
titleStack.alignment = UIStackViewAlignmentLeading;
|
||||
titleStack.distribution = UIStackViewDistributionEqualSpacing;
|
||||
titleStack.spacing = 4;
|
||||
[titleStack addArrangedSubview:[self titleLabel:@"遊戲名稱"]];
|
||||
[titleStack addArrangedSubview:[self titleLabel:@"熟練度"]];
|
||||
[titleStack addArrangedSubview:[self titleLabel:@"下單價格"]];
|
||||
[mainStack addArrangedSubview:titleStack];
|
||||
|
||||
UIStackView *informationStack = [[UIStackView alloc] init];
|
||||
informationStack.axis = UILayoutConstraintAxisVertical;
|
||||
informationStack.alignment = UIStackViewAlignmentLeading;
|
||||
informationStack.distribution = UIStackViewDistributionEqualSpacing;
|
||||
informationStack.spacing = 4;
|
||||
[informationStack addArrangedSubview:self.nameLabel];
|
||||
[informationStack addArrangedSubview:self.levelLabel];
|
||||
[informationStack addArrangedSubview:self.priceLabel];
|
||||
[mainStack addArrangedSubview:informationStack];
|
||||
|
||||
[self.contentView addSubview:self.orderButton];
|
||||
[self.orderButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.bgImageView);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(12);
|
||||
} else {
|
||||
make.right.mas_equalTo(-12);
|
||||
}
|
||||
make.width.mas_equalTo(72.5);
|
||||
make.height.mas_equalTo(27);
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)didTapOrderButton:(id)sender {
|
||||
if (self.didTapOrder) {
|
||||
self.didTapOrder(self.cellModel);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (NetImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
_bgImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_bgImageView.layer.masksToBounds = YES;
|
||||
_bgImageView.layer.cornerRadius = 8;
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)logoImageView {
|
||||
if (!_logoImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_logoImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_logoImageView.layer.masksToBounds = YES;
|
||||
_logoImageView.layer.cornerRadius = 8;
|
||||
_logoImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _logoImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel:(NSString *)content {
|
||||
return [UILabel labelInitWithText:content
|
||||
font:kFontMedium(13)
|
||||
textColor:[UIColor colorWithWhite:1 alpha:0.6]];
|
||||
}
|
||||
|
||||
- (UILabel *)nameLabel {
|
||||
if (!_nameLabel) {
|
||||
_nameLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(13)
|
||||
textColor:[UIColor whiteColor]];
|
||||
_nameLabel.numberOfLines = 1;
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)levelLabel {
|
||||
if (!_levelLabel) {
|
||||
_levelLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(13)
|
||||
textColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _levelLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)priceLabel {
|
||||
if (!_priceLabel) {
|
||||
_priceLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(13)
|
||||
textColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _priceLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)orderButton {
|
||||
if (!_orderButton) {
|
||||
_orderButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_orderButton setTitle:@"下單" forState:UIControlStateNormal];
|
||||
[_orderButton addTarget:self
|
||||
action:@selector(didTapOrderButton:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
[_orderButton setBackgroundColor:[UIColor colorWithWhite:1 alpha:0.4]];
|
||||
[_orderButton setImage:kImage(@"mine_game_order_icon") forState:UIControlStateNormal];
|
||||
_orderButton.layer.cornerRadius = 13.5;
|
||||
[_orderButton.titleLabel setFont:kFontBold(13)];
|
||||
|
||||
_orderButton.titleEdgeInsets = UIEdgeInsetsMake(0, 2, 0, 0);
|
||||
}
|
||||
return _orderButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPMineGameMateOrderView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class XPMineGamePartnerInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineGameMateOrderView : UIView
|
||||
|
||||
@property (nonatomic, strong) XPMineGamePartnerInfoModel *infoModel;
|
||||
@property (nonatomic, copy) void(^payForGame)(NSInteger round);
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
376
YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineGameMateOrderView.m
Normal file
376
YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineGameMateOrderView.m
Normal file
@@ -0,0 +1,376 @@
|
||||
//
|
||||
// XPMineGameMateOrderView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import "XPMineGameMateOrderView.h"
|
||||
|
||||
#import "XPIAPRechargeViewController.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
#import "Api.h"
|
||||
#import "WalletInfoModel.h"
|
||||
|
||||
@interface XPMineGameMateOrderView ()
|
||||
|
||||
@property (nonatomic, assign) NSInteger round;
|
||||
@property (nonatomic, assign) NSInteger currentCoin;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *bgImageView;
|
||||
@property (nonatomic, strong) NetImageView *logoImageView;
|
||||
@property (nonatomic, strong) UIButton *reduceButton;
|
||||
@property (nonatomic, strong) UILabel *numberLabel;
|
||||
@property (nonatomic, strong) UIButton *increaseButton;
|
||||
@property (nonatomic, strong) UILabel *priceLabel;
|
||||
@property (nonatomic, strong) UILabel *balanceLabel;
|
||||
@property (nonatomic, strong) UIButton *payButton;
|
||||
@property (nonatomic, strong) UIButton *rechargeButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineGameMateOrderView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
self.round = 1;
|
||||
[self setup];
|
||||
[self getCoin];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)getCoin {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
@kWeakify(self);
|
||||
[Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
@kStrongify(self);
|
||||
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
|
||||
self.currentCoin = model.golds;
|
||||
self.balanceLabel.text = @(self.currentCoin).stringValue;
|
||||
[self updateBalanceContent];
|
||||
}
|
||||
} uid:uid ticket:ticket];
|
||||
}
|
||||
|
||||
- (void)setInfoModel:(XPMineGamePartnerInfoModel *)infoModel {
|
||||
_infoModel = infoModel;
|
||||
|
||||
self.logoImageView.imageUrl = infoModel.pic;
|
||||
[self updatePriceContent];
|
||||
}
|
||||
|
||||
- (void)updatePriceContent {
|
||||
NSTextAttachment *coinAttachment = [[NSTextAttachment alloc] init];
|
||||
coinAttachment.image = kImage(@"mine_game_gold_icon");
|
||||
coinAttachment.bounds = CGRectMake(2, -0.5, 12, 12);
|
||||
NSAttributedString *coin = [NSAttributedString attributedStringWithAttachment:coinAttachment];
|
||||
NSAttributedString *price = [[NSAttributedString alloc] initWithString:@(self.infoModel.price * self.round).stringValue
|
||||
attributes:@{
|
||||
NSFontAttributeName: self.priceLabel.font,
|
||||
NSForegroundColorAttributeName: self.priceLabel.textColor
|
||||
}];
|
||||
NSMutableAttributedString *mutableAttributedString = [[NSMutableAttributedString alloc] initWithAttributedString:coin];
|
||||
[mutableAttributedString insertAttributedString:price atIndex:0];
|
||||
self.priceLabel.attributedText = mutableAttributedString.copy;
|
||||
}
|
||||
|
||||
- (void)updateBalanceContent {
|
||||
NSTextAttachment *coinAttachment = [[NSTextAttachment alloc] init];
|
||||
coinAttachment.image = kImage(@"mine_game_gold_icon");
|
||||
coinAttachment.bounds = CGRectMake(2, -0.5, 10, 10);
|
||||
NSAttributedString *coin = [NSAttributedString attributedStringWithAttachment:coinAttachment];
|
||||
NSAttributedString *price = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"余额:%ld", (long)self.currentCoin]
|
||||
attributes:@{
|
||||
NSFontAttributeName: self.balanceLabel.font,
|
||||
NSForegroundColorAttributeName: self.balanceLabel.textColor
|
||||
}];
|
||||
NSMutableAttributedString *mutableAttributedString = [[NSMutableAttributedString alloc] initWithAttributedString:coin];
|
||||
[mutableAttributedString insertAttributedString:price atIndex:0];
|
||||
self.balanceLabel.attributedText = mutableAttributedString.copy;
|
||||
}
|
||||
|
||||
- (void)setup {
|
||||
UIView *maskBG = [[UIView alloc] initWithFrame:self.bounds];
|
||||
maskBG.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6];
|
||||
[self addSubview:maskBG];
|
||||
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(300, 280));
|
||||
make.center.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
UIImageView *closeImage = [[UIImageView alloc] initWithImage:kImage(@"noble_time_close")];
|
||||
closeImage.userInteractionEnabled = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapCloseButton:)];
|
||||
[closeImage addGestureRecognizer:tap];
|
||||
[self addSubview:closeImage];
|
||||
[closeImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(26, 26));
|
||||
make.bottom.mas_equalTo(self.bgImageView.mas_top);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.bgImageView.mas_left);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.bgImageView.mas_right);
|
||||
}
|
||||
}];
|
||||
|
||||
UILabel *titleLabel = [UILabel labelInitWithText:@"開黑邀請"
|
||||
font:kFontBold(20)
|
||||
textColor:UIColorFromRGB(0x563c1f)];
|
||||
titleLabel.clipsToBounds = NO;
|
||||
[self addSubview:titleLabel];
|
||||
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.bgImageView).offset(24);
|
||||
make.centerX.mas_equalTo(self.bgImageView);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self addSubview:self.logoImageView];
|
||||
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(titleLabel.mas_bottom).offset(17.5);
|
||||
make.centerX.mas_equalTo(self.bgImageView);
|
||||
make.size.mas_equalTo(CGSizeMake(223, 95));
|
||||
}];
|
||||
|
||||
UILabel *subTitleLabel_1 = [UILabel labelInitWithText:@"開黑橘樹" font:kFontMedium(14) textColor:UIColorFromRGB(0x3f3c33)];
|
||||
UILabel *subTitleLabel_2 = [UILabel labelInitWithText:@"合計:" font:kFontMedium(14) textColor:UIColorFromRGB(0x3f3c33)];
|
||||
UIStackView *subTitleStack = [[UIStackView alloc] init];
|
||||
subTitleStack.axis = UILayoutConstraintAxisVertical;
|
||||
subTitleStack.alignment = UIStackViewAlignmentTop;
|
||||
subTitleStack.distribution = UIStackViewDistributionEqualSpacing;
|
||||
subTitleStack.spacing = 17;
|
||||
[subTitleStack addArrangedSubview:subTitleLabel_1];
|
||||
[subTitleStack addArrangedSubview:subTitleLabel_2];
|
||||
[self addSubview:subTitleStack];
|
||||
[subTitleStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.logoImageView.mas_bottom).offset(19);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.logoImageView);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.logoImageView);
|
||||
}
|
||||
}];
|
||||
|
||||
[self addSubview:self.increaseButton];
|
||||
[self.increaseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.logoImageView.mas_bottom).offset(15);
|
||||
make.size.mas_equalTo(CGSizeMake(23, 23));
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self.logoImageView);
|
||||
} else {
|
||||
make.right.mas_equalTo(self.logoImageView);
|
||||
}
|
||||
}];
|
||||
|
||||
[self addSubview:self.numberLabel];
|
||||
[self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.increaseButton);
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self.increaseButton.mas_right).offset(12.5);
|
||||
} else {
|
||||
make.right.mas_equalTo(self.increaseButton.mas_left).offset(-12.5);
|
||||
}
|
||||
}];
|
||||
|
||||
[self addSubview:self.reduceButton];
|
||||
[self.reduceButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.logoImageView.mas_bottom).offset(15);
|
||||
make.size.mas_equalTo(CGSizeMake(23, 23));
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self.numberLabel.mas_right).offset(12.5);
|
||||
} else {
|
||||
make.right.mas_equalTo(self.numberLabel.mas_left).offset(-12.5);
|
||||
}
|
||||
}];
|
||||
|
||||
[self addSubview:self.priceLabel];
|
||||
[self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.numberLabel);
|
||||
make.top.mas_equalTo(self.increaseButton.mas_bottom).offset(12);
|
||||
}];
|
||||
|
||||
UIImageView *line = [[UIImageView alloc] initWithImage:kImage(@"mine_game_order_line")];
|
||||
[self addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(0);
|
||||
make.size.mas_equalTo(CGSizeMake(220.5, 0.5));
|
||||
make.bottom.mas_equalTo(self.bgImageView).offset(-46);
|
||||
make.top.mas_equalTo(self.priceLabel.mas_bottom).offset(15);
|
||||
}];
|
||||
|
||||
[self addSubview:self.balanceLabel];
|
||||
[self.balanceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(line.mas_bottom).offset(15);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.logoImageView);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.logoImageView);
|
||||
}
|
||||
}];
|
||||
|
||||
[self addSubview:self.rechargeButton];
|
||||
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.balanceLabel);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.balanceLabel.mas_left).offset(-8.5);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.balanceLabel.mas_right).offset(8.5);
|
||||
}
|
||||
}];
|
||||
|
||||
[self addSubview:self.payButton];
|
||||
[self.payButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.balanceLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(65, 26));
|
||||
if (isMSRTL()) {
|
||||
make.left.mas_equalTo(self.logoImageView);
|
||||
} else {
|
||||
make.right.mas_equalTo(self.logoImageView);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)didTapReduceButton:(id)sender {
|
||||
self.round--;
|
||||
if (self.round<1) {
|
||||
self.round = 1;
|
||||
}
|
||||
self.numberLabel.text = @(self.round).stringValue;
|
||||
if (self.infoModel) {
|
||||
self.priceLabel.text = @(self.round * self.infoModel.price).stringValue;
|
||||
}
|
||||
|
||||
[self updatePriceContent];
|
||||
}
|
||||
|
||||
- (IBAction)didTapIncreaseButton:(id)sender {
|
||||
self.round ++;
|
||||
self.numberLabel.text = @(self.round).stringValue;
|
||||
[self updatePriceContent];
|
||||
}
|
||||
|
||||
- (IBAction)didTapRechargeButton:(id)sender {
|
||||
XPIAPRechargeViewController *vc = [[XPIAPRechargeViewController alloc] init];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)didTapPayButton:(id)sender {
|
||||
if (self.payForGame) {
|
||||
self.payForGame(self.round);
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)didTapCloseButton:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UIImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] initWithImage:[kImage(@"mine_game_order_bg") ms_SetImageForRTL]];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)logoImageView {
|
||||
if (!_logoImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_logoImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_logoImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_logoImageView.layer.masksToBounds = YES;
|
||||
_logoImageView.layer.cornerRadius = 8;
|
||||
|
||||
_logoImageView.backgroundColor = [UIColor systemTealColor];
|
||||
}
|
||||
return _logoImageView;
|
||||
}
|
||||
|
||||
- (UIButton *)reduceButton {
|
||||
if (!_reduceButton) {
|
||||
_reduceButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_reduceButton addTarget:self action:@selector(didTapReduceButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_reduceButton setImage:kImage(@"mine_game_order_reduce_icon") forState:UIControlStateNormal];
|
||||
[_reduceButton enlargeTouchArea:UIEdgeInsetsMake(10, 10, 10, 10)];
|
||||
}
|
||||
return _reduceButton;
|
||||
}
|
||||
|
||||
- (UIButton *)increaseButton {
|
||||
if (!_increaseButton) {
|
||||
_increaseButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_increaseButton addTarget:self action:@selector(didTapIncreaseButton:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_increaseButton setImage:kImage(@"mine_game_order_increase_icon") forState:UIControlStateNormal];
|
||||
[_reduceButton enlargeTouchArea:UIEdgeInsetsMake(10, 10, 10, 10)];
|
||||
}
|
||||
return _increaseButton;
|
||||
}
|
||||
|
||||
- (UILabel *)numberLabel {
|
||||
if (!_numberLabel) {
|
||||
_numberLabel = [UILabel labelInitWithText:@"1"
|
||||
font:kFontMedium(13)
|
||||
textColor:UIColorFromRGB(0x471606)];
|
||||
}
|
||||
return _numberLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)priceLabel {
|
||||
if (!_priceLabel) {
|
||||
_priceLabel = [UILabel labelInitWithText:@"0"
|
||||
font:kFontMedium(13)
|
||||
textColor:UIColorFromRGB(0x471606)];
|
||||
}
|
||||
return _priceLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)balanceLabel {
|
||||
if (!_balanceLabel) {
|
||||
_balanceLabel = [UILabel labelInitWithText:@"餘額:0"
|
||||
font:kFontMedium(12)
|
||||
textColor:UIColorFromRGB(0x471606)];
|
||||
}
|
||||
return _balanceLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)rechargeButton {
|
||||
if (!_rechargeButton) {
|
||||
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_rechargeButton setTitle:@"充值 >" forState:UIControlStateNormal];
|
||||
[_rechargeButton.titleLabel setFont:kFontMedium(12)];
|
||||
[_rechargeButton setTitleColor:UIColorFromRGB(0xff433a) forState:UIControlStateNormal];
|
||||
[_rechargeButton addTarget:self
|
||||
action:@selector(didTapRechargeButton:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _rechargeButton;
|
||||
}
|
||||
|
||||
- (UIButton *)payButton {
|
||||
if (!_payButton) {
|
||||
_payButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_payButton setTitle:@"支付" forState:UIControlStateNormal];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x57e193),UIColorFromRGB(0x14d2a6)]
|
||||
gradientType:GradientTypeLeftToRight
|
||||
imgSize:CGSizeMake(65, 26)];
|
||||
[_payButton setBackgroundImage:image forState:UIControlStateNormal];
|
||||
[_payButton.titleLabel setFont:kFontMedium(13)];
|
||||
[_payButton addTarget:self
|
||||
action:@selector(didTapPayButton:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
_payButton.layer.cornerRadius = 13;
|
||||
_payButton.layer.masksToBounds = YES;
|
||||
}
|
||||
return _payButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPGameOrdersListTableViewCell.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class XPMineGameOrderRecoredModel;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPGameOrdersListTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) XPMineGameOrderRecoredModel *model;
|
||||
@property (nonatomic, assign) NSInteger type; // 0 = 我發起的
|
||||
|
||||
@property (nonatomic, copy) void(^didTapChat)(XPMineGameOrderRecoredModel *model);
|
||||
@property (nonatomic, copy) void(^didTapPlayAgain)(XPMineGameOrderRecoredModel *model);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
414
YuMi/Modules/YMMine/View/Cell/XPGameOrdersListTableViewCell.m
Normal file
414
YuMi/Modules/YMMine/View/Cell/XPGameOrdersListTableViewCell.m
Normal file
@@ -0,0 +1,414 @@
|
||||
//
|
||||
// XPGameOrdersListTableViewCell.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import "XPGameOrdersListTableViewCell.h"
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
|
||||
@interface XPGameOrdersListTableViewCell ()
|
||||
|
||||
@property (nonatomic, strong) NetImageView *avatarImageView;
|
||||
@property (nonatomic, strong) UILabel *nameLabel;
|
||||
@property (nonatomic, strong) UILabel *userIDLabel;
|
||||
@property (nonatomic, strong) UILabel *gameNameLabel;
|
||||
@property (nonatomic, strong) UILabel *gamePriceLabel;
|
||||
@property (nonatomic, strong) UILabel *timeLabel;
|
||||
@property (nonatomic, strong) UILabel *orderIDLabel;
|
||||
@property (nonatomic, strong) UIButton *againButton;
|
||||
@property (nonatomic, strong) UIButton *messageButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPGameOrdersListTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self setup];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setModel:(XPMineGameOrderRecoredModel *)model {
|
||||
_model = model;
|
||||
|
||||
self.gameNameLabel.text = model.gameName;
|
||||
self.timeLabel.text = model.orderTime;
|
||||
self.orderIDLabel.text = model.orderNo;
|
||||
[self updatePriceContent];
|
||||
// [self updateOrderContent];
|
||||
}
|
||||
|
||||
- (void)setType:(NSInteger)type {
|
||||
if (type == 0) {
|
||||
self.avatarImageView.imageUrl = self.model.toAvatar;
|
||||
self.nameLabel.text = self.model.toNick;
|
||||
self.userIDLabel.text = @(self.model.toUid).stringValue;
|
||||
self.againButton.hidden = NO;
|
||||
} else {
|
||||
self.avatarImageView.imageUrl = self.model.fromAvatar;
|
||||
self.nameLabel.text = self.model.fromNick;
|
||||
self.userIDLabel.text = @(self.model.fromUid).stringValue;
|
||||
self.againButton.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updatePriceContent {
|
||||
NSTextAttachment *coinAttachment = [[NSTextAttachment alloc] init];
|
||||
coinAttachment.image = kImage(@"mine_game_gold_icon");
|
||||
coinAttachment.bounds = CGRectMake(4, 0.5, 9, 9);
|
||||
NSAttributedString *coin = [NSAttributedString attributedStringWithAttachment:coinAttachment];
|
||||
NSAttributedString *price = [[NSAttributedString alloc] initWithString:@(self.model.amount).stringValue
|
||||
attributes:@{
|
||||
NSFontAttributeName: self.gamePriceLabel.font,
|
||||
NSForegroundColorAttributeName: self.gamePriceLabel.textColor
|
||||
}];
|
||||
NSMutableAttributedString *mutableAttributedString = [[NSMutableAttributedString alloc] initWithAttributedString:coin];
|
||||
[mutableAttributedString insertAttributedString:price atIndex:0];
|
||||
self.gamePriceLabel.attributedText = mutableAttributedString.copy;
|
||||
[self.contentView layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)updateOrderContent {
|
||||
NSTextAttachment *coinAttachment = [[NSTextAttachment alloc] init];
|
||||
coinAttachment.image = kImage(@"user_card_copy_id1");
|
||||
coinAttachment.bounds = CGRectMake(2, -0.5, 9, 9);
|
||||
NSAttributedString *coin = [NSAttributedString attributedStringWithAttachment:coinAttachment];
|
||||
NSAttributedString *price = [[NSAttributedString alloc] initWithString:self.model.orderNo
|
||||
attributes:@{
|
||||
NSFontAttributeName: self.orderIDLabel.font,
|
||||
NSForegroundColorAttributeName: self.orderIDLabel.textColor
|
||||
}];
|
||||
NSMutableAttributedString *mutableAttributedString = [[NSMutableAttributedString alloc] initWithAttributedString:coin];
|
||||
[mutableAttributedString insertAttributedString:price atIndex:0];
|
||||
self.orderIDLabel.attributedText = mutableAttributedString.copy;
|
||||
[self.contentView layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)setup {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
|
||||
UIView *shadowView = [[UIView alloc] init];
|
||||
shadowView.backgroundColor = [UIColor clearColor];
|
||||
shadowView.layer.shadowColor = [UIColor redColor].CGColor;
|
||||
shadowView.layer.shadowOpacity = 0.5;
|
||||
shadowView.layer.shadowOffset = CGSizeMake(10, 30);
|
||||
shadowView.layer.shadowRadius = 5;
|
||||
[self.contentView addSubview:shadowView];
|
||||
[shadowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(0);
|
||||
make.left.mas_equalTo(14);
|
||||
make.right.mas_equalTo(-14);
|
||||
make.bottom.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
UIView *container = [[UIView alloc] init];
|
||||
container.backgroundColor = [UIColor whiteColor];
|
||||
container.layer.cornerRadius = 10;
|
||||
container.layer.masksToBounds = YES;
|
||||
container.layer.shadowColor = UIColorFromRGB(0x272727).CGColor;
|
||||
[self.contentView addSubview:container];
|
||||
[container mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(0);
|
||||
make.left.mas_equalTo(14);
|
||||
make.right.mas_equalTo(-14);
|
||||
make.bottom.mas_equalTo(-16);
|
||||
}];
|
||||
|
||||
[container addSubview:self.avatarImageView];
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(12.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(-9);
|
||||
} else {
|
||||
make.left.mas_equalTo(9);
|
||||
}
|
||||
make.width.height.mas_equalTo(60);
|
||||
}];
|
||||
|
||||
UIStackView *userInfoStack = [[UIStackView alloc] init];
|
||||
userInfoStack.axis = UILayoutConstraintAxisVertical;
|
||||
userInfoStack.distribution = UIStackViewDistributionFill;
|
||||
userInfoStack.alignment = UIStackViewAlignmentTop;
|
||||
userInfoStack.spacing = 8;
|
||||
[userInfoStack addArrangedSubview:self.nameLabel];
|
||||
[userInfoStack addArrangedSubview:self.userIDLabel];
|
||||
[container addSubview:userInfoStack];
|
||||
[userInfoStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.avatarImageView).offset(13.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.avatarImageView.mas_left).offset(-12);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(12);
|
||||
}
|
||||
}];
|
||||
|
||||
UIImageView *line = [[UIImageView alloc] initWithImage:kImage(@"mine_game_order_line")];
|
||||
[container addSubview:line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(0.5);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(14);
|
||||
}];
|
||||
|
||||
|
||||
UIStackView *nameStack = [self horizontalStack];
|
||||
[nameStack addArrangedSubview:[self titleLabel:@"遊戲名稱:"]];
|
||||
[nameStack addArrangedSubview:self.gameNameLabel];
|
||||
|
||||
UIStackView *priceStack = [self horizontalStack];
|
||||
[priceStack addArrangedSubview:[self titleLabel:@"消費金額:"]];
|
||||
[priceStack addArrangedSubview:self.gamePriceLabel];
|
||||
|
||||
UIStackView *orderTimeStack = [self horizontalStack];
|
||||
[orderTimeStack addArrangedSubview:[self titleLabel:@"下單時間:"]];
|
||||
[orderTimeStack addArrangedSubview:self.timeLabel];
|
||||
|
||||
UIStackView *orderIdStack = [self horizontalStack];
|
||||
[orderIdStack addArrangedSubview:[self titleLabel:@"訂單編號:"]];
|
||||
[orderIdStack addArrangedSubview:self.orderIDLabel];
|
||||
|
||||
// icon 單獨layout 不放在 stack
|
||||
UIImageView *copyIcon = [[UIImageView alloc] initWithImage:kImage(@"user_card_copy_id1")];
|
||||
copyIcon.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[copyIcon setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[copyIcon setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
copyIcon.frame = CGRectMake(0, 0, 14, 14);
|
||||
[orderIdStack addArrangedSubview:copyIcon];
|
||||
|
||||
UIStackView *contentStack = [[UIStackView alloc] initWithArrangedSubviews:@[
|
||||
nameStack,
|
||||
priceStack,
|
||||
orderTimeStack,
|
||||
orderIdStack
|
||||
]];
|
||||
contentStack.axis = UILayoutConstraintAxisVertical;
|
||||
contentStack.distribution = UIStackViewDistributionFill;
|
||||
contentStack.alignment = UIStackViewAlignmentTop;
|
||||
contentStack.spacing = 8;
|
||||
[container addSubview:contentStack];
|
||||
[contentStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(line.mas_bottom).offset(13.5);
|
||||
if (isMSRTL()) {
|
||||
make.right.mas_equalTo(self.avatarImageView);
|
||||
make.left.mas_equalTo(container).offset(11.5 + 6);
|
||||
} else {
|
||||
make.left.mas_equalTo(self.avatarImageView);
|
||||
make.right.mas_equalTo(container).offset(-11.5 - 6);
|
||||
}
|
||||
}];
|
||||
|
||||
// UIStackView *titleStack = [[UIStackView alloc] init];
|
||||
// titleStack.axis = UILayoutConstraintAxisVertical;
|
||||
// titleStack.distribution = UIStackViewDistributionFill;
|
||||
// titleStack.alignment = UIStackViewAlignmentTop;
|
||||
// titleStack.spacing = 8;
|
||||
// [titleStack addArrangedSubview:[self titleLabel:@"遊戲名稱:"]];
|
||||
// [titleStack addArrangedSubview:[self titleLabel:@"消費金額:"]];
|
||||
// [titleStack addArrangedSubview:[self titleLabel:@"下單時間:"]];
|
||||
// [titleStack addArrangedSubview:[self titleLabel:@"訂單編號:"]];
|
||||
// [container addSubview:titleStack];
|
||||
// [titleStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(line.mas_bottom).offset(13.5);
|
||||
// make.left.mas_equalTo(self.avatarImageView).offset(11.5);
|
||||
// }];
|
||||
//
|
||||
// UIStackView *informationStack = [[UIStackView alloc] init];
|
||||
// informationStack.axis = UILayoutConstraintAxisVertical;
|
||||
// informationStack.distribution = UIStackViewDistributionFill;
|
||||
// informationStack.alignment = UIStackViewAlignmentTop;
|
||||
// informationStack.spacing = 8;
|
||||
// [informationStack addArrangedSubview:self.gameNameLabel];
|
||||
// [informationStack addArrangedSubview:self.gamePriceLabel];
|
||||
// [informationStack addArrangedSubview:self.timeLabel];
|
||||
// [informationStack addArrangedSubview:self.orderIDLabel];
|
||||
// [container addSubview:informationStack];
|
||||
// [informationStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(line.mas_bottom).offset(13.5);
|
||||
// make.left.mas_equalTo(titleStack.mas_right).offset(8);
|
||||
// make.right.mas_equalTo(container).offset(-8);
|
||||
// }];
|
||||
|
||||
UIView *line_2 = [[UIView alloc] init];
|
||||
line_2.backgroundColor = UIColorFromRGB(0xF4F4F4);
|
||||
[container addSubview:line_2];
|
||||
[line_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(0.5);
|
||||
make.bottom.mas_equalTo(container.mas_bottom).offset(-49);
|
||||
}];
|
||||
|
||||
UIStackView *buttonsStack = [[UIStackView alloc] init];
|
||||
buttonsStack.axis = UILayoutConstraintAxisHorizontal;
|
||||
buttonsStack.distribution = UIStackViewDistributionFill;
|
||||
buttonsStack.alignment = UIStackViewAlignmentTrailing;
|
||||
buttonsStack.spacing = 26;
|
||||
[buttonsStack addArrangedSubview:self.againButton];
|
||||
[buttonsStack addArrangedSubview:self.messageButton];
|
||||
[container addSubview:buttonsStack];
|
||||
[buttonsStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-13);
|
||||
make.top.mas_equalTo(line_2.mas_bottom);
|
||||
make.bottom.mas_equalTo(container).offset(-13.5);
|
||||
}];
|
||||
}
|
||||
|
||||
- (UIStackView *)horizontalStack {
|
||||
UIStackView *stack = [[UIStackView alloc] init];
|
||||
stack.axis = UILayoutConstraintAxisHorizontal;
|
||||
stack.distribution = UIStackViewDistributionFill;
|
||||
stack.alignment = UIStackViewAlignmentCenter;
|
||||
stack.spacing = 5;
|
||||
return stack;
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
}
|
||||
|
||||
- (void)setIsMyOrder:(BOOL)isMyOrder {
|
||||
self.againButton.hidden = !isMyOrder;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel:(NSString *)content {
|
||||
UILabel *label = [UILabel labelInitWithText:content
|
||||
font:kFontMedium(13)
|
||||
textColor:UIColorFromRGB(0x242335)];
|
||||
[label setContentHuggingPriority:UILayoutPriorityDefaultHigh
|
||||
forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[label setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh
|
||||
forAxis:UILayoutConstraintAxisHorizontal];
|
||||
return label;
|
||||
}
|
||||
|
||||
-(IBAction)didTapAgainButton:(id)sender {
|
||||
if (self.didTapPlayAgain) {
|
||||
self.didTapPlayAgain(self.model);
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction)didTapMessageButton:(id)sender {
|
||||
if (self.didTapChat) {
|
||||
self.didTapChat(self.model);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didTapOrderLabel {
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
[pasteboard setString:self.model.orderNo];
|
||||
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"XPShareView0")];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 10;
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)nameLabel {
|
||||
if (!_nameLabel) {
|
||||
_nameLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(14)
|
||||
textColor:UIColorFromRGB(0x242335)];
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)userIDLabel {
|
||||
if (!_userIDLabel) {
|
||||
_userIDLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(12)
|
||||
textColor:UIColorFromRGB(0x666666)];
|
||||
}
|
||||
return _userIDLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)gameNameLabel {
|
||||
if (!_gameNameLabel) {
|
||||
_gameNameLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(14)
|
||||
textColor:UIColorFromRGB(0x242335)];
|
||||
}
|
||||
return _gameNameLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)gamePriceLabel {
|
||||
if (!_gamePriceLabel) {
|
||||
_gamePriceLabel = [UILabel labelInitWithText:@"0"
|
||||
font:kFontMedium(14)
|
||||
textColor:UIColorFromRGB(0x242335)];
|
||||
}
|
||||
return _gamePriceLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(14)
|
||||
textColor:UIColorFromRGB(0x242335)];
|
||||
}
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)orderIDLabel {
|
||||
if (!_orderIDLabel) {
|
||||
_orderIDLabel = [UILabel labelInitWithText:@""
|
||||
font:kFontMedium(14)
|
||||
textColor:UIColorFromRGB(0x242335)];
|
||||
_orderIDLabel.userInteractionEnabled = YES;
|
||||
_orderIDLabel.minimumScaleFactor = 0.5;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self
|
||||
action:@selector(didTapOrderLabel)];
|
||||
[_orderIDLabel addGestureRecognizer:tap];
|
||||
}
|
||||
return _orderIDLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)againButton {
|
||||
if (!_againButton) {
|
||||
_againButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_againButton.frame = CGRectMake(0, 0, 65, 26);
|
||||
[_againButton setTitle:@"再次支付" forState:UIControlStateNormal];
|
||||
[_againButton addTarget:self
|
||||
action:@selector(didTapAgainButton:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
// [_againButton setBackgroundColor:[UIColor colorWithWhite:1 alpha:0.4]];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFED118),UIColorFromRGB(0xFDB719)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(65, 26)];
|
||||
[_againButton setBackgroundImage:image forState:UIControlStateNormal];
|
||||
_againButton.layer.cornerRadius = 13;
|
||||
_againButton.layer.masksToBounds = YES;
|
||||
[_againButton.titleLabel setFont:kFontBold(13)];
|
||||
}
|
||||
return _againButton;
|
||||
}
|
||||
|
||||
- (UIButton *)messageButton {
|
||||
if (!_messageButton) {
|
||||
_messageButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_messageButton.frame = CGRectMake(0, 0, 65, 26);
|
||||
[_messageButton setTitle:@"私信" forState:UIControlStateNormal];
|
||||
[_messageButton addTarget:self
|
||||
action:@selector(didTapMessageButton:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
// [_messageButton setBackgroundColor:[UIColor colorWithWhite:1 alpha:0.4]];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x70e9e7),UIColorFromRGB(0x41d4f6)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(65, 26)];
|
||||
[_messageButton setBackgroundImage:image forState:UIControlStateNormal];
|
||||
_messageButton.layer.cornerRadius = 13;
|
||||
_messageButton.layer.masksToBounds = YES;
|
||||
[_messageButton.titleLabel setFont:kFontBold(13)];
|
||||
}
|
||||
return _messageButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -8,15 +8,22 @@
|
||||
#import "MvpViewController.h"
|
||||
#import <JXPagingView/JXPagerView.h>
|
||||
#import "MonentsInfoModel.h"
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
@class MedalModel, UserGiftWallInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class UserInfoModel, MineSkillCardListInfoModel, XPMineUserDataViewController;
|
||||
@protocol XPMineUserDataViewControllerDelegate <NSObject>
|
||||
|
||||
- (void)showGameOrderView:(XPMineGamePartnerInfoModel *)model;
|
||||
- (void)dismissGameOrderView;
|
||||
|
||||
@optional
|
||||
///请求技能卡中有声音的技能
|
||||
- (void)xPMineUserDataViewController:(XPMineUserDataViewController *)viewController didGetVoiceSuccess:(MineSkillCardListInfoModel *)voiceCard;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@interface XPMineUserDataViewController : MvpViewController<JXPagerViewListViewDelegate>
|
||||
@property (nonatomic,copy) NSString *userUid;
|
||||
@@ -28,6 +35,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, strong) NSArray<UserGiftWallInfoModel *> *luckyGiftWall;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPMineUserDataViewControllerDelegate> delegate;
|
||||
|
||||
- (void)submitGameOrder:(XPMineGamePartnerInfoModel *)model round:(NSInteger)round;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -12,13 +12,10 @@
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
///View
|
||||
|
||||
#import "XPMineDataClanTableViewCell.h"
|
||||
#import "XPMineDataGiftTableViewCell.h"
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
///Model
|
||||
#import "ClanDetailInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "MineSkillCardListInfoModel.h"
|
||||
///P
|
||||
@@ -28,7 +25,6 @@
|
||||
///View
|
||||
|
||||
#import "XPMineUserInfoGiftWallViewController.h"
|
||||
#import "XPMineClanViewController.h"
|
||||
#import "XPMineGuildViewController.h"
|
||||
#import "XPMonentsDetailViewController.h"
|
||||
#import "XPMineUserInfoAlbumViewController.h"
|
||||
@@ -37,15 +33,20 @@
|
||||
#import "XPMineAlbumTableViewCell.h"
|
||||
#import "XPMineMedalsTableViewCell.h"
|
||||
#import "XPMineGiftsTableViewCell.h"
|
||||
#import "XPMineDataGameMateTableViewCell.h"
|
||||
|
||||
#import "XPMineGameMateOrderView.h"
|
||||
|
||||
#import "MedalModel.h"
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
Album = 0,
|
||||
Medal = 1,
|
||||
Gifts = 2,
|
||||
LuckyGifts = 3,
|
||||
SectionTypeCount = 4
|
||||
GameMate = 0,
|
||||
Album = 1,
|
||||
Medal = 2,
|
||||
Gifts = 3,
|
||||
LuckyGifts = 4,
|
||||
SectionTypeCount = 5
|
||||
} MineUserInfoPageSectionType;
|
||||
|
||||
@interface XPMineUserSectionHeader : UIView
|
||||
@@ -144,19 +145,16 @@ typedef enum : NSUInteger {
|
||||
@end
|
||||
|
||||
|
||||
@interface XPMineUserDataViewController ()<XPMineUserDataProtocol, UITableViewDelegate, UITableViewDataSource, XPMineDataClanTableViewCellDelegate, XPMineDataGiftTableViewCellDelegate, XPMonentsTableViewCellDelegate, XPMonentsMineProtocol, XPMonentsDetailViewControllerDelegate>
|
||||
@interface XPMineUserDataViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineDataGiftTableViewCellDelegate, XPMonentsTableViewCellDelegate, XPMonentsMineProtocol, XPMonentsDetailViewControllerDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///家族信息
|
||||
@property (nonatomic,strong) ClanDetailInfoModel *clanDetailInfo;
|
||||
|
||||
///是否折叠
|
||||
@property (nonatomic,assign) BOOL isFold;
|
||||
@property (nonatomic,assign) BOOL isGiftsSectionExpand;
|
||||
@property (nonatomic,assign) BOOL isLuckyGiftsSectionExpand;
|
||||
@property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView);
|
||||
///是否展示加入家族房间
|
||||
@property (nonatomic,assign) BOOL isShowEnterClan;
|
||||
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<MonentsInfoModel *> *datasource;
|
||||
//@property (nonatomic,strong) UIView *headView;
|
||||
@@ -165,11 +163,14 @@ typedef enum : NSUInteger {
|
||||
///
|
||||
@property (nonatomic,assign) BOOL isOpen;
|
||||
|
||||
@property (nonatomic, strong) XPMineUserSectionHeader *gameMateHeader;
|
||||
@property (nonatomic, strong) XPMineUserSectionHeader *albumHeader;
|
||||
@property (nonatomic, strong) XPMineUserSectionHeader *medalHeader;
|
||||
@property (nonatomic, strong) XPMineUserSectionHeader *giftsHeader;
|
||||
@property (nonatomic, strong) XPMineUserSectionHeader *luckyGiftsHeader;
|
||||
|
||||
@property (nonatomic, copy) NSArray<XPMineGamePartnerInfoModel *> *gameInfos;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineUserDataViewController
|
||||
@@ -186,17 +187,10 @@ typedef enum : NSUInteger {
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
// [self initHttpRequest];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
#pragma mark - Http
|
||||
- (void)initHttpRequest {
|
||||
self.isOpen = self.userUid.integerValue == [[AccountInfoStorage instance]getUid].integerValue;
|
||||
self.isFold = YES;
|
||||
self.isShowEnterClan = NO;
|
||||
[self.presenter getClanDetailInfo:self.userUid currentUserUid:[AccountInfoStorage instance].getUid];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
@@ -223,6 +217,24 @@ typedef enum : NSUInteger {
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)submitGameOrder:(XPMineGamePartnerInfoModel *)model round:(NSInteger)round {
|
||||
@kWeakify(self);
|
||||
[self showLoading];
|
||||
[self.presenter submitOrder:^{
|
||||
@kStrongify(self);
|
||||
[self showSuccessToast:@"下单成功~"];
|
||||
if (self.delegate) {
|
||||
[self.delegate dismissGameOrderView];
|
||||
}
|
||||
} failure:^(NSString * _Nonnull msg) {
|
||||
@kStrongify(self);
|
||||
[self showErrorToast:msg];
|
||||
}
|
||||
gameId:model.gameId
|
||||
gameUid:model.uid
|
||||
inning:round];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return SectionTypeCount;
|
||||
@@ -230,6 +242,9 @@ typedef enum : NSUInteger {
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
switch (section) {
|
||||
case GameMate:
|
||||
return self.gameInfos.count;
|
||||
break;
|
||||
case Album:
|
||||
return 1;
|
||||
break;
|
||||
@@ -250,6 +265,9 @@ typedef enum : NSUInteger {
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
switch (indexPath.section) {
|
||||
case GameMate:
|
||||
return 78.5;
|
||||
break;
|
||||
case Album:
|
||||
return 90;
|
||||
break;
|
||||
@@ -273,6 +291,9 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
switch (section) {
|
||||
case GameMate:
|
||||
return nil;
|
||||
break;
|
||||
case Album:
|
||||
return nil;
|
||||
break;
|
||||
@@ -292,6 +313,9 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
switch (section) {
|
||||
case GameMate:
|
||||
return 0;
|
||||
break;
|
||||
case Album:
|
||||
return 0;
|
||||
break;
|
||||
@@ -310,16 +334,31 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
|
||||
if (section == Medal) {
|
||||
return self.medalInfo.medalCount == 0 ? 0 : 30;
|
||||
} else if (section == Gifts || section == LuckyGifts) {
|
||||
return 50;
|
||||
switch (section) {
|
||||
case GameMate:
|
||||
return self.gameInfos.count > 0 ? 30 : 0;
|
||||
break;
|
||||
case Album:
|
||||
return 30;
|
||||
break;
|
||||
case Medal:
|
||||
return self.medalInfo.medalCount == 0 ? 0 : 30;
|
||||
break;
|
||||
case Gifts:
|
||||
return 50;
|
||||
break;
|
||||
case LuckyGifts:
|
||||
return 50;
|
||||
break;
|
||||
default:
|
||||
return 30;
|
||||
break;
|
||||
}
|
||||
return 30;
|
||||
}
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
switch (section) {
|
||||
case GameMate:
|
||||
return self.gameInfos.count > 0 ? self.gameMateHeader : nil;
|
||||
case Album:
|
||||
return self.albumHeader;
|
||||
break;
|
||||
@@ -339,6 +378,19 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
switch (indexPath.section) {
|
||||
case GameMate: {
|
||||
XPMineDataGameMateTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDataGameMateTableViewCell class])
|
||||
forIndexPath:indexPath];
|
||||
cell.cellModel = [self.gameInfos xpSafeObjectAtIndex:indexPath.row];
|
||||
@kWeakify(self);
|
||||
[cell setDidTapOrder:^(XPMineGamePartnerInfoModel *model) {
|
||||
if (self.delegate) {
|
||||
[self.delegate showGameOrderView:model];
|
||||
}
|
||||
}];
|
||||
return cell;
|
||||
}
|
||||
break;
|
||||
case Album: {
|
||||
XPMineAlbumTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineAlbumTableViewCell class])
|
||||
forIndexPath:indexPath];
|
||||
@@ -354,14 +406,14 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
break;
|
||||
case Gifts:{
|
||||
XPMineGiftsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class])];
|
||||
XPMineGiftsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class]) forIndexPath:indexPath];
|
||||
cell.giftsDataSource = self.giftWall;
|
||||
cell.isLucky = NO;
|
||||
return cell;
|
||||
}
|
||||
break;
|
||||
case LuckyGifts:{
|
||||
XPMineGiftsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class])];
|
||||
XPMineGiftsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class]) forIndexPath:indexPath];
|
||||
cell.giftsDataSource = self.luckyGiftWall;
|
||||
cell.isLucky = YES;
|
||||
return cell;
|
||||
@@ -495,33 +547,6 @@ typedef enum : NSUInteger {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPMineDataClanTableViewCellDelegate
|
||||
- (void)xPMineDataClanTableViewCell:(XPMineDataClanTableViewCell *)view didClickFold:(UIButton *)sender {
|
||||
self.isFold = !sender.selected;
|
||||
[self.tableView reloadData];
|
||||
// [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
- (void)xPMineDataClanTableViewCell:(XPMineDataClanTableViewCell *)view didClickOpen:(ClanDetailInfoModel *)clanInfo{
|
||||
self.isOpen = YES;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
- (void)xPMineDataClanTableViewCell:(XPMineDataClanTableViewCell *)view didClickEnter:(ClanDetailInfoModel *)clanInfo {
|
||||
[self.presenter memberApplyHall:clanInfo.hall.hallId];
|
||||
}
|
||||
|
||||
- (void)xPMineDataClanTableViewCell:(XPMineDataClanTableViewCell *)view didClickClanView:(ClanDetailInfoModel *)clanInfo {
|
||||
XPMineClanViewController * clanVC = [[XPMineClanViewController alloc] init];
|
||||
clanVC.uid = self.clanDetailInfo.clan.elderUid;
|
||||
[self.navigationController pushViewController:clanVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)xPMineDataClanTableViewCell:(XPMineDataClanTableViewCell *)view didClickHallView:(ClanDetailInfoModel *)clanInfo {
|
||||
XPMineGuildViewController * hallVC = [[XPMineGuildViewController alloc] init];
|
||||
hallVC.ownerUid = clanInfo.hall.ownerUid;
|
||||
hallVC.guildId = clanInfo.hall.hallId;
|
||||
[self.navigationController pushViewController:hallVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineDataGiftTableViewCellDelegate
|
||||
- (void)xPMineDataGiftTableViewCell:(XPMineDataGiftTableViewCell *)view didClickMore:(UIButton *)sender {
|
||||
XPMineUserInfoGiftWallViewController * giftWallVC = [[XPMineUserInfoGiftWallViewController alloc] init];
|
||||
@@ -529,8 +554,6 @@ typedef enum : NSUInteger {
|
||||
[self.navigationController pushViewController:giftWallVC animated:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - JXPagingViewListViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
@@ -548,22 +571,6 @@ typedef enum : NSUInteger {
|
||||
self.scrollCallback(scrollView);
|
||||
}
|
||||
|
||||
#pragma mark - XPMineUserDataProtocol
|
||||
- (void)getClanDetailInfoSuccess:(ClanDetailInfoModel *)clanDetailInfo currentUserClanInfo:(ClanDetailInfoModel *)currentUserClanInfo {
|
||||
self.clanDetailInfo = clanDetailInfo;
|
||||
if (clanDetailInfo.hall.hallName.length > 0 && currentUserClanInfo.hall.hallName.length <= 0 && ![[AccountInfoStorage instance].getUid isEqualToString:self.userUid]) {
|
||||
self.isShowEnterClan = YES;
|
||||
} else {
|
||||
self.isShowEnterClan = NO;
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
// [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
- (void)memberApplyHallSuccess {
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMineUserDataViewController0")];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setUserInfo:(UserInfoModel *)userInfo {
|
||||
_userInfo = userInfo;
|
||||
@@ -573,6 +580,13 @@ typedef enum : NSUInteger {
|
||||
if (userInfo.uid != [[AccountInfoStorage instance].getUid integerValue]) {
|
||||
self.albumHeader.hasMore = NO;
|
||||
}
|
||||
|
||||
@kWeakify(self);
|
||||
[self.presenter loadGamePartnerInfoList:^(NSArray<XPMineGamePartnerInfoModel *> * _Nonnull infos) {
|
||||
@kStrongify(self);
|
||||
self.gameInfos = infos;
|
||||
[self.tableView reloadData];
|
||||
} uid:userInfo.uid];
|
||||
}
|
||||
- (void)setDynamicInfo:(NSArray<MonentsInfoModel *> *)dynamicInfo {
|
||||
[self.datasource removeAllObjects];
|
||||
@@ -596,6 +610,8 @@ typedef enum : NSUInteger {
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPMineDataGameMateTableViewCell class]
|
||||
forCellReuseIdentifier:NSStringFromClass([XPMineDataGameMateTableViewCell class])];
|
||||
[_tableView registerClass:[XPMineAlbumTableViewCell class]
|
||||
forCellReuseIdentifier:NSStringFromClass([XPMineAlbumTableViewCell class])];
|
||||
[_tableView registerClass:[XPMineMedalsTableViewCell class]
|
||||
@@ -603,8 +619,6 @@ typedef enum : NSUInteger {
|
||||
[_tableView registerClass:[XPMineGiftsTableViewCell class]
|
||||
forCellReuseIdentifier:NSStringFromClass([XPMineGiftsTableViewCell class])];
|
||||
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
[_tableView registerClass:[XPMonentsTableViewCell class] forCellReuseIdentifier:@"XPMonentsDynamicTableViewCell"];
|
||||
[_tableView registerClass:[XPMineDataClanTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataClanTableViewCell class])];
|
||||
[_tableView registerClass:[XPMineDataGiftTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDataGiftTableViewCell class])];
|
||||
if (isMSRTL()) {
|
||||
_tableView.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
|
||||
@@ -620,6 +634,15 @@ typedef enum : NSUInteger {
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
- (XPMineUserSectionHeader *)gameMateHeader {
|
||||
if (!_gameMateHeader) {
|
||||
_gameMateHeader = [[XPMineUserSectionHeader alloc] init];
|
||||
_gameMateHeader.title = @"組隊開黑嘿嘿嘿嘿";//YMLocalizedString(@"QinputPhotoView1");
|
||||
_gameMateHeader.hasMore = NO;
|
||||
}
|
||||
return _gameMateHeader;
|
||||
}
|
||||
|
||||
- (XPMineUserSectionHeader *)albumHeader {
|
||||
if (!_albumHeader) {
|
||||
_albumHeader = [[XPMineUserSectionHeader alloc] init];
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#import "XPMineUserInfoHeaderView.h"
|
||||
#import "XPMineUserInfoCustomNavView.h"
|
||||
#import "XPMineUserInfoIndividualTagView.h"
|
||||
#import "XPMineGameMateOrderView.h"
|
||||
///P
|
||||
#import "XPMineUserInfoPresenter.h"
|
||||
#import "XPMineUserInfoProtocol.h"
|
||||
@@ -52,7 +53,7 @@
|
||||
UIKIT_EXTERN NSString * kUpdateSoundInfo;
|
||||
|
||||
@interface XPMineUserInfoViewController ()<
|
||||
XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDelegate, JXCategoryViewDelegate,JXPagerViewDelegate, JXPagerMainTableViewGestureDelegate,XPMineUserInfoEditViewControllerDelegate,XPMineUserInfoTagVCDelegate,XPMineUserInfoIndividualTagViewDelegate>
|
||||
XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDelegate, JXCategoryViewDelegate,JXPagerViewDelegate, JXPagerMainTableViewGestureDelegate,XPMineUserInfoEditViewControllerDelegate,XPMineUserInfoTagVCDelegate,XPMineUserInfoIndividualTagViewDelegate, XPMineUserDataViewControllerDelegate>
|
||||
@property (nonatomic, strong) JXCategoryTitleView *titleView;
|
||||
@property (nonatomic, strong) JXCategoryIndicatorImageView *lineView;
|
||||
@property (nonatomic, strong) JXPagerView *pagingView;
|
||||
@@ -80,6 +81,8 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
|
||||
@property (nonatomic, strong) XPMomentUserDataViewController *userMomentVC;
|
||||
|
||||
@property (nonatomic, strong) XPMineGameMateOrderView *gameOrderView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineUserInfoViewController
|
||||
@@ -230,9 +233,26 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineUserDataViewControllerDelegate
|
||||
- (void)showGameOrderView:(XPMineGamePartnerInfoModel *)model {
|
||||
XPMineGameMateOrderView *view = [[XPMineGameMateOrderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
[self.view addSubview:view];
|
||||
view.infoModel = model;
|
||||
@kWeakify(self);
|
||||
view.payForGame = ^(NSInteger round) {
|
||||
@kStrongify(self);
|
||||
[self.userDataVC submitGameOrder:model round:round];
|
||||
};
|
||||
self.gameOrderView = view;
|
||||
}
|
||||
|
||||
- (void)dismissGameOrderView {
|
||||
[self.gameOrderView removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
|
||||
return [XPMineUserInfoHeaderView headerHeight:self.userInfo]; //500; //358;
|
||||
return [XPMineUserInfoHeaderView headerHeight:self.userInfo];
|
||||
}
|
||||
|
||||
- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
|
||||
@@ -527,7 +547,7 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
- (XPMineUserDataViewController *)userDataVC {
|
||||
if (!_userDataVC) {
|
||||
_userDataVC = [[XPMineUserDataViewController alloc] init];
|
||||
// _userDataVC.delegate = self;
|
||||
_userDataVC.delegate = self;
|
||||
}
|
||||
return _userDataVC;
|
||||
}
|
||||
|
@@ -365,7 +365,6 @@
|
||||
[self.presenter getContactCustomerService];
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
|
||||
}
|
||||
}
|
||||
- (void)getContactCustomerServiceSuccessWithUid:(NSString *)uid{
|
||||
|
@@ -140,8 +140,6 @@ return view;\
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
// [self initSubViews];
|
||||
// [self initSubViewConstraints];
|
||||
[self setupUI];
|
||||
}
|
||||
return self;
|
||||
@@ -169,7 +167,7 @@ return view;\
|
||||
// 计算行数
|
||||
NSInteger numberOfLines = ceil(textRect.size.height / lineHeight);
|
||||
if (numberOfLines>1) {
|
||||
return 480;
|
||||
return 470 + 14 * numberOfLines;
|
||||
}
|
||||
}
|
||||
return 500;
|
||||
|
16
YuMi/Modules/YMMine/View/XPGameOrdersListViewController.h
Normal file
16
YuMi/Modules/YMMine/View/XPGameOrdersListViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPGameOrdersListViewController.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPGameOrdersListViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
355
YuMi/Modules/YMMine/View/XPGameOrdersListViewController.m
Normal file
355
YuMi/Modules/YMMine/View/XPGameOrdersListViewController.m
Normal file
@@ -0,0 +1,355 @@
|
||||
//
|
||||
// XPGameOrdersListViewController.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by P on 2024/7/9.
|
||||
//
|
||||
|
||||
#import "XPGameOrdersListViewController.h"
|
||||
#import "XPGameOrdersListTableViewCell.h"
|
||||
#import "XPMineUserDataPresenter.h"
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import "SessionViewController.h"
|
||||
#import "XPMineGamePartnerInfoModel.h"
|
||||
#import "XPMineGameMateOrderView.h"
|
||||
#import "XPMineUserDataPresenter.h"
|
||||
|
||||
@interface XPGameOrdersListViewController () <UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (nonatomic, assign) NSInteger page;
|
||||
@property (nonatomic, assign) NSInteger type;
|
||||
|
||||
@property (nonatomic, strong) UIStackView *topStack;
|
||||
|
||||
@property (nonatomic, strong) UIButton *tab_1_button;
|
||||
@property (nonatomic, strong) UIButton *tab_2_button;
|
||||
@property (nonatomic, strong) UIView *underLine;
|
||||
|
||||
@property (nonatomic, strong) UITableView *myOrderTableView;
|
||||
@property (nonatomic, strong) UITableView *acceptOrderTableView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *myOrders;
|
||||
@property (nonatomic, strong) NSMutableArray *acceptOrders;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPGameOrdersListViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
self.type = 0;
|
||||
self.title = @"點單紀錄";
|
||||
self.myOrders = @[].mutableCopy;
|
||||
self.acceptOrders = @[].mutableCopy;
|
||||
self.tab_1_button.selected = YES;
|
||||
[self setup];
|
||||
[self initHeaderAndFooterRefresh:self.myOrderTableView];
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear: animated];
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPMineUserDataPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)createHeaderFor:(UITableView *)tableView {
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
|
||||
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
header.lastUpdatedTimeLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
tableView.mj_header = header;
|
||||
}
|
||||
|
||||
- (void)createFooterFor:(UITableView *)tableView {
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
tableView.mj_footer = footer;
|
||||
}
|
||||
|
||||
- (void)initHeaderAndFooterRefresh:(UITableView *)tableView {
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
|
||||
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
header.lastUpdatedTimeLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
tableView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
tableView.mj_footer = footer;
|
||||
}
|
||||
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
|
||||
if (self.type == 0) {
|
||||
self.myOrders = @[].mutableCopy;
|
||||
} else {
|
||||
self.acceptOrders = @[].mutableCopy;
|
||||
}
|
||||
|
||||
@kWeakify(self);
|
||||
[self.presenter loadGameOrderRecord:^(NSArray<XPMineGameOrderRecoredModel *> * _Nonnull orderRecords){
|
||||
@kStrongify(self);
|
||||
if (self.type == 0) {
|
||||
[self.myOrders addObjectsFromArray:orderRecords];
|
||||
[self.myOrderTableView reloadData];
|
||||
[self.myOrderTableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.acceptOrders addObjectsFromArray:orderRecords];
|
||||
[self.acceptOrderTableView reloadData];
|
||||
[self.acceptOrderTableView.mj_header endRefreshing];
|
||||
}
|
||||
} failure:^(NSString * _Nonnull msg) {
|
||||
@kStrongify(self);
|
||||
if (self.type == 0) {
|
||||
[self.myOrderTableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.acceptOrderTableView.mj_header endRefreshing];
|
||||
}
|
||||
} page:self.page type:self.type];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
self.page++;
|
||||
@kWeakify(self);
|
||||
[self.presenter loadGameOrderRecord:^(NSArray<XPMineGameOrderRecoredModel *> * _Nonnull orderRecords){
|
||||
@kStrongify(self)
|
||||
if (self.type == 0) {
|
||||
[self.myOrders addObjectsFromArray:orderRecords];
|
||||
[self.myOrderTableView reloadData];
|
||||
[self.myOrderTableView.mj_footer endRefreshing];
|
||||
} else {
|
||||
[self.acceptOrders addObjectsFromArray:orderRecords];
|
||||
[self.acceptOrderTableView reloadData];
|
||||
[self.acceptOrderTableView.mj_footer endRefreshing];
|
||||
}
|
||||
} failure:^(NSString * _Nonnull msg) {
|
||||
@kStrongify(self);
|
||||
if (self.type == 0) {
|
||||
[self.myOrderTableView.mj_footer endRefreshing];
|
||||
} else {
|
||||
[self.acceptOrderTableView.mj_footer endRefreshing];
|
||||
}
|
||||
} page:self.page type:self.type];
|
||||
}
|
||||
|
||||
- (void)setup {
|
||||
self.view.backgroundColor = UIColorFromRGB(0xf9f9f9);
|
||||
|
||||
UIStackView *topStack = [[UIStackView alloc] init];
|
||||
topStack.axis = UILayoutConstraintAxisHorizontal;
|
||||
topStack.distribution = UIStackViewDistributionFill;
|
||||
topStack.alignment = UIStackViewAlignmentLeading;
|
||||
topStack.spacing = 30;
|
||||
[topStack addArrangedSubview:self.tab_1_button];
|
||||
[topStack addArrangedSubview:self.tab_2_button];
|
||||
[self.view addSubview:topStack];
|
||||
self.topStack = topStack;
|
||||
[topStack mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.mas_equalTo(13);
|
||||
make.height.mas_equalTo(36);
|
||||
}];
|
||||
|
||||
[topStack addSubview:self.underLine];
|
||||
[self.underLine mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.tab_1_button.mas_bottom).offset(-4);
|
||||
make.centerX.mas_equalTo(self.tab_1_button);
|
||||
make.size.mas_equalTo(CGSizeMake(14, 3));
|
||||
}];
|
||||
|
||||
|
||||
[self.view addSubview:self.myOrderTableView];
|
||||
[self.myOrderTableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(14);
|
||||
// make.right.mas_equalTo(-14);
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(topStack.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.acceptOrderTableView];
|
||||
[self.acceptOrderTableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(14);
|
||||
// make.right.mas_equalTo(-14);
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(topStack.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)didTapButton1:(id)sender {
|
||||
self.tab_1_button.selected = YES;
|
||||
self.tab_2_button.selected = NO;
|
||||
[self.underLine mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.tab_1_button.mas_bottom).offset(-4);
|
||||
make.centerX.mas_equalTo(self.tab_1_button);
|
||||
make.size.mas_equalTo(CGSizeMake(14, 3));
|
||||
}];
|
||||
|
||||
self.myOrderTableView.hidden = NO;
|
||||
self.acceptOrderTableView.hidden = YES;
|
||||
self.myOrderTableView.userInteractionEnabled = YES;
|
||||
self.acceptOrderTableView.userInteractionEnabled = NO;
|
||||
|
||||
self.type = 0;
|
||||
if (self.myOrders.count == 0) {
|
||||
[self headerRefresh];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)didTapButton2:(id)sender {
|
||||
if (self.acceptOrderTableView.mj_header == nil) {
|
||||
[self initHeaderAndFooterRefresh:self.acceptOrderTableView];
|
||||
}
|
||||
self.tab_1_button.selected = NO;
|
||||
self.tab_2_button.selected = YES;
|
||||
[self.underLine mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.tab_2_button.mas_bottom).offset(-4);
|
||||
make.centerX.mas_equalTo(self.tab_2_button);
|
||||
make.size.mas_equalTo(CGSizeMake(14, 3));
|
||||
}];
|
||||
|
||||
self.myOrderTableView.hidden = YES;
|
||||
self.acceptOrderTableView.hidden = NO;
|
||||
self.myOrderTableView.userInteractionEnabled = NO;
|
||||
self.acceptOrderTableView.userInteractionEnabled = YES;
|
||||
|
||||
self.type = 1;
|
||||
if (self.acceptOrders.count == 0) {
|
||||
[self headerRefresh];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UITable DataSource & Delegate
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
if (tableView == self.myOrderTableView) {
|
||||
return self.myOrders.count;
|
||||
} else {
|
||||
return self.acceptOrders.count;
|
||||
}
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 262 + 16;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPGameOrdersListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPGameOrdersListTableViewCell class])
|
||||
forIndexPath:indexPath];
|
||||
if (tableView == self.myOrderTableView) {
|
||||
cell.model = [self.myOrders xpSafeObjectAtIndex:indexPath.row];
|
||||
} else {
|
||||
cell.model = [self.acceptOrders xpSafeObjectAtIndex:indexPath.row];
|
||||
}
|
||||
cell.type = self.type;
|
||||
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
|
||||
@kWeakify(self);
|
||||
cell.didTapChat = ^(XPMineGameOrderRecoredModel * _Nonnull model) {
|
||||
@kStrongify(self);
|
||||
// NSInteger uid = cell.type == 0 ? model.toUid : model.fromUid;
|
||||
NIMSession * session = [NIMSession session:@(model.fromUid).stringValue type:NIMSessionTypeP2P];
|
||||
SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:session];
|
||||
[self.navigationController pushViewController:sessionVC animated:YES];
|
||||
};
|
||||
|
||||
cell.didTapPlayAgain = ^(XPMineGameOrderRecoredModel * _Nonnull record) {
|
||||
@kStrongify(self);
|
||||
XPMineGameMateOrderView *view = [[XPMineGameMateOrderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight - kNavigationHeight)];
|
||||
[self.view addSubview:view];
|
||||
view.infoModel = [XPMineGamePartnerInfoModel modelFromRecord:record];
|
||||
// model 要轉換
|
||||
@kWeakify(self);
|
||||
@kWeakify(view);
|
||||
view.payForGame = ^(NSInteger round) {
|
||||
@kStrongify(self);
|
||||
@kStrongify(view);
|
||||
XPMineUserDataPresenter *udp = [[XPMineUserDataPresenter alloc] init];
|
||||
[udp submitOrder:^{
|
||||
|
||||
} failure:^(NSString * _Nonnull msg) {
|
||||
|
||||
}
|
||||
gameId:view.infoModel.gameId
|
||||
gameUid:view.infoModel.uid
|
||||
inning:round];
|
||||
};
|
||||
};
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (UITableView *)myOrderTableView {
|
||||
if (!_myOrderTableView) {
|
||||
_myOrderTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_myOrderTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_myOrderTableView.backgroundColor = [UIColor clearColor];
|
||||
_myOrderTableView.dataSource = self;
|
||||
_myOrderTableView.delegate = self;
|
||||
_myOrderTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
[_myOrderTableView registerClass:[XPGameOrdersListTableViewCell class]
|
||||
forCellReuseIdentifier:NSStringFromClass([XPGameOrdersListTableViewCell class])];
|
||||
}
|
||||
return _myOrderTableView;
|
||||
}
|
||||
|
||||
- (UITableView *)acceptOrderTableView {
|
||||
if (!_acceptOrderTableView) {
|
||||
_acceptOrderTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_acceptOrderTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_acceptOrderTableView.backgroundColor = [UIColor clearColor];
|
||||
_acceptOrderTableView.dataSource = self;
|
||||
_acceptOrderTableView.delegate = self;
|
||||
_acceptOrderTableView.userInteractionEnabled = NO;
|
||||
_acceptOrderTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
[_acceptOrderTableView registerClass:[XPGameOrdersListTableViewCell class]
|
||||
forCellReuseIdentifier:NSStringFromClass([XPGameOrdersListTableViewCell class])];
|
||||
}
|
||||
return _acceptOrderTableView;
|
||||
}
|
||||
|
||||
- (UIButton *)tab_1_button {
|
||||
if (!_tab_1_button) {
|
||||
_tab_1_button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_tab_1_button setTitle:@"我發起的" forState:UIControlStateNormal];
|
||||
[_tab_1_button.titleLabel setFont:kFontBold(14)];
|
||||
[_tab_1_button setTitleColor:[UIColor blackColor] forState:UIControlStateSelected];
|
||||
[_tab_1_button setTitleColor:[UIColor colorWithWhite:0 alpha:0.4] forState:UIControlStateNormal];
|
||||
[_tab_1_button addTarget:self action:@selector(didTapButton1:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _tab_1_button;
|
||||
}
|
||||
|
||||
- (UIButton *)tab_2_button {
|
||||
if (!_tab_2_button) {
|
||||
_tab_2_button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_tab_2_button setTitle:@"我接受的" forState:UIControlStateNormal];
|
||||
[_tab_2_button.titleLabel setFont:kFontBold(14)];
|
||||
[_tab_2_button setTitleColor:[UIColor blackColor] forState:UIControlStateSelected];
|
||||
[_tab_2_button setTitleColor:[UIColor colorWithWhite:0 alpha:0.4] forState:UIControlStateNormal];
|
||||
[_tab_2_button addTarget:self action:@selector(didTapButton2:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _tab_2_button;
|
||||
}
|
||||
|
||||
- (UIView *)underLine {
|
||||
if (!_underLine) {
|
||||
_underLine = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 14, 3)];
|
||||
[_underLine setBackgroundColor:UIColorFromRGB(0x0fca81)];
|
||||
_underLine.layer.cornerRadius = 1.5;
|
||||
_underLine.layer.masksToBounds = YES;
|
||||
}
|
||||
return _underLine;
|
||||
}
|
||||
|
||||
@end
|
@@ -67,6 +67,9 @@
|
||||
#import "XPLittleGameRoomOpenView.h"
|
||||
#import "XPMineGameTableViewCell.h"
|
||||
#import "PISwitchingEnvironmentVC.h"
|
||||
#import "XPGameOrdersListViewController.h"
|
||||
|
||||
|
||||
UIKIT_EXTERN NSString *kRequestRicket;
|
||||
|
||||
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineHeadItemTableViewCellDelegate, XPMineHeadViewDelegate, XPHomeBannerTableViewCellDelegate>
|
||||
@@ -316,6 +319,10 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
case XPMineItemType_My_Gift:
|
||||
{
|
||||
[self pushGiveDiamondVC];
|
||||
}
|
||||
break;
|
||||
case XPMineItemType_My_Game_Order: {
|
||||
[self toGameOrdersList];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -323,6 +330,10 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)toGameOrdersList {
|
||||
XPGameOrdersListViewController *vc = [[XPGameOrdersListViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (void)pushWebViewWIthUrl:(NSString *)url {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
|
@@ -31,19 +31,20 @@ static const NSInteger kItemsPerRow = 5;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.backBtn];
|
||||
[self addSubview:self.ms_bgView];
|
||||
[self.ms_bgView addSubview:self.collectionView];
|
||||
[self addSubview:self.collectionView];
|
||||
}
|
||||
-(void)installConstraints{
|
||||
[self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
[self.ms_bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.leading.trailing.equalTo(self).inset(kGetScaleWidth(0));
|
||||
make.leading.trailing.equalTo(self).inset(0);
|
||||
make.bottom.equalTo(self).offset(12);
|
||||
make.height.mas_equalTo(kGetScaleWidth(246));
|
||||
|
||||
}];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.ms_bgView);
|
||||
make.bottom.leading.trailing.equalTo(self).inset(kGetScaleWidth(0));
|
||||
make.height.mas_equalTo(kGetScaleWidth(246));
|
||||
}];
|
||||
}
|
||||
-(void)backBtnAction{
|
||||
@@ -53,7 +54,7 @@ static const NSInteger kItemsPerRow = 5;
|
||||
}
|
||||
-(void)setPlayList:(NSMutableArray *)playList {
|
||||
_playList = playList;
|
||||
[self updateViewHeightWithItemCount:playList.count];
|
||||
[self updateViewHeightWithItemCount:_playList.count];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.collectionView reloadData];
|
||||
});
|
||||
@@ -61,7 +62,7 @@ static const NSInteger kItemsPerRow = 5;
|
||||
|
||||
- (void)setLittleGameList:(NSMutableArray<LittleGameInfoModel *> *)littleGameList {
|
||||
_littleGameList = littleGameList;
|
||||
[self updateViewHeightWithItemCount:littleGameList.count];
|
||||
[self updateViewHeightWithItemCount:_littleGameList.count];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.collectionView reloadData];
|
||||
});
|
||||
@@ -70,7 +71,12 @@ static const NSInteger kItemsPerRow = 5;
|
||||
- (void)updateViewHeightWithItemCount:(NSInteger)count {
|
||||
NSInteger lineNum = (count + kItemsPerRow - 1)/kItemsPerRow;
|
||||
CGFloat height = 20 + 56 * lineNum + 44 * (lineNum - 1) + 70;
|
||||
height = kGetScaleWidth(100) * lineNum;
|
||||
// [_ms_bgView setCornerWithLeftTopCorner:kGetScaleWidth(12) rightTopCorner:kGetScaleWidth(12) bottomLeftCorner:0 bottomRightCorner:0 size:CGSizeMake(KScreenWidth, height-48)];
|
||||
[self.ms_bgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(height + 12));
|
||||
}];
|
||||
[self.collectionView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(height));
|
||||
}];
|
||||
}
|
||||
@@ -136,7 +142,9 @@ static const NSInteger kItemsPerRow = 5;
|
||||
if(!_ms_bgView){
|
||||
_ms_bgView = [UIView new];
|
||||
_ms_bgView.backgroundColor = UIColorFromRGB(0x2D1E4D);
|
||||
[_ms_bgView setCornerWithLeftTopCorner:kGetScaleWidth(12) rightTopCorner:kGetScaleWidth(12) bottomLeftCorner:0 bottomRightCorner:0 size:CGSizeMake(KScreenWidth, kGetScaleWidth(247))];
|
||||
_ms_bgView.layer.cornerRadius = 12;
|
||||
_ms_bgView.layer.masksToBounds = YES;
|
||||
// [_ms_bgView setCornerWithLeftTopCorner:kGetScaleWidth(12) rightTopCorner:kGetScaleWidth(12) bottomLeftCorner:0 bottomRightCorner:0 size:CGSizeMake(KScreenWidth, kGetScaleWidth(247))];
|
||||
}
|
||||
return _ms_bgView;
|
||||
}
|
||||
|
@@ -1931,7 +1931,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (message.yidunAntiSpamRes) {
|
||||
NSDictionary * spamRes = message.yidunAntiSpamRes.toJSONObject;
|
||||
NSDictionary * spamResExt = ((NSString *)spamRes[@"ext"]).toJSONObject;
|
||||
|
Reference in New Issue
Block a user