Commit c4d0ac9d authored by David黄金龙's avatar David黄金龙

Merge branch 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into youhua-dev

* 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 视频点赞收藏
parents 2183f24d 77c1c514
...@@ -94,6 +94,13 @@ extension YHHomeCollectionViewCell { ...@@ -94,6 +94,13 @@ extension YHHomeCollectionViewCell {
let vc = YHVideoPlayerVC() let vc = YHVideoPlayerVC()
vc.url = listModel.media_url vc.url = listModel.media_url
vc.id = listModel.id vc.id = listModel.id
vc.updateBlock = {
[weak self] item in
guard let self = self else { return }
listModel.is_like = item.is_like
listModel.like_count = item.like_count
self.updataSubViews()
}
self.parentViewController?.navigationController?.pushViewController(vc) self.parentViewController?.navigationController?.pushViewController(vc)
DispatchQueue.main.async { DispatchQueue.main.async {
......
...@@ -17,7 +17,7 @@ class YHVideoPlayerVC: YHBaseViewController { ...@@ -17,7 +17,7 @@ class YHVideoPlayerVC: YHBaseViewController {
var url:String = "" var url:String = ""
var id: Int = 0 var id: Int = 0
typealias Block = (YHWebModel) -> () typealias Block = (YHWebModel) -> ()
var block: Block? var updateBlock: Block?
private var operationFlag:Bool = false private var operationFlag:Bool = false
...@@ -232,7 +232,7 @@ extension YHVideoPlayerVC { ...@@ -232,7 +232,7 @@ extension YHVideoPlayerVC {
bottomView.isLike = model.is_like bottomView.isLike = model.is_like
if operationFlag { if operationFlag {
self.block?(model) self.updateBlock?(model)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment