From 7e663559c063c83e4f58afdb630193c8cc1de730 Mon Sep 17 00:00:00 2001 From: liyuhua <15626451870@163.com> Date: Wed, 13 Mar 2024 20:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=BF=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yinmeng-ios.xcodeproj/project.pbxproj | 8 ++++---- yinmeng-ios/Modules/Room/Model/RoomDataModel.swift | 1 + yinmeng-ios/Modules/Room/VC/RoomVC.swift | 10 +++++++--- .../MicSeatSuperView/NormalMicSeatSuperView.swift | 1 + .../MicSeatSuperView/SubView/NormalMicSeatView.swift | 12 ++++++------ .../View/RoomChatScreenUserChatCell.swift | 2 +- .../RoomChatScreenView/View/RoomChatScreenView.swift | 3 ++- .../Room/View/RoomMenuView/View/RoomMenuView.swift | 10 +++++++++- yinmeng-ios/Modules/Star/PlanetStarVC.swift | 2 +- yinmeng-ios/Modules/User/VC/UserInfoVC.swift | 1 + 10 files changed, 33 insertions(+), 17 deletions(-) diff --git a/yinmeng-ios.xcodeproj/project.pbxproj b/yinmeng-ios.xcodeproj/project.pbxproj index 71431ed..bcd6366 100644 --- a/yinmeng-ios.xcodeproj/project.pbxproj +++ b/yinmeng-ios.xcodeproj/project.pbxproj @@ -1401,7 +1401,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "yinmeng-ios/yinmeng-ios.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 48UCG35Q9W; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -1423,7 +1423,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.0.3; PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -1445,7 +1445,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "yinmeng-ios/yinmeng-ios.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 48UCG35Q9W; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -1467,7 +1467,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.0.3; PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/yinmeng-ios/Modules/Room/Model/RoomDataModel.swift b/yinmeng-ios/Modules/Room/Model/RoomDataModel.swift index 62b05ac..ea2dc57 100644 --- a/yinmeng-ios/Modules/Room/Model/RoomDataModel.swift +++ b/yinmeng-ios/Modules/Room/Model/RoomDataModel.swift @@ -22,5 +22,6 @@ struct RoomDataModel : HandyJSON { var avatar = "" var onlineNum:Int = 0 var defUser = "" + var type:Int = 3 } diff --git a/yinmeng-ios/Modules/Room/VC/RoomVC.swift b/yinmeng-ios/Modules/Room/VC/RoomVC.swift index 4f16559..792ecc0 100644 --- a/yinmeng-ios/Modules/Room/VC/RoomVC.swift +++ b/yinmeng-ios/Modules/Room/VC/RoomVC.swift @@ -131,7 +131,6 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { } private func dealWithChatData(chatData:NIMChatroom){ -// self.roomInfo?.onlineNum = chatData.onlineUserCount self.topView.roomData = self.roomInfo self.micSeatView.roomData = self.roomInfo self.micSeatView.setTRTC() @@ -145,7 +144,11 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { if roomData.valid{ UserViewModel.userVM.getUserInfo(uid: uid) }else{ - RoomVCViewModel.roomVM.openRoom(title: self.roomInfo?.title ?? "", type: 3, roomPwd: "", roomDesc: "", backPic: "") + var text = self.roomInfo?.title + if self.roomInfo?.title.count == 0{ + text = self.roomText + } + RoomVCViewModel.roomVM.openRoom(title: text ?? "", type: 3, roomPwd: "", roomDesc: "", backPic: "") } } @objc func dissChatViewAction(){ @@ -159,6 +162,7 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { } var roomUid:String = "" + var roomText:String = "" var roomInfo:RoomDataModel? //MARK: - 懒加载 private lazy var backgroundView:RoomBackgroundView = { @@ -189,7 +193,7 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { private lazy var bgChatView:UIButton = { let _bgChatView = UIButton() _bgChatView.addTarget(self, action: #selector(dissChatViewAction), for: .touchUpInside) - + _bgChatView.backgroundColor = UIColor.init(white: 0, alpha: 0.5) return _bgChatView }() private lazy var chatListVC:ChatListVC = { diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift index 3f23e40..c9600dc 100644 --- a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift @@ -333,6 +333,7 @@ extension NormalMicSeatSuperView:UICollectionViewDelegate,UICollectionViewDataSo } let params = ["uid":"\(AuthManager.userUid)","roomUid":roomUid] as [String : Any] RequestGet(path: "room/gift/value/get", parma: params) { data in + print(data) if let info = Deserialized.toModel(with: data) { for model in info.giftValueVos{ if var ownerUser = self.roomOwnerView.user{ diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift index b436a50..d8f4bbd 100644 --- a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift @@ -58,11 +58,11 @@ class NormalMicSeatView: UIView { nameStackView.addArrangedSubview(giftValueView) speakView.snp.makeConstraints { make in - make.width.height.equalTo(UIDevice.scaleWidth(width: 78)) + make.width.height.equalTo(UIDevice.scaleWidth(width: 70)) make.center.equalTo(self.avatarView) } avatarView.snp.makeConstraints { make in - make.width.height.equalTo(UIDevice.scaleWidth(width: 58)) + make.width.height.equalTo(UIDevice.scaleWidth(width: 50)) make.top.equalTo(UIDevice.scaleWidth(width: 5)) make.centerX.equalTo(self) } @@ -78,7 +78,7 @@ class NormalMicSeatView: UIView { make.height.equalTo(UIDevice.scaleWidth(width: 16)) } - avatarView.layer.cornerRadius = UIDevice.scaleWidth(width: 58) / 2 + avatarView.layer.cornerRadius = UIDevice.scaleWidth(width: 50) / 2 genderView.isHidden = true postionView.isHidden = true @@ -102,12 +102,12 @@ class NormalMicSeatView: UIView { nameStackView.addArrangedSubview(nameView) nameStackView.addArrangedSubview(genderView) speakView.snp.makeConstraints { make in - make.width.height.equalTo(UIDevice.scaleWidth(width: 75)) + make.width.height.equalTo(UIDevice.scaleWidth(width: 70)) make.center.equalTo(self.avatarView) } avatarView.snp.makeConstraints { make in make.top.equalTo(UIDevice.scaleWidth(width: 5)) - make.width.height.equalTo(UIDevice.scaleWidth(width: 55)) + make.width.height.equalTo(UIDevice.scaleWidth(width: 50)) make.centerX.equalTo(self) } nameStackView.snp.makeConstraints { make in @@ -125,7 +125,7 @@ class NormalMicSeatView: UIView { make.width.lessThanOrEqualTo(self) } - avatarView.layer.cornerRadius = UIDevice.scaleWidth(width: 55) / 2 + avatarView.layer.cornerRadius = UIDevice.scaleWidth(width: 50) / 2 genderView.isHidden = true postionView.isHidden = false speakParser.parse(withNamed: "YinSpeak", in: Bundle.main) {[weak self] videoItem in diff --git a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift index dab08a8..7797557 100644 --- a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift +++ b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift @@ -138,7 +138,7 @@ class RoomChatScreenUserChatCell: UITableViewCell { }() private lazy var textView:UILabel = { - let _textView = UILabel.getCustomLabel(text:"",font: UIFont.getScaleFont(ofSize: 12, weight: .regular),numberOfLines: 0) + let _textView = UILabel.getCustomLabel( text:"",font: UIFont.getScaleFont(ofSize: 12, weight: .regular), color: .white,numberOfLines: 0) _textView.isUserInteractionEnabled = true return _textView }() diff --git a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift index 5d8fcec..fbf25b5 100644 --- a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift +++ b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift @@ -33,6 +33,7 @@ class RoomChatScreenView: UIView { self.dealWithMsg(msg: msg ) } self.chatTableView.reloadData() + if self.msgList.count == 0 {return} DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { self.chatTableView.scrollToRow(at: IndexPath(row:self.msgList.count - 1 , section:0 ), at: .bottom, animated: true) } @@ -42,7 +43,7 @@ class RoomChatScreenView: UIView { func getTextMsg(msg:NIMMessage){ dealWithMsg(msg: msg) chatTableView.reloadData() - + if self.msgList.count == 0 {return} DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { self.chatTableView.scrollToRow(at: IndexPath.init(row:self.msgList.count - 1 , section:0 ), at: .bottom, animated: true) } diff --git a/yinmeng-ios/Modules/Room/View/RoomMenuView/View/RoomMenuView.swift b/yinmeng-ios/Modules/Room/View/RoomMenuView/View/RoomMenuView.swift index 647cc42..c9c32aa 100644 --- a/yinmeng-ios/Modules/Room/View/RoomMenuView/View/RoomMenuView.swift +++ b/yinmeng-ios/Modules/Room/View/RoomMenuView/View/RoomMenuView.swift @@ -100,7 +100,10 @@ class RoomMenuView: UIView { } - setBroadcast(isChange: isHaveChange) + if isHaveChange{ + setBroadcast(isChange: isHaveChange) + } + } break @@ -160,4 +163,9 @@ class RoomMenuView: UIView { _micBtn.isHidden = true return _micBtn }() +// private lazy var sendGiftBtn :UIButton = { +// let _sendGiftBtn = UIButton() +// _sendGiftBtn.setImage(UIImage(named: room_send_gift_icon), for: .normal) +// return _sendGiftBtn +// }() } diff --git a/yinmeng-ios/Modules/Star/PlanetStarVC.swift b/yinmeng-ios/Modules/Star/PlanetStarVC.swift index 9fad57c..9c95362 100644 --- a/yinmeng-ios/Modules/Star/PlanetStarVC.swift +++ b/yinmeng-ios/Modules/Star/PlanetStarVC.swift @@ -23,7 +23,7 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol { func requestData(){ - RequestGet(path: "home/recommendUsers", parma: ["pageNum":"\(self.page)","pageSize":"30"]) { data in + RequestGet(path: "home/recommendUsers", parma: ["pageNum":"\(self.page)","pageSize":"60"]) { data in if let list = Deserialized.toArray(with: data) { var dataList:[PlanetStarModel] = [] guard list.isEmpty else { diff --git a/yinmeng-ios/Modules/User/VC/UserInfoVC.swift b/yinmeng-ios/Modules/User/VC/UserInfoVC.swift index 852c002..6f87909 100644 --- a/yinmeng-ios/Modules/User/VC/UserInfoVC.swift +++ b/yinmeng-ios/Modules/User/VC/UserInfoVC.swift @@ -183,6 +183,7 @@ extension UserInfoVC: UserFunctionViewProtocol{ case .myRoom: let vc = RoomVC(roomUid: "\(AuthManager.userUid)") + vc.roomText = (self.info?.nick ?? "") + "的房间" let nav = BaseNavigationViewController.init(rootViewController: vc) nav.modalPresentationStyle = .fullScreen self.present(nav, animated: true, completion: nil)