跳转聊天
This commit is contained in:
2
Podfile
2
Podfile
@@ -23,7 +23,7 @@ pod 'SVGAPlayer'
|
||||
|
||||
pod 'NIMSDK_LITE', '9.6.1'
|
||||
|
||||
pod ''
|
||||
|
||||
# Pods for yinmeng-ios
|
||||
|
||||
end
|
||||
|
@@ -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 = {
|
||||
|
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user