Compare commits

...

6 Commits

Author SHA1 Message Date
QQQ
78152a54d4 移除 A/B 相关代码。
移除 XPSimpleMineViewController
2024-05-22 19:29:14 +08:00
QQQ
e8db7fb24d 移除固定的储值入口 2024-05-22 19:17:13 +08:00
QQQ
0438d882d3 移除 A/B 相关代码。
移除 XPMomentListViewController
2024-05-22 19:10:34 +08:00
QQQ
48560b5eb6 移除 A/B 相关代码。
移除 XPHomeSloganViewController
2024-05-22 19:06:21 +08:00
QQQ
c6799634e7 移除 A/B 相关代码。
移除 XPMineSimpleUserInfoViewController
2024-05-22 19:05:50 +08:00
QQQ
9cb71643f1 移除 A/B 相关代码。
通过 [ClientConfig shareConfig].canOpen 控制页面,现在已没有相关配置,删除/调整相关内容,[ClientConfig shareConfig].canOpen == YES 的部分将保留等价逻辑/代码
2024-05-22 18:58:09 +08:00
44 changed files with 411 additions and 2397 deletions

View File

@@ -35,14 +35,11 @@
142721AF29A75F6F00C7C423 /* SJXCSMIPHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427218629A75F6F00C7C423 /* SJXCSMIPHelper.m */; }; 142721AF29A75F6F00C7C423 /* SJXCSMIPHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1427218629A75F6F00C7C423 /* SJXCSMIPHelper.m */; };
142721B229A7647F00C7C423 /* XPBlankViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 142721B129A7647F00C7C423 /* XPBlankViewController.m */; }; 142721B229A7647F00C7C423 /* XPBlankViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 142721B129A7647F00C7C423 /* XPBlankViewController.m */; };
1464C5EA29A45FC300AF7C94 /* XPButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5E929A45FC300AF7C94 /* XPButton.m */; }; 1464C5EA29A45FC300AF7C94 /* XPButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5E929A45FC300AF7C94 /* XPButton.m */; };
1464C5ED29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5EC29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.m */; };
1464C5F029A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5EF29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m */; }; 1464C5F029A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5EF29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m */; };
1464C5F329A4C18000AF7C94 /* XPIAPRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F229A4C18000AF7C94 /* XPIAPRechargeViewController.m */; }; 1464C5F329A4C18000AF7C94 /* XPIAPRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F229A4C18000AF7C94 /* XPIAPRechargeViewController.m */; };
1464C5F629A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F529A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m */; }; 1464C5F629A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F529A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m */; };
1464C5F929A4D00000AF7C94 /* XPIAPRechargeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F829A4D00000AF7C94 /* XPIAPRechargeHeaderView.m */; }; 1464C5F929A4D00000AF7C94 /* XPIAPRechargeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F829A4D00000AF7C94 /* XPIAPRechargeHeaderView.m */; };
149839C4299E088000F82CBF /* XPMomentListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 149839C3299E088000F82CBF /* XPMomentListViewController.m */; };
149839C7299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 149839C6299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m */; }; 149839C7299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 149839C6299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m */; };
14A6034929A3567200D2A6A5 /* XPSimpleMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034829A3567200D2A6A5 /* XPSimpleMineViewController.m */; };
14A6034C29A35EE600D2A6A5 /* XPMineItemTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */; }; 14A6034C29A35EE600D2A6A5 /* XPMineItemTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */; };
14A6034F29A36D8300D2A6A5 /* XPSimpleMineHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034E29A36D8300D2A6A5 /* XPSimpleMineHeaderView.m */; }; 14A6034F29A36D8300D2A6A5 /* XPSimpleMineHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034E29A36D8300D2A6A5 /* XPSimpleMineHeaderView.m */; };
14B880E1299A1799005FCA1B /* XPLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14B880E0299A1799005FCA1B /* XPLoginViewController.m */; }; 14B880E1299A1799005FCA1B /* XPLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14B880E0299A1799005FCA1B /* XPLoginViewController.m */; };
@@ -1222,7 +1219,6 @@
E87DF4D72A42C9C3009C1185 /* HomePlayRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4D52A42C9C3009C1185 /* HomePlayRoomModel.m */; }; E87DF4D72A42C9C3009C1185 /* HomePlayRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4D52A42C9C3009C1185 /* HomePlayRoomModel.m */; };
E87DF4DA2A42C9D9009C1185 /* HomeCollectRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4D82A42C9D8009C1185 /* HomeCollectRoomModel.m */; }; E87DF4DA2A42C9D9009C1185 /* HomeCollectRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4D82A42C9D8009C1185 /* HomeCollectRoomModel.m */; };
E87DF4DD2A42CA12009C1185 /* HomeSearchResultModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4DB2A42CA12009C1185 /* HomeSearchResultModel.m */; }; E87DF4DD2A42CA12009C1185 /* HomeSearchResultModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4DB2A42CA12009C1185 /* HomeSearchResultModel.m */; };
E87DF4E02A42CA92009C1185 /* XPHomeSloganViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4DE2A42CA92009C1185 /* XPHomeSloganViewController.m */; };
E87DF4E42A42CAD2009C1185 /* XPHomeSearchNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4E22A42CAD2009C1185 /* XPHomeSearchNavView.m */; }; E87DF4E42A42CAD2009C1185 /* XPHomeSearchNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4E22A42CAD2009C1185 /* XPHomeSearchNavView.m */; };
E87DF4E72A42CB00009C1185 /* XPHomePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4E52A42CAFF009C1185 /* XPHomePresenter.m */; }; E87DF4E72A42CB00009C1185 /* XPHomePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4E52A42CAFF009C1185 /* XPHomePresenter.m */; };
E87DF4EC2A42CB60009C1185 /* XPSearchListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4EA2A42CB60009C1185 /* XPSearchListTableViewCell.m */; }; E87DF4EC2A42CB60009C1185 /* XPSearchListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87DF4EA2A42CB60009C1185 /* XPSearchListTableViewCell.m */; };
@@ -1588,8 +1584,6 @@
142721B129A7647F00C7C423 /* XPBlankViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPBlankViewController.m; sourceTree = "<group>"; }; 142721B129A7647F00C7C423 /* XPBlankViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPBlankViewController.m; sourceTree = "<group>"; };
1464C5E829A45FC300AF7C94 /* XPButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPButton.h; sourceTree = "<group>"; }; 1464C5E829A45FC300AF7C94 /* XPButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPButton.h; sourceTree = "<group>"; };
1464C5E929A45FC300AF7C94 /* XPButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPButton.m; sourceTree = "<group>"; }; 1464C5E929A45FC300AF7C94 /* XPButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPButton.m; sourceTree = "<group>"; };
1464C5EB29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSimpleUserInfoViewController.h; sourceTree = "<group>"; };
1464C5EC29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSimpleUserInfoViewController.m; sourceTree = "<group>"; };
1464C5EE29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSimpleUserInfoHeaderView.h; sourceTree = "<group>"; }; 1464C5EE29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSimpleUserInfoHeaderView.h; sourceTree = "<group>"; };
1464C5EF29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSimpleUserInfoHeaderView.m; sourceTree = "<group>"; }; 1464C5EF29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSimpleUserInfoHeaderView.m; sourceTree = "<group>"; };
1464C5F129A4C18000AF7C94 /* XPIAPRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIAPRechargeViewController.h; sourceTree = "<group>"; }; 1464C5F129A4C18000AF7C94 /* XPIAPRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIAPRechargeViewController.h; sourceTree = "<group>"; };
@@ -1598,12 +1592,8 @@
1464C5F529A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIAPRechargeCollectionViewCell.m; sourceTree = "<group>"; }; 1464C5F529A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIAPRechargeCollectionViewCell.m; sourceTree = "<group>"; };
1464C5F729A4D00000AF7C94 /* XPIAPRechargeHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIAPRechargeHeaderView.h; sourceTree = "<group>"; }; 1464C5F729A4D00000AF7C94 /* XPIAPRechargeHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIAPRechargeHeaderView.h; sourceTree = "<group>"; };
1464C5F829A4D00000AF7C94 /* XPIAPRechargeHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIAPRechargeHeaderView.m; sourceTree = "<group>"; }; 1464C5F829A4D00000AF7C94 /* XPIAPRechargeHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIAPRechargeHeaderView.m; sourceTree = "<group>"; };
149839C2299E088000F82CBF /* XPMomentListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentListViewController.h; sourceTree = "<group>"; };
149839C3299E088000F82CBF /* XPMomentListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentListViewController.m; sourceTree = "<group>"; };
149839C5299E0B9F00F82CBF /* XPMomentListCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentListCollectionViewCell.h; sourceTree = "<group>"; }; 149839C5299E0B9F00F82CBF /* XPMomentListCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentListCollectionViewCell.h; sourceTree = "<group>"; };
149839C6299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentListCollectionViewCell.m; sourceTree = "<group>"; }; 149839C6299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentListCollectionViewCell.m; sourceTree = "<group>"; };
14A6034729A3567200D2A6A5 /* XPSimpleMineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSimpleMineViewController.h; sourceTree = "<group>"; };
14A6034829A3567200D2A6A5 /* XPSimpleMineViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSimpleMineViewController.m; sourceTree = "<group>"; };
14A6034A29A35EE600D2A6A5 /* XPMineItemTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineItemTableViewCell.h; sourceTree = "<group>"; }; 14A6034A29A35EE600D2A6A5 /* XPMineItemTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineItemTableViewCell.h; sourceTree = "<group>"; };
14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineItemTableViewCell.m; sourceTree = "<group>"; }; 14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineItemTableViewCell.m; sourceTree = "<group>"; };
14A6034D29A36D8300D2A6A5 /* XPSimpleMineHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSimpleMineHeaderView.h; sourceTree = "<group>"; }; 14A6034D29A36D8300D2A6A5 /* XPSimpleMineHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSimpleMineHeaderView.h; sourceTree = "<group>"; };
@@ -3816,8 +3806,6 @@
E87DF4D92A42C9D9009C1185 /* HomeCollectRoomModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeCollectRoomModel.h; sourceTree = "<group>"; }; E87DF4D92A42C9D9009C1185 /* HomeCollectRoomModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeCollectRoomModel.h; sourceTree = "<group>"; };
E87DF4DB2A42CA12009C1185 /* HomeSearchResultModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeSearchResultModel.m; sourceTree = "<group>"; }; E87DF4DB2A42CA12009C1185 /* HomeSearchResultModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeSearchResultModel.m; sourceTree = "<group>"; };
E87DF4DC2A42CA12009C1185 /* HomeSearchResultModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeSearchResultModel.h; sourceTree = "<group>"; }; E87DF4DC2A42CA12009C1185 /* HomeSearchResultModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeSearchResultModel.h; sourceTree = "<group>"; };
E87DF4DE2A42CA92009C1185 /* XPHomeSloganViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomeSloganViewController.m; sourceTree = "<group>"; };
E87DF4DF2A42CA92009C1185 /* XPHomeSloganViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeSloganViewController.h; sourceTree = "<group>"; };
E87DF4E22A42CAD2009C1185 /* XPHomeSearchNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomeSearchNavView.m; sourceTree = "<group>"; }; E87DF4E22A42CAD2009C1185 /* XPHomeSearchNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomeSearchNavView.m; sourceTree = "<group>"; };
E87DF4E32A42CAD2009C1185 /* XPHomeSearchNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeSearchNavView.h; sourceTree = "<group>"; }; E87DF4E32A42CAD2009C1185 /* XPHomeSearchNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeSearchNavView.h; sourceTree = "<group>"; };
E87DF4E52A42CAFF009C1185 /* XPHomePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomePresenter.m; sourceTree = "<group>"; }; E87DF4E52A42CAFF009C1185 /* XPHomePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomePresenter.m; sourceTree = "<group>"; };
@@ -7568,8 +7556,6 @@
E8AB632328AE10310023B0D2 /* XPMoentsTopicListViewController.m */, E8AB632328AE10310023B0D2 /* XPMoentsTopicListViewController.m */,
E8AB632A28AE19600023B0D2 /* XPMonentsMineViewController.h */, E8AB632A28AE19600023B0D2 /* XPMonentsMineViewController.h */,
E8AB632B28AE19600023B0D2 /* XPMonentsMineViewController.m */, E8AB632B28AE19600023B0D2 /* XPMonentsMineViewController.m */,
149839C2299E088000F82CBF /* XPMomentListViewController.h */,
149839C3299E088000F82CBF /* XPMomentListViewController.m */,
14EB640729A5BDDD00A4A00B /* XPMomentsSimpleDetailViewController.h */, 14EB640729A5BDDD00A4A00B /* XPMomentsSimpleDetailViewController.h */,
14EB640829A5BDDD00A4A00B /* XPMomentsSimpleDetailViewController.m */, 14EB640829A5BDDD00A4A00B /* XPMomentsSimpleDetailViewController.m */,
14EB640B29A5C16000A4A00B /* XPMomentsSimpleDetailNav.h */, 14EB640B29A5C16000A4A00B /* XPMomentsSimpleDetailNav.h */,
@@ -9265,8 +9251,6 @@
E87E62522A3F55B2002F68C9 /* View */ = { E87E62522A3F55B2002F68C9 /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E87DF4DF2A42CA92009C1185 /* XPHomeSloganViewController.h */,
E87DF4DE2A42CA92009C1185 /* XPHomeSloganViewController.m */,
E87DF4B82A42C7BB009C1185 /* Search */, E87DF4B82A42C7BB009C1185 /* Search */,
E87E625F2A3F5669002F68C9 /* Cell */, E87E625F2A3F5669002F68C9 /* Cell */,
E87E625E2A3F565D002F68C9 /* CustomView */, E87E625E2A3F565D002F68C9 /* CustomView */,
@@ -9522,8 +9506,6 @@
E8D34D6328084E40009C4835 /* XPMineUserInfoGiftWallViewController.m */, E8D34D6328084E40009C4835 /* XPMineUserInfoGiftWallViewController.m */,
E8998D892859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.h */, E8998D892859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.h */,
E8998D8A2859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.m */, E8998D8A2859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.m */,
1464C5EB29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.h */,
1464C5EC29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.m */,
1464C5EE29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.h */, 1464C5EE29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.h */,
1464C5EF29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m */, 1464C5EF29A49DDD00AF7C94 /* XPMineSimpleUserInfoHeaderView.m */,
); );
@@ -10539,8 +10521,6 @@
9BD2ECCD288F829600F5CD9A /* XPMineFootPrintViewController.m */, 9BD2ECCD288F829600F5CD9A /* XPMineFootPrintViewController.m */,
9B1B729328002099003FACE9 /* XPMineFansTeamViewController.h */, 9B1B729328002099003FACE9 /* XPMineFansTeamViewController.h */,
9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */, 9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */,
14A6034729A3567200D2A6A5 /* XPSimpleMineViewController.h */,
14A6034829A3567200D2A6A5 /* XPSimpleMineViewController.m */,
14A6034A29A35EE600D2A6A5 /* XPMineItemTableViewCell.h */, 14A6034A29A35EE600D2A6A5 /* XPMineItemTableViewCell.h */,
14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */, 14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */,
14A6034D29A36D8300D2A6A5 /* XPSimpleMineHeaderView.h */, 14A6034D29A36D8300D2A6A5 /* XPSimpleMineHeaderView.h */,
@@ -11403,7 +11383,6 @@
F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */, F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */,
238B37C72AC55A2C00BFC9D5 /* XPTreasureFairyPrizeRecordView.m in Sources */, 238B37C72AC55A2C00BFC9D5 /* XPTreasureFairyPrizeRecordView.m in Sources */,
E8B9843628ABA8B40022D026 /* XPMonentPublishSuccessView.m in Sources */, E8B9843628ABA8B40022D026 /* XPMonentPublishSuccessView.m in Sources */,
E87DF4E02A42CA92009C1185 /* XPHomeSloganViewController.m in Sources */,
238ED83A2AE2891D0014EF9D /* PIRoomEnterRedPacketView.m in Sources */, 238ED83A2AE2891D0014EF9D /* PIRoomEnterRedPacketView.m in Sources */,
23E9E9972A80C3A100B792F2 /* XPMineGuildPersonalBillRecordVC.m in Sources */, 23E9E9972A80C3A100B792F2 /* XPMineGuildPersonalBillRecordVC.m in Sources */,
E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */, E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */,
@@ -11675,7 +11654,6 @@
14B880E7299A4B62005FCA1B /* XPLoginPhoneViewController.m in Sources */, 14B880E7299A4B62005FCA1B /* XPLoginPhoneViewController.m in Sources */,
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */, E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */, 189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
149839C4299E088000F82CBF /* XPMomentListViewController.m in Sources */,
E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */, E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */,
233423CD2AAEE98200B1253F /* XPCandyTreeConfirmBuyNumView.m in Sources */, 233423CD2AAEE98200B1253F /* XPCandyTreeConfirmBuyNumView.m in Sources */,
2331C1AD2A60F32D00E1D940 /* XPCandyTreeAnimationModel.m in Sources */, 2331C1AD2A60F32D00E1D940 /* XPCandyTreeAnimationModel.m in Sources */,
@@ -11971,7 +11949,6 @@
2357146E2BEB816B004C81D6 /* MSSessionPublicChatHallHeadView.m in Sources */, 2357146E2BEB816B004C81D6 /* MSSessionPublicChatHallHeadView.m in Sources */,
238B37CD2AC55A2C00BFC9D5 /* XPTreasureFailyResultView.m in Sources */, 238B37CD2AC55A2C00BFC9D5 /* XPTreasureFailyResultView.m in Sources */,
E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */, E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */,
1464C5ED29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.m in Sources */,
E8098CB1282E86EF0090B9F0 /* XPMonentsContentView.m in Sources */, E8098CB1282E86EF0090B9F0 /* XPMonentsContentView.m in Sources */,
E85E3FA728B7A6F000268DC8 /* MessageContentMonentsView.m in Sources */, E85E3FA728B7A6F000268DC8 /* MessageContentMonentsView.m in Sources */,
234E50A82BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m in Sources */, 234E50A82BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m in Sources */,
@@ -12355,7 +12332,6 @@
E87E91522796A15500A7B3F2 /* MicroExtModel.m in Sources */, E87E91522796A15500A7B3F2 /* MicroExtModel.m in Sources */,
E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */, E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */,
E89DCF5728FFF076001647EC /* XPWishGiftEmptyTableViewCell.m in Sources */, E89DCF5728FFF076001647EC /* XPWishGiftEmptyTableViewCell.m in Sources */,
14A6034929A3567200D2A6A5 /* XPSimpleMineViewController.m in Sources */,
237700D32BC7CC7C00D661F1 /* NSObject+MJExtension.m in Sources */, 237700D32BC7CC7C00D661F1 /* NSObject+MJExtension.m in Sources */,
E8D4DE442940462C00EC788D /* XPGiftTwelveStarBroadcastView.m in Sources */, E8D4DE442940462C00EC788D /* XPGiftTwelveStarBroadcastView.m in Sources */,
E81060DF29876D3A00B772F0 /* MessageTimeModel.m in Sources */, E81060DF29876D3A00B772F0 /* MessageTimeModel.m in Sources */,

View File

@@ -234,9 +234,6 @@ UIKIT_EXTERN NSString * adImageName;
/// 广 /// 广
- (void)advertiseJumpHandleWithInfo:(AdvertiseModel *)info { - (void)advertiseJumpHandleWithInfo:(AdvertiseModel *)info {
if (![ClientConfig shareConfig].canOpen) {
return;
}
if (UIApplication.sharedApplication.keyWindow != self.window) { if (UIApplication.sharedApplication.keyWindow != self.window) {
// //
return; return;

View File

@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong) ClientDataModel *configInfo; @property (nonatomic,strong) ClientDataModel *configInfo;
///开箱子 大于等级 展示 ///开箱子 大于等级 展示
@property (nonatomic, assign) NSInteger openCandyTreeLimitLevel; @property (nonatomic, assign) NSInteger openCandyTreeLimitLevel;
@property (nonatomic,assign) BOOL canOpen;
@property(nonatomic,assign) BOOL isTF; @property(nonatomic,assign) BOOL isTF;
///是否刷新了 ///是否刷新了
@property (nonatomic,assign) BOOL isLoad; @property (nonatomic,assign) BOOL isLoad;

View File

@@ -44,9 +44,9 @@
return isTestFlight; return isTestFlight;
} }
- (void)clientInit { - (void)clientInit {
@kWeakify(self);
self.canOpen = YES;
[Api clientInitConfig:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [Api clientInitConfig:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if (code == 200) { if (code == 200) {
self.retryCount = 0; self.retryCount = 0;
NSDictionary * initData = data.data; NSDictionary * initData = data.data;

View File

@@ -40,24 +40,14 @@
#pragma mark - Life Style #pragma mark - Life Style
- (instancetype)initWithItems:(NSArray<XPShareItem *> *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo { - (instancetype)initWithItems:(NSArray<XPShareItem *> *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo {
if (self = [super init]) { if (self = [super init]) {
NSMutableArray *itemList = [NSMutableArray array];
for (XPShareItem * item in items) { for (XPShareItem * item in items) {
if (item.type == XPShareItemTagAppFriends || item.type == XPShareItemTagCopyLink) { if (item.type == XPShareItemTagAppFriends || item.type == XPShareItemTagCopyLink) {
item.disable = YES; item.disable = YES;
} else { } else {
item.disable = [self isInstallClient:[self getSharePlatformType:item.type]]; item.disable = [self isInstallClient:[self getSharePlatformType:item.type]];
} }
if(item.disable == YES){
[itemList addObject:item];
}
} }
if([ClientConfig shareConfig].canOpen){ self.items = [NSMutableArray arrayWithArray:items];
self.items = [NSMutableArray arrayWithArray:items];
}else{
self.items = itemList;
}
self.itemSize =itemSize; self.itemSize =itemSize;
self.shareInfo = shareInfo; self.shareInfo = shareInfo;
[self initSubViews]; [self initSubViews];

View File

@@ -22,7 +22,7 @@
#import "XPSessionFindNewFiltrateView.h" #import "XPSessionFindNewFiltrateView.h"
#import "XPSessionFindNewGreetListView.h" #import "XPSessionFindNewGreetListView.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
///P ///P
#import "XPSessionFindNewProtocol.h" #import "XPSessionFindNewProtocol.h"
#import "XPSessionFindNewPresenter.h" #import "XPSessionFindNewPresenter.h"
@@ -170,15 +170,9 @@
- (void)xPSessionFindNewTableViewCell:(XPSessionFindNewTableViewCell *)cell didClickAvatar:(FindNewUserInfoModel *)userInfo { - (void)xPSessionFindNewTableViewCell:(XPSessionFindNewTableViewCell *)cell didClickAvatar:(FindNewUserInfoModel *)userInfo {
if (userInfo.uid > 0) { if (userInfo.uid > 0) {
if ([ClientConfig shareConfig].canOpen) { XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = userInfo.uid.integerValue;
userInfoVC.uid = userInfo.uid.integerValue; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = userInfo.uid.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
} }
} }

View File

@@ -76,15 +76,6 @@
XPMonentsDetailViewController * detailView = [[XPMonentsDetailViewController alloc] init]; XPMonentsDetailViewController * detailView = [[XPMonentsDetailViewController alloc] init];
detailView.monentsInfo = self.monents; detailView.monentsInfo = self.monents;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES]; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES];
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailView = [[XPMonentsDetailViewController alloc] init];
detailView.monentsInfo = self.monents;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailView = [[XPMomentsSimpleDetailViewController alloc] init];
detailView.monentsInfo = self.monents;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES];
}
} }
- (void)render:(MessageBaseModel *)message { - (void)render:(MessageBaseModel *)message {

View File

@@ -28,7 +28,7 @@
#import "XPIAPRechargeViewController.h" #import "XPIAPRechargeViewController.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPMineDressUpViewController.h" #import "XPMineDressUpViewController.h"
#import "XPDressUpShopViewController.h" #import "XPDressUpShopViewController.h"
#import "XPMineLoginPasswordViewController.h" #import "XPMineLoginPasswordViewController.h"
@@ -152,16 +152,9 @@
case SecretaryRouterType_UserInfo: case SecretaryRouterType_UserInfo:
{ {
if (value.length > 0) { if (value.length > 0) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { userInfoVC.uid = value.integerValue;
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
userInfoVC.uid = value.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = value.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
} }
} }
break; break;

View File

@@ -28,7 +28,7 @@
#import "SessionSettingUserView.h" #import "SessionSettingUserView.h"
#import "XPWebViewController.h" #import "XPWebViewController.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
@interface SessionInfoViewController ()<UITableViewDelegate, UITableViewDataSource, SessionSettingTableViewCellDelegate> @interface SessionInfoViewController ()<UITableViewDelegate, UITableViewDataSource, SessionSettingTableViewCellDelegate>
/// ///
@@ -88,16 +88,12 @@
if (self.datasource.count > 0) { if (self.datasource.count > 0) {
SessionSettingModel * model = [self.datasource safeObjectAtIndex1:indexPath.row]; SessionSettingModel * model = [self.datasource safeObjectAtIndex1:indexPath.row];
if (model.settingType == SessionSettingType_report) { if (model.settingType == SessionSettingType_report) {
if ([ClientConfig shareConfig].canOpen) { [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_report_click];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_report_click]; XPWebViewController *webVC = [[XPWebViewController alloc] init];
XPWebViewController *webVC = [[XPWebViewController alloc] init]; webVC.url = [NSString stringWithFormat:@"%@?reportUid=%ld&source=CHAT",
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%ld&source=CHAT",URLWithType(kReportRoomURL),self.userInfo.uid]; URLWithType(kReportRoomURL),
webVC.url = urlstr; self.userInfo.uid];
[self.navigationController pushViewController:webVC animated:YES]; [self.navigationController pushViewController:webVC animated:YES];
} else {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"SessionInfoViewController1")];
}
} }
} }
} }
@@ -182,16 +178,9 @@
#pragma mark - Event Response #pragma mark - Event Response
- (void)didTapUserRecognizer { - (void)didTapUserRecognizer {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_data_click]; [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_data_click];
XPMineUserInfoViewController * mineVC = [[XPMineUserInfoViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { mineVC.uid = self.userInfo.uid;
XPMineUserInfoViewController * mineVC = [[XPMineUserInfoViewController alloc] init]; [self.navigationController pushViewController:mineVC animated:YES];
mineVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:mineVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * mineVC = [[XPMineSimpleUserInfoViewController alloc] init];
mineVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:mineVC animated:YES];
}
} }
#pragma mark - Getters And Setters #pragma mark - Getters And Setters

View File

@@ -60,7 +60,7 @@
#import "MessageTreasureFairyModel.h" #import "MessageTreasureFairyModel.h"
///View ///View
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPRoomViewController.h" #import "XPRoomViewController.h"
#import "RoomHostDelegate.h" #import "RoomHostDelegate.h"
#import "MessageCell.h" #import "MessageCell.h"
@@ -510,16 +510,9 @@
- (void)didTapAvatar:(NSString *)uid { - (void)didTapAvatar:(NSString *)uid {
if (uid.length > 0 && ![NIMMessageUtils isOfficalAccount:uid]) { if (uid.length > 0 && ![NIMMessageUtils isOfficalAccount:uid]) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { infoVC.uid = uid.integerValue;
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init]; [[self getKeyWindowNav] pushViewController:infoVC animated:YES];
infoVC.uid = uid.integerValue;
[[self getKeyWindowNav] pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = uid.integerValue;
[[self getKeyWindowNav] pushViewController:infoVC animated:YES];
}
} }
} }

View File

@@ -52,115 +52,80 @@
self.phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent0"); self.phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent0");
self.payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent2"); self.payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent2");
} else { } else {
if ([ClientConfig shareConfig].canOpen) { XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init];
XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init]; phoneItem.title = YMLocalizedString(@"XPMineSettingPresent3");
phoneItem.title = YMLocalizedString(@"XPMineSettingPresent3"); phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent4");
phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent4"); phoneItem.type = XPMineSettingItemType_Phone;
phoneItem.type = XPMineSettingItemType_Phone; self.phoneItem = phoneItem;
self.phoneItem = phoneItem;
XPMineSettingItemModel * loginItem = [[XPMineSettingItemModel alloc] init];
loginItem.title = userinfo.isBindPasswd ? YMLocalizedString(@"XPMineLoginPasswordViewController6") : YMLocalizedString(@"XPMineSettingPresent6");
loginItem.subTitle = YMLocalizedString(@"XPMineSettingPresent7");
loginItem.type = XPMineSettingItemType_Login_Password;
self.loginItem = loginItem;
XPMineSettingItemModel * shieldItem = [[XPMineSettingItemModel alloc] init];
shieldItem.title = YMLocalizedString(@"XPMineSettingPresent27");
shieldItem.type = XPMineSettingItemType_Shield_management; XPMineSettingItemModel * loginItem = [[XPMineSettingItemModel alloc] init];
loginItem.title = userinfo.isBindPasswd ? YMLocalizedString(@"XPMineLoginPasswordViewController6") : YMLocalizedString(@"XPMineSettingPresent6");
XPMineSettingItemModel * blackListItem = [[XPMineSettingItemModel alloc] init]; loginItem.subTitle = YMLocalizedString(@"XPMineSettingPresent7");
blackListItem.title = YMLocalizedString(@"XPMineSettingPresent8"); loginItem.type = XPMineSettingItemType_Login_Password;
blackListItem.subTitle = @""; self.loginItem = loginItem;
blackListItem.type = XPMineSettingItemType_Black_Manager;
XPMineSettingItemModel * shieldItem = [[XPMineSettingItemModel alloc] init];
XPMineSettingItemModel * languageItem = [[XPMineSettingItemModel alloc] init]; shieldItem.title = YMLocalizedString(@"XPMineSettingPresent27");
languageItem.title = YMLocalizedString(@"XPMineSettingPresent28");
languageItem.subTitle = @""; shieldItem.type = XPMineSettingItemType_Shield_management;
languageItem.type = XPMineSettingItemType_Language;
XPMineSettingItemModel * blackListItem = [[XPMineSettingItemModel alloc] init];
blackListItem.title = YMLocalizedString(@"XPMineSettingPresent8");
blackListItem.subTitle = @"";
blackListItem.type = XPMineSettingItemType_Black_Manager;
XPMineSettingItemModel * languageItem = [[XPMineSettingItemModel alloc] init];
languageItem.title = YMLocalizedString(@"XPMineSettingPresent28");
languageItem.subTitle = @"";
languageItem.type = XPMineSettingItemType_Language;
XPMineSettingItemModel * payItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * payItem = [[XPMineSettingItemModel alloc] init];
payItem.title = YMLocalizedString(@"XPMineSettingPresent9"); payItem.title = YMLocalizedString(@"XPMineSettingPresent9");
payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent11"); payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent11");
payItem.type = XPMineSettingItemType_Pay_Password; payItem.type = XPMineSettingItemType_Pay_Password;
self.payItem = payItem; self.payItem = payItem;
XPMineSettingItemModel * notificaItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * notificaItem = [[XPMineSettingItemModel alloc] init];
notificaItem.title = YMLocalizedString(@"XPMineSettingPresent12"); notificaItem.title = YMLocalizedString(@"XPMineSettingPresent12");
notificaItem.subTitle = YMLocalizedString(@"XPMineSettingPresent13"); notificaItem.subTitle = YMLocalizedString(@"XPMineSettingPresent13");
notificaItem.type = XPMineSettingItemType_Notification_Remind; notificaItem.type = XPMineSettingItemType_Notification_Remind;
XPMineSettingItemModel * privacyItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * privacyItem = [[XPMineSettingItemModel alloc] init];
privacyItem.title = YMLocalizedString(@"XPMineSettingPresent14"); privacyItem.title = YMLocalizedString(@"XPMineSettingPresent14");
privacyItem.subTitle = @""; privacyItem.subTitle = @"";
privacyItem.type = XPMineSettingItemType_Permission; privacyItem.type = XPMineSettingItemType_Permission;
XPMineSettingItemModel * helperItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * helperItem = [[XPMineSettingItemModel alloc] init];
helperItem.title = YMLocalizedString(@"XPMineSettingPresent15"); helperItem.title = YMLocalizedString(@"XPMineSettingPresent15");
helperItem.subTitle = @""; helperItem.subTitle = @"";
helperItem.type = XPMineSettingItemType_Helper; helperItem.type = XPMineSettingItemType_Helper;
XPMineSettingItemModel * feedbackItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * feedbackItem = [[XPMineSettingItemModel alloc] init];
feedbackItem.title = YMLocalizedString(@"XPMineSettingPresent16"); feedbackItem.title = YMLocalizedString(@"XPMineSettingPresent16");
feedbackItem.subTitle = @""; feedbackItem.subTitle = @"";
feedbackItem.type = XPMineSettingItemType_Feedback; feedbackItem.type = XPMineSettingItemType_Feedback;
XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init];
clearMemoryItem.title = YMLocalizedString(@"XPMineSettingPresent17"); clearMemoryItem.title = YMLocalizedString(@"XPMineSettingPresent17");
clearMemoryItem.subTitle = @""; clearMemoryItem.subTitle = @"";
clearMemoryItem.type = XPMineSettingItemType_Clear_Memory; clearMemoryItem.type = XPMineSettingItemType_Clear_Memory;
XPMineSettingItemModel *updateItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel *updateItem = [[XPMineSettingItemModel alloc] init];
updateItem.title = YMLocalizedString(@"XPMineSettingPresent18"); updateItem.title = YMLocalizedString(@"XPMineSettingPresent18");
updateItem.subTitle = @""; updateItem.subTitle = @"";
updateItem.type = XPMineSettingItemType_CheckUpdate; updateItem.type = XPMineSettingItemType_CheckUpdate;
XPMineSettingItemModel * aboutusItem = [[XPMineSettingItemModel alloc] init]; XPMineSettingItemModel * aboutusItem = [[XPMineSettingItemModel alloc] init];
aboutusItem.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineAboutUsViewController0"), AppName]; aboutusItem.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineAboutUsViewController0"), AppName];
aboutusItem.subTitle = @""; aboutusItem.subTitle = @"";
aboutusItem.type = XPMineSettingItemType_About_Us; aboutusItem.type = XPMineSettingItemType_About_Us;
NSArray * oneSection = @[phoneItem]; NSArray * oneSection = @[phoneItem];
NSArray * twoSection = @[loginItem,payItem, notificaItem,shieldItem, blackListItem,languageItem]; NSArray * twoSection = @[loginItem,payItem, notificaItem,shieldItem, blackListItem,languageItem];
NSArray * threeSection = @[privacyItem]; NSArray * threeSection = @[privacyItem];
NSArray * fourthSection = @[helperItem, clearMemoryItem, updateItem, aboutusItem]; NSArray * fourthSection = @[helperItem, clearMemoryItem, updateItem, aboutusItem];
self.datasouce = @[oneSection, twoSection, threeSection, fourthSection]; self.datasouce = @[oneSection, twoSection, threeSection, fourthSection];
}else{
XPMineSettingItemModel * blackListItem = [[XPMineSettingItemModel alloc] init];
blackListItem.title = YMLocalizedString(@"XPMineSettingPresent20");
blackListItem.subTitle = @"";
blackListItem.type = XPMineSettingItemType_Black_Manager;
XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init];
phoneItem.title = YMLocalizedString(@"XPMineSettingPresent21");
phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : @"";
phoneItem.type = XPMineSettingItemType_Phone;
self.phoneItem = phoneItem;
XPMineSettingItemModel * loginItem = [[XPMineSettingItemModel alloc] init];
loginItem.title = userinfo.isBindPasswd ? YMLocalizedString(@"XPMineLoginPasswordViewController6") : YMLocalizedString(@"XPMineSettingPresent23");
loginItem.subTitle = @"";
loginItem.type = XPMineSettingItemType_Login_Password;
self.loginItem = loginItem;
XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init];
clearMemoryItem.title = YMLocalizedString(@"XPMineSettingPresent24");
clearMemoryItem.subTitle = @"";
clearMemoryItem.type = XPMineSettingItemType_Clear_Memory;
XPMineSettingItemModel * deleteItem = [[XPMineSettingItemModel alloc] init];
deleteItem.title = YMLocalizedString(@"XPMineSettingPresent25");
deleteItem.subTitle = @"";
deleteItem.type = XPMineSettingItemType_Delete_Account;
NSArray * oneSection = @[blackListItem];
NSArray * twoSection = @[phoneItem, loginItem];
NSArray * threeSection = @[clearMemoryItem, deleteItem];
self.datasouce = @[oneSection, twoSection, threeSection];
}
} }
[[self getView] getMineSettingDatasourceSuccess:self.datasouce]; [[self getView] getMineSettingDatasourceSuccess:self.datasouce];

View File

@@ -1,19 +0,0 @@
//
// YMMineSimpleUserInfoViewController.h
// YUMI
//
// Created by XY on 2023/2/21.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineSimpleUserInfoViewController : MvpViewController
///用户的id
@property (nonatomic,assign) NSInteger uid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,406 +0,0 @@
//
// YMMineSimpleUserInfoViewController.m
// YUMI
//
// Created by XY on 2023/2/21.
//
#import "XPMineSimpleUserInfoViewController.h"
#import "YUMIMacroUitls.h"
#import <Masonry.h>
#import <MJRefresh.h>
#import "DJDKMIMOMColor.h"
#import "UIImage+Utils.h"
#import "AccountInfoStorage.h"
#import "TTPopup.h"
#import "YUMIHtmlUrl.h"
#import "XPSkillCardPlayerManager.h"
#import "UIImage+Utils.h"
#import "YUMIConstant.h"
#import "NIMMessageUtils.h"
#import "NSArray+Safe.h"
#import "ClientConfig.h"
#import "XNDJTDDLoadingTool.h"
#import "MonentsListInfoModel.h"
#import "MineSkillCardListInfoModel.h"
#import "UserInfoModel.h"
///P
#import "XPMineUserInfoPresenter.h"
#import "XPMineUserInfoProtocol.h"
#import "RoomHostDelegate.h"
///View
#import "XPMomentListCollectionViewCell.h"
#import "XPMineUserInfoCustomNavView.h"
#import "XPMineSimpleUserInfoHeaderView.h"
///VC
#import "XPMineUserInfoEditViewController.h"
#import "XPWebViewController.h"
#import "SessionViewController.h"
#import "XPRoomViewController.h"
#import "XPMineUserDataViewController.h"
#import "XPMonentsMineViewController.h"
#import "XPMonentsDetailViewController.h"
#import "XPMomentsSimpleDetailViewController.h"
#import "XPMineUserInfoGiftWallViewController.h"
#define kHeaderViewHeight 615
@interface XPMineSimpleUserInfoViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineSimpleUserInfoHeaderViewDelegate>
@property (nonatomic, strong) UICollectionView *collectionView;
///
@property (nonatomic, strong) XPMineSimpleUserInfoHeaderView *headerView;
///
@property (nonatomic,strong) XPMineUserInfoCustomNavView *navView;
///
@property (nonatomic,strong) UserInfoModel *userInfo;
///
@property (nonatomic,strong) UIStackView *bottomStackView;
///
@property (nonatomic,strong) UIButton *chatButton;
///
@property (nonatomic,strong) UIButton *attentionButton;
@end
@implementation XPMineSimpleUserInfoViewController
- (XPMineUserInfoPresenter *)createPresenter {
return [[XPMineUserInfoPresenter alloc] init];
}
- (BOOL)isHiddenNavBar {
return YES;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (self.uid > 0) {
[self initHttpRequest];
}
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
}
- (void)createUI {
[self.view addSubview:self.collectionView];
[self.collectionView addSubview:self.headerView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(0);
make.leading.trailing.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
[self.view addSubview:self.navView];
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.top.mas_equalTo(self.view);
make.height.mas_equalTo(kNavigationHeight);
}];
if (self.uid != [AccountInfoStorage instance].getUid.integerValue) {
[self.view addSubview:self.chatButton];
[self.chatButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view);
make.height.mas_equalTo(36);
make.width.mas_equalTo(100);
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 15);
}];
}
}
- (void)initHttpRequest {
NSString *uid = [NSString stringWithFormat:@"%ld", self.uid];
///
// [self.presenter getUserInfoWithUid:uid];
[self.presenter getUserAttentionState:uid];
// 使
[self.presenter getUserDetailInfoWithUid:uid];
NSString * myUid = [AccountInfoStorage instance].getUid;
///访
if (![uid isEqualToString:myUid]) {
///
// [self.presenter getUserInfoWithUid:myUid];
}
}
#pragma mark -
- (void)showRightNavHandle {
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];
TTActionSheetConfig *report = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController0") clickAction:^{
if ([ClientConfig shareConfig].canOpen) {
XPWebViewController *vc = [[XPWebViewController alloc]init];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%@&source=PERSONAL",URLWithType(kReportRoomURL),uid];
vc.url = urlstr;
[self.navigationController pushViewController:vc animated:YES];
} else {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPMineSimpleUserInfoViewController1")];
}
}];
TTActionSheetConfig *black = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController2") clickAction:^{
[self addOrRemoveBlack:NO uid:uid];
}];
[array addObjectsFromArray:@[report, black]];
BOOL isInBlackList = [[NIMSDK sharedSDK].userManager isUserInBlackList:uid] || [NIMMessageUtils isOfficalAccount:[NSString stringWithFormat:@"%ld", self.uid]];
if (isInBlackList) {
[array removeObject:black];
}
[TTPopup actionSheetWithItems:array];
}
//
- (void)addOrRemoveBlack:(BOOL)isRemove uid:(NSString *)uid {
NSString *title;
NSString *message;
if (isRemove) {
title = YMLocalizedString(@"XPMineSimpleUserInfoViewController3");
message = YMLocalizedString(@"XPMineSimpleUserInfoViewController4");
}else{
title = YMLocalizedString(@"XPMineSimpleUserInfoViewController5");
message = YMLocalizedString(@"XPMineSimpleUserInfoViewController6");
}
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.title = title;
config.message = message;
[TTPopup alertWithConfig:config confirmHandler:^{
if (isRemove) {
[[NIMSDK sharedSDK].userManager removeFromBlackBlackList:uid completion:^(NSError * _Nullable error) {
if (error == nil) {
[self showSuccessToast:YMLocalizedString(@"XPMineSimpleUserInfoViewController7")];
}
}];
} else {
[[NIMSDK sharedSDK].userManager addToBlackList:uid completion:^(NSError * _Nullable error) {
if (error == nil) {
[self showSuccessToast:YMLocalizedString(@"XPMineSimpleUserInfoViewController8")];
}
}];
}
} cancelHandler:^{
}];
}
#pragma mark - XPMineCustomNavViewDelegate
- (void)xPMineCustomNavView:(XPMineUserInfoCustomNavView *)view didClickEditButton:(UIButton *)sender {
if (sender.isSelected) {///
XPMineUserInfoEditViewController * editVC = [[XPMineUserInfoEditViewController alloc] init];
[self.navigationController pushViewController:editVC animated:YES];
} else {
[self showRightNavHandle];
}
}
- (void)xPMineCustomNavView:(XPMineUserInfoCustomNavView *)view didClickBackButton:(UIButton *)sender {
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - XPMineSimpleUserInfoHeaderViewDelegate
///
- (void)headerViewMoreGiftAction {
if (self.uid > 0) {
XPMineUserInfoGiftWallViewController * giftWallVC = [[XPMineUserInfoGiftWallViewController alloc] init];
giftWallVC.userUid = [NSString stringWithFormat:@"%ld", self.uid];
[self.navigationController pushViewController:giftWallVC animated:YES];
}
}
///
- (void)headerViewOnlineAction:(NSString *)roomUid {
if (roomUid.length > 0 ) {
//退 TODO
[self.navigationController.viewControllers enumerateObjectsUsingBlock:^(__kindof UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[XPRoomViewController class]]) {
[self.navigationController popToRootViewControllerAnimated:NO];
XPRoomViewController<RoomHostDelegate> * rooomVC = obj;
[rooomVC exitRoom];
*stop = YES;
}
}];
[XPRoomViewController openRoom:roomUid viewController:self];
}
}
#pragma mark - XPMineUserInfoProtocol
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
if (userInfo.uid == self.uid) {
self.userInfo = userInfo;
// self.headView.userInfo = userInfo;
} else {
if (!userInfo.userVipInfoVO.lookHomepageHide) {
NSString * uid = [NSString stringWithFormat:@"%ld", self.uid];
[self.presenter visitUser:uid];
}
}
}
- (void)ongetDetailInfoSuccess:(UserInfoModel *)userInfo {
self.userInfo = userInfo;
self.headerView.userInfo = userInfo;
self.headerView.roomUid = userInfo.roomUid;
[self.collectionView reloadData];
// self.userDataVC.userInfo = userInfo;
// self.monentsVC.dynamicInfo = userInfo.dynamicInfo;
}
- (void)getAttentionStateSuccess:(BOOL)status {
self.attentionButton.selected = status;
}
- (void)attentionUserSuccess:(BOOL)status {
self.attentionButton.selected = status;
}
#pragma mark - Event Response
- (void)chatButtonAction:(UIButton *)sender {
NSString * sessionId = [NSString stringWithFormat:@"%ld",self.uid];
NIMSession * session = [NIMSession session:sessionId type:NIMSessionTypeP2P];
SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:session];
[self.navigationController pushViewController:sessionVC animated:YES];
}
- (void)attentionButtonAction:(UIButton *)sender {
NSString *uid = [NSString stringWithFormat:@"%ld", self.uid];
[self.presenter attentionUser:uid state:!sender.selected];
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.userInfo.dynamicInfo.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPMomentListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPMomentListCollectionViewCell.self) forIndexPath:indexPath];
MonentsInfoModel * monentsInfo = [self.userInfo.dynamicInfo safeObjectAtIndex1:indexPath.row];
cell.monentsInfo = monentsInfo;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.userInfo.dynamicInfo.count > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.userInfo.dynamicInfo safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.userInfo.dynamicInfo safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
}
#pragma mark -
- (UICollectionView *)collectionView {
if (!_collectionView) {
MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
CGFloat width = (KScreenWidth - 16 -13 -16)/2.0;
CGFloat height = 220.0/165.0*width;
layout.itemSize = CGSizeMake(width, height);
layout.minimumLineSpacing = 12.0;
layout.minimumInteritemSpacing = 13.0;
layout.sectionInset = UIEdgeInsetsMake(12, 16, 12, 16);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.backgroundColor = UIColor.whiteColor;
_collectionView.alwaysBounceVertical = YES;
[_collectionView registerClass:[XPMomentListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass(XPMomentListCollectionViewCell.self)];
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
_collectionView.contentInset = UIEdgeInsetsMake(kHeaderViewHeight, 0, 0, 0);
}
return _collectionView;
}
- (XPMineSimpleUserInfoHeaderView *)headerView {
if (!_headerView) {
_headerView = [[XPMineSimpleUserInfoHeaderView alloc] init];
_headerView.frame = CGRectMake(0, -kHeaderViewHeight, KScreenWidth, kHeaderViewHeight);
_headerView.delegate = self;
}
return _headerView;
}
- (XPMineUserInfoCustomNavView *)navView {
if (!_navView) {
_navView = [[XPMineUserInfoCustomNavView alloc] init];
_navView.delegate = self;
}
return _navView;
}
- (UIStackView *)bottomStackView {
if (!_bottomStackView) {
_bottomStackView = [[UIStackView alloc] init];
_bottomStackView.axis = UILayoutConstraintAxisHorizontal;
_bottomStackView.distribution = UIStackViewDistributionFillEqually;
_bottomStackView.alignment = UIStackViewAlignmentFill;
_bottomStackView.spacing = 25;
}
return _bottomStackView;
}
- (UIButton *)chatButton {
if (!_chatButton) {
_chatButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_chatButton setTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController9") forState:UIControlStateNormal];
[_chatButton setTitleColor:[DJDKMIMOMColor confirmButtonTextColor] forState:UIControlStateNormal];
_chatButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_chatButton setBackgroundColor:[DJDKMIMOMColor appMainColor]];
_chatButton.layer.masksToBounds = YES;
_chatButton.layer.cornerRadius = 36/2;
[_chatButton addTarget:self action:@selector(chatButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _chatButton;
}
- (UIButton *)attentionButton {
if (!_attentionButton) {
_attentionButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_attentionButton setTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController10") forState:UIControlStateNormal];
[_attentionButton setTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController11") forState:UIControlStateSelected];
[_attentionButton setTitleColor:[DJDKMIMOMColor confirmButtonTextColor] forState:UIControlStateNormal];
[_attentionButton setTitleColor:[DJDKMIMOMColor cancelButtonTextColor] forState:UIControlStateSelected];
[_attentionButton setImage:[UIImage imageNamed:@"mine_user_info_bottom_attention_normal"] forState:UIControlStateNormal];
[_attentionButton setImage:[UIImage imageNamed:@"mine_user_info_bottom_attention_select"] forState:UIControlStateSelected];
_attentionButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_attentionButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor], [DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_attentionButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor cancelButtonGradientStartColor], [DJDKMIMOMColor cancelButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateSelected];
_attentionButton.layer.masksToBounds = YES;
_attentionButton.layer.cornerRadius = 36/2;
_attentionButton.hidden = YES;
[_attentionButton addTarget:self action:@selector(attentionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _attentionButton;
}
@end

View File

@@ -266,26 +266,22 @@
[self.presenter getNobleChargeProductListWithChannelType:@"9"]; [self.presenter getNobleChargeProductListWithChannelType:@"9"];
[self getWalletInfo]; [self getWalletInfo];
@kWeakify(self);
if([ClientConfig shareConfig].canOpen){ [Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { @kStrongify(self);
if(code == 200){ if(code == 200){
if(data.data[@"isNative"] != nil){ if(data.data[@"isNative"] != nil){
self.pi_IsNative = [data.data[@"isNative"] boolValue]; self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
} }
}
}]; }];
}
} }
-(void)getWalletInfo{ -(void)getWalletInfo{
NSString * uid = [AccountInfoStorage instance].getUid; NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket; NSString * ticket = [AccountInfoStorage instance].getTicket;
@kWeakify(self);
[Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if(code == 200){ if(code == 200){
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data]; WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
self.infoModel = model; self.infoModel = model;

View File

@@ -90,56 +90,38 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
#ifdef DEBUG #ifdef DEBUG
[self showLoading];
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if([ClientConfig shareConfig].canOpen){ [self hideHUD];
[self showLoading]; if(code == 200){
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { if(data.data[@"isNative"] != nil){
[self hideHUD]; BOOL is = [data.data[@"isNative"] boolValue];
if(code == 200){ [self initWebView:is];
if(data.data[@"isNative"] != nil){
BOOL is = [data.data[@"isNative"] boolValue];
[self initWebView:is];
}
return;
} }
} else {
[self initWebView:YES]; [self initWebView:YES];
}]; }
return; }];
}
[self initWebView:YES];
#else #else
if(isEnterprise == YES){ if(isEnterprise == YES){
if([ClientConfig shareConfig].canOpen){ [self showLoading];
[self showLoading]; [Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [self hideHUD];
[self hideHUD]; if(code == 200){
if(code == 200){ if(data.data[@"isNative"] != nil){
if(data.data[@"isNative"] != nil){ BOOL is = [data.data[@"isNative"] boolValue];
BOOL is = [data.data[@"isNative"] boolValue]; [self initWebView:is];
[self initWebView:is];
}
return;
} }
[self initWebView:YES]; return;
}]; }
return; [self initWebView:YES];
} }];
[self initWebView:YES]; return;
}else{ }else{
[self initWebView:NO]; [self initWebView:NO];
} }
#endif #endif
} }
-(void)initWebView:(BOOL)is{ -(void)initWebView:(BOOL)is{
if(is == YES){ if(is == YES){
@@ -147,23 +129,10 @@
[self initHttpData]; [self initHttpData];
return; return;
} }
XPWebViewController *vc = [[XPWebViewController alloc]init];
NSString *channel = @"p";
channel = [NSString stringWithFormat:@"%@a",channel];
channel = [NSString stringWithFormat:@"%@y",channel];
NSString *url = [NSString stringWithFormat:URLWithType(kChannelUrl),channel,self.type,[YYUtility deviceID]];
vc.url = url;
[self addChildViewController:vc];
vc.view.frame = self.view.frame;
[self.view addSubview:vc.view];
} }
- (void)createUI { - (void)createUI {
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.headerView]; [self.view addSubview:self.headerView];
[self.view addSubview:self.collectionView]; [self.view addSubview:self.collectionView];
[self.view addSubview:self.rechargeBtn]; [self.view addSubview:self.rechargeBtn];
@@ -179,7 +148,6 @@
make.height.mas_equalTo(height); make.height.mas_equalTo(height);
}]; }];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) { [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view); make.centerX.mas_equalTo(self.view);
make.bottom.mas_equalTo(-34); make.bottom.mas_equalTo(-34);
@@ -193,17 +161,11 @@
make.bottom.equalTo(self.stackView.mas_top).mas_offset(-kGetScaleWidth(10)); make.bottom.equalTo(self.stackView.mas_top).mas_offset(-kGetScaleWidth(10));
}]; }];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.headerView.mas_bottom).mas_offset(-kGetScaleWidth(22)); make.top.mas_equalTo(self.headerView.mas_bottom).mas_offset(-kGetScaleWidth(22));
make.leading.trailing.mas_equalTo(0); make.leading.trailing.mas_equalTo(0);
make.bottom.equalTo(self.rechargeBtn.mas_top).mas_offset(-kGetScaleWidth(10)); make.bottom.equalTo(self.rechargeBtn.mas_top).mas_offset(-kGetScaleWidth(10));
}]; }];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kStatusBarHeight); make.top.mas_equalTo(kStatusBarHeight);
@@ -219,9 +181,7 @@
- (void)initHttpData { - (void)initHttpData {
[self getRechargeList]; [self getRechargeList];
if([ClientConfig shareConfig].canOpen){ [self.presenter getBannerList];
[self.presenter getBannerList];
}
[self getUserWalletBalanceInfo]; [self getUserWalletBalanceInfo];
[self checkTranscationIds]; [self checkTranscationIds];
} }

View File

@@ -238,12 +238,7 @@
} }
break; break;
case XPMineSettingItemType_Delete_Account: { case XPMineSettingItemType_Delete_Account: {
[self pushWebViewWIthUrl:URLWithType(kAccountlogoutURL)];
if ([ClientConfig shareConfig].canOpen) {
[self pushWebViewWIthUrl:URLWithType(kAccountlogoutURL)];
} else {
[self pushWebViewWIthUrl:@"molistar/modules/logOff/index.html"];
}
} }
break; break;
case XPMineSettingItemType_Shield_management: case XPMineSettingItemType_Shield_management:
@@ -428,15 +423,9 @@
_logoutButton.layer.cornerRadius = 50/2; _logoutButton.layer.cornerRadius = 50/2;
_logoutButton.titleLabel.font = [UIFont systemFontOfSize:16]; _logoutButton.titleLabel.font = [UIFont systemFontOfSize:16];
[_logoutButton addTarget:self action:@selector(logoutButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [_logoutButton addTarget:self action:@selector(logoutButtonAction:) forControlEvents:UIControlEventTouchUpInside];
if ([ClientConfig shareConfig].canOpen) { [_logoutButton setTitle:YMLocalizedString(@"XPMineSettingViewController7") forState:UIControlStateNormal];
[_logoutButton setTitle:YMLocalizedString(@"XPMineSettingViewController7") forState:UIControlStateNormal]; _logoutButton.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
_logoutButton.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor]; [_logoutButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateNormal];
[_logoutButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateNormal];
}else{
[_logoutButton setTitle:YMLocalizedString(@"XPMineSettingViewController8") forState:UIControlStateNormal];
_logoutButton.backgroundColor = UIColorFromRGB(0xCED3D8);
[_logoutButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
}
} }
return _logoutButton; return _logoutButton;
} }

View File

@@ -22,7 +22,7 @@
#import "XPMineAnchorFansTeamProtocol.h" #import "XPMineAnchorFansTeamProtocol.h"
///VC ///VC
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "SessionViewController.h" #import "SessionViewController.h"
@interface XPMineFansTeamViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineAnchorFansTeamProtocol> @interface XPMineFansTeamViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineAnchorFansTeamProtocol>
@@ -96,16 +96,9 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
XPMineAnchorFansTeamModel *item = [self.datasource safeObjectAtIndex1:indexPath.row]; XPMineAnchorFansTeamModel *item = [self.datasource safeObjectAtIndex1:indexPath.row];
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { userInfoVC.uid = item.teamUid;
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; [self.navigationController pushViewController:userInfoVC animated:YES];
userInfoVC.uid = item.teamUid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = item.teamUid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

View File

@@ -23,7 +23,7 @@
#import "XPMineVisitorProtocol.h" #import "XPMineVisitorProtocol.h"
///VC ///VC
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "SessionViewController.h" #import "SessionViewController.h"
@interface XPMineVisitorViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineVisitorProtocol, XPMineVisitorTableViewCellDelegate> @interface XPMineVisitorViewController ()<UITableViewDelegate,UITableViewDataSource, XPMineVisitorProtocol, XPMineVisitorTableViewCellDelegate>
@@ -157,16 +157,9 @@
- (void)onAvatarClick:(XPMineVisitorTableViewCell *)cell { - (void)onAvatarClick:(XPMineVisitorTableViewCell *)cell {
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
XPMineVisitorItemModel *item = [self.datasource safeObjectAtIndex1:indexPath.row]; XPMineVisitorItemModel *item = [self.datasource safeObjectAtIndex1:indexPath.row];
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { userInfoVC.uid = item.uid;
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; [self.navigationController pushViewController:userInfoVC animated:YES];
userInfoVC.uid = item.uid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = item.uid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
} }
- (void)onChatClick:(XPMineVisitorTableViewCell *)cell { - (void)onChatClick:(XPMineVisitorTableViewCell *)cell {

View File

@@ -1,16 +0,0 @@
//
// YMSimpleMineViewController.h
// YUMI
//
// Created by XY on 2023/2/20.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPSimpleMineViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,498 +0,0 @@
//
// YMSimpleMineViewController.m
// YUMI
//
// Created by XY on 2023/2/20.
//
#import "XPSimpleMineViewController.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "TTPopup.h"
#import "YUMIMacroUitls.h"
#import "YUMIHtmlUrl.h"
#import "UIButton+EnlargeTouchArea.h"
#import "StatisticsServiceHelper.h"
#import "YUMIConstant.h"
#import "Api+Room.h"
#import "Api+RoomSetting.h"
#import "AccountInfoStorage.h"
#import "ClientConfig.h"
#import "NSMutableDictionary+Saft.h"
#import "DJDKMIMOMColor.h"
#import "ClientConfig.h"
///Model
#import "XPMineItemModel.h"
#import "UserInfoModel.h"
#import "XPMineVisitorUnReadModel.h"
#import "ClanDetailInfoModel.h"
#import "HomeBannerInfoModel.h"
#import "XPMineFuntionItemModel.h"
#import "WalletInfoModel.h"
///P
#import "XPMineProtocol.h"
#import "XPMinePresent.h"
///View
#import "XPMineHeadItemTableViewCell.h"
#import "XPSimpleMineHeaderView.h"
#import "XPHomeBannerTableViewCell.h"
#import "XPMineNewUserRechargeView.h"
#import "XPMineItemTableViewCell.h"
///VC
#import "XPMineSettingViewController.h"
#import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPIAPRechargeViewController.h"
#import "XPWebViewController.h"
#import "XPRoomViewController.h"
#import "XPMineDressUpViewController.h"
#import "XPDressUpShopViewController.h"
#import "XPMineFansViewController.h"
#import "XPMineAttentionViewController.h"
#import "XPMineVisitorViewController.h"
#import "XPMineFansTeamViewController.h"
#import "XPMineClanViewController.h"
#import "XPMineGuildViewController.h"
#import "XPMineFootPrintViewController.h"
#import "XPMineCollectRoomListViewController.h"
#import "XPMineFeedbackViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPIAPRechargeViewController.h"
@interface XPSimpleMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPHomeBannerTableViewCellDelegate, XPMineProtocol, XPSimpleMineHeaderViewDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) XPSimpleMineHeaderView *headerView;
///
@property (nonatomic,strong) UserInfoModel *userInfo;
///
@property (nonatomic,strong) ClanDetailInfoModel *clanInfo;
///
@property (nonatomic,strong) XPMineItemModel *guildItemModel;
///banner
@property (nonatomic, strong) NSMutableArray<HomeBannerInfoModel *> *bannerArray;
@property (nonatomic, strong) NSArray<XPMineItemModel *> *sectionArray0;
@property (nonatomic, strong) NSArray<XPMineItemModel *> *sectionArray1;
@end
@implementation XPSimpleMineViewController
- (XPMinePresent *)createPresenter {
return [[XPMinePresent alloc] init];;
}
- (BOOL)isHiddenNavBar {
return YES;
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.presenter getUserInfo];
}
- (void)createUI {
self.tableView.tableHeaderView = self.headerView;
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
- (void)openMyRoom {
NSString* roomUid = [NSString stringWithFormat:@"%ld", (long)self.userInfo.uid];
[XPRoomViewController openRoom:roomUid viewController:self];
}
#pragma mark - XPSimpleMineHeaderViewDelegate
- (void)headerViewBtnActionType:(XPMineItemType)itemType {
switch (itemType) {
case XPMineItemType_Match_Relevance_Account:
break;
case XPMineItemType_Foot_Print:
{
XPMineFootPrintViewController *vc = [[XPMineFootPrintViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case XPMineItemType_Account:
{
XPIAPRechargeViewController *rechargeVC = [[XPIAPRechargeViewController alloc] init];
rechargeVC.type = @"4";
[self.navigationController pushViewController:rechargeVC animated:YES];
}
break;
case XPMineItemType_Personinfo:
{
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:infoVC animated:YES];
}
}
break;
case XPMineItemType_My_Room:
{
[self openMyRoom];
}
break;
case XPMineItemType_Collect_Room://
{
XPMineCollectRoomListViewController *collectVC = [[XPMineCollectRoomListViewController alloc] init];
[self.navigationController pushViewController:collectVC animated:YES];
}
break;
case XPMineItemType_My_Dressup:
{
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
[self.navigationController pushViewController:dressUpVC animated:YES];
}
break;
case XPMineItemType_DressUp_Market:
{
XPDressUpShopViewController *dressUpShopVc = [[XPDressUpShopViewController alloc] init];
[self.navigationController pushViewController:dressUpShopVc animated:YES];
}
break;
case XPMineItemType_Fans_List:
{
XPMineFansViewController * fansVC = [[XPMineFansViewController alloc] init];
[self.navigationController pushViewController:fansVC animated:YES];
}
break;
case XPMineItemType_Attention_List:
{
XPMineAttentionViewController * attentionVC = [[XPMineAttentionViewController alloc] init];
[self.navigationController pushViewController:attentionVC animated:YES];
}
break;
case XPMineItemType_Visitor:
{
XPMineVisitorViewController *visitorVC = [[XPMineVisitorViewController alloc] init];
[self.navigationController pushViewController:visitorVC animated:YES];
}
break;
case XPMineItemType_FansTeam: {
XPMineFansTeamViewController *fansTeamVc = [[XPMineFansTeamViewController alloc] init];
[self.navigationController pushViewController:fansTeamVc animated:YES];
}
break;
case XPMineItemType_My_Guild:
{
if (self.clanInfo.clan.elderUid.length > 0) {
XPMineClanViewController * clanVC = [[XPMineClanViewController alloc] init];
clanVC.uid = [NSString stringWithFormat:@"%ld", self.userInfo.uid];
[self.navigationController pushViewController:clanVC animated:YES];
} else if(self.clanInfo.hall.hallId.length > 0) {
XPMineGuildViewController * guildVC = [[XPMineGuildViewController alloc] init];
guildVC.ownerUid = self.clanInfo.hall.ownerUid;
guildVC.guildId = self.clanInfo.hall.hallId;
[self.navigationController pushViewController:guildVC animated:YES];
}else{
[self showErrorToast:YMLocalizedString(@"XPSimpleMineViewController0")];
}
}
break;
case -1: { //
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = URLWithType(kUserLevelURL);
[self.navigationController pushViewController:webVC animated:YES];
}
break;
case -2: { //
XPMineFeedbackViewController * feedbackVC = [[XPMineFeedbackViewController alloc] init];
[self.navigationController pushViewController:feedbackVC animated:YES];
}
break;
case -3: { //
XPMineSettingViewController * settingVC = [[XPMineSettingViewController alloc] init];
settingVC.userInfo = self.userInfo;
[self.navigationController pushViewController:settingVC animated:YES];
}
break;
default:
break;
}
}
#pragma mark - XPMineProtocol
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
///401
if (!userInfo.isBindPhone && [ClientConfig shareConfig].iosPhoneBind) {
return;
}
if (userInfo.nick == nil || userInfo.avatar == nil) {
return;
}
self.userInfo = userInfo;
self.headerView.userInfo = userInfo;
[self.tableView reloadData];
[self.presenter getMineBannerList];
[self.presenter getClanDetailInfo];
[self.tableView reloadData];
}
///
- (void)onGetClanDetailInfoSuccess:(ClanDetailInfoModel *)clanInfo {
self.clanInfo = clanInfo;
[self.tableView reloadData];
}
- (void)onGetClanDetailInfofail {
}
///banner
- (void)onGetPersonalBannerListSuccess:(NSArray<HomeBannerInfoModel *> *)items {
[self.bannerArray removeAllObjects];
[self.bannerArray addObjectsFromArray:items];
[self.tableView reloadData];
NSMutableArray *array = [NSMutableArray array];
for (HomeBannerInfoModel *item in self.bannerArray) {
[array addObject:item.bannerId];
}
NSString *trackName = [array componentsJoinedByString:@","];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_banner_show eventAttributes:@{@"bannerId" : trackName}];
}
- (void)onGetPersonalBannerListFail {
}
#pragma mark - XPHomeBannerTableViewCellDelegate
///banner
- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_banner_click eventAttributes:@{@"bannerId" : info.bannerId}];
switch (info.skipType) {
case HomeBannerInfoSkipType_Room:
{
if (info.skipUri.length > 0) {
[XPRoomViewController openRoom:info.skipUri viewController:self];
}
}
break;
case HomeBannerInfoSkipType_Web:
{
XPWebViewController *vc = [[XPWebViewController alloc]init];
vc.url = info.skipUri;
[self.navigationController pushViewController:vc animated:YES];
}
break;
default:
break;
}
}
#pragma mark - TableViewDelegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
if (self.userInfo) {
return 3;
}
return 0;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 0;
}else if (section == 1) {
return self.sectionArray1.count;
}else if (section == 2) {
return 1;
}
return 0;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 64;
} else if (indexPath.section == 1) {
return 64;
} else {
return 80;
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
if (section == 0) {
return 0.01;
}
return 13;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
return UIView.new;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 0.01;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
return UIView.new;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
XPMineItemTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineItemTableViewCell class])];
XPMineItemModel *itemModel = self.sectionArray0[indexPath.row];
cell.itemModel = itemModel;
if (indexPath.row == 0) {
[cell setCornerTop:YES bottom:NO];
}else if (indexPath.row == self.sectionArray0.count -1) {
[cell setCornerTop:NO bottom:YES];
}else{
[cell setCornerTop:NO bottom:NO];
}
return cell;
}else if (indexPath.section == 1) {
XPMineItemTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineItemTableViewCell class])];
XPMineItemModel *itemModel = self.sectionArray1[indexPath.row];
cell.itemModel = itemModel;
if (indexPath.row == 0) {
[cell setCornerTop:YES bottom:NO];
}else if (indexPath.row == self.sectionArray1.count -1) {
[cell setCornerTop:NO bottom:YES];
}else{
[cell setCornerTop:NO bottom:NO];
}
return cell;
}else if (indexPath.section == 2) {
XPHomeBannerTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])];
if (cell == nil) {
cell = [[XPHomeBannerTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])];
}
cell.isMineViewBanner = YES;
if (self.bannerArray.count) {
cell.bannerList = self.bannerArray;
}
cell.delegate = self;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
return UITableViewCell.new;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
XPMineItemModel *item = self.sectionArray0[indexPath.row];
[self headerViewBtnActionType:item.type];
}else if (indexPath.section == 1) {
XPMineItemModel *item = self.sectionArray1[indexPath.row];
[self headerViewBtnActionType:item.type];
}
}
#pragma mark -
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
[_tableView registerClass:[XPMineItemTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineItemTableViewCell class])];
[_tableView registerClass:[XPHomeBannerTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])];
}
return _tableView;
}
- (XPSimpleMineHeaderView *)headerView {
if (!_headerView) {
_headerView = [[XPSimpleMineHeaderView alloc] init];
_headerView.frame = CGRectMake(0, 0, self.view.bounds.size.width, 313);
_headerView.delegate = self;
}
return _headerView;
}
- (NSArray<XPMineItemModel *> *)sectionArray0 {
if (!_sectionArray0) {
XPMineItemModel *model0 = [[XPMineItemModel alloc] init];
model0.itemImageName = @"mine_union";
model0.itemName = YMLocalizedString(@"XPSimpleMineViewController1");
model0.type = XPMineItemType_My_Guild;
XPMineItemModel *model1 = [[XPMineItemModel alloc] init];
model1.itemImageName = @"mine_dress";
model1.itemName = YMLocalizedString(@"XPSimpleMineViewController2");
model1.type = XPMineItemType_DressUp_Market;
XPMineItemModel *model2 = [[XPMineItemModel alloc] init];
model2.itemImageName = @"mine_fans";
model2.itemName = YMLocalizedString(@"XPSimpleMineViewController3");
model2.type = XPMineItemType_FansTeam;
_sectionArray0 = @[model0, model1, model2];
}
return _sectionArray0;
}
- (NSArray<XPMineItemModel *> *)sectionArray1 {
if (!_sectionArray1) {
XPMineItemModel *model1 = [[XPMineItemModel alloc] init];
model1.itemImageName = @"mine_feedback";
model1.itemName = YMLocalizedString(@"XPSimpleMineViewController5");
model1.type = -2;
XPMineItemModel *model2 = [[XPMineItemModel alloc] init];
model2.itemImageName = @"mine_setting";
model2.itemName = YMLocalizedString(@"XPSimpleMineViewController6");
model2.type = -3;
_sectionArray1 = @[ model1, model2];
}
return _sectionArray1;
}
- (NSMutableArray<HomeBannerInfoModel *> *)bannerArray {
if (!_bannerArray) {
_bannerArray = [NSMutableArray array];
}
return _bannerArray;
}
@end

View File

@@ -1,16 +0,0 @@
//
// YMMomentListViewController.h
// YUMI
//
// Created by XY on 2023/2/16.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMomentListViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,282 +0,0 @@
//
// YMMomentListViewController.m
// YUMI
//
// Created by XY on 2023/2/16.
//
#import "XPMomentListViewController.h"
#import "YUMIMacroUitls.h"
#import <Masonry.h>
#import <MJRefresh.h>
#import "DJDKMIMOMColor.h"
#import "NSArray+Safe.h"
#import "ClientConfig.h"
#import "MonentsListInfoModel.h"
#import "XPMomentListCollectionViewCell.h"
#import "XPButton.h"
#import "XPMonentsLatestPresenter.h"
#import "XPMonentsLatestProtocol.h"
#import "XPMonentsDetailViewController.h"
#import "XPMonentsPublishViewController.h"
#import "XPMomentsSimpleDetailViewController.h"
@interface XPMomentListViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, XPMonentsLatestProtocol, XPMonentsDetailViewControllerDelegate>
@property (nonatomic, strong) UICollectionView *collectionView;
///
@property (nonatomic, strong) UIView *customNav;
@property (nonatomic, strong) UILabel *titleLabel;
///
@property (nonatomic, strong) XPButton *publishBtn;
///
@property (nonatomic,strong) NSMutableArray<MonentsInfoModel *> *datasource;
///
@property (nonatomic,assign) NSInteger page;
///
@property (nonatomic,assign) BOOL hasNoMoreData;
///
@property (nonatomic,strong) MonentsListInfoModel *listInfo;
@end
@implementation XPMomentListViewController
- (BOOL)isHiddenNavBar {
return YES;
}
- (__kindof id)createPresenter {
return [[XPMonentsLatestPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
[self initHeaderAndFooterRrfresh];
}
- (void)createUI {
[self.view addSubview:self.customNav];
[self.customNav addSubview:self.titleLabel];
[self.view addSubview:self.collectionView];
[self.view addSubview:self.publishBtn];
[self.customNav mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kStatusBarHeight);
make.leading.trailing.mas_equalTo(0);
make.height.mas_equalTo(44);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.customNav);
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.customNav.mas_bottom);
make.leading.trailing.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
[self.publishBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(-108);
make.trailing.mas_equalTo(0);
make.width.height.mas_equalTo(70);
}];
}
///
- (void)publishBtnAction {
XPMonentsPublishViewController * publishVC = [[XPMonentsPublishViewController alloc] init];
[self.navigationController pushViewController:publishVC animated:YES];
}
#pragma mark -
- (void)initHeaderAndFooterRrfresh {
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];
self.collectionView.mj_header = header;
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
footer.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
footer.ignoredScrollViewContentInsetBottom = self.collectionView.contentInset.bottom;
self.collectionView.mj_footer = footer;
[self headerRefresh];
}
#pragma mark - fangfa
- (void)headerRefresh {
self.page = 1;
[self.presenter getMonentsLatestListPageSize:20 dynamicId:@"" state:0];
}
- (void)footerRefresh {
if (self.hasNoMoreData) {
[self showErrorToast:YMLocalizedString(@"XPMomentListViewController0")];
[self.collectionView.mj_footer endRefreshing];
return;
}
self.page++;
[self.presenter getMonentsLatestListPageSize:20 dynamicId:self.listInfo.nextDynamicId state:1];
}
#pragma mark - XPMonentsLatestProtocol
- (void)getMonentsLatestListSuccess:(MonentsListInfoModel *)listInfo state:(int)state{
self.listInfo = listInfo;
if (state == 0) {
[self.datasource removeAllObjects];
}
if (listInfo.dynamicList.count > 0) {
[self.datasource addObjectsFromArray:listInfo.dynamicList];
}
if (state == 0) {
self.hasNoMoreData = NO;
[self.collectionView.mj_header endRefreshing];
} else {
if (listInfo.dynamicList.count > 0) {
self.hasNoMoreData = NO;
} else {
self.hasNoMoreData = YES;
}
[self.collectionView.mj_footer endRefreshing];
}
[self.collectionView reloadData];
}
- (void)getMonentsLatestListFail:(NSString *)msg state:(int)state {
if (state == 0) {
[self.collectionView.mj_header endRefreshing];
} else {
[self.collectionView.mj_footer endRefreshing];
}
}
#pragma mark - XPMonentsDetailViewControllerDelegate
- (void)xPMonentsDetailViewController:(XPMonentsDetailViewController *)view deleteMonents:(NSString *)dynamicId {
__block MonentsInfoModel * deleteInfo;
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.dynamicId.integerValue == dynamicId.integerValue) {
deleteInfo = obj;
}
}];
if (deleteInfo) {
[self.datasource removeObject:deleteInfo];
[self.collectionView reloadData];
}
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.datasource.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPMomentListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPMomentListCollectionViewCell.self) forIndexPath:indexPath];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
cell.monentsInfo = monentsInfo;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMomentsSimpleDetailViewController *detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
}
#pragma mark -
- (UICollectionView *)collectionView {
if (!_collectionView) {
MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
CGFloat width = (KScreenWidth - 16 -13 -16)/2.0;
CGFloat height = 220.0/165.0*width;
layout.itemSize = CGSizeMake(width, height);
layout.minimumLineSpacing = 12.0;
layout.minimumInteritemSpacing = 13.0;
layout.sectionInset = UIEdgeInsetsMake(12, 16, 12, 16);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.backgroundColor = UIColor.clearColor;
_collectionView.alwaysBounceVertical = YES;
[_collectionView registerClass:[XPMomentListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass(XPMomentListCollectionViewCell.self)];
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
return _collectionView;
}
- (XPButton *)publishBtn {
if (!_publishBtn) {
_publishBtn = [XPButton buttonWithType:UIButtonTypeCustom];
_publishBtn.backgroundColor = UIColorFromRGB(0x0C1430);
[_publishBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
_publishBtn.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
[_publishBtn setTitle:YMLocalizedString(@"XPMomentListViewController1") forState:UIControlStateNormal];
[_publishBtn setImage:[UIImage imageNamed:@"moment_camera"] forState:UIControlStateNormal];
[_publishBtn addTarget:self action:@selector(publishBtnAction) forControlEvents:UIControlEventTouchUpInside];
_publishBtn.layer.cornerRadius = 70/2;
_publishBtn.clipsToBounds = YES;
_publishBtn.buttonStyle = XPButtonImageTop;
_publishBtn.padding = 4;
}
return _publishBtn;
}
- (UIView *)customNav {
if (!_customNav) {
_customNav = [[UIView alloc] init];
_customNav.backgroundColor = [DJDKMIMOMColor appBackgroundColor];
}
return _customNav;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = YMLocalizedString(@"XPMomentListViewController2");
_titleLabel.backgroundColor = [UIColor clearColor];
_titleLabel.font = [UIFont systemFontOfSize:18.f weight:UIFontWeightMedium];
_titleLabel.textColor = DJDKMIMOMColor.mainTextColor;
_titleLabel.textAlignment = NSTextAlignmentCenter;
}
return _titleLabel;
}
- (NSMutableArray<MonentsInfoModel *> *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -33,7 +33,7 @@
#import "QKeyboardManager.h" #import "QKeyboardManager.h"
#import "QEmotionBoardView.h" #import "QEmotionBoardView.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPMomentsSimpleDetailNav.h" #import "XPMomentsSimpleDetailNav.h"
#import "XPWebViewController.h" #import "XPWebViewController.h"
///P ///P
@@ -280,38 +280,29 @@
/// ///
- (void)momentsSimpleDetailNavAvatarAction { - (void)momentsSimpleDetailNavAvatarAction {
if ([ClientConfig shareConfig].canOpen) { XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = self.monentsInfo.uid.integerValue;
userInfoVC.uid = self.monentsInfo.uid.integerValue; [self.navigationController pushViewController:userInfoVC animated:YES];
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = self.monentsInfo.uid.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
} }
/// ///
- (void)momentsSimpleDetailNavMoreAction { - (void)momentsSimpleDetailNavMoreAction {
TTActionSheetConfig *action; TTActionSheetConfig *action;
@kWeakify(self);
if (self.monentsInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) { if (self.monentsInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController4") clickAction:^{ action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController4") clickAction:^{
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{ [TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
@kStrongify(self);
[self.presenter deleteMonents:self.monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", self.monentsInfo.worldId]]; [self.presenter deleteMonents:self.monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", self.monentsInfo.worldId]];
} cancelHandler:^{ } cancelHandler:^{}];
}];
}]; }];
} else { } else {
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController6") clickAction:^{ action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController6") clickAction:^{
if ([ClientConfig shareConfig].canOpen) { @kStrongify(self);
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.monentsInfo.uid, @"WORLDDYNAMIC"]; NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.monentsInfo.uid, @"WORLDDYNAMIC"];
XPWebViewController * webVC = [[XPWebViewController alloc] init]; XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = url; webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES]; [self.navigationController pushViewController:webVC animated:YES];
} else {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPMomentsSimpleDetailViewController7")];
}
}]; }];
} }
[TTPopup actionSheetWithItems:@[action]]; [TTPopup actionSheetWithItems:@[action]];
@@ -330,16 +321,9 @@
} }
} }
- (void)xPMonentsCommentTableViewCell:(XPMonentsCommentTableViewCell *)view didClickAvatar:(NSString *)commentInfo { - (void)xPMonentsCommentTableViewCell:(XPMonentsCommentTableViewCell *)view didClickAvatar:(NSString *)commentInfo {
if ([ClientConfig shareConfig].canOpen) { XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = commentInfo.integerValue;
userInfoVC.uid = commentInfo.integerValue; [self.navigationController pushViewController:userInfoVC animated:YES];
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = commentInfo.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
} }
#pragma mark - XPMonentsTableViewCellDelegate #pragma mark - XPMonentsTableViewCellDelegate
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo { - (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {

View File

@@ -132,15 +132,9 @@
MonentsInfoModel * monents = [[MonentsInfoModel alloc] init]; MonentsInfoModel * monents = [[MonentsInfoModel alloc] init];
monents.dynamicId = model.dynamicId; monents.dynamicId = model.dynamicId;
if ([ClientConfig shareConfig].canOpen) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; detailVC.monentsInfo = monents;
detailVC.monentsInfo = monents; [self.navigationController pushViewController:detailVC animated:YES];
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
detailVC.monentsInfo = monents;
[self.navigationController pushViewController:detailVC animated:YES];
}
} }
} }
#pragma mark -JXCategoryListContainerViewDelegate #pragma mark -JXCategoryListContainerViewDelegate

View File

@@ -94,22 +94,14 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; [tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.datasource.count > 0) { if (self.datasource.count > 0) {
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
if ([ClientConfig shareConfig].canOpen) { if(monentsInfo.dynamicId == nil) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; return;
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
if(monentsInfo.dynamicId == nil)return;
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
if(monentsInfo.dynamicId == nil)return;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
} }
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
} }
} }
#pragma mark - XPMonentsTableViewCellDelegate #pragma mark - XPMonentsTableViewCellDelegate
@@ -126,19 +118,10 @@
[self showErrorToast:YMLocalizedString(@"XPMineUserDataViewController5")]; [self showErrorToast:YMLocalizedString(@"XPMineUserDataViewController5")];
return; return;
} }
if ([ClientConfig shareConfig].canOpen) { XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init]; detailVC.monentsInfo = monentsInfo;
detailVC.monentsInfo = monentsInfo; detailVC.delegate = self;
detailVC.delegate = self; [self.navigationController pushViewController:detailVC animated:YES];
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
} }
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo { - (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsMineViewController2") confirmHandler:^{ [TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsMineViewController2") confirmHandler:^{

View File

@@ -104,7 +104,6 @@
[self.datasource addObject:self.addPicImage]; [self.datasource addObject:self.addPicImage];
self.addTopicView.hidden = ![ClientConfig shareConfig].canOpen;
for (id view in self.textView.subviews) { for (id view in self.textView.subviews) {
if ([view isKindOfClass:[UITextView class]]){ if ([view isKindOfClass:[UITextView class]]){
UITextView *textView = view; UITextView *textView = view;

View File

@@ -23,7 +23,7 @@
///VC ///VC
#import "XPRoomViewController.h" #import "XPRoomViewController.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
UIKIT_EXTERN NSString *kFromSearchToHomeViewKey; UIKIT_EXTERN NSString *kFromSearchToHomeViewKey;
UIKIT_EXTERN NSString *kTabShowAnchorCardKey; UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
@@ -68,6 +68,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}]; }];
} }
- (void)toMineUserInfoView:(HomeSearchResultModel *)model {
XPMineUserInfoViewController *infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = model.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource #pragma mark - UITableViewDelegate And UITableViewDataSource
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 74; return 74;
@@ -89,38 +95,25 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; [tableView deselectRowAtIndexPath:indexPath animated:YES];
HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row];
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kFromSearchToHomeViewKey]; BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kFromSearchToHomeViewKey];
if (!result) { if (!result) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kFromSearchToHomeViewKey]; [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kFromSearchToHomeViewKey];
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
[[NSNotificationCenter defaultCenter] postNotificationName:kTabShowAnchorCardKey object:@{@"delayShow" : @(YES)}]; [[NSNotificationCenter defaultCenter] postNotificationName:kTabShowAnchorCardKey object:@{@"delayShow" : @(YES)}];
} }
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row];
if (self.type == SearchType_Room) { if (self.type == SearchType_Room) {
if (resultModel.valid) { if (resultModel.valid) {
[XPRoomViewController openRoom:resultModel.uid viewController:self.presentingViewController]; [XPRoomViewController openRoom:resultModel.uid viewController:self.presentingViewController];
} else { } else {
if ([ClientConfig shareConfig].canOpen) { [self toMineUserInfoView:resultModel];
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
} }
} else { } else {
if ([ClientConfig shareConfig].canOpen) { [self toMineUserInfoView:resultModel];
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
} }
} }

View File

@@ -20,7 +20,7 @@
#import "XPHomeSearchRecordCell.h" #import "XPHomeSearchRecordCell.h"
#import "XPRoomViewController.h" #import "XPRoomViewController.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
///P ///P
#import "XPInRoomRecordPresenter.h" #import "XPInRoomRecordPresenter.h"
#import "XPInRoomRecordProtocol.h" #import "XPInRoomRecordProtocol.h"
@@ -222,15 +222,9 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
if (resultModel.valid) { if (resultModel.valid) {
[XPRoomViewController openRoom:resultModel.roomUid viewController:self.presentingViewController]; [XPRoomViewController openRoom:resultModel.roomUid viewController:self.presentingViewController];
} else { } else {
if ([ClientConfig shareConfig].canOpen) { XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init]; infoVC.uid = resultModel.roomUid.integerValue;
infoVC.uid = resultModel.roomUid.integerValue; [(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = resultModel.roomUid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
} }
} }
} }

View File

@@ -1,16 +0,0 @@
//
// YMHomeSloganViewController.h
// YUMI
//
// Created by XY on 2023/2/17.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPHomeSloganViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,311 +0,0 @@
//
// YMHomeSloganViewController.m
// YUMI
//
// Created by XY on 2023/2/17.
//
#import "XPHomeSloganViewController.h"
#import "XPHomeUserView.h"
#import "YUMIMacroUitls.h"
#import "DJDKMIMOMColor.h"
#import "NetImageView.h"
#import <Masonry.h>
#import "XPWeakTimer.h"
#import "AccountInfoStorage.h"
#import "Api+Home.h"
///M
#import "HomeRecommendRoomModel.h"
///VC
#import "XPRoomViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
@interface XPHomeSloganViewController ()<XPHomeUserViewDelegate> {
NSTimer * timer;
}
///
@property (nonatomic, strong) NSMutableArray<XPHomeUserView *> *userViewArr;
///
@property (nonatomic, strong) NetImageView *bgImageView;
/// MoliStar
@property (nonatomic, strong) UIImageView *nameImageView;
@property (nonatomic, strong) UIButton *enterRoomBtn;
///
@property (nonatomic,strong) NSMutableArray<HomeRecommendRoomModel *> *hotRoomList;
@end
@implementation XPHomeSloganViewController
//- (XPHomeRecommendPresenter *)createPresenter {
// return [[XPHomeRecommendPresenter alloc] init];
//}
- (BOOL)isHiddenNavBar {
return YES;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
[self addTimer];
[self loadRecommend];
}
- (void)loadRecommend {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * pageStr = [NSString stringWithFormat:@"%d", 1];
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", 10];
[Api getRecommendListComplection:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200) {
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
[self getHomeRecommendRoomListSuccess:array];
} else {
}
} uid:uid tabId:@"" pageNum:pageStr pageSize:pageSizeStr];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (timer) {
[timer setFireDate:[NSDate distantPast]]; //
}
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (timer) {
//
[timer setFireDate:[NSDate distantFuture]]; //
}
}
- (void)createUI {
[self.view addSubview:self.bgImageView];
[self.view addSubview:self.nameImageView];
[self.view addSubview:self.enterRoomBtn];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
[self.nameImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kStatusBarHeight+20);
make.leading.mas_equalTo(23);
make.width.mas_equalTo(100);
make.height.mas_equalTo(45);
}];
[self.enterRoomBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(30);
make.height.mas_equalTo(40);
make.centerY.mas_equalTo(self.nameImageView);
make.trailing.mas_equalTo(self.view).offset(-15);
}];
}
- (void)addTimer {
timer = [XPWeakTimer scheduledTimerWithTimeInterval:15 block:^(id userInfo) {
[self loadRecommend];
} userInfo:nil repeats:YES];
}
#pragma mark - XPHomeUserViewDelegate
- (void)userViewClickAction:(HomeRecommendRoomModel *)model {
if (model.roomUid.length > 0) {
// [XPRoomViewController openRoom:model.uid fromNick:nil fromType:UserEnterRoomFromType_Home_Recommend fromUid:nil viewController:self];
XPMineSimpleUserInfoViewController *infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = [model.roomUid integerValue];
[self.navigationController pushViewController:infoVC animated:YES];
}
}
#pragma mark - XPHomeRecommendProtocol
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list {
if (list.count > 10) {
list = [list subarrayWithRange:NSMakeRange(0, 9)];
}
[self.hotRoomList removeAllObjects];
[self.hotRoomList addObjectsFromArray:list];
//
if (self.userViewArr.count > 0) {
[self removeUserViews];
return;
}
//
for (HomeRecommendRoomModel *model in self.hotRoomList) {
XPHomeUserView *userView = [self showUserView:model];
if(userView != nil) {
[self.userViewArr addObject:userView];
}
}
}
- (void)getHomeRecommendDataFail {
}
///
- (XPHomeUserView *)showUserView:(HomeRecommendRoomModel *)model {
//
CGFloat scale = (arc4random_uniform(50)+1)*0.01 + 0.5;
CGRect rect = [self getRandomRect];
CGRect scaleRect = rect;
scaleRect.size.width = rect.size.width * scale;
scaleRect.size.height = rect.size.height * scale;
//
NSInteger count = 0; //1000退
BOOL contain = [self intersectsRect:scaleRect];
while (contain || count < 1000) {
scale = (arc4random_uniform(50)+1)*0.01 + 0.5;
rect = [self getRandomRect];
scaleRect = rect;
scaleRect.size.width = rect.size.width * scale;
scaleRect.size.height = rect.size.height * scale;
contain = [self intersectsRect:scaleRect];
count++;
}
//1000
if (contain == YES) {
return nil;
}
//
XPHomeUserView *userView = [[XPHomeUserView alloc] init];
userView.frame = rect;
userView.transform = CGAffineTransformMakeScale(scale, scale);
userView.frame = scaleRect;
userView.delegate = self;
[self.view addSubview:userView];
userView.roomModel = model;
//
userView.alpha = 0;
[UIView animateWithDuration:0.5 animations:^{
userView.alpha = 1;
} completion:^(BOOL finished) {
}];
return userView;
}
- (void)removeUserViews {
dispatch_group_t group = dispatch_group_create();
dispatch_queue_t queue = dispatch_get_main_queue();
NSUInteger viewCount = self.userViewArr.count;
for (int i = 0; i< viewCount; i++) {
dispatch_group_enter(group);
XPHomeUserView *userView = self.userViewArr[i];
[UIView animateWithDuration:0.5 animations:^{
userView.alpha = 0;
userView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[userView removeFromSuperview];
[self.userViewArr removeObject:userView];
dispatch_group_leave(group);
}];
}
dispatch_group_notify(group, queue, ^{
for (HomeRecommendRoomModel *model in self.hotRoomList) {
XPHomeUserView *userView = [self showUserView:model];
if (userView !=nil) {
[self.userViewArr addObject:userView];
}
}
});
}
///
- (CGRect)getRandomRect {
@autoreleasepool {
//
CGFloat userViewWidth = 120;
CGFloat userViewHeight = 120;
CGFloat statusBarHeight = kStatusBarHeight;
//
CGFloat areaWidth = self.view.bounds.size.width - userViewWidth - 5*2;
CGFloat areaHeight = self.view.bounds.size.height - statusBarHeight - 70 - 90- userViewHeight;
CGFloat x = arc4random_uniform(areaWidth)+5;
CGFloat y = arc4random_uniform(areaHeight)+statusBarHeight+ 70;
CGRect rect = CGRectMake(x, y, userViewWidth, userViewHeight);
return rect;
}
}
///
/// - Parameter targetRect:
- (BOOL)intersectsRect:(CGRect)targetRect {
@autoreleasepool {
for (XPHomeUserView *userView in self.userViewArr) {
CGRect frame = userView.frame;
BOOL b = CGRectIntersectsRect(targetRect, frame);
if (b) {
return YES;
}
}
return NO;
}
}
- (void)likeButtonAction:(UIButton *)sender {
NSString* roomUid = [AccountInfoStorage instance].getUid;
[XPRoomViewController openRoom:roomUid viewController:self];
}
#pragma mark -
- (NSMutableArray<XPHomeUserView *> *)userViewArr {
if (!_userViewArr) {
_userViewArr = [NSMutableArray array];
}
return _userViewArr;
}
- (NSMutableArray<HomeRecommendRoomModel *> *)hotRoomList {
if (!_hotRoomList) {
_hotRoomList = [NSMutableArray array];
}
return _hotRoomList;
}
- (NetImageView *)bgImageView {
if (!_bgImageView) {
_bgImageView = [[NetImageView alloc] init];
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
_bgImageView.image = [UIImage imageNamed:@"home_bg"];
}
return _bgImageView;
}
- (UIImageView *)nameImageView {
if (!_nameImageView) {
_nameImageView = [[UIImageView alloc] init];
_nameImageView.contentMode = UIViewContentModeScaleAspectFit;
_nameImageView.image = [UIImage imageNamed:@"home_name"];
}
return _nameImageView;
}
- (UIButton *)enterRoomBtn {
if (!_enterRoomBtn) {
_enterRoomBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_enterRoomBtn setImage:[UIImage imageNamed:@"home_nav_open_room"] forState:UIControlStateNormal];
[_enterRoomBtn setImage:[UIImage imageNamed:@"home_nav_open_room"] forState:UIControlStateSelected];
[_enterRoomBtn addTarget:self action:@selector(likeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _enterRoomBtn;
}
@end

View File

@@ -232,9 +232,6 @@
#pragma mark - NIMBroadcastDelegate #pragma mark - NIMBroadcastDelegate
// 广 // 广
- (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage{ - (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage{
if (![ClientConfig shareConfig].canOpen) {
return;
}
if (broadcastMessage.content) { if (broadcastMessage.content) {
NSDictionary *msgDictionary = [broadcastMessage.content toJSONObject]; NSDictionary *msgDictionary = [broadcastMessage.content toJSONObject];
AttachmentModel *attachment = [AttachmentModel modelWithJSON:msgDictionary[@"body"]]; AttachmentModel *attachment = [AttachmentModel modelWithJSON:msgDictionary[@"body"]];
@@ -268,21 +265,6 @@
- (void)handleNIMCustomMessage:(NIMMessage *)message { - (void)handleNIMCustomMessage:(NIMMessage *)message {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
if (![ClientConfig shareConfig].canOpen) {
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_Gift) {
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
receiveInfo.isLuckyBagGift = attachment.second == Custom_Message_Sub_Gift_LuckySend;
receiveInfo.isBatch = YES;
[self receiveGiftHandleSendGiftAnimation:attachment];
} else if (attachment.first == CustomMessageType_AllMicroSend) { //
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
receiveInfo.isLuckyBagGift = (attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend);
receiveInfo.isBatch = (attachment.second == Custom_Message_Sub_AllBatchSend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend);
[self receiveGiftHandleSendGiftAnimation:attachment];
}
return;
}
AttachmentModel *attachment = (AttachmentModel *)obj.attachment; AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_Gift) { if (attachment.first == CustomMessageType_Gift) {
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data]; GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
@@ -2058,9 +2040,49 @@
NSString *fullPath = [filePath stringByAppendingPathComponent:fileName]; NSString *fullPath = [filePath stringByAppendingPathComponent:fileName];
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){ if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
NSData *data = [NSData dataWithContentsOfFile:fullPath options:0 error:NULL]; NSData *data = [NSData dataWithContentsOfFile:fullPath options:0 error:NULL];
@kWeakify(self);
[self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { [self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self);
if (videoItem != nil) {
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
[self.giftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.middleLevelView);
make.width.mas_equalTo(KScreenWidth);
make.height.mas_equalTo(KScreenHeight);
}];
}
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.giftEffectView.alpha = 1;
self.giftEffectView.loops = 1;
self.giftEffectView.clearsAfterStop = YES;
self.giftEffectView.videoItem = videoItem;
[self.giftEffectView startAnimation];
} else {
self.isLargeGiftAnimating = NO;
}
} failureBlock:^(NSError * _Nonnull error) {
@kStrongify(self);
self.giftEffectView.hidden = YES;
self.isLargeGiftAnimating = NO;
}];
} else {
@kWeakify(self);
[self.parser parseWithURL:[NSURL URLWithString:encodingUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
@kStrongify(self);
if (videoItem != nil) { if (videoItem != nil) {
self.giftEffectView.hidden = NO; self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) { if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView]; [self.middleLevelView addSubview:self.giftEffectView];
@@ -2090,50 +2112,12 @@
return; return;
} }
self.isLargeGiftAnimating = NO; self.isLargeGiftAnimating = NO;
} failureBlock:^(NSError * _Nonnull error) { } failureBlock:^(NSError * _Nullable error) {
@kStrongify(self);
self.giftEffectView.hidden = YES; self.giftEffectView.hidden = YES;
self.isLargeGiftAnimating = NO; self.isLargeGiftAnimating = NO;
}]; }];
return; }
};
[self.parser parseWithURL:[NSURL URLWithString:encodingUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
[self.giftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.middleLevelView);
make.width.mas_equalTo(KScreenWidth);
make.height.mas_equalTo(KScreenHeight);
}];
}
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.giftEffectView.alpha = 1;
self.giftEffectView.loops = 1;
self.giftEffectView.clearsAfterStop = YES;
self.giftEffectView.videoItem = videoItem;
[self.giftEffectView startAnimation];
return;
}
self.isLargeGiftAnimating = NO;
} failureBlock:^(NSError * _Nullable error) {
self.giftEffectView.hidden = YES;
self.isLargeGiftAnimating = NO;
}];
} }
/// pag /// pag
- (void)playGiftEffectWithPagUrl:(NSString *)pagUrl { - (void)playGiftEffectWithPagUrl:(NSString *)pagUrl {

View File

@@ -73,7 +73,7 @@
#import "XPRoomViewController.h" #import "XPRoomViewController.h"
#import "AcrossRoomPKPrizeModel.h" #import "AcrossRoomPKPrizeModel.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPRoomRankEntranceView.h" #import "XPRoomRankEntranceView.h"
#import "XPRoomAnchorRankEnterView.h" #import "XPRoomAnchorRankEnterView.h"
#import "XPRoomBackMusicPlayerView.h" #import "XPRoomBackMusicPlayerView.h"
@@ -305,31 +305,24 @@
}]; }];
} }
- (void)showLittleGameMiniView:(RoomType)type micCount:(NSInteger)micCount { - (void)showLittleGameMiniView:(RoomType)type micCount:(NSInteger)micCount {
if([ClientConfig shareConfig].canOpen){ if (type == RoomType_MiniGame) {
if (type == RoomType_MiniGame) { if (!self.littleGameMiniView.superview) {
if (!self.littleGameMiniView.superview) { [self addSubview:self.littleGameMiniView];
[self addSubview:self.littleGameMiniView]; [self.littleGameMiniView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.littleGameMiniView mas_makeConstraints:^(MASConstraintMaker *make) { make.trailing.mas_equalTo(0);
make.trailing.mas_equalTo(0); make.top.mas_equalTo(kNavigationHeight);
make.top.mas_equalTo(kNavigationHeight); make.height.mas_equalTo(23);
make.height.mas_equalTo(23); }];
}];
}
self.littleGameMiniView.micCount = micCount;
if (micCount > 6) {
[self.littleGameMiniView removeFromSuperview];
}
} else {
if (self.littleGameMiniView.superview) {
[self.littleGameMiniView removeFromSuperview];
}
} }
}else{ self.littleGameMiniView.micCount = micCount;
if (micCount > 6) {
[self.littleGameMiniView removeFromSuperview];
}
} else {
if (self.littleGameMiniView.superview) { if (self.littleGameMiniView.superview) {
[self.littleGameMiniView removeFromSuperview]; [self.littleGameMiniView removeFromSuperview];
} }
} }
} }
- (void)configLittleGameState { - (void)configLittleGameState {
@@ -622,7 +615,7 @@
self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView7"); self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView7");
[self updateContrionEntranceWithRoomUid:roomUid type:@"day"];// [self updateContrionEntranceWithRoomUid:roomUid type:@"day"];//
} }
if ([ClientConfig shareConfig].canOpen && ![[AccountInfoStorage instance].getUid isEqualToString:roomUid]) {// if (![[AccountInfoStorage instance].getUid isEqualToString:roomUid]) {//
NSString * uid = [[AccountInfoStorage instance] getUid]; NSString * uid = [[AccountInfoStorage instance] getUid];
[Api attentionStatusCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {// [Api attentionStatusCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {//
BOOL isLike = ((NSNumber *)data.data).boolValue; BOOL isLike = ((NSNumber *)data.data).boolValue;
@@ -689,9 +682,6 @@
} }
- (void)onRoomMiniEntered { - (void)onRoomMiniEntered {
if (![ClientConfig shareConfig].canOpen) {
return;
}
if ([XPRoomMiniManager shareManager].getCurrentMusic) { if ([XPRoomMiniManager shareManager].getCurrentMusic) {
if (!self.musicPlayView.superview) { if (!self.musicPlayView.superview) {
[self addSubview:self.musicPlayView]; [self addSubview:self.musicPlayView];
@@ -1031,10 +1021,6 @@
} else if(self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) { } else if(self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
self.roompkPanelView.micQueue = queue; self.roompkPanelView.micQueue = queue;
}else { }else {
if (![ClientConfig shareConfig].canOpen) {
return;
}
MicroQueueModel * currentUserModel; MicroQueueModel * currentUserModel;
NSString * uid = [AccountInfoStorage instance].getUid; NSString * uid = [AccountInfoStorage instance].getUid;
for (MicroQueueModel * microModel in queue.allValues) { for (MicroQueueModel * microModel in queue.allValues) {
@@ -1146,15 +1132,9 @@
#pragma mark - XPAnchorPkPanelViewDelegate #pragma mark - XPAnchorPkPanelViewDelegate
- (void)xPAnchorPKPanelView:(XPAnchorPkPanelView *)view showUserCard:(NSString *)uid { - (void)xPAnchorPKPanelView:(XPAnchorPkPanelView *)view showUserCard:(NSString *)uid {
if ([ClientConfig shareConfig].canOpen) { XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; userInfoVC.uid = uid.integerValue;
userInfoVC.uid = uid.integerValue; [self.delegate.getCurrentNav pushViewController:userInfoVC animated:YES];
[self.delegate.getCurrentNav pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.delegate.getCurrentNav pushViewController:userInfoVC animated:YES];
}
} }
/// ///
@@ -1663,9 +1643,6 @@
} }
- (void)configPlayMusicRoomTypeChange { - (void)configPlayMusicRoomTypeChange {
if (![ClientConfig shareConfig].canOpen) {
return;
}
RoomInfoModel * roomInfo = self.delegate.getRoomInfo; RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
if (roomInfo.type == RoomType_MiniGame) { if (roomInfo.type == RoomType_MiniGame) {
[self pauseLayer:self.musicEnterButton.imageView.layer]; [self pauseLayer:self.musicEnterButton.imageView.layer];

View File

@@ -101,7 +101,10 @@
-(void)getFirstRechargeRewardList{ -(void)getFirstRechargeRewardList{
[XNDJTDDLoadingTool showLoading]; [XNDJTDDLoadingTool showLoading];
@kWeakify(self);
[Api firstRechargeRewardList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [Api firstRechargeRewardList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
[XNDJTDDLoadingTool hideHUD]; [XNDJTDDLoadingTool hideHUD];
if(code == 200){ if(code == 200){
NSArray * array = [FirstRechargeModel modelsWithArray:data.data]; NSArray * array = [FirstRechargeModel modelsWithArray:data.data];
@@ -111,21 +114,15 @@
[XNDJTDDLoadingTool showErrorWithMessage:msg]; [XNDJTDDLoadingTool showErrorWithMessage:msg];
} channelType:@"3"]; } channelType:@"3"];
[self checkTranscationIds]; [self checkTranscationIds];
if([ClientConfig shareConfig].canOpen){
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { @kStrongify(self);
if(code == 200){
if(code == 200){ if(data.data[@"isNative"] != nil){
if(data.data[@"isNative"] != nil){ self.pi_IsNative = [data.data[@"isNative"] boolValue];
self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
} }
}
}]; }];
}
} }
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {

View File

@@ -205,9 +205,6 @@
} }
- (NSDictionary *)supportMessageDic { - (NSDictionary *)supportMessageDic {
if (![ClientConfig shareConfig].canOpen) {
return @{};
}
return @{ return @{
@(CustomMessageType_Chat_Hall_Headlinesn): @(CustomMessageType_Chat_Hall_Headlinesn):
[NSSet setWithObjects: [NSSet setWithObjects:

View File

@@ -231,37 +231,33 @@
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
if ([ClientConfig shareConfig].canOpen) { ///
/// [attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser fromSayHelloChannel:model.fromSayHelloChannel]];
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser fromSayHelloChannel:model.fromSayHelloChannel]]; if ([self isCurrentRoomSuperAdmin:message.from]) {
if ([self isCurrentRoomSuperAdmin:message.from]) { [attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]]; }
}
if (model.vipIcon) {//VIPicon
if (model.vipIcon) {//VIPicon [attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(20, 20)]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (model.experUrl) {
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(model.isCustomWord == YES){
if (model.inRoomNameplatePic.length > 0){
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
} }
if (model.experUrl) { }else{
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]]; if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
} else if (model.inRoomNameplatePic.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
} }
if(model.isCustomWord == YES){
if (model.inRoomNameplatePic.length > 0){
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}else{
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
} else if (model.inRoomNameplatePic.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}
} }
[attribute appendAttributedString:[self createTextAttribute:nick color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createTextAttribute:nick color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
@@ -340,61 +336,56 @@
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from]; NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithDictionary:dic]; XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithDictionary:dic];
if ([ClientConfig shareConfig].canOpen) { ///
/// [attribute appendAttributedString:[self createOfficalAndNewuserAttribute:extModel.defUser newUser:extModel.newUser fromSayHelloChannel:extModel.fromSayHelloChannel]];
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:extModel.defUser newUser:extModel.newUser fromSayHelloChannel:extModel.fromSayHelloChannel]];
if ([self isCurrentRoomSuperAdmin:message.from]) {
if ([self isCurrentRoomSuperAdmin:message.from]) { [attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.vipIcon.length > 0) {//VIPicon
messageInfo.vipIcon = extModel.vipIcon;
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.experUrl.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(extModel.isCustomWord == YES){
if (extModel.inRoomNameplatePic.length > 0) {
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}else{
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
if (extModel.carName.length > 0) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser1") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:extModel.carName color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.fromType > 0) {
if (extModel.fromType == UserEnterRoomFromType_Home_Recommend) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser2") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_User || extModel.fromType == UserEnterRoomFromType_New_User_Greet) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser3") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_Game_Detail) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser4") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser5") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
}
}
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser6") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} else {
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser7") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} }
if (extModel.vipIcon.length > 0) {//VIPicon
messageInfo.vipIcon = extModel.vipIcon;
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.experUrl.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(extModel.isCustomWord == YES){
if (extModel.inRoomNameplatePic.length > 0) {
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}else{
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
if (extModel.carName.length > 0) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser1") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:extModel.carName color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.fromType > 0) {
if (extModel.fromType == UserEnterRoomFromType_Home_Recommend) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser2") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_User || extModel.fromType == UserEnterRoomFromType_New_User_Greet) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser3") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_Game_Detail) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser4") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser5") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
}
}
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser6") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
messageInfo.content = attribute; messageInfo.content = attribute;
return messageInfo; return messageInfo;
} }
@@ -1329,9 +1320,6 @@
- (void)showUserCard:(NSInteger)uid { - (void)showUserCard:(NSInteger)uid {
if (![ClientConfig shareConfig].canOpen) {
return;
}
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
NSString * targetUid = [NSString stringWithFormat:@"%ld", uid]; NSString * targetUid = [NSString stringWithFormat:@"%ld", uid];
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init]; XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];

View File

@@ -250,9 +250,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
[self addSubview:self.messageTableView]; [self addSubview:self.messageTableView];
[self addSubview:self.messageTipsBtn]; [self addSubview:self.messageTipsBtn];
[self addSubview:self.atTipBtn]; [self addSubview:self.atTipBtn];
if ([ClientConfig shareConfig].canOpen) { self.messageTableView.tableHeaderView = self.headerView;
self.messageTableView.tableHeaderView = self.headerView;
}
} }
- (void)initSubViewConstraints { - (void)initSubViewConstraints {
@@ -423,9 +421,6 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
} }
- (NSDictionary *)supportMessageDic { - (NSDictionary *)supportMessageDic {
if (![ClientConfig shareConfig].canOpen) {
return @{};
}
return @{ return @{
@(CustomMessageType_AllMicroSend): @(CustomMessageType_AllMicroSend):
[NSSet setWithObjects: [NSSet setWithObjects:
@@ -579,7 +574,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
/// ///
- (void)createUserEnterRoomAddRoomtopicMessage { - (void)createUserEnterRoomAddRoomtopicMessage {
if ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion == YES || ![ClientConfig shareConfig].canOpen) { if ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion == YES) {
return; return;
} }
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;

View File

@@ -169,7 +169,6 @@
[array addObject:wishGift]; [array addObject:wishGift];
} }
if (isCreator || isManager || isSuperAdmin) { if (isCreator || isManager || isSuperAdmin) {
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) { if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {
[array insertObject:dating atIndex:0]; [array insertObject:dating atIndex:0];
@@ -187,18 +186,9 @@
[array addObject:trumpet]; [array addObject:trumpet];
[array addObject:giftEffect]; [array addObject:giftEffect];
} }
}else{ }else{
[array addObject:giftEffect]; [array addObject:giftEffect];
} }
if (![ClientConfig shareConfig].canOpen) {
[array removeAllObjects];
[array addObject:clearScreen];
[array addObject:roomSetting];
}
[array addObject:report]; [array addObject:report];
if(roomInfo.hasRoomAlbum == YES){ if(roomInfo.hasRoomAlbum == YES){
[array insertObject:roomPhotoAlbum atIndex:1]; [array insertObject:roomPhotoAlbum atIndex:1];

View File

@@ -156,10 +156,6 @@
#pragma mark - Getters And Setters #pragma mark - Getters And Setters
- (void)setTitleArray:(NSArray *)titleArray { - (void)setTitleArray:(NSArray *)titleArray {
if (![ClientConfig shareConfig].canOpen) {
self.hidden = YES;
return;
}
_titleArray = titleArray; _titleArray = titleArray;
if (titleArray.count == 0){ if (titleArray.count == 0){
[self onCloseButtonClick]; [self onCloseButtonClick];

View File

@@ -392,17 +392,9 @@
self.micStateImageView.hidden = micState.micState == MicroMicStateType_Open; self.micStateImageView.hidden = micState.micState == MicroMicStateType_Open;
UIImage *image; UIImage *image;
if (micState.posState == MicroPosStateType_Free) { if (micState.posState == MicroPosStateType_Free) {
if ([ClientConfig shareConfig].canOpen) { image = [UIImage imageNamed:@"room_position_normal"];
image = [UIImage imageNamed:@"room_position_normal"];
}else{
image = [UIImage imageNamed:@"room_position_normal1"];
}
} else { } else {
if ([ClientConfig shareConfig].canOpen) { image = [UIImage imageNamed:@"room_position_lock"];
image = [UIImage imageNamed:@"room_position_lock"];
}else{
image = [UIImage imageNamed:@"room_position_lock1"];
}
} }
CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width); CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width);
UIGraphicsBeginImageContextWithOptions(scaledToSize, false, 0.0); UIGraphicsBeginImageContextWithOptions(scaledToSize, false, 0.0);
@@ -461,15 +453,9 @@
} else { } else {
self.nickLabel.textColor = [DJDKMIMOMColor positionNickColor]; self.nickLabel.textColor = [DJDKMIMOMColor positionNickColor];
self.avatarImageView.image = nil; self.avatarImageView.image = nil;
if (self.microModel.microState.position == -1) {
if ([ClientConfig shareConfig].canOpen) { self.nickLabel.hidden = YES;
if (self.microModel.microState.position == -1) { }
self.nickLabel.hidden = YES;
}
} else {
self.nickLabel.hidden = YES;
}
} }
NSString * headWearUrl = userInfo.headwearEffect.length ? userInfo.headwearEffect : userInfo.headWearUrl.length ? userInfo.headWearUrl : userInfo.headwearPic; NSString * headWearUrl = userInfo.headwearEffect.length ? userInfo.headwearEffect : userInfo.headWearUrl.length ? userInfo.headWearUrl : userInfo.headwearPic;
if (headWearUrl.length > 0 && !userInfo.vipMic) { if (headWearUrl.length > 0 && !userInfo.vipMic) {

View File

@@ -26,17 +26,9 @@
UIImage *image; UIImage *image;
if (micState.posState == MicroPosStateType_Free) { if (micState.posState == MicroPosStateType_Free) {
if ([ClientConfig shareConfig].canOpen) { image = [UIImage imageNamed:@"room_position_normal"];
image = [UIImage imageNamed:@"room_position_normal"];
}else{
image = [UIImage imageNamed:@"room_position_normal1"];
}
} else { } else {
if ([ClientConfig shareConfig].canOpen) { image = [UIImage imageNamed:@"room_position_lock"];
image = [UIImage imageNamed:@"room_position_lock"];
}else{
image = [UIImage imageNamed:@"room_position_lock1"];
}
} }
CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width); CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width);

View File

@@ -72,12 +72,7 @@
} }
- (CGFloat)hightForStageView { - (CGFloat)hightForStageView {
if ([ClientConfig shareConfig].canOpen) { return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2;
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2;
} else {
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2 - 20;
}
} }
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid { - (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {

View File

@@ -265,9 +265,6 @@
- (void)microQueueUpdated:(BOOL)isHandleRTC { - (void)microQueueUpdated:(BOOL)isHandleRTC {
BOOL selfNeedBroadcast = NO; BOOL selfNeedBroadcast = NO;
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
if (![ClientConfig shareConfig].canOpen) {
roomInfo.showGiftValue = NO;
}
BOOL leaveMode = roomInfo.leaveMode; BOOL leaveMode = roomInfo.leaveMode;
NSMutableArray *statisMicArray = [NSMutableArray array]; NSMutableArray *statisMicArray = [NSMutableArray array];
for (int i = 0; i < self.countOfMircoView; i++) { for (int i = 0; i < self.countOfMircoView; i++) {
@@ -768,42 +765,19 @@
} }
if (targetUid && targetUid.length > 0) { if (targetUid && targetUid.length > 0) {
if ([ClientConfig shareConfig].canOpen) { XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init]; model.uid = targetUid;
model.uid = targetUid; model.position = position;
model.position = position; model.posState = micModel.microState.posState;
model.posState = micModel.microState.posState; model.micState = micModel.microState.micState;
model.micState = micModel.microState.micState; model.nick = userInfo.nick;
model.nick = userInfo.nick; model.roomInfo = roomInfo;
model.roomInfo = roomInfo; model.micQueue = self.micQueue;
model.micQueue = self.micQueue; model.delegate = self.hostDelegate;
model.delegate = self.hostDelegate; model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
model.superMangerList = self.hostDelegate.getRoomSuperAdminList; XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model]; [self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil]; [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
} else {
// 2.
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = roomId;
request.userIds = @[uid];
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
NIMChatroomMember * member = members.firstObject;
if (!member) return;
// 2.1
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:YMLocalizedString(@"StageView2") clickAction:^{
NIMChatroomQueueRemoveRequest *request = [[NIMChatroomQueueRemoveRequest alloc]init];
request.key = position;
request.roomId = roomId;
[[NIMSDK sharedSDK].chatroomManager removeChatroomQueueObject:request completion:^(NSError * _Nullable error, NSDictionary<NSString *,NSString *> * _Nullable element) {
NSLog(@"%@", error);
}];
}];
[TTPopup actionSheetWithItems:@[lockMic]];
}
}];
}
return; return;
} }
@@ -865,9 +839,6 @@
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) { if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
// 2.1.1 // 2.1.1
NSString * upTitle = YMLocalizedString(@"StageView5"); NSString * upTitle = YMLocalizedString(@"StageView5");
if (![ClientConfig shareConfig].canOpen) {
upTitle = YMLocalizedString(@"StageView6");
}
TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:upTitle clickAction:^{ TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:upTitle clickAction:^{
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid]; NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid];
UIView* microView = [self findMicroViewByUid:selfUid]; UIView* microView = [self findMicroViewByUid:selfUid];
@@ -885,9 +856,6 @@
}else { }else {
lockTitle = micModel.microState.posState == MicroPosStateType_Free ? YMLocalizedString(@"StageView23") : YMLocalizedString(@"StageView10"); lockTitle = micModel.microState.posState == MicroPosStateType_Free ? YMLocalizedString(@"StageView23") : YMLocalizedString(@"StageView10");
} }
if (![ClientConfig shareConfig].canOpen) {
lockTitle = micModel.microState.posState == MicroPosStateType_Free ? YMLocalizedString(@"StageView24") : YMLocalizedString(@"StageView12");
}
TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:lockTitle clickAction:^{ TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:lockTitle clickAction:^{
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid]; NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
NSString * state = micModel.microState.posState == MicroPosStateType_Free ? @"1" : @"0"; NSString * state = micModel.microState.posState == MicroPosStateType_Free ? @"1" : @"0";
@@ -900,9 +868,6 @@
// 2.1.3 / // 2.1.3 /
NSString * muteTitle = micModel.microState.micState == MicroMicStateType_Open ? YMLocalizedString(@"StageView25") : YMLocalizedString(@"StageView14"); NSString * muteTitle = micModel.microState.micState == MicroMicStateType_Open ? YMLocalizedString(@"StageView25") : YMLocalizedString(@"StageView14");
if (![ClientConfig shareConfig].canOpen) {
muteTitle = micModel.microState.micState == MicroMicStateType_Open ? YMLocalizedString(@"StageView26") : YMLocalizedString(@"StageView16");
}
TTActionSheetConfig *muteMic = [TTActionSheetConfig normalTitle:muteTitle clickAction:^{ TTActionSheetConfig *muteMic = [TTActionSheetConfig normalTitle:muteTitle clickAction:^{
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid]; NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
NSString * state = micModel.microState.micState == MicroMicStateType_Open ? @"1" : @"0"; NSString * state = micModel.microState.micState == MicroMicStateType_Open ? @"1" : @"0";
@@ -923,12 +888,7 @@
inviteUserMicVC.blindDateVipUid = roomInfo.blindDateVipUid; inviteUserMicVC.blindDateVipUid = roomInfo.blindDateVipUid;
[self.hostDelegate.getCurrentNav pushViewController:inviteUserMicVC animated:YES]; [self.hostDelegate.getCurrentNav pushViewController:inviteUserMicVC animated:YES];
}]; }];
if ([ClientConfig shareConfig].canOpen) { [TTPopup actionSheetWithItems:@[upMic, inviteMic, lockMic, muteMic]];
[TTPopup actionSheetWithItems:@[upMic,inviteMic, lockMic, muteMic]];
} else {
[TTPopup actionSheetWithItems:@[ muteMic,upMic, lockMic]];
}
} else { } else {
// 2.2 // 2.2
if (micModel.microState.posState == MicroPosStateType_Lock) { if (micModel.microState.posState == MicroPosStateType_Lock) {

View File

@@ -308,10 +308,8 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
} }
/// ///
// [self.presenter getRoomFirstCharegWindow:self.roomUid]; // [self.presenter getRoomFirstCharegWindow:self.roomUid];
if ([ClientConfig shareConfig].canOpen) { ///id
///id [self.presenter getUnlockRoomAlbumPhotoListWithRoomUid:self.roomUid];
[self.presenter getUnlockRoomAlbumPhotoListWithRoomUid:self.roomUid];
}
//x //x
[[NIMSDK sharedSDK].chatroomManager addDelegate:self]; [[NIMSDK sharedSDK].chatroomManager addDelegate:self];
[[NIMSDK sharedSDK].chatManager addDelegate:self]; [[NIMSDK sharedSDK].chatManager addDelegate:self];
@@ -418,12 +416,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self.view addSubview:self.roomHeaderView]; [self.view addSubview:self.roomHeaderView];
[self.view addSubview:self.functionView]; [self.view addSubview:self.functionView];
[self.view addSubview:self.animationView]; [self.view addSubview:self.animationView];
self.activityContainerView.hidden = YES;
self.littleGameView.hidden = YES;
if ([ClientConfig shareConfig].canOpen) {
self.littleGameView.hidden = NO;
self.activityContainerView.hidden = NO;
}
@kWeakify(self); @kWeakify(self);
self.activityContainerView.openRedPacketHandle = ^(XPRedPacketModel * _Nullable redModel,RoomType type,BOOL isChangeRoom) { self.activityContainerView.openRedPacketHandle = ^(XPRedPacketModel * _Nullable redModel,RoomType type,BOOL isChangeRoom) {
@kStrongify(self); @kStrongify(self);
@@ -891,10 +884,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self changeStageViewOnRoomUpdate]; [self changeStageViewOnRoomUpdate];
[self.roomHeaderView onRoomEntered]; [self.roomHeaderView onRoomEntered];
[self.activityContainerView onRoomEntered]; [self.activityContainerView onRoomEntered];
[self.menuContainerView onRoomEntered]; [self.menuContainerView onRoomEntered];
[self.backContainerView onRoomEntered]; [self.backContainerView onRoomEntered];
[self.littleGameView onRoomEntered]; [self.littleGameView onRoomEntered];
@@ -1745,9 +1734,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
#pragma mark - NIMBroadcastDelegate #pragma mark - NIMBroadcastDelegate
// 广 // 广
- (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage{ - (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage{
if (![ClientConfig shareConfig].canOpen) {
return;
}
if (broadcastMessage.content) { if (broadcastMessage.content) {
NSDictionary *msgDictionary = [broadcastMessage.content toJSONObject]; NSDictionary *msgDictionary = [broadcastMessage.content toJSONObject];
AttachmentModel *attachment = [AttachmentModel modelWithJSON:msgDictionary[@"body"]]; AttachmentModel *attachment = [AttachmentModel modelWithJSON:msgDictionary[@"body"]];

View File

@@ -65,15 +65,12 @@
#import "XPTaskCompleteTipView.h" #import "XPTaskCompleteTipView.h"
#import "XPWebViewController.h" #import "XPWebViewController.h"
#import "XPMineUserInfoViewController.h" #import "XPMineUserInfoViewController.h"
#import "XPMineSimpleUserInfoViewController.h"
#import "XPMonentsRecommendViewController.h" #import "XPMonentsRecommendViewController.h"
#import "XPMonentsViewController.h" #import "XPMonentsViewController.h"
#import "XPReceiveRedPacketView.h" #import "XPReceiveRedPacketView.h"
#import "XPRoomYearActivityView.h" #import "XPRoomYearActivityView.h"
#import "XPUpgradeView.h" #import "XPUpgradeView.h"
#import "XPMomentListViewController.h"
#import "XPHomeSloganViewController.h"
#import "XPSimpleMineViewController.h"
#import "XPLoginAuthCodeVC.h" #import "XPLoginAuthCodeVC.h"
///Present ///Present
#import "MainPresenter.h" #import "MainPresenter.h"
@@ -222,13 +219,11 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
/// ///
[self.presenter checkTranscation]; [self.presenter checkTranscation];
/// ///
if ([ClientConfig shareConfig].canOpen) { [self.presenter getVersionUpdate];
[self.presenter getVersionUpdate];
if (self.inviteCode && self.inviteCode.length > 0) {
if (self.inviteCode && self.inviteCode.length > 0) { ///
/// [self.presenter checkInviteUserInfo:self.inviteCode];
[self.presenter checkInviteUserInfo:self.inviteCode];
}
} }
[self requestGiftList]; [self requestGiftList];
/// ///
@@ -239,19 +234,17 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
XPAdImageTool.shareImageTool.isImLogin = YES; XPAdImageTool.shareImageTool.isImLogin = YES;
if ([ClientConfig shareConfig].canOpen) { if ([self hadLaunchApp] && [self canShowAnchorCard]) {
if ([self hadLaunchApp] && [self canShowAnchorCard]) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ if (self.view.window && self.isViewLoaded) {
if (self.view.window && self.isViewLoaded) { [self.presenter getAnchorCardInfo];
[self.presenter getAnchorCardInfo]; }
} });
}); }
} if (self.needShowAnchorCard && !self.delayShowAnchorCard) {
if (self.needShowAnchorCard && !self.delayShowAnchorCard) { [self.presenter getAnchorCardInfo];
[self.presenter getAnchorCardInfo]; [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHadLaunchApp];///
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHadLaunchApp];/// [[NSUserDefaults standardUserDefaults] synchronize];
[[NSUserDefaults standardUserDefaults] synchronize];
}
} }
} }
@@ -268,51 +261,47 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
} }
self.userInfo = userInfo; self.userInfo = userInfo;
[AccountInfoStorage instance].name = self.userInfo.nick; [AccountInfoStorage instance].name = self.userInfo.nick;
if ((userInfo.nick == nil || userInfo.avatar == nil) && self.isFormLogin == NO) { if ((userInfo.nick == nil || userInfo.avatar == nil) && self.isFormLogin == NO) {
[self completeUserInfo]; [self completeUserInfo];
return; return;
} }
if ([ClientConfig shareConfig].canOpen) {
if(self.isReload == NO){ if(self.isReload == NO){
[self initTabs:YES];
self.isInitReload = YES;
}
}else{
[self initTabs:YES]; [self initTabs:YES];
self.isInitReload = YES;
} }
if ([ClientConfig shareConfig].canOpen) { if (self.inviteCode.length <= 0) {
if (self.inviteCode.length <= 0) { [self initQuickEnterRoom];
[self initQuickEnterRoom];
}
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
} }
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
} }
-(void)loginIng{ -(void)loginIng{
if ((self.userInfo.nick == nil || self.userInfo.avatar == nil) && self.isFormLogin == NO) { if ((self.userInfo.nick == nil || self.userInfo.avatar == nil) && self.isFormLogin == NO) {
[self completeUserInfo]; [self completeUserInfo];
return; return;
} }
if(self.isReload == NO){ if(self.isReload == NO){
[self initTabs:YES]; [self initTabs:YES];
self.isInitReload = YES; self.isInitReload = YES;
} }
if ([ClientConfig shareConfig].canOpen) {
if (self.inviteCode.length <= 0) { if (self.inviteCode.length <= 0) {
[self initQuickEnterRoom]; [self initQuickEnterRoom];
}
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
} }
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
} }
- (void)getAuthorizationCodeInfoWithPhonefail{ - (void)getAuthorizationCodeInfoWithPhonefail{
[self completeUserInfo]; [self completeUserInfo];
@@ -581,7 +570,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
#pragma mark - NIMChatManagerDelegate #pragma mark - NIMChatManagerDelegate
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages { - (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
if (![ClientConfig shareConfig].canOpen || [AccountInfoStorage instance].getTicket.length == 0) { if ([AccountInfoStorage instance].getTicket.length == 0) {
return; return;
} }
for (NIMMessage * message in messages) { for (NIMMessage * message in messages) {
@@ -611,7 +600,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage { - (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage {
if (![ClientConfig shareConfig].canOpen || [AccountInfoStorage instance].getUid.length == 0) { if ([AccountInfoStorage instance].getUid.length == 0) {
return; return;
} }
if (broadcastMessage.content) { if (broadcastMessage.content) {
@@ -622,7 +611,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
return; return;
} }
// MARK: if else
if (attachment.first == CustomMessageType_RedPacket) { if (attachment.first == CustomMessageType_RedPacket) {
[self receiveRedPacketDealWithData:attachment]; [self receiveRedPacketDealWithData:attachment];
} else if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广 } else if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广
@@ -634,7 +623,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[self getVersionUpdate:updateModel]; [self getVersionUpdate:updateModel];
} }
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){ }else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveLuckyGiftBigPrize:attachment]; [self.roomAnimation receiveLuckyGiftBigPrize:attachment];
}else if(attachment.first == CustomMessageType_Graffiti_Star_Kitchen && attachment.second == Custom_Message_Sub_Star_Kitchen_FullScreen){ }else if(attachment.first == CustomMessageType_Graffiti_Star_Kitchen && attachment.second == Custom_Message_Sub_Star_Kitchen_FullScreen){
@@ -661,7 +649,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP }else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveNobleLevelUp:attachment]; [self.roomAnimation receiveNobleLevelUp:attachment];
}else if (attachment.first == CustomMessageType_General_Floating_Screen && attachment.second == Custom_Message_Sub_General_Floating_Screen_All_Room){ }else if (attachment.first == CustomMessageType_General_Floating_Screen && attachment.second == Custom_Message_Sub_General_Floating_Screen_All_Room){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveRoomGeneralFloatingScreen:attachment]; [self.roomAnimation receiveRoomGeneralFloatingScreen:attachment];
@@ -745,20 +732,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
UIViewController * home; UIViewController * home;
UIViewController * monents; UIViewController * monents;
///ipXPNewHomeViewController ///ipXPNewHomeViewController
[[NSNotificationCenter defaultCenter]postNotificationName:@"kInLoginVC" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"kInLoginVC" object:nil];
if (logined) { if (logined) {
msg = [[XPSessionMainViewController alloc] init]; msg = [[XPSessionMainViewController alloc] init];
home = [[XPNewHomeViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { monents = [[XPMonentsViewController alloc] init];
me = [[XPMineViewController alloc] init];
home = [[XPNewHomeViewController alloc] init];
monents = [[XPMonentsViewController alloc] init];
me = [[XPMineViewController alloc] init];
}else{
home = [[XPHomeSloganViewController alloc] init];
monents = [[XPMomentListViewController alloc] init];
me = [[XPSimpleMineViewController alloc] init];
}
} else { } else {
game = [[XPBlankViewController alloc]init]; game = [[XPBlankViewController alloc]init];
msg = [[XPSessionMainViewController alloc]init]; msg = [[XPSessionMainViewController alloc]init];
@@ -966,24 +945,14 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)xPAnchorCardViewClickAvatar:(NSString *)uid { - (void)xPAnchorCardViewClickAvatar:(NSString *)uid {
if (uid.length) { if (uid.length) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) { userInfoVC.uid = uid.integerValue;
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; [self.selectedViewController.navigationController pushViewController:userInfoVC animated:YES];
userInfoVC.uid = uid.integerValue;
[self.selectedViewController.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.selectedViewController.navigationController pushViewController:userInfoVC animated:YES];
}
[self.anchorCardView removeFromSuperview];
self.anchorCardView = nil;
self.needShowAnchorCard = NO;
} else {
[self.anchorCardView removeFromSuperview];
self.anchorCardView = nil;
self.needShowAnchorCard = NO;
} }
[self.anchorCardView removeFromSuperview];
self.anchorCardView = nil;
self.needShowAnchorCard = NO;
} }
- (void)handleAnchorCardSwipeFrom:(UISwipeGestureRecognizer *)recognizer{ - (void)handleAnchorCardSwipeFrom:(UISwipeGestureRecognizer *)recognizer{