This commit is contained in:
启星
2025-11-21 16:17:05 +08:00
parent 7ac937ddbf
commit 8913ea6f48
283 changed files with 8474 additions and 800 deletions

View File

@@ -0,0 +1,41 @@
//
// QXSingerSongListCell.h
// QXLive
//
// Created by 启星 on 2025/11/14.
//
#import <UIKit/UIKit.h>
#import "QXUserSongListModel.h"
NS_ASSUME_NONNULL_BEGIN
@protocol QXSingerSongListCellDelegate <NSObject>
@optional
-(void)updateSongList;
@end
@interface QXSingerSongListCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *songNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *singerNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *bossLabel;
@property (weak, nonatomic) IBOutlet UIImageView *giftImageView;
@property (weak, nonatomic) IBOutlet UILabel *giftInfoLabel;
@property (weak, nonatomic) IBOutlet UILabel *giftPriceLabel;
@property (weak, nonatomic) IBOutlet UIButton *requestBtn;
@property (weak, nonatomic) IBOutlet UILabel *playingLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *songNameTopConstraint;
@property (weak, nonatomic) IBOutlet UIImageView *giftCoinImageView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *singerNameTopConstraint;
/// 0 点歌 1 已点歌曲 2 历史记录
@property (nonatomic,assign)NSInteger type;
@property (nonatomic,assign)BOOL isCompere;
@property (nonatomic,strong)NSString* roomId;
@property (nonatomic,assign)NSInteger index;
@property (nonatomic,strong)QXUserSongListModel *model;
@property (nonatomic,weak)id<QXSingerSongListCellDelegate>delegate;
+(instancetype)cellWithTableView:(UITableView *)tableView;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,117 @@
//
// QXSingerSongListCell.m
// QXLive
//
// Created by on 2025/11/14.
//
#import "QXSingerSongListCell.h"
#import "QXMineNetwork.h"
@implementation QXSingerSongListCell
+(instancetype)cellWithTableView:(UITableView *)tableView{
static NSString *cellId = @"QXSingerSongListCell";
QXSingerSongListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
if (!cell) {
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
cell.backgroundColor = [UIColor clearColor];
}
return cell;
}
-(void)setType:(NSInteger)type{
_type = type;
if (type == 0) {
[self.requestBtn setTitle:@"点歌" forState:(UIControlStateNormal)];
self.giftImageView.hidden = NO;
self.giftInfoLabel.hidden = NO;
self.giftPriceLabel.hidden = NO;
self.giftCoinImageView.hidden = NO;
self.bossLabel.hidden = YES;
self.songNameTopConstraint.constant = 12;
self.singerNameTopConstraint.constant = 2;
}else if (type == 1){
self.giftImageView.hidden = YES;
self.giftInfoLabel.hidden = YES;
self.giftPriceLabel.hidden = YES;
self.giftCoinImageView.hidden = YES;
self.bossLabel.hidden = NO;
self.songNameTopConstraint.constant = 8;
self.singerNameTopConstraint.constant = 2;
[self.requestBtn setTitle:@"置顶" forState:(UIControlStateNormal)];
}else{
self.giftImageView.hidden = NO;
self.giftInfoLabel.hidden = NO;
self.giftPriceLabel.hidden = NO;
self.giftCoinImageView.hidden = NO;
self.bossLabel.hidden = NO;
self.songNameTopConstraint.constant = 8;
self.singerNameTopConstraint.constant = 2;
[self.requestBtn setTitle:@"点歌" forState:(UIControlStateNormal)];
self.requestBtn.hidden = YES;
}
}
-(void)setIsCompere:(BOOL)isCompere{
_isCompere = isCompere;
if (self.type == 1) {
self.requestBtn.hidden = !isCompere;
}else if(self.type == 2){
self.requestBtn.hidden = YES;
}else{
self.requestBtn.hidden = NO;
}
}
-(void)setIndex:(NSInteger)index{
_index = index;
if (self.type == 1) {
if (index == 0) {
self.playingLabel.hidden = NO;
self.requestBtn.hidden = YES;
}else{
self.requestBtn.hidden = NO;
self.playingLabel.hidden = YES;
}
}
}
-(void)setModel:(QXUserSongListModel *)model{
_model = model;
self.songNameLabel.text = model.song_name;
self.singerNameLabel.text = [NSString stringWithFormat:@"演唱者:%@",model.singer_nickname];
[self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
self.giftInfoLabel.text = [NSString stringWithFormat:@"%@*%@",model.gift_name,model.gift_num];
self.giftPriceLabel.text = model.gift_price;
self.bossLabel.text = [NSString stringWithFormat:@"老板:%@",model.boss_nickname];
}
- (IBAction)requestAction:(UIButton*)sender {
if ([sender.titleLabel.text isEqualToString:@"点歌"]) {
[QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"点歌成功");
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}else{
MJWeakSelf
[QXMineNetwork requestSongToTopWithId:self.model.id successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"置顶成功");
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(updateSongList)]) {
[weakSelf.delegate updateSongList];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="129" id="KGk-i7-Jjw" customClass="QXSingerSongListCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eYx-gQ-CGU">
<rect key="frame" x="12" y="4" width="351" height="82"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="军中绿花" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W9n-HK-oRm">
<rect key="frame" x="11.999999999999996" y="12" width="55.666666666666657" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="CVE-5T-jkQ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.22745099663734436" green="0.73725497722625732" blue="0.42745098471641541" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="演唱者:梁小江" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MzA-rW-K79">
<rect key="frame" x="12" y="35" width="83.666666666666671" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="3dZ-Se-Ob5"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="IsP-oL-Tfk">
<rect key="frame" x="166.66666666666666" y="12" width="58" height="58"/>
<constraints>
<constraint firstAttribute="width" secondItem="IsP-oL-Tfk" secondAttribute="height" multiplier="1:1" id="VhP-yQ-rob"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C2U-Kg-6Oc">
<rect key="frame" x="230.66666666666666" y="12" width="30.999999999999972" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="room_upseat_coin" translatesAutoresizingMaskIntoConstraints="NO" id="VS5-NB-TWO">
<rect key="frame" x="226.66666666666666" y="55" width="15" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="31J-Hb-yA0"/>
<constraint firstAttribute="width" constant="15" id="TfO-CM-Z2R"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YtR-Ll-MNw">
<rect key="frame" x="287" y="26" width="52" height="30"/>
<color key="backgroundColor" red="0.22745099663734436" green="0.73725497722625732" blue="0.42745098471641541" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="52" id="4kn-jx-dlX"/>
<constraint firstAttribute="height" constant="30" id="7d5-CV-kOV"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="点歌">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="requestAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="AUJ-jC-oOU"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99999" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Se7-dQ-SMr">
<rect key="frame" x="243.66666666666663" y="53" width="44" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="正在播放" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O17-j3-0au">
<rect key="frame" x="291" y="33.666666666666664" width="48" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.22745099663734436" green="0.73725497722625732" blue="0.42745098471641541" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="老板:夏末" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J0D-Yy-9x7">
<rect key="frame" x="12" y="55" width="60" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="51n-dk-tNv"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.73333334922790527" green="0.72549021244049072" blue="0.7764706015586853" alpha="0.070000000000000007" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Se7-dQ-SMr" firstAttribute="bottom" secondItem="IsP-oL-Tfk" secondAttribute="bottom" id="2w3-lq-5e4"/>
<constraint firstItem="W9n-HK-oRm" firstAttribute="top" secondItem="eYx-gQ-CGU" secondAttribute="top" constant="12" id="841-m6-Kxg"/>
<constraint firstAttribute="bottom" secondItem="J0D-Yy-9x7" secondAttribute="bottom" constant="9" id="He7-4n-W1H"/>
<constraint firstItem="O17-j3-0au" firstAttribute="trailing" secondItem="YtR-Ll-MNw" secondAttribute="trailing" id="JvX-Q0-tHF"/>
<constraint firstAttribute="trailing" secondItem="YtR-Ll-MNw" secondAttribute="trailing" constant="12" id="MZW-iX-FMt"/>
<constraint firstItem="MzA-rW-K79" firstAttribute="top" secondItem="W9n-HK-oRm" secondAttribute="bottom" constant="2" id="Vqo-Er-plo"/>
<constraint firstItem="IsP-oL-Tfk" firstAttribute="centerX" secondItem="eYx-gQ-CGU" secondAttribute="centerX" constant="20" id="WUR-uM-VWs"/>
<constraint firstItem="C2U-Kg-6Oc" firstAttribute="top" secondItem="IsP-oL-Tfk" secondAttribute="top" id="bOF-rw-Z5H"/>
<constraint firstItem="YtR-Ll-MNw" firstAttribute="centerY" secondItem="eYx-gQ-CGU" secondAttribute="centerY" id="c9r-ZP-8A2"/>
<constraint firstItem="VS5-NB-TWO" firstAttribute="bottom" secondItem="IsP-oL-Tfk" secondAttribute="bottom" id="dfa-Uu-HRK"/>
<constraint firstAttribute="bottom" secondItem="IsP-oL-Tfk" secondAttribute="bottom" constant="12" id="edU-uy-kmK"/>
<constraint firstItem="Se7-dQ-SMr" firstAttribute="leading" secondItem="VS5-NB-TWO" secondAttribute="trailing" constant="2" id="f4z-o2-kOh"/>
<constraint firstItem="VS5-NB-TWO" firstAttribute="leading" secondItem="IsP-oL-Tfk" secondAttribute="trailing" constant="2" id="iFq-LS-7B7"/>
<constraint firstItem="J0D-Yy-9x7" firstAttribute="leading" secondItem="W9n-HK-oRm" secondAttribute="leading" id="ijE-MJ-NzF"/>
<constraint firstItem="W9n-HK-oRm" firstAttribute="leading" secondItem="eYx-gQ-CGU" secondAttribute="leading" constant="12" id="kHo-W3-Do0"/>
<constraint firstItem="O17-j3-0au" firstAttribute="centerY" secondItem="eYx-gQ-CGU" secondAttribute="centerY" id="kjN-8i-dFU"/>
<constraint firstItem="C2U-Kg-6Oc" firstAttribute="leading" secondItem="IsP-oL-Tfk" secondAttribute="trailing" constant="6" id="l9Z-M3-wsR"/>
<constraint firstItem="MzA-rW-K79" firstAttribute="leading" secondItem="eYx-gQ-CGU" secondAttribute="leading" constant="12" id="mqI-2L-6SG"/>
<constraint firstItem="IsP-oL-Tfk" firstAttribute="top" secondItem="eYx-gQ-CGU" secondAttribute="top" constant="12" id="zls-VH-Iee"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="eYx-gQ-CGU" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12" id="Cgg-UQ-i5d"/>
<constraint firstAttribute="bottom" secondItem="eYx-gQ-CGU" secondAttribute="bottom" constant="4" id="L3o-dH-L7z"/>
<constraint firstAttribute="trailing" secondItem="eYx-gQ-CGU" secondAttribute="trailing" constant="12" id="pAM-sy-Oh8"/>
<constraint firstItem="eYx-gQ-CGU" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="4" id="xRa-o0-5Jm"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="bossLabel" destination="J0D-Yy-9x7" id="Eog-yT-y9w"/>
<outlet property="giftCoinImageView" destination="VS5-NB-TWO" id="gGL-jw-7Xp"/>
<outlet property="giftImageView" destination="IsP-oL-Tfk" id="7OT-RU-xOn"/>
<outlet property="giftInfoLabel" destination="C2U-Kg-6Oc" id="V5Y-HH-MTU"/>
<outlet property="giftPriceLabel" destination="Se7-dQ-SMr" id="L8J-fA-kHn"/>
<outlet property="playingLabel" destination="O17-j3-0au" id="kSt-f3-A4T"/>
<outlet property="requestBtn" destination="YtR-Ll-MNw" id="1LO-1P-loE"/>
<outlet property="singerNameLabel" destination="MzA-rW-K79" id="q15-dB-Mdc"/>
<outlet property="singerNameTopConstraint" destination="Vqo-Er-plo" id="Enn-Cg-VkZ"/>
<outlet property="songNameLabel" destination="W9n-HK-oRm" id="7H3-oo-hCO"/>
<outlet property="songNameTopConstraint" destination="841-m6-Kxg" id="ZKh-sy-KPG"/>
</connections>
<point key="canvasLocation" x="222.13740458015266" y="49.647887323943664"/>
</tableViewCell>
</objects>
<resources>
<image name="room_upseat_coin" width="16" height="16"/>
</resources>
</document>

View File

@@ -0,0 +1,23 @@
//
// QXSingerSongListContentView.h
// QXLive
//
// Created by 启星 on 2025/11/14.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXSingerSongListContentView : UIView<JXCategoryListContentViewDelegate>
@property (nonatomic,assign)BOOL isCompere;
/// 0 点歌 1 已点歌曲 2 历史记录
@property (nonatomic,assign)NSInteger type;
@property (nonatomic,assign)NSInteger historyType;
@property (nonatomic,assign)QXRoomPitModel* pitModel;
@property (nonatomic,strong)NSString*roomId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,160 @@
//
// QXSingerSongListContentView.m
// QXLive
//
// Created by on 2025/11/14.
//
#import "QXSingerSongListContentView.h"
#import "QXSingerSongListCell.h"
#import "QXMineNetwork.h"
@interface QXSingerSongListContentView()<UITableViewDelegate,UITableViewDataSource,QXSingerSongListCellDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,assign)NSInteger page ;
@property (nonatomic,strong)NSMutableArray *dataArray;
@end
@implementation QXSingerSongListContentView
-(UIView *)listView{
return self;
}
-(void)listWillAppear{
[self getSongList];
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubviews];
}
return self;
}
-(void)initSubviews{
self.backgroundColor = [UIColor clearColor];
self.page = 1;
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height) style:(UITableViewStylePlain)];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.backgroundColor = RGB16(0x1B1926);
// self.tableView.rowHeight = 73;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
MJWeakSelf
self.tableView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
weakSelf.page++;
[weakSelf getSongList];
}];
self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1;
[weakSelf getSongList];
}];
[self addSubview:self.tableView];
}
-(void)setType:(NSInteger)type{
_type = type;
}
-(void)setPitModel:(QXRoomPitModel *)pitModel{
_pitModel = pitModel;
}
-(void)getSongList{
MJWeakSelf
if (self.type == 0) {
///
NSString *roomId = @"";
NSString *userId = @"";
if (self.pitModel == nil) {
///
roomId = self.roomId;
userId = @"";
}else{
///
userId = self.pitModel.user_id;
roomId = @"";
}
[QXMineNetwork getUserSongListWithRoomId:roomId user_id:userId page:self.page SuccessBlock:^(NSArray<QXUserSongListModel *> * _Nonnull list, NSString * _Nonnull count) {
if (weakSelf.page == 1) {
[weakSelf.dataArray removeAllObjects];
}
[weakSelf.dataArray addObjectsFromArray:list];
[weakSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing];
if (list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[weakSelf.tableView.mj_header endRefreshing];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}else if (self.type == 1){
///
[QXMineNetwork requestSongWithRoomId:self.roomId type:1 page:self.page successBlock:^(NSArray<QXUserSongListModel *> * _Nonnull list, NSString * _Nonnull count) {
if (weakSelf.page == 1) {
[weakSelf.dataArray removeAllObjects];
}
[weakSelf.dataArray addObjectsFromArray:list];
[weakSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing];
if (list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[weakSelf.tableView.mj_header endRefreshing];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}else{
///
[QXMineNetwork requestSongWithRoomId:self.roomId type:self.historyType page:self.page successBlock:^(NSArray<QXUserSongListModel *> * _Nonnull list, NSString * _Nonnull count) {
if (weakSelf.page == 1) {
[weakSelf.dataArray removeAllObjects];
}
[weakSelf.dataArray addObjectsFromArray:list];
[weakSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing];
if (list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[weakSelf.tableView.mj_header endRefreshing];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
}
-(void)updateSongList{
self.page = 1;
[self getSongList];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXSingerSongListCell *cell = [QXSingerSongListCell cellWithTableView:tableView];
cell.type = self.type;
cell.isCompere = self.isCompere;
cell.index = indexPath.row;
cell.model = self.dataArray[indexPath.row];
cell.roomId = self.roomId;
cell.delegate = self;
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (self.type == 0) {
return 73;
}else{
return 75+8;
}
}
-(NSMutableArray *)dataArray{
if (!_dataArray) {
_dataArray = [NSMutableArray array];
}
return _dataArray;
}
@end

View File

@@ -0,0 +1,20 @@
//
// QXSingerSongListSubView.h
// QXLive
//
// Created by 启星 on 2025/11/14.
//
#import <UIKit/UIKit.h>
#import "JXCategoryView.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXSingerSongListSubView : UIView<JXCategoryListContentViewDelegate>
@property (nonatomic,assign)BOOL isCompere;
/// 0 点歌 1 已点歌曲 2 历史记录
@property (nonatomic,assign)NSInteger type;
@property (nonatomic,strong)NSArray *pitArray;
@property (nonatomic,strong)NSString *roomId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,122 @@
//
// QXSingerSongListSubView.m
// QXLive
//
// Created by on 2025/11/14.
//
#import "QXSingerSongListSubView.h"
#import "QXSingerSongListContentView.h"
@interface QXSingerSongListSubView()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
@property (nonatomic,strong)JXCategoryListContainerView *containerView;
@property (nonatomic,strong)NSMutableArray *titles;
@property (nonatomic,strong)NSString *todayTitle;
@property (nonatomic,strong)NSString *yestoryTitle;
@property (nonatomic,strong)NSString *weekTitle;
@property (nonatomic,strong)NSString *lastweekTitle;
@end
@implementation QXSingerSongListSubView
-(UIView *)listView{
return self;
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubviews];
}
return self;
}
-(void)initSubviews{
self.categoryView = [[JXCategoryTitleView alloc] init];
self.categoryView.frame = CGRectMake(16,0,SCREEN_WIDTH-32, 64);
self.categoryView.delegate = self;
// self.categoryView.titles = @[@"全部",@"1号麦",@"2号麦"];
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"];
self.categoryView.titleColor = [UIColor colorWithHexString:@"#BBB9C6"];
self.categoryView.cellWidth = 60;
self.categoryView.cellSpacing = 16;
self.categoryView.contentEdgeInsetLeft = 8;
// self.categoryView.contentEdgeInsetRight = 8;
// self.categoryView.titleLabelZoomScale = 1.1;
// self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14];
self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:14];
self.categoryView.averageCellSpacingEnabled = NO;
JXCategoryIndicatorBackgroundView *indicatorView = [[JXCategoryIndicatorBackgroundView alloc] init];
indicatorView.indicatorHeight = 32;
indicatorView.indicatorWidth = 60;
indicatorView.indicatorColor = RGB16(0x3ABC6D);
indicatorView.indicatorCornerRadius = 16;
self.categoryView.indicators = @[indicatorView];
self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_CollectionView) delegate:self];
self.containerView.frame = CGRectMake(0, 60, self.width, self.height-60);
self.containerView.listCellBackgroundColor = RGB16(0x1B1926);
self.containerView.scrollView.backgroundColor = RGB16(0x1B1926);
[self addSubview:self.categoryView];
[self addSubview:self.containerView];
self.categoryView.listContainer = self.containerView;
}
-(void)setType:(NSInteger)type{
_type = type;
if (type == 0) {
///
}else if(type == 1){
///
}else{
///
self.todayTitle = @"今日";
self.yestoryTitle = @"昨日";
self.weekTitle = @"本周";
self.lastweekTitle = @"上周";
[self.titles removeAllObjects];
[self.titles addObject:self.todayTitle];
[self.titles addObject:self.yestoryTitle];
[self.titles addObject:self.weekTitle];
[self.titles addObject:self.lastweekTitle];
self.categoryView.titles = self.titles;
}
}
-(void)setPitArray:(NSArray *)pitArray{
_pitArray = pitArray;
[self.titles removeAllObjects];
[self.titles addObject:@"全部"];
for (QXRoomPitModel*pitModel in pitArray) {
[self.titles addObject:[NSString stringWithFormat:@"%@号麦",pitModel.pit_number]];
}
self.categoryView.titles = self.titles;
[self.categoryView reloadData];
[self.containerView reloadData];
}
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
return self.titles.count;
}
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{
QXSingerSongListContentView *view = [[QXSingerSongListContentView alloc] initWithFrame:self.containerView.bounds];
view.type = self.type;
if (self.type == 0) {
if (self.titles.count > 1 && index>0) {
view.pitModel = self.pitArray[index-1];
}
}
if (self.type == 2) {
view.historyType = index+2;
}
view.roomId = self.roomId;
return view;
}
-(NSMutableArray *)titles{
if (!_titles) {
_titles = [NSMutableArray arrayWithArray:@[@"全部"]];
}
return _titles;
}
@end

View File

@@ -0,0 +1,19 @@
//
// QXSingerSongListView.h
// QXLive
//
// Created by 启星 on 2025/11/14.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXSingerSongListView : UIView
@property (nonatomic,assign)BOOL isCompere;
@property (nonatomic,strong)NSString *roomId;
-(void)updateAlreadyCountWithCount:(NSString*)count;
-(void)showInView:(UIView *)view pitArray:(nonnull NSArray *)pitArray isCompere:(BOOL)isCompere;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,171 @@
//
// QXSingerSongListView.m
// QXLive
//
// Created by on 2025/11/14.
//
#import "QXSingerSongListView.h"
#import "QXSingerSongListSubView.h"
#import "QXSingerSongListContentView.h"
#import "QXMineNetwork.h"
@interface QXSingerSongListView()<UIGestureRecognizerDelegate,JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
@property (nonatomic,strong)UIView *bgView;
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
@property (nonatomic,strong)JXCategoryListContainerView *containerView;
@property (nonatomic,strong)QXSingerSongListSubView *requestSongView;
@property (nonatomic,strong)QXSingerSongListContentView *alreadySongView;
@property (nonatomic,strong)QXSingerSongListSubView *historySongView;
@property (nonatomic,strong)NSString *requestSongTitle;
@property (nonatomic,strong)NSString *alreadySongTitle;
@property (nonatomic,strong)NSString *historySongTitle;
@property (nonatomic,strong)NSMutableArray *titles;
@end
@implementation QXSingerSongListView
- (instancetype)init
{
self = [super init];
if (self) {
self.frame = UIScreen.mainScreen.bounds;
[self initSubviews];
}
return self;
}
-(void)initSubviews{
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hide)];
tap.delegate = self;
[self addGestureRecognizer:tap];
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
self.requestSongTitle = @"点歌";
self.alreadySongTitle = @"已点歌曲";
self.historySongTitle = @"历史记录";
self.titles = [NSMutableArray arrayWithArray:@[self.requestSongTitle,self.alreadySongTitle,self.historySongTitle]];
self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, kSafeAreaBottom+ScaleWidth(510))];
self.bgView.backgroundColor = RGB16(0x1B1926);
[self.bgView addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
[self addSubview:self.bgView];
self.categoryView = [[JXCategoryTitleView alloc] init];
self.categoryView.frame = CGRectMake(16,12,self.width-32, 44);
self.categoryView.delegate = self;
self.categoryView.titles = self.titles;
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"];
self.categoryView.titleColor = [UIColor colorWithHexString:@"#BDBBC8"];
self.categoryView.cellWidth = JXCategoryViewAutomaticDimension;
self.categoryView.cellSpacing = 20;
self.categoryView.contentEdgeInsetLeft = 8;
// self.categoryView.contentEdgeInsetRight = 8;
// self.categoryView.titleLabelZoomScale = 1.1;
self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14];
self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16];
self.categoryView.averageCellSpacingEnabled = NO;
JXCategoryIndicatorLineView *indicatorView = [[JXCategoryIndicatorLineView alloc] init];
indicatorView.indicatorHeight = 2;
indicatorView.indicatorWidth = 10;
indicatorView.indicatorColor = RGB16(0xffffff);
indicatorView.indicatorCornerRadius = 1;
self.categoryView.indicators = @[indicatorView];
self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_ScrollView) delegate:self];
self.containerView.frame = CGRectMake(0, 44+12, self.width, self.bgView.height-44-12);
self.containerView.backgroundColor = RGB16(0x1B1926);
[self.bgView addSubview:self.categoryView];
[self.bgView addSubview:self.containerView];
self.categoryView.listContainer = self.containerView;
}
-(void)setRoomId:(NSString *)roomId{
_roomId = roomId;
[self getSongListCount];
}
-(void)getSongListCount{
MJWeakSelf
[QXMineNetwork requestSongCountWithRoomId:self.roomId successBlock:^(QXUserSongListCount * _Nonnull model) {
weakSelf.alreadySongTitle = [NSString stringWithFormat:@"已点歌曲(%@)",model.already];
[weakSelf.titles replaceObjectAtIndex:1 withObject:self.alreadySongTitle];
weakSelf.categoryView.titles = weakSelf.titles;
[weakSelf.categoryView reloadDataWithoutListContainer];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)updateAlreadyCountWithCount:(NSString*)count{
self.alreadySongTitle = [NSString stringWithFormat:@"已点歌曲(%@)",count];
[self.titles replaceObjectAtIndex:1 withObject:self.alreadySongTitle];
self.categoryView.titles = self.titles;
[self.categoryView reloadDataWithoutListContainer];
}
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
return touch.view == self;
}
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
return 3;
}
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{
if (index == 0) {
return self.requestSongView;
}else if (index == 1){
return self.alreadySongView;
}else{
return self.historySongView;
}
}
-(void)requestSongListCountDidChanged:(NSString *)count isHistory:(BOOL)isHistory{
if (isHistory) {
// self.historySongTitle = [NSString stringWithFormat:@"历史记录(%@)",count];;
}else{
self.alreadySongTitle = [NSString stringWithFormat:@"已点歌曲(%@)",count];;
}
[self.categoryView reloadData];
}
-(QXSingerSongListSubView *)requestSongView{
if (!_requestSongView) {
_requestSongView = [[QXSingerSongListSubView alloc] initWithFrame:self.containerView.bounds];
_requestSongView.roomId = self.roomId;
_requestSongView.type = 0;
}
return _requestSongView;
}
-(QXSingerSongListContentView *)alreadySongView{
if (!_alreadySongView) {
_alreadySongView = [[QXSingerSongListContentView alloc] initWithFrame:self.containerView.bounds];
_alreadySongView.roomId = self.roomId;
_alreadySongView.type = 1;
}
return _alreadySongView;
}
-(QXSingerSongListSubView *)historySongView{
if (!_historySongView) {
_historySongView = [[QXSingerSongListSubView alloc] initWithFrame:self.containerView.bounds];
_historySongView.roomId = self.roomId;
_historySongView.type = 2;
}
return _historySongView;
}
-(void)showInView:(UIView *)view pitArray:(nonnull NSArray *)pitArray isCompere:(BOOL)isCompere{
self.requestSongView.pitArray = pitArray;
self.alreadySongView.isCompere = isCompere;
self.bgView.y = SCREEN_HEIGHT;
[view addSubview:self];
[UIView animateWithDuration:0.3 animations:^{
self.bgView.y = SCREEN_HEIGHT- ScaleWidth(510)-kSafeAreaBottom;
}];
}
-(void)hide{
[UIView animateWithDuration:0.3 animations:^{
self.bgView.y = SCREEN_HEIGHT;
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
@end

View File

@@ -22,10 +22,10 @@ typedef NS_ENUM(NSInteger) {
QXRoomUserInfoViewEventTypeAtTA = 301,
/// 聊天
QXRoomUserInfoViewEventTypeChat ,
/// 关注
QXRoomUserInfoViewEventTypeAttention ,
/// 送礼物
QXRoomUserInfoViewEventTypeGift ,
/// 关注
QXRoomUserInfoViewEventTypeAttention = 400,
///
// QXRoomUserInfoViewEventTypeReport ,
}QXRoomUserInfoViewEventType;
@@ -55,6 +55,8 @@ NS_ASSUME_NONNULL_BEGIN
/// isPK
@property (nonatomic,assign)BOOL isPK;
@property (nonatomic,assign)BOOL isNeedLeftBtn;
@property (nonatomic,strong)NSString *roomId;
@property (nonatomic,strong)NSString *pitNumber;
@property (nonatomic,weak)id<QXRoomUserInfoViewDelegate>delegate;

View File

@@ -15,24 +15,32 @@
#import "QXReportViewController.h"
#import "QXUserHomePageViewController.h"
#import "QXUserInfoRelationTableCell.h"
#import "QXUserRelationListView.h"
#import "QXUserInfoRelationCardCell.h"
#import "QXDirectSetScaleView.h"
#import "QXSeatHeaderView.h"
#import "CKShimmerLabel.h"
#import "QXUserHomeHeaderView.h"
#import "QXGiftWallViewController.h"
#import "QXUserCpCardView.h"
#import "QXUserCpDressView.h"
#import "QXHeartBeatSpaceViewController.h"
@interface QXRoomUserInfoView()<UIGestureRecognizerDelegate,SDCycleScrollViewDelegate,QXMenuPopViewDelegate,UITableViewDelegate,UITableViewDataSource>
@interface QXRoomUserInfoView()<UIGestureRecognizerDelegate,SDCycleScrollViewDelegate,QXMenuPopViewDelegate,UICollectionViewDelegate,UICollectionViewDataSource>
@property (nonatomic,strong)UIView *bgView;
@property (nonatomic,strong)UIImageView *bgImageView;
///
@property (nonatomic,strong)QXSeatHeaderView *headerImageView;
///
@property (nonatomic,strong)UIButton *nameBtn;
@property (nonatomic,strong)CKShimmerLabel *nameLabel;
@property (nonatomic,strong)UIImageView *sexImageView;
/// ID
@property (nonatomic,strong)UILabel *idLabel;
///
///
@property (nonatomic,strong)UILabel *guildLabel;
///
@property (nonatomic,strong)UIButton *remindBtn;
///
@property (nonatomic,strong)UIButton *joinGuildBtn;
///
@property (nonatomic,strong)UIButton *focusBtn;
///
@property (nonatomic,strong)UIButton *upSeatBtn;
///
@@ -46,7 +54,7 @@
///
@property (nonatomic,strong)UIButton *moreBtn;
/// iconbgView
@property (nonatomic,strong)UIView *iconBgView;
@property (nonatomic,strong)UICollectionView *collectionView;
///
@property (nonatomic,strong)UILabel *introduceLabel;
@@ -56,14 +64,7 @@
///
@property (nonatomic,strong)UIButton *moreGiftBtn;
///
//@property (nonatomic,strong)SDCycleScrollView *relationshipScrollview;
@property (nonatomic,strong)UITableView *relationTableView;
///
@property (nonatomic,strong)UIButton *relationshipCardBtn;
///
@property (nonatomic,strong)UIButton *relationshipSeatBtn;
@property (nonatomic,assign)BOOL isRealLove;
@property (nonatomic,strong)QXUserCpCardView *cpContentView;
///
@property (nonatomic,strong)UIView *bottomView;
@@ -75,10 +76,8 @@
@property (nonatomic,strong) QXUserInfoGiftWallView *giftWallView;
@property (nonatomic,strong)UIButton *relationMoreBtn;
///
@property (nonatomic,strong) QXUserRelationListView *relationView;
@property (nonatomic,strong) QXRelationshipList *listModel;
@property (nonatomic,strong) QXUserCpDressView *cpDressView;
@end
@implementation QXRoomUserInfoView
@@ -97,24 +96,30 @@
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hide)];
tap.delegate = self;
[self addGestureRecognizer:tap];
self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, kSafeAreaBottom+ScaleWidth(429+33))];
self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, kSafeAreaBottom+ScaleWidth(462))];
// self.bgView.backgroundColor = [UIColor whiteColor];
[self addSubview:self.bgView];
self.bgImageView = [[UIImageView alloc] initWithFrame:self.bgView.bounds];
self.bgImageView.image = [UIImage imageNamed:@"room_user_bg"];
self.bgImageView.image = [UIImage imageNamed:@"room_user_n_bg"];
[self.bgView addSubview:self.bgImageView];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(ScaleWidth(24));
make.top.mas_equalTo(0);
make.left.right.bottom.equalTo(self.bgView);
}];
self.cpDressView = [[QXUserCpDressView alloc] initWithFrame:CGRectMake(self.width-ScaleWidth(20)-ScaleWidth(145), ScaleWidth(20), ScaleWidth(145), ScaleWidth(240))];
self.cpDressView.hidden = YES;
[self.bgView addSubview:self.cpDressView];
self.headerImageView = [[QXSeatHeaderView alloc] init];
self.headerImageView.contentMode = UIViewContentModeScaleAspectFill;
[self.bgView addSubview:self.headerImageView];
// [self.headerImageView addRoundedCornersWithRadius:ScaleWidth(33)];
[self.headerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerX.equalTo(self.bgView);
make.top.mas_equalTo(38);
make.left.mas_equalTo(21);
make.size.mas_equalTo(CGSizeMake(ScaleWidth(66), ScaleWidth(79)));
}];
@@ -125,25 +130,65 @@
make.bottom.left.right.top.equalTo(self.headerImageView);
}];
self.nameBtn = [[UIButton alloc] init];
self.nameBtn.titleLabel.font = [UIFont systemFontOfSize:14];
self.nameBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
[self.nameBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
[self.bgView addSubview:self.nameBtn];
[self.nameBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// self.nameBtn = [[UIButton alloc] init];
// self.nameBtn.titleLabel.font = [UIFont systemFontOfSize:14];
// self.nameBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
// [self.nameBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
// [self.bgView addSubview:self.nameBtn];
// [self.nameBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(self.headerImageView.mas_bottom).offset(2);
// make.height.mas_equalTo(18);
// make.centerX.equalTo(self.headerImageView);
// }];
self.nameLabel = [[CKShimmerLabel alloc] initWithFrame:CGRectMake(32, ScaleWidth(79)+2, 100, 18)];
self.nameLabel.shimmerWidth = 20;
self.nameLabel.shimmerRadius = 20;
self.nameLabel.durationTime = 1;
self.nameLabel.repeat = YES;
self.nameLabel.textColor = QXConfig.themeColor;
self.nameLabel.font = [UIFont boldSystemFontOfSize:18];
self.nameLabel.text = @"羽声语音";
self.nameLabel.contentLabel.textAlignment = NSTextAlignmentCenter;
[self.bgView addSubview:self.nameLabel];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerImageView.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.centerX.equalTo(self.headerImageView);
make.left.equalTo(self.headerImageView);
make.width.mas_equalTo(100);
}];
self.focusBtn = [[UIButton alloc] init];
self.focusBtn.titleLabel.font = [UIFont systemFontOfSize:14];
// self.focusBtn.backgroundColor = RGB16A(0xffffff, 0.2);
[self.focusBtn addRoundedCornersWithRadius:12];
self.focusBtn.tag = 400;
[self.focusBtn addTarget:self action:@selector(btnEventAction:) forControlEvents:(UIControlEventTouchUpInside)];
[self.focusBtn setTitle:@"+ 关注" forState:(UIControlStateNormal)];
[self.focusBtn setTitle:@"已关注" forState:(UIControlStateSelected)];
[self.focusBtn setBackgroundImage:[UIImage imageWithColor:QXConfig.themeColor] forState:(UIControlStateNormal)];
[self.focusBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0x999999)] forState:(UIControlStateSelected)];
[self.focusBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
[self.focusBtn setTitleColor:RGB16(0xe3e3e3) forState:(UIControlStateSelected)];
[self.bgView addSubview:self.focusBtn];
[self.focusBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.headerImageView).offset(-15);
make.height.mas_equalTo(24);
make.left.equalTo(self.headerImageView.mas_right).offset(10);
make.width.mas_equalTo(50);
}];
// self.sexImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 17, 17)];
// [self.bgView addSubview:self.sexImageView];
self.idLabel = [[UILabel alloc] init];
self.idLabel.font = [UIFont systemFontOfSize:12];
self.idLabel.textColor = [UIColor whiteColor];
[self.bgView addSubview:self.idLabel];
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.nameBtn.mas_bottom).offset(2);
make.top.equalTo(self.nameLabel.mas_bottom).offset(5);
make.height.mas_equalTo(16);
make.centerX.equalTo(self.headerImageView);
make.left.equalTo(self.headerImageView);
make.width.mas_lessThanOrEqualTo(ScaleWidth(180));
}];
self.guildLabel = [[UILabel alloc] init];
@@ -151,82 +196,86 @@
self.guildLabel.textColor = [UIColor whiteColor];
[self.bgView addSubview:self.guildLabel];
[self.guildLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.idLabel.mas_bottom).offset(2);
make.top.equalTo(self.idLabel.mas_bottom).offset(5);
make.height.mas_equalTo(16);
make.centerX.equalTo(self.headerImageView);
make.left.equalTo(self.headerImageView);
make.width.mas_lessThanOrEqualTo(ScaleWidth(180));
}];
self.iconBgView = [[UIView alloc] init];
[self.bgView addSubview:self.iconBgView];
[self.iconBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.guildLabel.mas_bottom).offset(4);
make.size.mas_equalTo(CGSizeMake(42, 16));
self.joinGuildBtn = [[UIButton alloc] init];
[self.joinGuildBtn setTitle:@"立即加入" forState:(UIControlStateNormal)];
self.joinGuildBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[self.joinGuildBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
[self.joinGuildBtn addTarget:self action:@selector(btnEventAction:) forControlEvents:(UIControlEventTouchUpInside)];
[self.bgView addSubview:self.joinGuildBtn];
[self.joinGuildBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.guildLabel.mas_right);
make.centerY.equalTo(self.guildLabel);
make.height.mas_equalTo(35);
}];
// self.iconBgView = [[UIView alloc] init];
// [self.bgView addSubview:self.iconBgView];
// [self.iconBgView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(self.idLabel.mas_bottom).offset(10);
// make.size.mas_equalTo(CGSizeMake(42, 16));
// }];
// self.iconView = [[UICollectionView alloc] initWithFrame:<#(CGRect)#> collectionViewLayout:<#(nonnull UICollectionViewLayout *)#>];
// [self.bgView addSubview:self.iconView];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(UserIconWidth, UserIconHeight);
layout.minimumLineSpacing = 7;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.collectionView.backgroundColor = UIColor.clearColor;
[self.collectionView registerClass:[QXTagImageCell class] forCellWithReuseIdentifier:@"QXTagImageCell"];
[self.bgView addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.headerImageView);
make.height.mas_equalTo(UserIconHeight);
make.top.equalTo(self.guildLabel.mas_bottom).offset(14);
make.width.mas_equalTo(300);
}];
self.introduceLabel = [[UILabel alloc] init];
self.introduceLabel.textAlignment = NSTextAlignmentCenter;
self.introduceLabel.textAlignment = NSTextAlignmentLeft;
self.introduceLabel.font = [UIFont systemFontOfSize:12];
self.introduceLabel.textColor = RGB16(0x999999);
self.introduceLabel.numberOfLines = 2;
[self.bgView addSubview:self.introduceLabel];
[self.introduceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.iconBgView.mas_bottom).offset(8);
make.left.mas_equalTo(40);
make.top.equalTo(self.collectionView.mas_bottom).offset(10);
make.left.equalTo(self.headerImageView);
make.right.mas_equalTo(-40);
make.height.mas_equalTo(40);
}];
self.clearBtn = [[UIButton alloc] init];
[self.clearBtn setTitle:QXText(@"清魅力") forState:(UIControlStateNormal)];
[self.clearBtn setImage:[UIImage imageNamed:@"room_clear_charm"] forState:(UIControlStateNormal)];
self.clearBtn.titleLabel.font = [UIFont systemFontOfSize:12];
self.clearBtn.backgroundColor = RGB16A(0xffffff, 0.2);
self.clearBtn.hidden = YES;
[self.clearBtn addRoundedCornersWithRadius:ScaleWidth(10)];
self.clearBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
[self.clearBtn addTarget:self action:@selector(clearCharmAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.clearBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
[self.bgView addSubview:self.clearBtn];
[self.clearBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(22);
make.top.mas_equalTo(ScaleWidth(24)+26);
make.height.mas_equalTo(ScaleWidth(20));
make.width.mas_greaterThanOrEqualTo(ScaleWidth(66));
}];
self.remindBtn = [[UIButton alloc] init];
// [self.remindBtn setImage:[UIImage imageNamed:@"room_up_notice_icon"] forState:(UIControlStateNormal)];
[self.remindBtn setTitle:QXText(@"转币") forState:(UIControlStateNormal)];
self.remindBtn.titleLabel.font = [UIFont systemFontOfSize:12];
self.remindBtn.backgroundColor = RGB16A(0xffffff, 0.2);
self.remindBtn.hidden = YES;
[self.remindBtn addRoundedCornersWithRadius:ScaleWidth(10)];
self.remindBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
[self.remindBtn addTarget:self action:@selector(eventAction:) forControlEvents:(UIControlEventTouchUpInside)];
[self.remindBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
[self.bgView addSubview:self.remindBtn];
[self.remindBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(22);
make.centerY.equalTo(self.guildLabel);
make.height.mas_equalTo(ScaleWidth(20));
make.width.mas_greaterThanOrEqualTo(ScaleWidth(66));
}];
// self.remindBtn = [[UIButton alloc] init];
//// [self.remindBtn setImage:[UIImage imageNamed:@"room_up_notice_icon"] forState:(UIControlStateNormal)];
// [self.remindBtn setTitle:QXText(@"转币") forState:(UIControlStateNormal)];
// self.remindBtn.titleLabel.font = [UIFont systemFontOfSize:12];
// self.remindBtn.backgroundColor = RGB16A(0xffffff, 0.2);
// self.remindBtn.hidden = YES;
// [self.remindBtn addRoundedCornersWithRadius:ScaleWidth(10)];
// self.remindBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
// [self.remindBtn addTarget:self action:@selector(eventAction:) forControlEvents:(UIControlEventTouchUpInside)];
// [self.remindBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
// [self.bgView addSubview:self.remindBtn];
// [self.remindBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.mas_equalTo(22);
// make.centerY.equalTo(self.guildLabel);
// make.height.mas_equalTo(ScaleWidth(20));
// make.width.mas_greaterThanOrEqualTo(ScaleWidth(66));
// }];
self.followBtn = [[UIButton alloc] init];
self.followBtn.hidden = YES;
[self.followBtn setImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)];
[self.followBtn addTarget:self action:@selector(followAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.bgView addSubview:self.followBtn];
[self.followBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(22);
make.top.equalTo(self.remindBtn.mas_bottom).offset(17);
make.height.mas_equalTo(ScaleWidth(24));
make.width.mas_equalTo(ScaleWidth(70));
}];
self.upSeatBtn = [[UIButton alloc] init];
[self.upSeatBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
@@ -239,11 +288,41 @@
[self.bgView addSubview:self.upSeatBtn];
[self.upSeatBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-ScaleWidth(64));
make.centerY.equalTo(self.clearBtn);
make.top.mas_equalTo(13);
make.height.mas_equalTo(ScaleWidth(24));
make.width.mas_equalTo(ScaleWidth(44));
}];
self.clearBtn = [[UIButton alloc] init];
[self.clearBtn setTitle:QXText(@"清魅力") forState:(UIControlStateNormal)];
[self.clearBtn setImage:[UIImage imageNamed:@"room_clear_charm"] forState:(UIControlStateNormal)];
self.clearBtn.titleLabel.font = [UIFont systemFontOfSize:12];
self.clearBtn.backgroundColor = RGB16A(0xffffff, 0.2);
self.clearBtn.hidden = YES;
[self.clearBtn addRoundedCornersWithRadius:ScaleWidth(12)];
self.clearBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
[self.clearBtn addTarget:self action:@selector(clearCharmAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.clearBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
[self.bgView addSubview:self.clearBtn];
[self.clearBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.upSeatBtn.mas_left).offset(-10);
make.centerY.equalTo(self.upSeatBtn);
make.height.mas_equalTo(ScaleWidth(24));
make.width.mas_greaterThanOrEqualTo(ScaleWidth(66));
}];
self.followBtn = [[UIButton alloc] init];
self.followBtn.hidden = YES;
[self.followBtn setImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)];
[self.followBtn addTarget:self action:@selector(followAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.bgView addSubview:self.followBtn];
[self.followBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.clearBtn.mas_left).offset(-10);
make.centerY.equalTo(self.upSeatBtn.mas_bottom);
make.height.mas_equalTo(ScaleWidth(24));
make.width.mas_equalTo(ScaleWidth(70));
}];
self.moreBtn = [[UIButton alloc] init];
[self.moreBtn setImage:[UIImage imageNamed:@"room_user_more"] forState:(UIControlStateNormal)];
[self.moreBtn addTarget:self action:@selector(eventAction:) forControlEvents:(UIControlEventTouchUpInside)];
@@ -314,71 +393,23 @@
}];
[self.moreGiftBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:2];
self.relationshipCardBtn = [[UIButton alloc] init];
self.relationshipCardBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
[self.relationshipCardBtn setTitle:QXText(@"关系卡") forState:(UIControlStateNormal)];
[self.relationshipCardBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
[self.relationshipCardBtn addTarget:self action:@selector(relationSelectedAction:) forControlEvents:(UIControlEventTouchUpInside)];
self.relationshipCardBtn.titleLabel.font = [UIFont boldSystemFontOfSize:16];
[self.bgView addSubview:self.relationshipCardBtn];
[self.relationshipCardBtn mas_makeConstraints:^(MASConstraintMaker *make) {
self.cpContentView = [[QXUserCpCardView alloc] init];
MJWeakSelf
[self.cpContentView addTapBlock:^(id _Nonnull obj) {
QXHeartBeatSpaceViewController*vc = [[QXHeartBeatSpaceViewController alloc] init];
vc.userId = weakSelf.userId;
[weakSelf.viewController.navigationController pushViewController:vc animated:YES];
}];
[self.bgView addSubview:self.cpContentView];
[self.cpContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.moreGiftBtn.mas_bottom).offset(5);
make.height.mas_equalTo(ScaleWidth(100));
make.left.mas_equalTo(16);
make.height.mas_equalTo(30);
make.top.equalTo(self.giftTitleLabel.mas_bottom).offset(10);
make.width.mas_equalTo(60);
}];
self.relationshipSeatBtn = [[UIButton alloc] init];
[self.relationshipSeatBtn setTitle:QXText(@"关系位") forState:(UIControlStateNormal)];
[self.relationshipSeatBtn addTarget:self action:@selector(relationSelectedAction:) forControlEvents:(UIControlEventTouchUpInside)];
[self.relationshipSeatBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
self.relationshipSeatBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
[self.bgView addSubview:self.relationshipSeatBtn];
[self.relationshipSeatBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.relationshipCardBtn.mas_right).offset(5);
make.height.mas_equalTo(30);
make.top.equalTo(self.giftTitleLabel.mas_bottom).offset(10);
make.width.mas_equalTo(65);
}];
self.relationMoreBtn = [[UIButton alloc] init];
[self.relationMoreBtn setTitle:QXText(@"更多") forState:(UIControlStateNormal)];
[self.relationMoreBtn setImage:[[UIImage imageNamed:@"arrowRight"] imageByTintColor:QXConfig.themeColor] forState:(UIControlStateNormal)];
[self.relationMoreBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
self.relationMoreBtn.titleLabel.font = [UIFont boldSystemFontOfSize:12];
[self.relationMoreBtn addTarget:self action:@selector(relationAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.bgView addSubview:self.relationMoreBtn];
[self.relationMoreBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.bgView.mas_right).offset(-16);
make.height.mas_equalTo(30);
make.top.equalTo(self.giftTitleLabel.mas_bottom).offset(10);
make.width.mas_equalTo(65);
}];
[self.relationMoreBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:2];
// self.relationshipScrollview = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage imageNamed:@"room_relationship_card_bg"]];
// self.relationshipScrollview.backgroundColor = [UIColor clearColor];
// [self.bgView insertSubview:self.relationshipScrollview belowSubview:self.relationshipCardBtn];
// [self.relationshipScrollview mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.equalTo(self.relationshipSeatBtn.mas_top).offset(4);
// make.left.mas_equalTo(6);
// make.right.mas_equalTo(-6);
// make.height.mas_equalTo(ScaleWidth(141));
// }];
self.relationTableView = [[UITableView alloc] initWithFrame:CGRectZero style:(UITableViewStylePlain)];
self.relationTableView.delegate = self;
self.relationTableView.dataSource = self;
self.relationTableView.scrollEnabled = NO;
self.relationTableView.backgroundColor = [UIColor clearColor];
self.relationTableView.rowHeight = ScaleWidth(141);
[self.bgView insertSubview:self.relationTableView belowSubview:self.relationshipCardBtn];
[self.relationTableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.relationshipSeatBtn.mas_top).offset(4);
make.left.mas_equalTo(6);
make.right.mas_equalTo(-6);
make.height.mas_equalTo(ScaleWidth(141));
make.right.mas_equalTo(-16);
}];
self.bottomView = [[UIView alloc] init];
[self.bgView addSubview:self.bottomView];
@@ -386,13 +417,13 @@
make.left.mas_equalTo(16);
make.right.mas_equalTo(-16);
// make.bottom.mas_equalTo(-(kSafeAreaBottom+10));
make.top.equalTo(self.relationTableView.mas_bottom).offset(20);
make.top.equalTo(self.cpContentView.mas_bottom).offset(25);
make.height.mas_equalTo(35);
}];
self.toolsArray = @[QXText(@"@TA"),QXText(@"聊天"),QXText(@"关注"),QXText(@"送礼物")];
self.toolsArray = @[QXText(@"@TA"),QXText(@"发消息"),QXText(@"送礼物")];
CGFloat margin = 5;
CGFloat btnWidth = (SCREEN_WIDTH-16*2-margin*3)/self.toolsArray.count;
CGFloat btnWidth = (SCREEN_WIDTH-16*2-margin*2)/self.toolsArray.count;
for (int i = 0 ; i < self.toolsArray.count; i++) {
NSString *title = self.toolsArray[i];
UIButton *btn = [[UIButton alloc] init];
@@ -412,22 +443,18 @@
}
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.userModel.icon.count;
}
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
QXTagImageCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXTagImageCell" forIndexPath:indexPath];
cell.imageUrl = self.userModel.icon[indexPath.row];
return cell;
}
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
return touch.view == self;
}
-(void)relationSelectedAction:(UIButton*)sender{
if (sender == self.relationshipSeatBtn) {
self.relationshipSeatBtn.titleLabel.font = [UIFont boldSystemFontOfSize:16];
self.relationshipCardBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
self.isRealLove = YES;
}else{
self.relationshipSeatBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
self.relationshipCardBtn.titleLabel.font = [UIFont boldSystemFontOfSize:16];
self.isRealLove = NO;
}
[self.relationTableView reloadData];
}
-(void)clearCharmAction{
[QXMineNetwork roomClearCharmWithRoomId:self.roomId userId:self.userId successBlock:^(NSDictionary * _Nonnull dict) {
@@ -436,21 +463,7 @@
showToast(msg);
}];
}
//-(void)getRelationList{
// MJWeakSelf
// [QXMineNetwork roomUserRelationWithUserId:self.userId successBlock:^(QXRelationshipList * list) {
// weakSelf.listModel = list;
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
//
// }];
//}
-(void)relationAction{
[self hide];
self.relationView.isRealLove = self.isRealLove;
self.relationView.userId = self.userId;
// self.relationView.list = self.listModel;
[self.relationView showInView:self.viewController.view];
}
-(void)followAction{
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.roomId isRejoin:NO navagationController:self.viewController.navigationController];
@@ -482,7 +495,6 @@
//}
-(void)setUserId:(NSString *)userId{
_userId = userId;
[self relationSelectedAction:self.relationshipCardBtn];
if (self.isCompere) {
// @TA...
self.moreBtn.hidden = NO;
@@ -526,8 +538,9 @@
self.bottomView.hidden = YES;
self.reportBtn.hidden = YES;
self.blackBtn.hidden = YES;
// self.remindBtn.hidden = YES;
self.focusBtn.hidden = YES;
}else{
self.focusBtn.hidden = NO;
// self.remindBtn.hidden = NO;
self.bottomView.hidden = NO;
}
@@ -554,28 +567,56 @@
weakSelf.headerImageView.nobilityImageView.image = nil;
}
if ([model.nickname_color isExist]) {
[weakSelf.nameBtn setTitleColor:[UIColor colorWithHexString:model.nickname_color] forState:(UIControlStateNormal)];
weakSelf.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color] ;
[weakSelf.nameLabel startShimmer];
}else{
[weakSelf.nameBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
[weakSelf.nameLabel stopShimmer];
}
[weakSelf.nameBtn setTitle:model.nickname forState:(UIControlStateNormal)];
[weakSelf.nameBtn setImage:model.sex.intValue==1?[UIImage imageNamed:@"user_sex_boy"]:[UIImage imageNamed:@"user_sex_girl"] forState:(UIControlStateNormal)];
[weakSelf.nameBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:2];
weakSelf.idLabel.text = [NSString stringWithFormat:@"ID:%@",model.user_code];
weakSelf.guildLabel.text = [NSString stringWithFormat:@"%@:%@",QXText(@"所属公会"),model.guild];
weakSelf.nameLabel.text = model.nickname;
[weakSelf.nameLabel.contentLabel sizeToFit];
[weakSelf.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(weakSelf.headerImageView.mas_bottom).offset(2);
make.height.mas_equalTo(18);
make.left.equalTo(weakSelf.headerImageView);
make.width.mas_equalTo(weakSelf.nameLabel.contentLabel.width);
}];
[weakSelf.focusBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(weakSelf.nameLabel);
make.height.mas_equalTo(24);
make.left.equalTo(self.nameLabel.mas_right).offset(10);
make.width.mas_equalTo(55);
}];
if (model.cp_info) {
weakSelf.cpDressView.hidden = NO;
weakSelf.cpDressView.model = model.cp_info;
weakSelf.cpContentView.model = model.cp_info;
}
// weakSelf.sexImageView.image = model.sex.intValue==1?[UIImage imageNamed:@"user_sex_boy"]:[UIImage imageNamed:@"user_sex_girl"];
// [weakSelf.sexImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
// make.width.height.mas_equalTo(17);
// make.left.equalTo(weakSelf.nameLabel.mas_right).offset(2);
// make.centerY.equalTo(weakSelf.nameLabel);
// }];
[weakSelf.collectionView reloadData];
weakSelf.idLabel.text = [NSString stringWithFormat:@"%@ ID:%@",model.sex.intValue==1?@"男":@"女",model.user_code];
weakSelf.guildLabel.text = [NSString stringWithFormat:@"所属公会:%@",[model.guild isExist]?model.guild:@"无"];
weakSelf.joinGuildBtn.hidden = ![model.guild isExist];
[weakSelf.upSeatBtn setTitle:model.is_in_pit.intValue==1?QXText(@"下麦"):QXText(@"抱麦") forState:(UIControlStateNormal)];
[weakSelf.moreGiftBtn setTitle:[NSString localizedStringWithFormat:QXText(@"90天内累计收到%@个礼物"),model.gift_num] forState:(UIControlStateNormal)];
[weakSelf.moreGiftBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:2];
weakSelf.introduceLabel.text = model.profile;
[weakSelf.relationTableView reloadData];
// if (model.red_status.intValue == 1 && ![weakSelf.userId isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) {
// weakSelf.remindBtn.hidden = NO;
// }
UIButton *followBtn = [self viewWithTag:303];
if (model.is_follow.intValue == 1) {
[followBtn setTitle:QXText(@"已关注") forState:(UIControlStateNormal)];
// [self.focusBtn setTitle:QXText(@"已关注") forState:(UIControlStateNormal)];
weakSelf.focusBtn.selected = YES;
}else{
[followBtn setTitle:QXText(@"关注") forState:(UIControlStateNormal)];
// [self.focusBtn setTitle:QXText(@"+ 关注") forState:(UIControlStateNormal)];
weakSelf.focusBtn.selected = NO;
}
if ([weakSelf.userId isEqualToString:[QXGlobal shareGlobal].loginModel.user_id] && model.is_in_pit.intValue==1) {
@@ -827,37 +868,44 @@
}];
}else if (sender == self.moreGiftBtn){
// [self.giftWallView showInView:self.viewController.view];
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
[self hide];
QXGiftWallViewController *vc = [[QXGiftWallViewController alloc] init];
NSString *userId = self.userId;
vc.user_id = userId;
vc.isGiftWall = YES;
vc.userId = userId;
// vc.isGiftWall = YES;
[self.viewController.navigationController pushViewController:vc animated:YES];
}else if(sender == self.reportBtn){
[self reprortAction];
}else if(sender == self.remindBtn){
QXDirectSetScaleView *scaleView = [[QXDirectSetScaleView alloc] init];
scaleView.userId = self.userId;
scaleView.isGiveCoin = YES;
for (UIWindow *w in [UIApplication sharedApplication].windows) {
if ([w isKeyWindow]) {
[scaleView showInView:w];
break;
}
}
}
// else if(sender == self.remindBtn){
// ///
// QXDirectSetScaleView *scaleView = [[QXDirectSetScaleView alloc] init];
// scaleView.userId = self.userId;
// scaleView.isGiveCoin = YES;
// for (UIWindow *w in [UIApplication sharedApplication].windows) {
// if ([w isKeyWindow]) {
// [scaleView showInView:w];
// break;
// }
// }
// }
}
-(void)btnEventAction:(UIButton*)sender{
if (self.userModel == nil) {
return;
}
// if (sender.tag == 301) {
if (sender.tag == 303) {
if (sender == self.joinGuildBtn) {
QXLOG(@"加入公会");
return;
}
if (sender == self.focusBtn) {
[QXDynamicNetwork followWithUserId:self.userId type:@"1" successBlock:^(NSDictionary * _Nonnull dict) {
if ([sender.titleLabel.text isEqualToString:QXText(@"关注")]) {
[sender setTitle:QXText(@"已关注") forState:(UIControlStateNormal)];
}else{
[sender setTitle:QXText(@"关注") forState:(UIControlStateNormal)];
}
// if ([sender.titleLabel.text isEqualToString:QXText(@"关注")]) {
// [sender setTitle:QXText(@"已关注") forState:(UIControlStateNormal)];
// }else{
// [sender setTitle:QXText(@"关注") forState:(UIControlStateNormal)];
// }
sender.selected = !sender.selected;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
@@ -869,30 +917,6 @@
}
// }
}
//-(UINib *)customCollectionViewCellNibForCycleScrollView:(SDCycleScrollView *)view{
// UINib *nib = [UINib nibWithNibName:@"QXUserInfoRelationCell" bundle:[NSBundle mainBundle]];
// return nib;
//}
//-(void)setupCustomCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index cycleScrollView:(SDCycleScrollView *)view{
// QXUserInfoRelationCell *relationCell = (QXUserInfoRelationCell*)cell;
//
//}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (!self.isRealLove) {
QXUserInfoRelationCardCell *cell = [QXUserInfoRelationCardCell cellWithTableView:tableView];
cell.isList = NO;
cell.model = self.userModel.qinmi;
return cell;
}else{
QXUserInfoRelationTableCell *cell = [QXUserInfoRelationTableCell cellWithTableView:tableView];
cell.isList = NO;
cell.model = self.userModel.zhenai;
return cell;
}
}
-(void)showInView:(UIView *)view{
@@ -923,11 +947,6 @@
return _giftWallView;
}
-(QXUserRelationListView *)relationView{
if (!_relationView) {
_relationView = [[QXUserRelationListView alloc] initWithFrame:UIScreen.mainScreen.bounds];
}
return _relationView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXUserCpCardView.h
// QXLive
//
// Created by 启星 on 2025/11/19.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXUserCpCardView : UIView
@property (nonatomic,strong)QXUserCpInfoModel *model;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,157 @@
//
// QXUserCpCardView.m
// QXLive
//
// Created by on 2025/11/19.
//
#import "QXUserCpCardView.h"
@interface QXUserCpCardView()
@property (nonatomic,strong)UIImageView *bgImageView;
@property (nonatomic,strong)UIImageView *cpTagImageView;
@property (nonatomic,strong)UILabel *cpTagLabel;
@property (nonatomic,strong)UIImageView *levelImageView;
@property (nonatomic,strong)UILabel *levelLabel;
@property (nonatomic,strong)UIImageView *heartImageView;
@property (nonatomic,strong)UILabel *levelValueLabel;
@property (nonatomic,strong)QXSeatHeaderView *leftHeaderImageView;
@property (nonatomic,strong)UILabel *leftNameLabel;
@property (nonatomic,strong)QXSeatHeaderView *rightHeaderImageView;
@property (nonatomic,strong)UILabel *righttNameLabel;
@end
@implementation QXUserCpCardView
- (instancetype)init
{
self = [super init];
if (self) {
[self initSubviews];
}
return self;
}
-(void)initSubviews{
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_cp_bg"]];
[self addSubview:self.bgImageView];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
self.cpTagImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_cp_tag_icon"]];
[self addSubview:self.cpTagImageView];
[self.cpTagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.equalTo(self);
make.width.mas_equalTo(ScaleWidth(42));
make.height.mas_equalTo(ScaleWidth(18));
}];
self.cpTagLabel = [[UILabel alloc] init];
self.cpTagLabel.font = [UIFont systemFontOfSize:12];
self.cpTagLabel.textColor = RGB16A(0xFFFFFF,0.78);
self.cpTagLabel.text = @"CP";
[self addSubview:self.cpTagLabel];
[self.cpTagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self.cpTagImageView);
}];
self.levelImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_cp_level_bg"]];
[self addSubview:self.levelImageView];
[self.levelImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(4);
make.centerX.equalTo(self);
make.width.mas_equalTo(ScaleWidth(121));
make.height.mas_equalTo(ScaleWidth(28));
}];
self.levelLabel = [[UILabel alloc] init];
self.levelLabel.font = [UIFont boldSystemFontOfSize:12];
self.levelLabel.textColor = RGB16(0xFFEAB9);
[self addSubview:self.levelLabel];
[self.levelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self.levelImageView);
}];
self.heartImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_cp_center_heart"]];
[self addSubview:self.heartImageView];
[self.heartImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self);
make.centerY.equalTo(self).offset(ScaleWidth(2));
make.width.mas_equalTo(ScaleWidth(116));
make.height.mas_equalTo(ScaleWidth(26));
}];
self.levelValueLabel = [[UILabel alloc] init];
self.levelValueLabel.font = [UIFont systemFontOfSize:14];
self.levelValueLabel.textColor = RGB16(0xFF0088);
[self addSubview:self.levelValueLabel];
[self.levelValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(-13);
make.height.mas_equalTo(21);
make.centerX.equalTo(self);
}];
self.leftHeaderImageView = [[QXSeatHeaderView alloc] init];
[self.leftHeaderImageView addRoundedCornersWithRadius:ScaleWidth(51)/2];
self.leftHeaderImageView.layer.borderWidth = 2;
self.leftHeaderImageView.layer.borderColor = RGB16(0xffffff).CGColor;
[self addSubview:self.leftHeaderImageView];
[self.leftHeaderImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(ScaleWidth(38));
make.width.height.mas_equalTo(ScaleWidth(51));
make.centerY.equalTo(self).offset(-10);
}];
self.leftNameLabel = [[UILabel alloc] init];
self.leftNameLabel.font = [UIFont systemFontOfSize:10];
self.leftNameLabel.textColor = RGB16(0x624E79);
[self addSubview:self.leftNameLabel];
[self.leftNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.leftHeaderImageView);
make.top.equalTo(self.leftHeaderImageView.mas_bottom).offset(5);
make.height.mas_equalTo(12);
}];
self.rightHeaderImageView = [[QXSeatHeaderView alloc] init];
[self.rightHeaderImageView addRoundedCornersWithRadius:ScaleWidth(51)/2];
self.rightHeaderImageView.layer.borderWidth = 2;
self.rightHeaderImageView.layer.borderColor = RGB16(0xffffff).CGColor;
[self addSubview:self.rightHeaderImageView];
[self.rightHeaderImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-38);
make.width.height.mas_equalTo(ScaleWidth(51));
make.centerY.equalTo(self).offset(-10);
}];
self.righttNameLabel = [[UILabel alloc] init];
self.righttNameLabel.font = [UIFont systemFontOfSize:10];
self.righttNameLabel.textColor = RGB16(0x624E79);
[self addSubview:self.righttNameLabel];
[self.righttNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.rightHeaderImageView);
make.top.equalTo(self.rightHeaderImageView.mas_bottom).offset(5);
make.height.mas_equalTo(12);
}];
}
-(void)setModel:(QXUserCpInfoModel *)model{
_model = model;
if ([model.user_info1.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
[self.leftHeaderImageView setHeadIcon:model.user_info1.avatar dress:model.user_info1.dress];
[self.rightHeaderImageView setHeadIcon:model.user_info2.avatar dress:model.user_info2.dress];
self.leftNameLabel.text = model.user_info1.nickname;
self.righttNameLabel.text = model.user_info2.nickname;
}else{
[self.leftHeaderImageView setHeadIcon:model.user_info2.avatar dress:model.user_info2.dress];
[self.rightHeaderImageView setHeadIcon:model.user_info1.avatar dress:model.user_info1.dress];
self.leftNameLabel.text = model.user_info2.nickname;
self.righttNameLabel.text = model.user_info1.nickname;
}
self.levelLabel.text = [NSString stringWithFormat:@"LV%@ %@",model.level,model.name];
self.levelValueLabel.text = [NSString qx_showHotCountNum:model.exp.longLongValue];
// self.cpTagLabel.text = model.name;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXUserCpDressView.h
// QXLive
//
// Created by 启星 on 2025/11/19.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXUserCpDressView : UIView
@property (nonatomic,strong)QXUserCpInfoModel *model;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,238 @@
//
// QXUserCpDressView.m
// QXLive
//
// Created by on 2025/11/19.
//
#import "QXUserCpDressView.h"
#import "QXEffectSvgaView.h"
#import "QGVAPWrapView.h"
#import "UIView+VAP.h"
#import "QXFileManager.h"
@interface QXUserCpDressView()<VAPWrapViewDelegate>
@property (nonatomic,strong)QXEffectSvgaView *svgaView;
@property (nonatomic,strong)QGVAPWrapView *mp4View;
@property (nonatomic,strong)UIImageView *headerView1;
@property (nonatomic,strong)UIImageView *headerView2;
@property (nonatomic,strong) NSString *videoPath;
@end
@implementation QXUserCpDressView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubviews];
}
return self;
}
-(void)initSubviews{
self.headerView1 = [[UIImageView alloc] init];
self.headerView1.contentMode = UIViewContentModeScaleAspectFill;
[self.headerView1 addRoundedCornersWithRadius:ScaleWidth(30)/2];
[self addSubview:self.headerView1];
self.headerView2 = [[UIImageView alloc] init];
self.headerView2.contentMode = UIViewContentModeScaleAspectFill;
[self.headerView2 addRoundedCornersWithRadius:ScaleWidth(30)/2];
[self addSubview:self.headerView2];
self.svgaView = [[QXEffectSvgaView alloc] initWithFrame:CGRectMake(ScaleWidth(15),ScaleWidth(15), self.width-ScaleWidth(30), self.height-ScaleWidth(30)) isAutoPlay:YES];
self.svgaView.hidden = YES;
[self addSubview:self.svgaView];
self.mp4View = [[QGVAPWrapView alloc] initWithFrame:CGRectMake(ScaleWidth(15),ScaleWidth(15), self.width-ScaleWidth(30), self.height-ScaleWidth(30))];
self.mp4View.hidden = YES;
// self.mp4View.ap
self.mp4View.hwd_enterBackgroundOP = HWDMP4EBOperationTypeDoNothing;
self.mp4View.contentMode = QGVAPWrapViewContentModeScaleToFill;
self.mp4View.userInteractionEnabled = NO;
self.mp4View.backgroundColor = [UIColor clearColor];
self.mp4View.hidden = YES;
[self addSubview:self.mp4View];
}
-(void)setModel:(QXUserCpInfoModel *)model{
_model = model;
if ([model.user_info1.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
[self.headerView1 sd_setImageWithURL:[NSURL URLWithString:model.user_info1.avatar]];
[self.headerView2 sd_setImageWithURL:[NSURL URLWithString:model.user_info2.avatar]];
}else{
[self.headerView1 sd_setImageWithURL:[NSURL URLWithString:model.user_info2.avatar]];
[self.headerView2 sd_setImageWithURL:[NSURL URLWithString:model.user_info1.avatar]];
}
[self displayDressWithDressUrl:model.pendant];
if (model.direction.intValue == 0) {
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self).offset(ScaleWidth(30));
make.centerX.equalTo(self).offset(-(ScaleWidth(15)+4));
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerView1);
make.left.equalTo(self.headerView1.mas_right).offset(8);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 1) {
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self).offset(0);
make.top.equalTo(self).offset(ScaleWidth(30));
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerView1.mas_bottom).offset(8);
make.right.equalTo(self.headerView1);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 2) {
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self).offset(0);
make.centerY.equalTo(self).offset(-(ScaleWidth(15)+4));
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerView1.mas_bottom).offset(8);
make.right.equalTo(self.headerView1);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 3) {
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self).offset(-ScaleWidth(30));
make.right.equalTo(self).offset(0);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.headerView2);
make.bottom.equalTo(self.headerView2.mas_top).offset(-8);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 4) {
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self).offset(-ScaleWidth(30));
make.centerX.equalTo(self).offset(-(ScaleWidth(15)+4));
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerView1);
make.left.equalTo(self.headerView1.mas_right).offset(8);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 5) {
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self).offset(-ScaleWidth(30));
make.left.equalTo(self).offset(0);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.headerView2);
make.bottom.equalTo(self.headerView2.mas_top).offset(-8);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 6) {
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self).offset(0);
make.centerY.equalTo(self).offset(-(ScaleWidth(15)+4));
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerView1.mas_bottom).offset(8);
make.right.equalTo(self.headerView1);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}else if (model.direction.intValue == 7) {
[self.headerView1 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self).offset(0);
make.top.equalTo(self).offset(ScaleWidth(30));
make.width.height.mas_equalTo(ScaleWidth(30));
}];
[self.headerView2 mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.headerView1.mas_bottom).offset(8);
make.left.equalTo(self.headerView1);
make.width.height.mas_equalTo(ScaleWidth(30));
}];
return;
}
}
-(void)displayDressWithDressUrl:(NSString*)dressUrl{
if (dressUrl.length > 0 && ([dressUrl hasPrefix:@"http"] || [dressUrl hasPrefix:@"https"])) {
if ([dressUrl isExist]) {
if ([dressUrl hasSuffix:@"svga"]) {
[self.svgaView setHidden:NO];
[self.mp4View stopHWDMP4];
[self.mp4View setHidden:YES];
[self.svgaView destroySvga];
[self.svgaView loadSVGAPlayerWith:dressUrl inBundle:NO loop:INTMAX_MAX];
}else if ([dressUrl hasSuffix:@"mp4"]){
[self.svgaView setHidden:YES];
[self.mp4View setHidden:NO];
[self.mp4View stopHWDMP4];
MJWeakSelf
[[QXRequset shareInstance] downloadVideoPlayerWithUrl:dressUrl completion:^(BOOL result, NSString * _Nonnull fileName) {
NSString *videoPath = [QXFileManager getGiftVideoPath:dressUrl.lastPathComponent];
weakSelf.videoPath = videoPath;
[weakSelf.mp4View setMute:YES];
// videoPath = [[NSBundle mainBundle] pathForResource:@"4150" ofType:@"mp4"];
[weakSelf.mp4View playHWDMP4:videoPath repeatCount:INTMAX_MAX delegate:self];
}];
}else{
[self.mp4View stopHWDMP4];
[self.svgaView destroySvga];
[self.svgaView setHidden:YES];
[self.mp4View setHidden:YES];
}
} else {
[self.mp4View stopHWDMP4];
[self.svgaView destroySvga];
[self.svgaView setHidden:YES];
[self.mp4View setHidden:YES];
}
}
}
-(void)stopHWDMP4{
if (![self.model.pendant isExist]) {
return;
}
[self.mp4View stopHWDMP4];
}
-(void)playHWDMP4{
if (![self.model.pendant isExist]) {
return;
}
[self.mp4View playHWDMP4:self.videoPath repeatCount:INTMAX_MAX delegate:self];
}
//- (QXEffectSvgaView *)svgaView {
// if (!_svgaView) {
// _svgaView = [[QXEffectSvgaView alloc] initWithFrame:CGRectZero isAutoPlay:YES];
// _svgaView.hidden = YES;
// }
// return _svgaView;
//}
//- (QGVAPWrapView *)mp4View {
// if (!_mp4View) {
// _mp4View = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
// _mp4View.hwd_enterBackgroundOP = HWDMP4EBOperationTypeDoNothing;
// _mp4View.contentMode = UIViewContentModeScaleAspectFill;
// _mp4View.userInteractionEnabled = NO;
// _mp4View.backgroundColor = [UIColor clearColor];
// _mp4View.hidden = YES;
// }
// return _mp4View;
//}
@end

View File

@@ -10,7 +10,7 @@
typedef NS_ENUM(NSInteger) {
/// 房间类型
/// 点唱
/// 聊天
QXRoomSettingTypeRoomTypeSing = 10,
/// 拍卖房
QXRoomSettingTypeRoomTypeAuction = 11,
@@ -24,6 +24,8 @@ typedef NS_ENUM(NSInteger) {
QXRoomSettingTypeRoomTypeFunny = 100,
/// 练歌房
QXRoomSettingTypeRoomTypeKSing = 200,
/// 点唱房
QXRoomSettingTypeRoomTypeSinger = 300,
/// 常用工具
/// 房间补贴

View File

@@ -44,6 +44,8 @@
@property (nonatomic,strong)QXRoomSettingModel *roomTypeFunny;
///
@property (nonatomic,strong)QXRoomSettingModel *roomTypeKSing;
///
@property (nonatomic,strong)QXRoomSettingModel *roomTypeSinger;
@@ -174,6 +176,7 @@
NSArray *roomTypeArr;
NSArray *toolsArr;
NSArray *moreArr;
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFriend,self.roomTypeKSing,self.roomTypeSinger];
switch (roleType) {
//
case QXRoomRoleTypeCompere:{
@@ -181,13 +184,11 @@
// toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgImage];
///
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend,self.roomTypeKSing];
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
}else{
// toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
///
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
}
@@ -219,7 +220,6 @@
///
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
}
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend,self.roomTypeKSing];
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
@@ -243,7 +243,6 @@
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
}
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend,self.roomTypeKSing];
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
}
@@ -325,7 +324,14 @@
// [self.welcomeView showInView:self.viewController.view];
return;
}
if (model.type == QXRoomSettingTypeRoomTypeAuction || model.type == QXRoomSettingTypeRoomTypeSing || model.type == QXRoomSettingTypeRoomTypeBoy || model.type == QXRoomSettingTypeRoomTypeGirl || model.type == QXRoomSettingTypeRoomTypeFriend || model.type == QXRoomSettingTypeRoomTypeFunny || model.type == QXRoomSettingTypeRoomTypeKSing) {
if (model.type == QXRoomSettingTypeRoomTypeAuction
|| model.type == QXRoomSettingTypeRoomTypeSing
|| model.type == QXRoomSettingTypeRoomTypeBoy
|| model.type == QXRoomSettingTypeRoomTypeGirl
|| model.type == QXRoomSettingTypeRoomTypeFriend
|| model.type == QXRoomSettingTypeRoomTypeFunny
|| model.type == QXRoomSettingTypeRoomTypeKSing
|| model.type == QXRoomSettingTypeRoomTypeSinger) {
self.alertView.message = [NSString stringWithFormat:@"您确定要修改为%@房吗?",model.name];
[[QXGlobal shareGlobal] showView:self.alertView controller:self.viewController popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
@@ -364,6 +370,8 @@
type = @"7";
}else if (roomType == QXRoomSettingTypeRoomTypeFunny) {
type = @"8";
}else if (roomType == QXRoomSettingTypeRoomTypeSinger) {
type = @"9";
}
[QXMineNetwork changeRoomTypeWithRoomId:self.roomModel.room_info.room_id type:type successBlock:^(NSDictionary * _Nonnull dict) {
@@ -391,9 +399,9 @@
-(QXRoomSettingModel *)roomTypeSing{
if (!_roomTypeSing) {
_roomTypeSing = [[QXRoomSettingModel alloc] init];
_roomTypeSing.name = QXText(@"点唱");
_roomTypeSing.name = QXText(@"交友");
_roomTypeSing.type = QXRoomSettingTypeRoomTypeSing;
_roomTypeSing.icon = @"room_set_room_type_sing";
_roomTypeSing.icon = @"room_set_room_type_funny";
}
return _roomTypeSing;
}
@@ -452,6 +460,16 @@
}
return _roomTypeFunny;
}
-(QXRoomSettingModel *)roomTypeSinger{
if (!_roomTypeSinger) {
_roomTypeSinger = [[QXRoomSettingModel alloc] init];
_roomTypeSinger.name = QXText(@"点唱");
_roomTypeSinger.type = QXRoomSettingTypeRoomTypeSinger;
_roomTypeSinger.icon = @"room_set_room_type_sing";
}
return _roomTypeSinger;
}
-(QXRoomSettingModel *)roomSubsidy{
if (!_roomSubsidy) {
_roomSubsidy = [[QXRoomSettingModel alloc] init];

View File

@@ -42,15 +42,25 @@ NS_ASSUME_NONNULL_BEGIN
/// 是否展示离线状态 需求暂定二卡八不展示离线状态
@property (nonatomic,assign)BOOL noOffLine;
//@property (nonatomic,strong)QXRoomOwnerModel *userModel ;
@property (nonatomic,assign)NSString *tagViewBgColor;
@property (nonatomic,assign)CGFloat nameToHeaderSpace;
@property (nonatomic,assign)CGFloat charmToNameSpace;
@property (nonatomic,assign)CGFloat nameFontSize;
/// name是否超出显示
@property (nonatomic,assign)BOOL nameBeyound;
-(void)updateUserCharm:(NSString*)charm;
- (void)startAudioAnimation ;
/// 暂停麦位动画
- (void)stopAudioAnimation ;
/// 隐藏魅力
-(void)hideCharm;
/// 隐藏名称
-(void)hideName;
-(void)destroyViews;

View File

@@ -282,16 +282,21 @@
-(void)setTagString:(NSString *)tagString{
_tagString = tagString;
self.tagLabel.hidden = NO;
self.numberLabel.hidden = YES;
self.tagLabel.text = tagString;
[self.tagLabel sizeToFit];
[self.tagLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.noUserImageView);
make.top.equalTo(self.noUserImageView.mas_bottom).offset(-8);
make.height.mas_equalTo(ScaleWidth(13));
make.width.mas_equalTo(self.tagLabel.width+16);
}];
if ([tagString isExist]) {
self.tagLabel.hidden = NO;
self.numberLabel.hidden = YES;
self.tagLabel.text = tagString;
[self.tagLabel sizeToFit];
[self.tagLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.noUserImageView);
make.top.equalTo(self.noUserImageView.mas_bottom).offset(-8);
make.height.mas_equalTo(ScaleWidth(13));
make.width.mas_equalTo(self.tagLabel.width+16);
}];
}else{
self.tagLabel.hidden = YES;
}
}
-(void)setType:(QXRoomSeatContentViewType)type{
_type = type;
@@ -448,12 +453,56 @@
self.lockImageView.hidden = YES;
}
}
-(void)hideName{
self.numberLabel.hidden = YES;
self.nameLabel.hidden = YES;
}
-(void)setIsAutionSeat:(BOOL)isAutionSeat{
_isAutionSeat = isAutionSeat;
self.noUserImageView.image = [UIImage imageNamed:@"room_seat_auction_icon"];
self.charmBgView.hidden = YES;
}
-(void)setTagViewBgColor:(NSString *)tagViewBgColor{
_tagViewBgColor = tagViewBgColor;
self.tagLabel.backgroundColor = [UIColor colorWithHexString:tagViewBgColor];
}
-(void)setNameToHeaderSpace:(CGFloat)nameToHeaderSpace{
_nameToHeaderSpace = nameToHeaderSpace;
[self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.noUserImageView.mas_bottom).offset(nameToHeaderSpace);
}];
}
-(void)setCharmToNameSpace:(CGFloat)charmToNameSpace{
_charmToNameSpace = charmToNameSpace;
[self.charmBgView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.nameLabel.mas_bottom).offset(charmToNameSpace);
}];
}
-(void)setNameFontSize:(CGFloat)nameFontSize{
self.nameLabel.font = [UIFont systemFontOfSize:nameFontSize];
}
-(void)setNameBeyound:(BOOL)nameBeyound{
_nameBeyound = nameBeyound;
if (nameBeyound) {
[self.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.noUserImageView.mas_bottom).offset(self.nameToHeaderSpace);
make.centerX.equalTo(self.noUserImageView);
make.height.mas_equalTo(18);
}];
}else{
[self.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.noUserImageView.mas_bottom).offset(5);
make.height.mas_equalTo(18);
make.left.right.equalTo(self);
}];
}
}
-(void)setNumberString:(NSString *)numberString{
self.numberLabel.text = numberString;
}

View File

@@ -0,0 +1,65 @@
//
// QXRoomSeatTypeSingerView.h
// QXLive
//
// Created by 启星 on 2025/11/12.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXRoomSeatTypeSingerView : UIView
@property (nonatomic,weak)id<QXRoomSeatDelegate>delegate;
@property (nonatomic,assign)NSInteger myPitNumber;
@property (nonatomic,strong)QXRoomSeatContentView* mySeatView;
@property (nonatomic,strong)QXRoomModel *roomModel;
/// 上下麦
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
/// 清除魅力
-(void)clearCharm;
/// 清除个人魅力
-(void)roomClearUserCharmWithUserId:(NSString *)userId;
/// 设置魅力
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model;
/// 设置多人魅力
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
/// 设置麦位锁麦状态
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber;
/// 房间内用户信息发生变化
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user;
/// 房间内换麦
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK;
/// 点唱房当前歌曲信息发生变化
-(void)singerSongCurrentSongInfoDidChanged:(QXUserSongListModel*)model;
/// 点唱房下一首歌信息发生变化
-(void)singerSongNextSongInfoDidChanged:(QXUserSongListModel*)model;
/// 已点歌曲数量发生变化
-(void)singerSongCountDidChanged:(NSString*)count;
-(void)stopHWDMP4;
-(void)playHWDMP4;
-(void)destroyViews;
@end
@interface QXRoomSeatTypeSingerCompereView : UIView
@property (nonatomic,strong)UIImageView *bgImageView;
@property (nonatomic,strong)UIButton *contentViewNoBodyBtn;
@property (nonatomic,strong)QXRoomSeatContentView *contentView;
@property (nonatomic,strong)UIImageView *iconImageView;
@property (nonatomic,strong)UIImageView *nextHeaderImageView;
@property (nonatomic,strong)UILabel *nextTitleLabel;
@property (nonatomic,strong)UILabel *nextNameLabel;
@property (nonatomic,strong)QXRoomPitModel *model;
/// 是否为主持
@property (nonatomic,assign)BOOL isCompere;
@property (nonatomic,copy)void(^upSeatBlock)(void);
-(void)destroyViews;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,757 @@
//
// QXRoomSeatTypeSingerView.m
// QXLive
//
// Created by on 2025/11/12.
//
#import "QXRoomSeatTypeSingerView.h"
#import "QXRoomSeatContentView.h"
#import "QXRoomSeatSettingView.h"
#import "QXMineNetwork.h"
#import "QXSingerSongListView.h"
@interface QXRoomSeatTypeSingerView()<QXRoomSeatDelegate>
@property (nonatomic,strong)QXRoomSeatSettingView *settingView;
@property (nonatomic,strong)QXRoomSeatTypeSingerCompereView *compereView;
@property (nonatomic,strong)QXRoomSeatTypeSingerCompereView *nextView;
@property (nonatomic,strong)UIView *singerContentView;
@property (nonatomic,strong)UIImageView *singerBgImageView;
@property (nonatomic,strong)QXRoomSeatContentView *bossView;
@property (nonatomic,strong)QXRoomSeatContentView *singerView;
@property (nonatomic,strong)UIButton *nextBtn;
@property (nonatomic,strong)UIButton *songBtn;
@property (nonatomic,strong)UIImageView *songInfoBgImageView;
@property (nonatomic,strong)UILabel *songInfoLabel;
@property (nonatomic,strong)NSMutableArray* seatArray;
@property (nonatomic,strong)QXSingerSongListView *songListView;
@end
@implementation QXRoomSeatTypeSingerView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubviews];
}
return self;
}
-(void)initSubviews{
self.singerContentView = [[UIView alloc] init];
[self addSubview:self.singerContentView];
[self.singerContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self);
make.width.mas_equalTo(ScaleWidth(253));
make.height.mas_equalTo(ScaleWidth(164)+20);
make.centerX.equalTo(self);
}];
self.compereView = [[QXRoomSeatTypeSingerCompereView alloc] initWithFrame:CGRectMake(0, 28, 98, 78)];
self.compereView.contentView.delegate = self;
self.compereView.contentView.number = 9;
self.compereView.isCompere = YES;
MJWeakSelf
self.compereView.upSeatBlock = ^{
[weakSelf upseatCompere];
};
[self addSubview:self.compereView];
self.nextView = [[QXRoomSeatTypeSingerCompereView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-98, 28, 98, 78)];
self.nextView.isCompere = NO;
self.nextView.hidden = YES;
[self.nextView addTapBlock:^(id _Nonnull obj) {
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickUserHeaderWithPitModel:userModel:isPkRoom:pkRoomId:isNoTakeOff:)]) {
[weakSelf.delegate didClickUserHeaderWithPitModel:weakSelf.nextView.model userModel:nil isPkRoom:NO pkRoomId:@"" isNoTakeOff:NO];
}
}];
[self addSubview:self.nextView];
self.singerBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_type_singer_singer_bg"]];
[self.singerContentView addSubview:self.singerBgImageView];
[self.singerBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(10);
make.left.right.equalTo(self.singerContentView);
make.bottom.mas_equalTo(-10);
}];
self.bossView = [[QXRoomSeatContentView alloc] init];
self.bossView.tagString = @"老板";
self.bossView.delegate = self;
self.bossView.number = 10;
self.bossView.tagViewBgColor = @"#04040473";
[self.bossView hideCharm];
[self.bossView hideName];
[self.singerContentView addSubview:self.bossView];
[self.bossView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.singerContentView);
make.width.mas_equalTo(46);
make.height.mas_equalTo(46-10+30);
make.right.mas_equalTo(-ScaleWidth(52));
}];
self.singerView = [[QXRoomSeatContentView alloc] init];
[self.singerView hideCharm];
[self.singerView hideName];
self.singerView.noUserImageView.image = [UIImage imageNamed:@"room_seat_singer"];
self.singerView.delegate = self;
[self.singerContentView addSubview:self.singerView];
[self.singerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(ScaleWidth(63));
make.height.mas_equalTo(ScaleWidth(63));
make.centerX.centerY.equalTo(self.singerContentView);
}];
self.nextBtn = [[UIButton alloc] init];
[self.nextBtn setBackgroundImage:[UIImage imageNamed:@"room_type_singer_next_btn"] forState:(UIControlStateNormal)];
self.nextBtn.hidden = YES;
[self.singerContentView addSubview:self.nextBtn];
[self.nextBtn addTarget:self action:@selector(nextAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.singerContentView);
make.bottom.mas_equalTo(-15);
make.width.mas_equalTo(ScaleWidth(80));
make.height.mas_equalTo(ScaleWidth(38));
}];
self.songBtn = [[UIButton alloc] init];
[self.songBtn setBackgroundImage:[UIImage imageNamed:@"room_type_singer_song_btn"] forState:(UIControlStateNormal)];
[self.singerContentView addSubview:self.songBtn];
[self.songBtn addTarget:self action:@selector(songAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.songBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.singerContentView);
make.bottom.mas_equalTo(-15);
make.width.mas_equalTo(ScaleWidth(80));
make.height.mas_equalTo(ScaleWidth(38));
}];
self.songInfoBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"singer_song_name_bg"]];
[self.singerContentView addSubview:self.songInfoBgImageView];
[self.songInfoBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.singerContentView);
make.bottom.equalTo(self.singerContentView);
make.height.mas_equalTo(24);
make.width.mas_equalTo(180);
}];
self.songInfoLabel = [[UILabel alloc] init];
self.songInfoLabel.font = [UIFont boldSystemFontOfSize:14];
self.songInfoLabel.textColor = RGB16(0xFFE100);
self.songInfoLabel.text = @"暂无歌曲";
self.songInfoLabel.textAlignment = NSTextAlignmentCenter;
[self.singerContentView addSubview:self.songInfoLabel];
[self.songInfoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.singerContentView);
make.bottom.equalTo(self.singerContentView);
make.height.mas_equalTo(24);
}];
NSInteger lineItemCount = 4;
CGFloat leftMargin = 20;
CGFloat topSpace = 0;
CGFloat seatWidth = ScaleWidth(60);
CGFloat seatHeight = ScaleWidth(60-10)+51;
CGFloat itemSpace = (SCREEN_WIDTH-leftMargin*2-seatWidth*lineItemCount)/(lineItemCount-1);
for (int i = 0 ; i < 8 ; i++) {
QXRoomSeatContentView *contentView = [[QXRoomSeatContentView alloc] init];
contentView.number = i+1;
contentView.noOffLine = NO;
contentView.noUserImageView.image = [UIImage imageNamed:@"room_seat_singer"];
contentView.delegate = self;
[self addSubview:contentView];
[contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.singerContentView.mas_bottom).offset(1+(seatHeight+topSpace)*(i/4));
make.left.equalTo(self).offset(leftMargin+(seatWidth+itemSpace)*(i%4));
make.size.mas_equalTo(CGSizeMake(seatWidth, seatHeight));
}];
[self.seatArray addObject:contentView];
}
[self.seatArray addObject:self.compereView.contentView];
// [self.seatArray addObject:self.bossView];
}
-(void)nextAction{
[QXMineNetwork requsetSongNextActionWithId:self.roomModel.singer_info.song_info.id successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"切歌成功");
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
-(void)songAction{
NSMutableArray *arr= [NSMutableArray array];
for (QXRoomSeatContentView*seatView in self.seatArray) {
if (seatView.pitModel.user_id.longLongValue > 0) {
if (![seatView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
[arr addObject:seatView.pitModel];
}
}
}
self.songListView.roomId = self.roomModel.room_info.room_id;
[self.songListView showInView:self.viewController.view pitArray:arr isCompere:self.myPitNumber==9];
}
-(void)configNextBtn{
if (self.myPitNumber == 9 || [self.roomModel.singer_info.song_info.singer_user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
self.nextBtn.hidden = NO;
}else{
self.nextBtn.hidden = YES;
}
}
-(void)configSingerSeat{
for (QXRoomSeatContentView*seatView in self.seatArray) {
if ([seatView.pitModel.user_id isEqualToString:self.roomModel.singer_info.song_info.singer_user_id]) {
seatView.tagString = @"演唱者";
}else{
seatView.tagString = @"";
}
}
}
-(void)setRoomModel:(QXRoomModel *)roomModel{
_roomModel = roomModel;
for (int i = 0 ; i < roomModel.room_info.pit_list.count;i++) {
QXRoomPitModel *pitModel = roomModel.room_info.pit_list[i];
if (i > self.seatArray.count -1) {
break;
}
QXRoomSeatContentView *contentView = self.seatArray[i];
contentView.pitModel = pitModel;
if ([pitModel.pit_number isEqualToString:@"9"]) {
if (pitModel.user_id.longLongValue > 0) {
self.compereView.contentView.hidden = NO;
self.compereView.contentViewNoBodyBtn.hidden = YES;
}else{
self.compereView.contentView.hidden = YES;
self.compereView.contentViewNoBodyBtn.hidden = NO;
}
}
}
[self singerSongCurrentSongInfoDidChanged:roomModel.singer_info.song_info];
[self singerSongNextSongInfoDidChanged:roomModel.singer_info.next_song_info];
self.myPitNumber = roomModel.user_info.pit_number.integerValue;
[self configNextBtn];
}
-(void)upseatCompere{
[QXMineNetwork roomUpSeatWithRoomId:self.roomModel.room_info.room_id pit_number:@"9" isUpSeat:YES successBlock:^(NSDictionary * _Nonnull dict) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
-(void)didClickUserHeaderWithPitModel:(QXRoomPitModel *)pitModel seatView:(QXRoomSeatContentView *)seatView{
NSString *pit_number = [NSString stringWithFormat:@"%ld",seatView.number] ;
QXLOG(@"点击了%ld麦位",seatView.number);
if (seatView.pitModel.user_id.longLongValue > 0) {
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickUserHeaderWithPitModel:userModel:isPkRoom:pkRoomId:isNoTakeOff:)]) {
[self.delegate didClickUserHeaderWithPitModel:seatView.pitModel userModel:nil isPkRoom:NO pkRoomId:@"" isNoTakeOff:NO];
}
}else{
if (seatView.number == 9) {
/// 9
[self upseatCompere];
return;
}else if (seatView.number == 10) {
// if (self.myPitNumber == 9 || self.roomModel.user_info.is_room_owner.intValue == 1 || self.roomModel.user_info.is_management.intValue == 1) {
// if (self.delegate && [self.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
// [self.delegate didHugSeatWithPitNumber:@"10"];
// }
// }else{
// showToast(@"请等待主持抱麦");
// }
showToast(@"暂无老板");
return;
}else{
if (self.myPitNumber == 9) {
MJWeakSelf
/// 9
QXRoomPitModel *pitModel = seatView.pitModel;
self.settingView.roomId = self.roomModel.room_info.room_id;
self.settingView.pitModel = pitModel;
self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
seatView.pitModel = pitModel;
// if (self.isPKMyRoom || self.isPKOtherRoom) {
// [seatView hideCharm];
// }
};
self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
// [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
[weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
}
};
[self.settingView showInView:self.viewController.view];
}else{
if (self.roomModel.room_info.room_up_pit_type.intValue == 2) {
///
[QXMineNetwork roomUpSeatWithRoomId:self.roomModel.room_info.room_id pit_number:pit_number isUpSeat:YES successBlock:^(NSDictionary * _Nonnull dict) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}else{
//
if (self.myPitNumber == 9 || self.roomModel.user_info.is_room_owner.intValue == 1 || self.roomModel.user_info.is_management.intValue == 1 || self.roomModel.user_info.is_host.intValue == 1) {
MJWeakSelf
/// 9
QXRoomPitModel *pitModel = seatView.pitModel;
self.settingView.roomId = self.roomModel.room_info.room_id;
self.settingView.pitModel = pitModel;
self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
seatView.pitModel = pitModel;
// if (self.isPKMyRoom || self.isPKOtherRoom) {
// [seatView hideCharm];
// }
};
self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
// [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
[weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
}
};
[self.settingView showInView:self.viewController.view];
}
}
}
}
}
}
-(void)previewRoomUserCharmListWithUserId:(NSString *)userId{
if (self.delegate && [self.delegate respondsToSelector:@selector(previewRoomUserCharmListWithUserId:)]) {
[self.delegate previewRoomUserCharmListWithUserId:userId];
}
}
-(void)clearCharm{
for (QXRoomSeatContentView *seatView in self.seatArray) {
QXRoomPitModel *model = seatView.pitModel;
model.charm = @"0";
// seatView.pitModel = model;
[seatView updateUserCharm:model.charm];
// if (self.isPKMyRoom || self.isPKOtherRoom) {
// [seatView hideCharm];
// }
}
}
-(void)roomClearUserCharmWithUserId:(NSString *)userId{
for (QXRoomSeatContentView *seatView in self.seatArray) {
QXRoomPitModel *model = seatView.pitModel;
if ([model.user_id isEqualToString:userId]) {
model.charm = @"0";
// seatView.pitModel = model;
[seatView updateUserCharm:model.charm];
break;
}
// if (self.isPKMyRoom || self.isPKOtherRoom) {
// [seatView hideCharm];
// }
}
}
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model{
for (QXRoomSeatContentView *seatView in self.seatArray) {
QXRoomPitModel *md = seatView.pitModel;
if ([model.user_id isEqualToString:md.user_id]) {
// md.charm = model.charm;
// seatView.pitModel = md;
[seatView updateUserCharm:model.charm];
// if (self.isPKMyRoom || self.isPKOtherRoom) {
// [seatView hideCharm];
// }
break;
}
}
}
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
for (QXUserHomeModel*model in users) {
[self setSeatCharmWithUser:model];
}
}
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
if (fromPitNumber == 0 || toPitNumber == 0) {
return;
}
QXRoomSeatContentView *fromSeatView = self.seatArray[fromPitNumber-1];
QXRoomSeatContentView *toSeatView = self.seatArray[toPitNumber-1];
QXRoomPitModel *fromPitModel = fromSeatView.pitModel;
QXRoomPitModel *totModel = toSeatView.pitModel;
if (toPitNumber == 9) {
self.compereView.contentView.hidden = NO;
self.compereView.contentViewNoBodyBtn.hidden = YES;
}else{
self.compereView.contentView.hidden = YES;
self.compereView.contentViewNoBodyBtn.hidden = NO;
}
NSString* tmpPitNum = [NSString stringWithFormat:@"%@",fromPitModel.pit_number];
fromPitModel.pit_number = totModel.pit_number;
totModel.pit_number = tmpPitNum;
NSMutableArray*arr = [NSMutableArray arrayWithArray:self.roomModel.room_info.pit_list];
if (toPitNumber <= arr.count) {
[arr exchangeObjectAtIndex:fromPitNumber-1 withObjectAtIndex:toPitNumber-1];
}
self.roomModel.room_info.pit_list = arr;
toSeatView.pitModel = fromPitModel;
fromSeatView.pitModel = totModel;
if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
self.myPitNumber = toPitNumber;
}
[self configNextBtn];
[self configSingerSeat];
// ///
// for (UIView *view in self.seatArray) {
// ///
// if ([view isKindOfClass:[QXRoomSeatContentView class]]) {
// QXRoomSeatContentView *seatView = (QXRoomSeatContentView*)view;
// /// idid
// if ([userInfo.user_id isEqualToString:seatView.pitModel.user_id]) {
// ///
// if (seatView.pitModel.pit_number.intValue != toPitNumber) {
// ///
// QXRoomPitModel *model = seatView.pitModel;
// model.user_id = @"0";
// model.avatar = @"";
// model.dress = @"";
// model.sex = @"";
// model.nickname = @"";
// model.user_code = @"";
// model.charm = @"";
// seatView.pitModel = model;
// }
// }
// }
// }
}
-(void)setSeatIsLock:(NSString *)isLock pitNumber:(NSString *)pitNumber{
NSInteger pit_number = pitNumber.integerValue;
QXRoomSeatContentView *contentView = self.seatArray[pit_number-1];
contentView.is_lock = isLock;
}
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{
for (QXRoomSeatContentView *seatView in self.seatArray) {
QXRoomPitModel *md = seatView.pitModel;
if ([user.user_id isEqualToString:md.user_id]) {
md.dress = user.dress;
md.nickname = user.nickname;
md.sex = user.sex;
md.avatar = user.avatar;
md.nobility_image = user.nobility_image;
md.nickname_color = user.nickname_color;
md.mic_cycle = user.mic_cycle;
seatView.pitModel = md;
break;
}
}
}
///
-(void)singerSongCurrentSongInfoDidChanged:(QXUserSongListModel*)model{
self.roomModel.singer_info.song_info = model;
QXRoomPitModel *bossPitModel = self.bossView.pitModel;
if (bossPitModel==nil) {
bossPitModel = [[QXRoomPitModel alloc] init];
}
QXRoomPitModel *singerPitModel = self.singerView.pitModel;
if (singerPitModel==nil) {
singerPitModel = [[QXRoomPitModel alloc] init];
}
if (model) {
bossPitModel.nickname = model.boss_nickname;
bossPitModel.avatar = model.boss_avatar;
bossPitModel.mic_cycle = model.boss_mic_cycle;
bossPitModel.user_id = model.boss_user_id;
bossPitModel.dress = model.boss_dress;
singerPitModel.nickname = model.singer_nickname;
singerPitModel.avatar = model.singer_avatar;
singerPitModel.mic_cycle = model.singer_mic_cycle;
singerPitModel.user_id = model.singer_user_id;
singerPitModel.dress = model.singer_dress;
self.songInfoLabel.text = [NSString stringWithFormat:@"演唱歌曲:%@",model.song_name];
}else{
bossPitModel.nickname = @"";
bossPitModel.mic_cycle = @"";
bossPitModel.user_id = @"0";
bossPitModel.avatar = @"";
bossPitModel.dress = @"";
singerPitModel.nickname = @"";
singerPitModel.mic_cycle = @"";
singerPitModel.user_id = @"0";
singerPitModel.avatar = @"";
singerPitModel.dress = @"";
self.songInfoLabel.text = [NSString stringWithFormat:@"暂无歌曲"];
}
self.bossView.pitModel = bossPitModel;
self.singerView.pitModel = singerPitModel;
[self.bossView hideCharm];
[self.bossView hideName];
[self.singerView hideCharm];
[self.singerView hideName];
[self configNextBtn];
[self configSingerSeat];
}
///
-(void)singerSongNextSongInfoDidChanged:(QXUserSongListModel*)model{
self.roomModel.singer_info.next_song_info = model;
QXRoomPitModel *pitModel = self.nextView.model;
if (pitModel==nil) {
pitModel = [[QXRoomPitModel alloc] init];
}
if (model) {
pitModel.nickname = model.singer_nickname;
pitModel.avatar = model.singer_avatar;
pitModel.mic_cycle = model.singer_mic_cycle;
pitModel.user_id = model.singer_user_id;
pitModel.dress = model.singer_dress;
self.nextView.hidden = NO;
}else{
pitModel.nickname = @"";
pitModel.mic_cycle = @"";
pitModel.user_id = @"0";
pitModel.avatar = @"";
pitModel.dress = @"";
self.nextView.hidden = YES;
}
self.nextView.model = pitModel;
}
///
-(void)singerSongCountDidChanged:(NSString*)count{
[self.songListView updateAlreadyCountWithCount:count];
}
-(void)stopHWDMP4{
for (QXRoomSeatContentView *seatView in self.seatArray) {
[seatView stopHWDMP4];
}
}
-(void)playHWDMP4{
for (QXRoomSeatContentView *seatView in self.seatArray) {
[seatView playHWDMP4];
}
}
///
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
if (pit_number > 10) {
return;
}
if (pit_number == 9) {
if (isUpSeat) {
self.compereView.contentView.hidden = NO;
self.compereView.contentViewNoBodyBtn.hidden = YES;
}else{
self.compereView.contentView.hidden = YES;
self.compereView.contentViewNoBodyBtn.hidden = NO;
}
}
QXRoomSeatContentView *contentView = self.seatArray[pit_number-1];
QXRoomPitModel *model = contentView.pitModel;
if (isUpSeat) {
model.user_id = user.user_id;
model.avatar = user.avatar;
model.dress = user.dress;
model.sex = user.sex;
model.nickname = user.nickname;
model.user_code = user.user_code;
model.charm = user.charm;
model.nobility_image = user.nobility_image;
model.nickname_color = user.nickname_color;
model.mic_cycle = user.mic_cycle;
}else{
model.user_id = @"0";
model.avatar = @"";
model.dress = @"";
model.sex = @"";
model.nickname = @"";
model.user_code = @"";
model.charm = @"";
model.nobility_image = @"";
model.nickname_color = @"";
model.mic_cycle = @"";
if (contentView.isSeatSpeaking) {
[contentView stopAudioAnimation];
}
}
if ([user.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) {
if (isUpSeat) {
self.myPitNumber = pit_number;
}else{
self.myPitNumber = -1;
}
}
contentView.pitModel = model;
[self configNextBtn];
[self configSingerSeat];
}
-(QXRoomSeatSettingView *)settingView{
if (!_settingView) {
_settingView = [[QXRoomSeatSettingView alloc] init];
}
return _settingView;
}
-(QXSingerSongListView *)songListView{
if (!_songListView) {
_songListView = [[QXSingerSongListView alloc] init];
}
return _songListView;
}
-(void)destroyViews{
[self.compereView destroyViews];
[self.nextView destroyViews];
for (QXRoomSeatContentView *contentView in self.seatArray) {
[contentView destroyViews];
}
}
-(NSMutableArray *)seatArray{
if (!_seatArray) {
_seatArray = [NSMutableArray array];
}
return _seatArray;
}
@end
@implementation QXRoomSeatTypeSingerCompereView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubviews];
}
return self;
}
-(void)setIsCompere:(BOOL)isCompere{
_isCompere = isCompere;
self.bgImageView.image = [UIImage imageNamed:isCompere?@"room_type_singer_compere_bg":@"room_type_singer_next_bg"];
self.iconImageView.image = [UIImage imageNamed:isCompere?@"room_type_singer_compere_icon":@"room_type_singer_next_icon"];
// self.contentView.hidden = !isCompere;
self.contentViewNoBodyBtn.hidden = !isCompere;
self.nextHeaderImageView.hidden = isCompere;
self.nextNameLabel.hidden = isCompere;
self.nextTitleLabel.hidden = isCompere;
if (isCompere) {
[self.iconImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-11);
make.width.mas_equalTo(30);
make.height.mas_equalTo(16);
make.top.equalTo(self);
}];
}else{
[self.iconImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(11);
make.width.mas_equalTo(30);
make.height.mas_equalTo(16);
make.top.equalTo(self);
}];
}
}
-(void)setModel:(QXRoomPitModel *)model{
_model = model;
if (self.isCompere) {
self.contentView.pitModel = model;
}else{
[self.nextHeaderImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar]];
self.nextNameLabel.text = model.nickname;
}
}
-(void)upseatAction{
if (self.upSeatBlock) {
self.upSeatBlock();
}
}
-(void)initSubviews{
self.iconImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_type_singer_compere_icon"]];
[self addSubview:self.iconImageView];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-11);
make.width.mas_equalTo(30);
make.height.mas_equalTo(16);
make.top.equalTo(self);
}];
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_type_singer_compere_bg"]];
[self addSubview:self.bgImageView];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self);
make.top.equalTo(self.iconImageView).offset(8);
}];
self.contentViewNoBodyBtn = [[UIButton alloc] init];
[self.contentViewNoBodyBtn setBackgroundImage:[UIImage imageNamed:@"room_seat_icon"] forState:(UIControlStateNormal)];
[self.contentViewNoBodyBtn addTarget:self action:@selector(upseatAction) forControlEvents:(UIControlEventTouchUpInside)];
[self addSubview:self.contentViewNoBodyBtn];
[self.contentViewNoBodyBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(36);
make.height.mas_equalTo(36);
make.centerX.centerY.equalTo(self.bgImageView);
}];
self.contentView = [[QXRoomSeatContentView alloc] init];
self.contentView.nameToHeaderSpace = -5;
self.contentView.charmToNameSpace = 0;
self.contentView.nameBeyound = YES;
self.contentView.hidden = YES;
self.contentView.nameFontSize = 12;
[self addSubview:self.contentView];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.bgImageView);
make.width.mas_equalTo(46);
make.height.mas_equalTo(46-10+51);
make.centerX.equalTo(self.bgImageView);
}];
self.nextTitleLabel = [[UILabel alloc] init];
self.nextTitleLabel.textColor = RGB16A(0xFFFFFF,0.65);
self.nextTitleLabel.text = @"下一位\n准备";
self.nextTitleLabel.numberOfLines = 2;
self.nextTitleLabel.font = [UIFont systemFontOfSize:11];
[self addSubview:self.nextTitleLabel];
[self.nextTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(10);
make.centerY.equalTo(self.bgImageView);
}];
self.nextHeaderImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_seat_singer"]];
[self.nextHeaderImageView addRoundedCornersWithRadius:16];
self.nextHeaderImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.nextHeaderImageView];
[self.nextHeaderImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-15);
make.width.height.mas_equalTo(32);
make.top.equalTo (self.bgImageView).offset(10);
}];
self.nextNameLabel = [[UILabel alloc] init];
self.nextNameLabel.textColor = RGB16(0xEFEAFF);
self.nextNameLabel.font = [UIFont systemFontOfSize:12];
self.nextNameLabel.text = @"暂无";
[self addSubview:self.nextNameLabel];
[self.nextNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.nextHeaderImageView.mas_bottom).offset(2);
make.centerX.equalTo(self.nextHeaderImageView);
}];
[self bringSubviewToFront:self.iconImageView];
}
-(void)destroyViews{
[self.contentView destroyViews];
}
@end

View File

@@ -10,6 +10,7 @@
#import "QXRoomModel.h"
#import "QXRoomSeatDelegate.h"
#import "QXRoomFriendRelationModel.h"
#import "QXUserSongListModel.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger) {
@@ -26,6 +27,8 @@ typedef NS_ENUM(NSInteger) {
QXRoomSeatViewTypePK,
/// 交友房
QXRoomSeatViewTypeFriend,
/// 点唱
QXRoomSeatViewTypeSinger,
}QXRoomSeatViewType;
@@ -116,6 +119,15 @@ typedef NS_ENUM(NSInteger) {
-(void)friendCabinRoomIsQuit;
/// 私密小屋时间发生延时
-(void)friendCabinRoomTimeDelayWithTime:(NSString*)end_time;
/// 点唱房当前歌曲信息发生变化
-(void)singerSongCurrentSongInfoDidChanged:(QXUserSongListModel*)model;
/// 点唱房下一首歌信息发生变化
-(void)singerSongNextSongInfoDidChanged:(QXUserSongListModel*)model;
/// 已点歌曲数量发生变化
-(void)singerSongCountDidChanged:(NSString*)count;
@end
NS_ASSUME_NONNULL_END

View File

@@ -14,22 +14,27 @@
#import "QXRoomSeatPKView.h"
#import "QXRoomSeatTypeFrientView.h"
#import "QXRoomUserCharmView.h"
#import "QXRoomSeatTypeSingerView.h"
@interface QXRoomSeatView()<QXRoomSeatDelegate>
///
@property (nonatomic,strong)QXRoomSeatTypeNormalView *normalSeatView;
/// K
@property (nonatomic,strong)QXRoomSeatTypeSongView *songView;
///
@property (nonatomic,strong)QXRoomSeatTypeAuctionView *auctionView;
/// 线
@property (nonatomic,strong) QXRoomOnlineUserListView *onlineListView;
///
@property (nonatomic,strong)QXRoomSeatTypeCabinView *cabinView;
/// PK
@property (nonatomic,strong)QXRoomSeatPKView *roomPkView;
///
@property (nonatomic,strong)QXRoomSeatTypeFrientView *roomFriendView;
///
@property (nonatomic,strong)QXRoomSeatTypeSingerView *singerView;
@property (nonatomic,strong)QXRoomUserCharmView *charmListView;
@end
@@ -48,14 +53,25 @@
//
-(void)initNomarlView{
// if (_songView) {
// [_songView removeFromSuperview];
// _songView = nil;
// }
//
if (_singerView) {
_singerView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_singerView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_singerView destroyViews];
[self->_singerView removeFromSuperview];
self->_singerView = nil;
[self showNormalView];
}];
return;
}
if (_songView) {
// [_normalSeatView removeFromSuperview];
// _normalSeatView = nil;
[[QXAgoraEngine sharedEngine] ktv_EndSing];
_songView.transform = CGAffineTransformIdentity;
//
@@ -70,22 +86,7 @@
[self->_songView destroyViews];
[self->_songView removeFromSuperview];
self->_songView = nil;
[self addSubview:self.normalSeatView];
[self.normalSeatView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.normalSeatView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.normalSeatView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showNormalView];
}];
return;
}
@@ -109,22 +110,7 @@
[self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview];
self->_auctionView = nil;
[self addSubview:self.normalSeatView];
[self.normalSeatView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.normalSeatView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.normalSeatView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showNormalView];
}];
return;
}
@@ -142,22 +128,7 @@
[self->_roomPkView destroyViews];
[self->_roomPkView removeFromSuperview];
self->_roomPkView = nil;
[self addSubview:self.normalSeatView];
[self.normalSeatView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.normalSeatView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.normalSeatView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showNormalView];
}];
return;
}
@@ -175,22 +146,7 @@
[self->_roomFriendView destroyViews];
[self->_roomFriendView removeFromSuperview];
self->_roomFriendView = nil;
[self addSubview:self.normalSeatView];
[self.normalSeatView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.normalSeatView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.normalSeatView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showNormalView];
}];
return;
}
@@ -199,9 +155,44 @@
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)showNormalView{
[self addSubview:self.normalSeatView];
[self.normalSeatView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.normalSeatView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.normalSeatView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}
//
-(void)initAuctionView{
if (_singerView) {
_singerView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_singerView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_singerView destroyViews];
[self->_singerView removeFromSuperview];
self->_singerView = nil;
[self showAuctionView];
}];
return;
}
if (_normalSeatView) {
// [_normalSeatView removeFromSuperview];
// _normalSeatView = nil;
@@ -218,22 +209,7 @@
[self->_normalSeatView destroyViews];
[self->_normalSeatView removeFromSuperview];
self->_normalSeatView = nil;
[self addSubview:self.auctionView];
[self.auctionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.auctionView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showAuctionView];
}];
return;
}
@@ -254,22 +230,7 @@
[self->_songView destroyViews];
[self->_songView removeFromSuperview];
self->_songView = nil;
[self addSubview:self.auctionView];
[self.auctionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.auctionView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showAuctionView];
}];
return;
}
@@ -287,22 +248,7 @@
[self->_roomPkView destroyViews];
[self->_roomPkView removeFromSuperview];
self->_roomPkView = nil;
[self addSubview:self.auctionView];
[self.auctionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.auctionView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showAuctionView];
}];
return;
}
@@ -321,21 +267,7 @@
[self->_roomFriendView removeFromSuperview];
self->_roomFriendView = nil;
[self addSubview:self.auctionView];
[self.auctionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.auctionView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showAuctionView];
}];
return;
}
@@ -344,9 +276,45 @@
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)showAuctionView{
[self addSubview:self.auctionView];
[self.auctionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.auctionView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}
//
//ktv
-(void)initSingView{
if (_singerView) {
_singerView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_singerView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_singerView destroyViews];
[self->_singerView removeFromSuperview];
self->_singerView = nil;
[self showSongView];
}];
return;
}
if (_normalSeatView) {
// [_normalSeatView removeFromSuperview];
// _normalSeatView = nil;
@@ -363,22 +331,7 @@
[self->_normalSeatView destroyViews];
[self->_normalSeatView removeFromSuperview];
self->_normalSeatView = nil;
[self addSubview:self.songView];
[self.songView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.songView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showSongView];
}];
return;
}
@@ -399,55 +352,7 @@
[self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview];
self->_auctionView = nil;
[self addSubview:self.songView];
[self.songView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.songView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}];
return;
}
if (_roomPkView) {
_roomPkView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_roomPkView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_roomPkView destroyViews];
[self->_roomPkView removeFromSuperview];
self->_roomPkView = nil;
[self addSubview:self.songView];
[self.songView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.songView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showSongView];
}];
return;
}
@@ -465,22 +370,7 @@
[self->_roomFriendView destroyViews];
[self->_roomFriendView removeFromSuperview];
self->_roomFriendView = nil;
[self addSubview:self.songView];
[self.songView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.songView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showSongView];
}];
return;
}
@@ -489,6 +379,24 @@
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)showSongView{
[self addSubview:self.songView];
[self.songView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.songView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}
- (void)initRoomPKView{
if (_normalSeatView) {
@@ -526,11 +434,14 @@
}];
return;
}
if (_songView) {
// [_normalSeatView removeFromSuperview];
// _normalSeatView = nil;
[[QXAgoraEngine sharedEngine] ktv_EndSing];
_songView.transform = CGAffineTransformIdentity;
[self addSubview:self.roomPkView];
[self.roomPkView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)initRoomFriendView{
if (_singerView) {
_singerView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
@@ -538,39 +449,17 @@
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
self->_singerView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_songView destroyViews];
[self->_songView removeFromSuperview];
self->_songView = nil;
[self addSubview:self.roomPkView];
[self.roomPkView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.roomPkView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.roomPkView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self->_singerView destroyViews];
[self->_singerView removeFromSuperview];
self->_singerView = nil;
[self showRoomFriendView];
}];
return;
}
[self addSubview:self.roomPkView];
[self.roomPkView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)initRoomFriendView{
if (_normalSeatView) {
// [_normalSeatView removeFromSuperview];
// _normalSeatView = nil;
_normalSeatView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
@@ -584,22 +473,7 @@
[self->_normalSeatView destroyViews];
[self->_normalSeatView removeFromSuperview];
self->_normalSeatView = nil;
[self addSubview:self.roomFriendView];
[self.roomFriendView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.roomFriendView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.roomFriendView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showRoomFriendView];
}];
return;
}
@@ -620,22 +494,7 @@
[self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview];
self->_auctionView = nil;
[self addSubview:self.roomFriendView];
[self.roomFriendView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.roomFriendView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.roomFriendView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showRoomFriendView];
}];
return;
}
@@ -654,22 +513,7 @@
[self->_songView destroyViews];
[self->_songView removeFromSuperview];
self->_songView = nil;
[self addSubview:self.roomFriendView];
[self.roomFriendView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.roomFriendView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.roomFriendView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
[self showRoomFriendView];
}];
return;
}
@@ -678,6 +522,127 @@
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)showRoomFriendView{
[self addSubview:self.roomFriendView];
[self.roomFriendView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.roomFriendView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.roomFriendView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}
-(void)initSignerView{
if (_roomFriendView) {
_roomFriendView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_roomFriendView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_roomFriendView destroyViews];
[self->_roomFriendView removeFromSuperview];
self->_roomFriendView = nil;
[self showSinggerView];
}];
return;
}
if (_normalSeatView) {
// [_normalSeatView removeFromSuperview];
// _normalSeatView = nil;
_normalSeatView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_normalSeatView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_normalSeatView destroyViews];
[self->_normalSeatView removeFromSuperview];
self->_normalSeatView = nil;
[self showSinggerView];
}];
return;
}
if (_auctionView) {
_auctionView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview];
self->_auctionView = nil;
[self showSinggerView];
}];
return;
}
if (_songView) {
[[QXAgoraEngine sharedEngine] ktv_EndSing];
_songView.transform = CGAffineTransformIdentity;
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self->_songView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) {
[self->_songView destroyViews];
[self->_songView removeFromSuperview];
self->_songView = nil;
[self showSinggerView];
}];
return;
}
[self addSubview:self.singerView];
[self.singerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
}
-(void)showSinggerView{
[self addSubview:self.singerView];
[self.singerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self);
}];
self.singerView.transform = CGAffineTransformMakeScale(0.01, 0.01);
//
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.singerView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}
- (void)initCabinView{
self.cabinView = [[QXRoomSeatTypeCabinView alloc] init];
@@ -708,6 +673,9 @@
case QXRoomSeatViewTypeFriend:
self.roomFriendView.myPitNumber = myPitNumber;
break;
case QXRoomSeatViewTypeSinger:
self.singerView.myPitNumber = myPitNumber;
break;
default:
break;
}
@@ -747,6 +715,10 @@
[self initRoomFriendView];
}
break;
case QXRoomSeatViewTypeSinger:{
[self initSignerView];
}
break;
default:
break;
}
@@ -807,6 +779,9 @@
case QXRoomSeatViewTypeFriend:
self.roomFriendView.roomModel = roomModel;
break;
case QXRoomSeatViewTypeSinger:
self.singerView.roomModel = roomModel;
break;
default:
break;
}
@@ -886,6 +861,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView clearCharm];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView clearCharm];
break;
default:
break;
}
@@ -913,6 +891,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView roomClearUserCharmWithUserId:userId];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView roomClearUserCharmWithUserId:userId];
break;
default:
break;
}
@@ -939,6 +920,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
break;
default:
break;
}
@@ -966,6 +950,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView setSeatCharmWithUser:model];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView setSeatCharmWithUser:model];
break;
default:
break;
}
@@ -994,6 +981,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView setSeatCharmWithUsers:users];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView setSeatCharmWithUsers:users];
break;
default:
break;
}
@@ -1019,6 +1009,9 @@
case QXRoomSeatViewTypePK:
[self.roomPkView setSeatIsLock:isLock pitNumber:pitNumber];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView setSeatIsLock:isLock pitNumber:pitNumber];
break;
default:
break;
}
@@ -1212,6 +1205,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
break;
default:
break;
}
@@ -1260,24 +1256,26 @@
self.onlineListView.roomId = self.roomModel.room_info.room_id;
[self.onlineListView showInView:self.viewController.view];
}
///
-(void)singerSongCurrentSongInfoDidChanged:(QXUserSongListModel*)model{
if (_singerView) {
[self.singerView singerSongCurrentSongInfoDidChanged:model];
}
}
///
-(void)singerSongNextSongInfoDidChanged:(QXUserSongListModel*)model{
if (_singerView) {
[self.singerView singerSongNextSongInfoDidChanged:model];
}
}
///
-(void)singerSongCountDidChanged:(NSString*)count{
if (_singerView) {
[self.singerView singerSongCountDidChanged:count];
}
}
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{
// if (_normalSeatView) {
// [self.normalSeatView roomUserInfoDidChanged:user];
// return;
// }
// if (_songView) {
// [self.songView roomUserInfoDidChanged:user];
// return;
// }
// if (_auctionView) {
// [self.auctionView roomUserInfoDidChanged:user];
// return;
// }
// if (_roomPkView) {
// [self.roomPkView roomUserInfoDidChanged:user];
// return;
// }
switch (self.type) {
case QXRoomSeatViewTypeNormal:
[self.normalSeatView roomUserInfoDidChanged:user];
@@ -1297,6 +1295,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView roomUserInfoDidChanged:user];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView roomUserInfoDidChanged:user];
break;
default:
break;
}
@@ -1321,6 +1322,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView stopHWDMP4];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView stopHWDMP4];
break;
default:
break;
}
@@ -1345,6 +1349,9 @@
case QXRoomSeatViewTypeFriend:
[self.roomFriendView playHWDMP4];
break;
case QXRoomSeatViewTypeSinger:
[self.singerView playHWDMP4];
break;
default:
break;
}
@@ -1373,6 +1380,10 @@
[self.cabinView destroyViews];
_cabinView = nil;
}
if (_singerView) {
[self.singerView destroyViews];
_singerView = nil;
}
}
-(QXRoomOnlineUserListView *)onlineListView{
@@ -1382,7 +1393,13 @@
}
return _onlineListView;
}
-(QXRoomSeatTypeSingerView *)singerView{
if (!_singerView) {
_singerView = [[QXRoomSeatTypeSingerView alloc] init];
_singerView.delegate = self;
}
return _singerView;
}
-(QXRoomSeatTypeAuctionView *)auctionView{
if (!_auctionView) {
_auctionView = [[QXRoomSeatTypeAuctionView alloc] init];