跳转聊天

This commit is contained in:
liyuhua
2024-02-28 19:23:44 +08:00
parent 4304c3cad8
commit 1bf234a98e
3 changed files with 21 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ pod 'SVGAPlayer'
pod 'NIMSDK_LITE', '9.6.1'
pod ''
# Pods for yinmeng-ios
end

View File

@@ -8,7 +8,7 @@
import UIKit
import Nuke
typealias RefreshBlcok = ()->Void
typealias RefreshBlcok = (_ userId: String?)->Void
class PlanetStarClickItemView: UIView {
@@ -162,9 +162,15 @@ class PlanetStarClickItemView: UIView {
}
}
@objc func chatBtnAction(){
if let _refreshBlcok = refreshBlcok,let uid = self.chooseModel?.uid{
_refreshBlcok(uid)
}
}
@objc func refreshBtnAction(){
if let _refreshBlcok = refreshBlcok{
_refreshBlcok()
_refreshBlcok(nil)
}
makeRotationAnim(view: refreshBtn)
}
@@ -424,6 +430,7 @@ class PlanetStarClickItemView: UIView {
let _chatBtn = UIButton()
_chatBtn.setBackgroundImage(UIImage(named: "yin_plane_star_attention_bg"), for: .normal)
_chatBtn.setImage(UIImage(named: "yin_plane_star_chat_icon"), for: .normal)
_chatBtn.addTarget(self, action: #selector(chatBtnAction), for: .touchUpInside)
return _chatBtn
}()
var bgSignatureView:UIImageView = {

View File

@@ -6,7 +6,7 @@
//
import UIKit
import NIMSDK
class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
@@ -74,9 +74,16 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
}
bgRadiusView.refreshBlcok = {[weak self] in
bgRadiusView.refreshBlcok = {[weak self] uid in
guard let _uid = uid else {
self?.page = (self?.page ?? 1) + 1
self?.requestData()
return
}
let session = NIMSession.init(_uid, type: .P2P)
let chatVC = ChatVC.init(session: session)
self?.navigationController?.pushViewController(chatVC, animated: true)
}