修复bug

This commit is contained in:
liyuhua
2024-02-23 14:40:10 +08:00
parent 5f0d52451c
commit a189cdfaa8
20 changed files with 152 additions and 195 deletions

View File

@@ -310,6 +310,7 @@
23B8D8D82B85F8B900CA472F /* PIHoemCategoryTitleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B8D8D72B85F8B900CA472F /* PIHoemCategoryTitleCell.m */; };
23B8D8DB2B85FDDD00CA472F /* PIHomeCategoryTitleModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B8D8DA2B85FDDD00CA472F /* PIHomeCategoryTitleModel.m */; };
23B8D8DE2B860B8800CA472F /* PIHoemCategoryCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B8D8DD2B860B8800CA472F /* PIHoemCategoryCollectionView.m */; };
23B8D8E12B87715100CA472F /* PIGeneralPublicScreenModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B8D8E02B87715100CA472F /* PIGeneralPublicScreenModel.m */; };
23BA165B2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23BA165A2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m */; };
23C7C0B72A7CD7B000802205 /* XPNewMineGuildItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C7C0B62A7CD7B000802205 /* XPNewMineGuildItemView.m */; };
23C9DFC32B84807A00B51558 /* PIRoomActivityClickView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C9DFC22B84807A00B51558 /* PIRoomActivityClickView.m */; };
@@ -984,7 +985,6 @@
E85E7B1B2A4EB0D200B6D00A /* XPMineMainIncomeStatisViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A8A2A4EB0D200B6D00A /* XPMineMainIncomeStatisViewController.m */; };
E85E7B1C2A4EB0D200B6D00A /* XPMineHallAnchorIncomeStatisViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A8B2A4EB0D200B6D00A /* XPMineHallAnchorIncomeStatisViewController.m */; };
E85E7B1D2A4EB0D200B6D00A /* XPMineClanIncomeStatisViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A8C2A4EB0D200B6D00A /* XPMineClanIncomeStatisViewController.m */; };
E85E7B1E2A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A912A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.m */; };
E85E7B1F2A4EB0D300B6D00A /* XPMineGuildIncomeStatisViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A932A4EB0D200B6D00A /* XPMineGuildIncomeStatisViewController.m */; };
E85E7B202A4EB0D300B6D00A /* XPMineGuildIncomeDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A942A4EB0D200B6D00A /* XPMineGuildIncomeDetailViewController.m */; };
E85E7B212A4EB0D300B6D00A /* XPNewMineGuildIncomeRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E85E7A952A4EB0D200B6D00A /* XPNewMineGuildIncomeRecordViewController.m */; };
@@ -2086,6 +2086,8 @@
23B8D8DA2B85FDDD00CA472F /* PIHomeCategoryTitleModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIHomeCategoryTitleModel.m; sourceTree = "<group>"; };
23B8D8DC2B860B8800CA472F /* PIHoemCategoryCollectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIHoemCategoryCollectionView.h; sourceTree = "<group>"; };
23B8D8DD2B860B8800CA472F /* PIHoemCategoryCollectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIHoemCategoryCollectionView.m; sourceTree = "<group>"; };
23B8D8DF2B87715100CA472F /* PIGeneralPublicScreenModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIGeneralPublicScreenModel.h; sourceTree = "<group>"; };
23B8D8E02B87715100CA472F /* PIGeneralPublicScreenModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIGeneralPublicScreenModel.m; sourceTree = "<group>"; };
23BA16592A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIBaseAnimationViewModel.h; sourceTree = "<group>"; };
23BA165A2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIBaseAnimationViewModel.m; sourceTree = "<group>"; };
23C7C0B52A7CD7B000802205 /* XPNewMineGuildItemView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNewMineGuildItemView.h; sourceTree = "<group>"; };
@@ -3271,7 +3273,6 @@
E85E7A842A4EB0D200B6D00A /* GuildSearchUserInfoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GuildSearchUserInfoModel.h; sourceTree = "<group>"; };
E85E7A872A4EB0D200B6D00A /* XPMineGuildIncomeStatisViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineGuildIncomeStatisViewController.h; sourceTree = "<group>"; };
E85E7A882A4EB0D200B6D00A /* XPMineGoldIncomeRecordVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineGoldIncomeRecordVC.m; sourceTree = "<group>"; };
E85E7A892A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineAnchorIncomeStatisViewController.h; sourceTree = "<group>"; };
E85E7A8A2A4EB0D200B6D00A /* XPMineMainIncomeStatisViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineMainIncomeStatisViewController.m; sourceTree = "<group>"; };
E85E7A8B2A4EB0D200B6D00A /* XPMineHallAnchorIncomeStatisViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineHallAnchorIncomeStatisViewController.m; sourceTree = "<group>"; };
E85E7A8C2A4EB0D200B6D00A /* XPMineClanIncomeStatisViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineClanIncomeStatisViewController.m; sourceTree = "<group>"; };
@@ -3279,7 +3280,6 @@
E85E7A8E2A4EB0D200B6D00A /* XPMineGuildIncomeDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineGuildIncomeDetailViewController.h; sourceTree = "<group>"; };
E85E7A8F2A4EB0D200B6D00A /* XPMineGuildIncomeRecordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineGuildIncomeRecordViewController.h; sourceTree = "<group>"; };
E85E7A902A4EB0D200B6D00A /* XPMineMainIncomeStatisViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineMainIncomeStatisViewController.h; sourceTree = "<group>"; };
E85E7A912A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineAnchorIncomeStatisViewController.m; sourceTree = "<group>"; };
E85E7A922A4EB0D200B6D00A /* XPMineGoldIncomeRecordVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineGoldIncomeRecordVC.h; sourceTree = "<group>"; };
E85E7A932A4EB0D200B6D00A /* XPMineGuildIncomeStatisViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineGuildIncomeStatisViewController.m; sourceTree = "<group>"; };
E85E7A942A4EB0D200B6D00A /* XPMineGuildIncomeDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineGuildIncomeDetailViewController.m; sourceTree = "<group>"; };
@@ -7914,6 +7914,8 @@
E87A24F0272935920086A794 /* XPMessageRemoteExtModel.m */,
E8398069290288660084BFC8 /* XPMessageInfoModel.h */,
E839806A290288660084BFC8 /* XPMessageInfoModel.m */,
23B8D8DF2B87715100CA472F /* PIGeneralPublicScreenModel.h */,
23B8D8E02B87715100CA472F /* PIGeneralPublicScreenModel.m */,
);
path = Model;
sourceTree = "<group>";
@@ -8121,8 +8123,6 @@
E85E7A862A4EB0D200B6D00A /* IncomeStatis */ = {
isa = PBXGroup;
children = (
E85E7A892A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.h */,
E85E7A912A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.m */,
E85E7A962A4EB0D200B6D00A /* XPMineClanIncomeStatisViewController.h */,
E85E7A8C2A4EB0D200B6D00A /* XPMineClanIncomeStatisViewController.m */,
E85E7A922A4EB0D200B6D00A /* XPMineGoldIncomeRecordVC.h */,
@@ -11638,7 +11638,6 @@
E8098CAA282E03B40090B9F0 /* XPMonentsRecommendPresenter.m in Sources */,
E8F63CBB298B648300B338BA /* SessionSayHelloListModel.m in Sources */,
9B1B729828002147003FACE9 /* XPMineFansTeamPresenter.m in Sources */,
E85E7B1E2A4EB0D200B6D00A /* XPMineAnchorIncomeStatisViewController.m in Sources */,
23FF42702AA6C7CF0055733C /* XPNewHomeItemCell.m in Sources */,
E87DF4DA2A42C9D9009C1185 /* HomeCollectRoomModel.m in Sources */,
E86507E8281A8212006951B0 /* ContentTweetModel.m in Sources */,
@@ -11752,6 +11751,7 @@
E873EB02280922720071030D /* XPMineUserInfoEmptyCollectionViewCell.m in Sources */,
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */,
E82107872987E49100DE7040 /* MessageRedPacketModel.m in Sources */,
23B8D8E12B87715100CA472F /* PIGeneralPublicScreenModel.m in Sources */,
23194DD52AD292F200649F51 /* PIPageControl.m in Sources */,
23E9EA9E2A84C42B00B792F2 /* SGYProgressView.m in Sources */,
E87E91552796B6DE00A7B3F2 /* XPRoomInviteUserViewController.m in Sources */,

View File

@@ -112,6 +112,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
CustomMessageType_Room_Album = 101,
///守护星球
CustomMessageType_Guardian_Planet = 102,
///通用公屏信息
CustomMessageType_General_Public_Screen = 103,
};
@@ -624,6 +626,14 @@ typedef NS_ENUM(NSUInteger, CustomMessageTypeGuardianPlanet) {
Custom_Message_Sub_Guardian_Planet_One_Room = 1021,//单房间
Custom_Message_Sub_Guardian_Planet_All_Room = 1022,///全部房间
};
///通用公屏信息
//CustomMessageType_General_Public_Screen = 10000,
typedef NS_ENUM(NSUInteger, CustomMessageTypeGeneralPublicScreen) {
///所有房间
Custom_Message_Sub_General_Public_Screen_One_Room = 1031,//单房间
Custom_Message_Sub_General_Public_Screen_All_Room = 1032,///全部房间
};
@interface AttachmentModel : PIBaseModel<NIMCustomAttachment>
@property (nonatomic,assign) int first;
@property (nonatomic,assign) int second;

View File

@@ -145,10 +145,10 @@ NS_ASSUME_NONNULL_BEGIN
/// 家族个播收入列表
/// @param completion 完成
/// @param uid 用户的uid
/// @param clanId 家族的id
/// @param hallId 家族的id
/// @param startTime 开始时间
/// @param endTime 结束时间
+ (void)getClanSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid clanId:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime;
+ (void)getClanSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid hallId:(NSString *)hallId startTime:(NSString *)startTime endTime:(NSString *)endTime;
/// 公会个播收入列表
/// @param completion 完成

View File

@@ -183,8 +183,8 @@
/// @param clanId id
/// @param startTime
/// @param endTime
+ (void)getClanSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid clanId:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
[self makeRequest:@"income/singleroom/incomeTotalV2" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, clanId, startTime, endTime, nil];
+ (void)getClanSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid hallId:(NSString *)hallId startTime:(NSString *)startTime endTime:(NSString *)endTime {
[self makeRequest:@"income/singleroom/incomeTotalV2" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, hallId, startTime, endTime, nil];
}
///

View File

@@ -55,7 +55,7 @@
[[self getView] getClanAnchorTotalIncomeSuccess:incomeModel];
} fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] getClanAnchorTotalIncomeFail:msg];
}] uid:uid clanId:clanId startTime:startTime endTime:endTime];
}] uid:uid hallId:clanId startTime:startTime endTime:endTime];
}
///

View File

@@ -1,17 +0,0 @@
//
// XPMineAnchorIncomeStatisViewController.h
// YuMi
//
// Created by YuMi on 2022/4/11.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineAnchorIncomeStatisViewController : BaseViewController
///家族的id
@property (nonatomic,copy) NSString *clanId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,148 +0,0 @@
//
// XPMineAnchorIncomeStatisViewController.m
// YuMi
//
// Created by YuMi on 2022/4/11.
//
#import "XPMineAnchorIncomeStatisViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <JXCategoryView/JXCategoryView.h>
#import <JXCategoryView/JXCategoryIndicatorBackgroundView.h>
#import <JXCategoryView/JXCategoryListContainerView.h>
///Tool
#import "DJDKMIMOMColor.h"
///View
#import "XPMineGuildIncomeRecordViewController.h"
@interface XPMineAnchorIncomeStatisViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate>
///
@property (nonatomic, strong) NSArray<NSString *> *titles;
///
@property (nonatomic, strong) JXCategoryTitleView *titleView;
///lineView
@property (nonatomic, strong) JXCategoryListContainerView *contentView;
///
@property (nonatomic,strong) XPMineGuildIncomeRecordViewController *dayRecordVC;
///
@property (nonatomic,strong) XPMineGuildIncomeRecordViewController *weekRecordVC;
@end
@implementation XPMineAnchorIncomeStatisViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = YMLocalizedString(@"XPMineAnchorIncomeStatisViewController0");
[self initSubViews];
[self initSubViewConstraints];
}
#pragma mark - Private Method
- (void)initSubViews {
[self.view addSubview:self.titleView];
[self.view addSubview:self.contentView];
}
- (void)initSubViewConstraints {
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view).offset(10);
make.left.right.mas_equalTo(self.view);
make.height.mas_equalTo(30);
}];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.titleView.mas_bottom);
make.left.right.bottom.mas_equalTo(self.view);
}];
}
#pragma mark - JXCategoryViewDelegate
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
return self.titles.count;
}
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
if (index == 0) {
return self.dayRecordVC;
} else {
return self.weekRecordVC;
}
}
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
if (index == 0) {
self.dayRecordVC.timeType = GuildIncomeRecrdTimeType_Day;
} else {
self.weekRecordVC.timeType = GuildIncomeRecrdTimeType_Week;
}
}
#pragma mark - Getters And Setters
- (void)setClanId:(NSString *)clanId {
_clanId = clanId;
self.dayRecordVC.clanId = _clanId;
self.weekRecordVC.clanId = _clanId;
self.dayRecordVC.timeType = GuildIncomeRecrdTimeType_Day;
}
- (JXCategoryTitleView *)titleView {
if (!_titleView) {
_titleView = [[JXCategoryTitleView alloc] init];
_titleView.delegate = self;
_titleView.titles = self.titles;
_titleView.backgroundColor = [DJDKMIMOMColor appBackgroundColor];
_titleView.titleColor = [DJDKMIMOMColor secondTextColor];
_titleView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
_titleView.titleSelectedFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
_titleView.defaultSelectedIndex = 0;
_titleView.cellSpacing = 5;
_titleView.cellWidthIncrement = 5;
_titleView.listContainer = self.contentView;
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
lineView.indicatorColor = [DJDKMIMOMColor appMainColor];
lineView.indicatorWidth = 8.f;
lineView.indicatorHeight = 4.f;
lineView.indicatorCornerRadius = 2.f;
_titleView.indicators = @[lineView];
}
return _titleView;
}
- (JXCategoryListContainerView *)contentView {
if (!_contentView) {
_contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
_contentView.defaultSelectedIndex = 0;
}
return _contentView;
}
- (NSArray<NSString *> *)titles {
if (!_titles) {
_titles = @[YMLocalizedString(@"XPMineAnchorIncomeStatisViewController1"), YMLocalizedString(@"XPMineAnchorIncomeStatisViewController2")];
}
return _titles;
}
- (XPMineGuildIncomeRecordViewController *)dayRecordVC {
if (!_dayRecordVC) {
_dayRecordVC = [[XPMineGuildIncomeRecordViewController alloc] init];
_dayRecordVC.incomeType = GuildIncomeType_Anchor;
}
return _dayRecordVC;
}
- (XPMineGuildIncomeRecordViewController *)weekRecordVC {
if (!_weekRecordVC) {
_weekRecordVC = [[XPMineGuildIncomeRecordViewController alloc] init];
_weekRecordVC.incomeType = GuildIncomeType_Anchor;
}
return _weekRecordVC;
}
@end

View File

@@ -88,11 +88,12 @@
} else if(self.incomeType == GuildIncomeType_Hall) {
[self.presenter getHallTotalIncome:self.guidId startTime:self.pi_startTimeStr endTime:self.pi_endTimeStr];
} else {
if (self.clanId.length > 0) {
[self.presenter getClanAnchorTotalIncome:self.clanId startTime:self.pi_startTimeStr endTime:self.pi_endTimeStr];
} else {
[self.presenter getHallAnchorTotalIncome:self.guidId startTime:self.pi_startTimeStr endTime:self.pi_endTimeStr];
}
// if (self.clanId.length > 0) {
// [self.presenter getHallAnchorTotalIncome:self.guidId startTime:self.pi_startTimeStr endTime:self.pi_endTimeStr];
// } else {
[self.presenter getClanAnchorTotalIncome:self.guidId startTime:self.pi_startTimeStr endTime:self.pi_endTimeStr];
// }
}
}
#pragma mark - Private Method

View File

@@ -23,7 +23,6 @@
#import "XPMineGuildViewController.h"
#import "XPMineGuildSearchViewController.h"
#import "XPMineClanIncomeStatisViewController.h"
#import "XPMineAnchorIncomeStatisViewController.h"
#import "XPMineGuildSuperAdminSetViewController.h"
#import "XPMineUserInfoViewController.h"
#import "XPMineMainIncomeStatisViewController.h"

View File

@@ -32,7 +32,13 @@ NS_ASSUME_NONNULL_BEGIN
tabId:(NSString *)tabId
pageNum:(NSString *)pageNum
pageSize:(NSString *)pageSize;
/// 查看推荐列表
/// @param complection 完成
/// @param uid 用户的uid
/// @param tabId tabid
/// @param pageNum 当前的页数
/// @param pageSize 一页有多少个
+ (void)getNewRecommendListComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid tabId:(NSString *)tabId pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize;
/// 搜索
/// @param complection 完成
/// @param key 关键字

View File

@@ -33,7 +33,15 @@
+ (void)getRecommendListComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid tabId:(NSString *)tabId pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize {
[self makeRequest:@"home/tab/mapV2" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, tabId, pageNum, pageSize, nil];
}
///
/// @param complection
/// @param uid uid
/// @param tabId tabid
/// @param pageNum
/// @param pageSize
+ (void)getNewRecommendListComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid tabId:(NSString *)tabId pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize {
[self makeRequest:@"home/tab/homeV2" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, tabId, pageNum, pageSize, nil];
}
///
/// @param complection
/// @param key

View File

@@ -24,7 +24,7 @@
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * pageStr = [NSString stringWithFormat:@"%d", page];
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
[Api getRecommendListComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[Api getNewRecommendListComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
NSArray * array = [HomePlayRoomModel modelsWithArray:data.data];
[[self getView] getHomeRecommendRoomListSuccess:array ];
}fail:^(NSInteger code, NSString * _Nullable msg) {

View File

@@ -555,10 +555,10 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
recommendModel.checkedWidth = [UILabel getWidthWithText:recommendModel.name height:kGetScaleWidth(44) font:kFontSemibold(16)];
recommendModel.noCheckedWidth = [UILabel getWidthWithText:recommendModel.name height:kGetScaleWidth(44) font:kFontRegular(14)];
recommendModel.isChecked = YES;
PIHomeCategoryTitleModel *hotModel = [PIHomeCategoryTitleModel new];
hotModel.id = @"-2";
hotModel.name = YMLocalizedString(@"XPNewHomeViewController1");
hotModel.checkedWidth = [UILabel getWidthWithText:recommendModel.name height:kGetScaleWidth(44) font:kFontSemibold(16)];
hotModel.noCheckedWidth = [UILabel getWidthWithText:recommendModel.name height:kGetScaleWidth(44) font:kFontRegular(14)];
[_tagModelList addObject:recommendModel];

View File

@@ -0,0 +1,28 @@
//
// PIGeneralPublicScreenModel.h
// YuMi
//
// Created by duoban on 2024/2/22.
//
#import <Foundation/Foundation.h>
@class PIGeneralPublicScreenItemModel;
NS_ASSUME_NONNULL_BEGIN
@interface PIGeneralPublicScreenModel : NSObject
@property(nonatomic,copy) NSDictionary *template;
@property(nonatomic,copy) NSString *textColor;
@property(nonatomic,copy) NSArray<PIGeneralPublicScreenItemModel *> *contents;
@end
@interface PIGeneralPublicScreenItemModel : NSObject
@property(nonatomic,copy) NSString *type;
@property(nonatomic,copy) NSString *key;
@property(nonatomic,copy) NSDictionary *text;
@property(nonatomic,copy) NSString *textColor;
@property(nonatomic,assign) int skipType;
@property(nonatomic,assign) NSString *skipContent;
@property(nonatomic,copy) NSString *image;
@property(nonatomic,assign) CGFloat width;
@property(nonatomic,assign) CGFloat height;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,17 @@
//
// PIGeneralPublicScreenModel.m
// YuMi
//
// Created by duoban on 2024/2/22.
//
#import "PIGeneralPublicScreenModel.h"
@implementation PIGeneralPublicScreenModel
+ (NSDictionary *)objectClassInArray {
return @{@"contents":PIGeneralPublicScreenItemModel.class};
}
@end
@implementation PIGeneralPublicScreenItemModel
@end

View File

@@ -52,6 +52,7 @@
#import "XPWebViewController.h"
#import "XCCurrentVCStackManager.h"
#import "XPTreasureFairyViewController.h"
#import "PIGeneralPublicScreenModel.h"
@implementation XPRoomMessageParser
@@ -181,6 +182,8 @@
return messageInfo;
}else if(first == CustomMessageType_Guardian_Planet){
return [self createGuardianPlanetAttribute:attachment messageInfo:messageInfo];
}else if(first == CustomMessageType_General_Public_Screen){
return [self createGeneralPublicScreenAttribute:attachment messageInfo:messageInfo];
}
return nil;
}
@@ -462,6 +465,42 @@
// return attribute;
//}
- (XPMessageInfoModel *)createGeneralPublicScreenAttribute:(AttachmentModel *)attachment messageInfo:(XPMessageInfoModel *)messageInfo{
PIGeneralPublicScreenModel *screenModel = [PIGeneralPublicScreenModel modelWithDictionary:attachment.data];
NSDictionary *textDic = screenModel.template;
if(textDic.allKeys.count == 0)return messageInfo;
NSString *title = textDic[@"zh-CHT"] == nil ? textDic[textDic.allKeys.firstObject] : textDic[@"zh-CHT"];
if(title.length == 0)return messageInfo;
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageDefalutFont],NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:screenModel.textColor]}];
for (PIGeneralPublicScreenItemModel *model in screenModel.contents) {
if([model.type isEqualToString:@"TEXT"]){
NSDictionary *subTextDic = model.text;
if(subTextDic.allKeys.count > 0){
NSString *subText = subTextDic[@"zh-CHT"] == nil ? subTextDic[subTextDic.allKeys.firstObject] : subTextDic[@"zh-CHT"];
NSAttributedString *attText = [[NSAttributedString alloc]initWithString:subText attributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:model.textColor]}];
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attText];
@kWeakify(self)
[attribute yy_setTextHighlightRange:[attribute.string rangeOfString:subText] color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@kStrongify(self);
if(model.skipType == 6){
if(model.skipContent.length == 0)return;
[self showUserCard:model.skipContent.integerValue];
}
}];
}
}else if ([model.type isEqualToString:@"IMAGE"]){
NSMutableAttributedString *attImage = [self createUrlImageAttribute:model.image size:CGSizeMake(model.width, model.height)];
[attImage appendAttributedString:[self createSapceAttribute:2]];
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attImage];
}
}
messageInfo.content = attribute;
return messageInfo;
}
- (XPMessageInfoModel *)createGuardianPlanetAttribute:(AttachmentModel *)attachment messageInfo:(XPMessageInfoModel *)messageInfo{
XPRoomStarKitchenModel *starModel = [XPRoomStarKitchenModel modelWithDictionary:attachment.data];
NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomMessageParser1033334"),starModel.nick,starModel.diamonds];
@@ -1302,7 +1341,20 @@
NSMutableAttributedString * attrString = [NSMutableAttributedString yy_attachmentStringWithContent:imageView contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imageView.bounds.size.width, imageView.bounds.size.height) alignToFont:[UIFont systemFontOfSize:15.0] alignment:YYTextVerticalAlignmentCenter];
return attrString;
}
///
/// @param imageUrl
- (NSMutableAttributedString *)createUrlImageAttribute:(NSString *)imageUrl size:(CGSize)size {
NetImageConfig *config = [[NetImageConfig alloc]init];
///
config.autoLoad = YES;
NetImageView *imageView = [[NetImageView alloc]initWithUrl:imageUrl config:config];
imageView.bounds = CGRectMake(0, 0, size.width, size.height);
imageView.layer.masksToBounds = YES;
imageView.contentMode = UIViewContentModeScaleAspectFit;
NSMutableAttributedString * attrString = [NSMutableAttributedString yy_attachmentStringWithContent:imageView contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imageView.bounds.size.width, imageView.bounds.size.height) alignToFont:[UIFont systemFontOfSize:15.0] alignment:YYTextVerticalAlignmentCenter];
return attrString;
}
///
/// @param imageName

View File

@@ -535,6 +535,11 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
@(Custom_Message_Sub_Guardian_Planet_One_Room),
@(Custom_Message_Sub_Guardian_Planet_All_Room),
nil],
@(CustomMessageType_General_Public_Screen):
[NSSet setWithObjects:
@(Custom_Message_Sub_General_Public_Screen_One_Room),
@(Custom_Message_Sub_General_Public_Screen_All_Room),
nil],
};
}

View File

@@ -1680,6 +1680,8 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
isHave = YES;
}else if(attachment.first == CustomMessageType_Guardian_Planet && attachment.second == Custom_Message_Sub_Guardian_Planet_All_Room){
isHave = YES;
}else if(attachment.first == CustomMessageType_General_Public_Screen && attachment.second == Custom_Message_Sub_General_Public_Screen_All_Room){
isHave = YES;
}else if (attachment.first == CustomMessageType_Treasure_Fairy && (attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L4 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Draw_Gift_L5 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L1 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L2 || attachment.second == Custom_Message_Sub_Treasure_Fairy_Convert_L3)) { //
isHave = YES;
}else if (attachment.first == CustomMessageType_Tarot && (attachment.second == Custom_Message_Sub_Tarot_Advanced || attachment.second == Custom_Message_Sub_Tarot_Intermediate)){

View File

@@ -2333,10 +2333,7 @@
"XPMineClanIncomeStatisViewController2" = "每周统计";
"XPMineClanIncomeStatisViewController3" = "每月统计";
///XPMineAnchorIncomeStatisViewController.m
"XPMineAnchorIncomeStatisViewController0" = "主播收入";
"XPMineAnchorIncomeStatisViewController1" = "按日统计";
"XPMineAnchorIncomeStatisViewController2" = "每周统计";
///XPMineGuildIncomeStatisViewController.m
"XPMineGuildIncomeStatisViewController0" = "收入统计";

View File

@@ -2327,10 +2327,7 @@
"XPMineClanIncomeStatisViewController2" = "每周統計";
"XPMineClanIncomeStatisViewController3" = "每月統計";
///XPMineAnchorIncomeStatisViewController.m
"XPMineAnchorIncomeStatisViewController0" = "主播收入";
"XPMineAnchorIncomeStatisViewController1" = "按日統計";
"XPMineAnchorIncomeStatisViewController2" = "每周統計";
///XPMineGuildIncomeStatisViewController.m
"XPMineGuildIncomeStatisViewController0" = "收入統計";