This commit is contained in:
启星
2026-01-09 20:35:23 +08:00
parent 796f64f5e3
commit d41d74dd8e
20 changed files with 118 additions and 30 deletions

View File

@@ -141,14 +141,8 @@
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
model.messageType = QXRoomChatMessageTypeSystem;
NSString *jia_jia = [NSString stringWithFormat:@"%@",msg.Text[@"jia_jia"]];
if ([self.exRoomId isExist] && [self.roomId isExist]) {
if (!isSuperRoom) {
///
if ([groupId isEqualToString:self.groupId]){
if (([jia_jia hasPrefix:@"http"] || [jia_jia hasPrefix:@"https"]) && ([jia_jia hasSuffix:@"svga"] || [jia_jia hasSuffix:@"mp4"])) {
[[QXGiftPlayerManager shareManager] displayChatEffectView:jia_jia];
}
}
}else{
if (([jia_jia hasPrefix:@"http"] || [jia_jia hasPrefix:@"https"]) && ([jia_jia hasSuffix:@"svga"] || [jia_jia hasSuffix:@"mp4"])) {
[[QXGiftPlayerManager shareManager] displayChatEffectView:jia_jia];
}
@@ -179,21 +173,14 @@
///
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
model.messageType = QXRoomChatMessageTypeGift;
if ([self.exRoomId isExist] && [self.roomId isExist]) {
if (!isSuperRoom) {
///
if ([groupId isEqualToString:self.groupId]){
NSArray *arr = [model.GiftInfo.play_image componentsSeparatedByString:@","];
[[QXGiftPlayerManager shareManager] displayFullEffectViewWithMorePlayImages:arr];
[[QXGiftDisplayManager sharedManager] receiveGift:model];
}
}else{
if ([model.GiftInfo.play_image isExist]) {
NSArray *arr = [model.GiftInfo.play_image componentsSeparatedByString:@","];
[[QXGiftPlayerManager shareManager] displayFullEffectViewWithMorePlayImages:arr];
}
[[QXGiftDisplayManager sharedManager] receiveGift:model];
}
if (model.ToUserInfos.count>0) {
if (self.delegate && [self.delegate respondsToSelector:@selector(didRecieveGiftWithWithUserInfos:)]) {
[self.delegate didRecieveGiftWithWithUserInfos:model.ToUserInfos];

View File

@@ -169,7 +169,7 @@
UILabel *waterLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-16-130, 0, SCREEN_WIDTH-130-32, 25)];
waterLabel.font = [UIFont systemFontOfSize:13];
waterLabel.textColor = [UIColor colorWithHexString:@"#333333"];
NSString *total_earning = [NSString stringWithFormat:@"%.2f",model.total_earning];
NSString *total_earning = [NSString stringWithFormat:@"%.4f",model.total_earning];
NSString *total_price = [NSString stringWithFormat:@"%.2f",model.total_price];
NSString *s = [NSString stringWithFormat:@"收益 %@ 流水 %@",total_earning,total_price];
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:s];
@@ -181,6 +181,11 @@
[waterLabel sizeToFit];
waterLabel.frame = CGRectMake(SCREEN_WIDTH-16-waterLabel.size.width, 0, waterLabel.size.width, 25);
[header addSubview:waterLabel];
if (self.type == 1) {
waterLabel.hidden = YES;
}else{
waterLabel.hidden = NO;
}
return header;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

View File

@@ -1570,6 +1570,12 @@ NS_ASSUME_NONNULL_BEGIN
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
小黑屋列表
*/
+(void)roomBarCabinRoomListWithRoomId:(NSString*)roomId
successBlock:(void (^)(NSArray* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@end

View File

@@ -3197,4 +3197,28 @@
failBlock(error,msg);
}];
}
/**
*/
+(void)roomBarCabinRoomListWithRoomId:(NSString*)roomId
successBlock:(void (^)(NSArray* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"room_id":roomId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXRoomBarCabinRoomList parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
id object = responseObject[@"data"];
NSArray *array = [NSArray array];
if ([object isKindOfClass:[NSArray class]]) {
array = (NSArray*)object;
}
successBlock(array);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
@end

View File

@@ -125,7 +125,7 @@
-(void)setModel:(QXRoomDetailModel *)model{
_model = model;
self.allWaterLabel.text = [NSString stringWithFormat:@"%.2f",model.total_amount];;
self.allPriceLabel.text = [NSString stringWithFormat:@"%.2f",model.total_earning];
self.allPriceLabel.text = [NSString stringWithFormat:@"%.4f",model.total_earning];
}
-(UIImageView *)bgImageView{

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bar_room_title_cabin_room@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bar_room_title_cabin_room@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -614,4 +614,6 @@ static NSString * QXRoomGetSeductionCoin = @"api/BarRoom/get_liao_ta_coin";
static NSString * QXRoomBarSeduction = @"api/BarRoom/liao_ta";
/// 约他
static NSString * QXRoomBarAsk = @"api/BarRoom/meeting_ta";
/// 小黑屋列表
static NSString * QXRoomBarCabinRoomList = @"api/BarRoom/black_room_list";
#endif /* Api_h */

View File

@@ -26,6 +26,9 @@
}
-(void)updateProgress:(NSNotification *)notice{
if ([self.roomModel.room_info.type_id isEqualToString:@"6"]) {
return;
}
QXMeetActivityDriftModel *model = notice.object;
if (model.from_type == QXMeetActivityTypeAcLock) {
[self.meetView updateUserAndGiftInfoWithModel:model];

View File

@@ -271,6 +271,7 @@ QXUpSeatViewDelegate
make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT));
}];
QXCPEffectView *cpEffectView = [[QXGiftPlayerManager shareManager] defaultCpEffectView];
cpEffectView.isBackground = NO;
[cpEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(self.seatContentView.mas_bottom).offset(padding);
// make.left.right.equalTo(self.bgEffectView);

View File

@@ -476,7 +476,7 @@ NSInteger maxMessageCount = 20;
self.nameLabel.textColor = superRoomMessageColor;
[attr yy_setColor:superRoomMessageColor range:NSMakeRange(0, attr.length)];
}else{
self.nameLabel.textColor = messageNameColor;
self.nameLabel.textColor = RGB16(0xDED6ED);
if ([message.FromUserInfo.nickname isExist]) {
[attr yy_setColor:messageNameColor range:[message.text rangeOfString:message.FromUserInfo.nickname]];
}
@@ -968,7 +968,7 @@ NSInteger maxMessageCount = 20;
if (message.isSuperRoom) {
self.nameLabel.textColor = superRoomMessageColor;
}else{
self.nameLabel.textColor = messageNameColor;
self.nameLabel.textColor = RGB16(0xDED6ED);
}
self.nameLabel.text = message.FromUserInfo.nickname;
[self.headerImageView setHeadIcon:message.FromUserInfo.avatar dress:@""];

View File

@@ -218,7 +218,7 @@
self.cabinRoom.titleLabel.font = [UIFont systemFontOfSize:12];
[self.cabinRoom setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
[self.cabinRoom addTarget:self action:@selector(cabinAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.cabinRoom setImage:[UIImage imageNamed:@"room_clear_charm"] forState:(UIControlStateNormal)];
[self.cabinRoom setImage:[UIImage imageNamed:@"bar_room_title_cabin_room"] forState:(UIControlStateNormal)];
self.cabinRoom.backgroundColor = RGB16A(0xFFFFFF,0.2);
[self.cabinRoom addRoundedCornersWithRadius:ScaleWidth(11)];
[self addSubview:self.cabinRoom];
@@ -243,6 +243,10 @@
}
-(void)setIsCompere:(BOOL)isCompere{
_isCompere = isCompere;
if ([self.roomModel.room_info.type_id isEqualToString:@"11"]) {
self.clearCharmBtn.hidden = YES;
return;
}
self.clearCharmBtn.hidden = !isCompere;
}
-(void)layoutSubviews{
@@ -260,6 +264,11 @@
self.followBtn.selected = NO;
}
self.countLabel.text = roomModel.room_info.online_number?roomModel.room_info.online_number:@"0";
if ([self.roomModel.room_info.type_id isEqualToString:@"11"]) {
self.cabinRoom.hidden = NO;
}else{
self.cabinRoom.hidden = YES;
}
}
-(void)setOnlineUsers:(NSArray *)onlineUsers{
_onlineUsers = onlineUsers;

View File

@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong) VAPView *playerMp4View;
-(void)displayCpEffectUrl:(QXRoomChatListModel*)model;
@property (nonatomic, strong) dispatch_queue_t queue;
@property (nonatomic, assign) BOOL isBackground;
- (void)destroyEffectView;
-(void)stopPlay;
-(void)startPlay;

View File

@@ -19,7 +19,6 @@
@property (nonatomic, assign) BOOL isLoadEffect;
@property (nonatomic, strong) QXRoomChatListModel *playModel;
@property (nonatomic, assign) BOOL isPlaying;
@property (nonatomic, assign) BOOL isBackground;
@end
@implementation QXCPEffectView
- (instancetype)initWithFrame:(CGRect)frame {

View File

@@ -84,7 +84,7 @@
<action selector="upAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="lXk-rU-fQZ"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAY-Bl-81T">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAY-Bl-81T">
<rect key="frame" x="204" y="57.666666666666657" width="60" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="8g8-R3-JIJ"/>
@@ -94,7 +94,7 @@
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ID:123567" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aET-0G-opo">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aET-0G-opo">
<rect key="frame" x="204" y="87.666666666666671" width="60" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="05u-LP-7ec"/>

View File

@@ -51,8 +51,9 @@
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 20;
layout.minimumInteritemSpacing = 20;
// layout.minimumLineSpacing = 20;
// layout.minimumInteritemSpacing = 20;
layout.sectionInset = UIEdgeInsetsMake(0, 50, 0, 50);
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.titleLabel.bottom+10, self.bgView.width, self.bgView.height-self.titleLabel.bottom-20) collectionViewLayout:layout];
@@ -73,7 +74,14 @@
}
-(void)getGiftList{
MJWeakSelf
[QXMineNetwork giftListWithLabel:@"99" roomId:self.roomId successBlock:^(NSArray<QXGiftModel *> * _Nonnull list) {
// [QXMineNetwork giftListWithLabel:@"99" roomId:self.roomId successBlock:^(NSArray<QXGiftModel *> * _Nonnull list) {
// [weakSelf.dataArray removeAllObjects];
// [weakSelf.dataArray addObjectsFromArray:list];
// [weakSelf.collectionView reloadData];
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
//
// }];
[QXMineNetwork roomBarCabinRoomListWithRoomId:self.roomId successBlock:^(NSArray * _Nonnull list) {
[weakSelf.dataArray removeAllObjects];
[weakSelf.dataArray addObjectsFromArray:list];
[weakSelf.collectionView reloadData];
@@ -94,8 +102,7 @@
return cell;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
NSInteger itemWidth = (NSInteger)(SCREEN_WIDTH-50*2-20)/4;
return CGSizeMake(itemWidth, itemWidth);
return CGSizeMake(ScaleWidth(128), ScaleWidth(128));
}
-(NSMutableArray *)dataArray{

View File

@@ -244,7 +244,7 @@
[self getGiftList];
}
-(void)getGiftList{
// MJWeakSelf
MJWeakSelf
// [QXMineNetwork giftListWithLabel:@"99" roomId:self.roomModel.room_info.room_id successBlock:^(NSArray<QXGiftModel *> * _Nonnull list) {
// [weakSelf.dataArray removeAllObjects];
// [weakSelf.dataArray addObjectsFromArray:list];
@@ -259,7 +259,7 @@
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
//
// }];
MJWeakSelf
// MJWeakSelf
[QXMineNetwork getRoomNewGiftListWithLabel:@"16" type:@"6" successBlock:^(NSArray<QXGiftModel *> * _Nonnull list) {
[weakSelf.dataArray removeAllObjects];
[weakSelf.dataArray addObjectsFromArray:list];
@@ -277,6 +277,17 @@
}
-(void)didSendGiftWithGiftModel:(QXGiftModel *)giftModel giftView:(QXRoomSeatBarCabinGiftView *)giftView{
NSString *to_uid = @"";
if ([self.roomModel.cp_user.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
to_uid = self.roomModel.cp_user.user_id1;
}else{
to_uid = self.roomModel.cp_user.user_id;
}
[QXMineNetwork roomSendGiftWithRoomId:self.roomModel.room_info.room_id gift_id:giftModel.gift_id gift_num:@"1" to_uid:to_uid heart_id:@"" type:@"1" pit_number:@"" gift_bag_id:giftModel.gift_bag successBlock:^(NSDictionary * _Nonnull dict) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
[giftView stopFloatingAnimation];
[UIView animateWithDuration:0.3 animations:^{
giftView.alpha = 0;
@@ -306,6 +317,7 @@
}
-(void)friendCabinRoomTimeDelayWithTime:(NSString*)end_time{
self.roomModel.cp_user.time_day = end_time;
[self stopTimer];
[self startTimer];
}

View File

@@ -77,6 +77,7 @@
self.ruleBtn = [[UIButton alloc] init];
[self.rightSettingView addSubview:self.ruleBtn];
[self.ruleBtn addTarget:self action:@selector(ruleAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.ruleBtn setBackgroundImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
self.giftBtn = [[UIButton alloc] init];
@@ -285,6 +286,14 @@
[giftView showInView:self.viewController.view];
}
-(void)ruleAction{
NSString *server = QXGlobal.shareGlobal.currentServer;
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"36"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
-(void)everyOneFollowMe{
NSInteger count = 0;
for (int i = 0 ; i < self.seatArray.count;i++) {

View File

@@ -302,6 +302,7 @@
}
-(void)friendCabinRoomTimeDelayWithTime:(NSString*)end_time{
self.roomModel.cp_user.time_day = end_time;
[self stopTimer];
[self startTimer];
}
-(void)closeAction{