Commit 77c1c514 authored by Steven杜宇's avatar Steven杜宇

// 视频点赞收藏

parent eadb2fe8
......@@ -94,6 +94,13 @@ extension YHHomeCollectionViewCell {
let vc = YHVideoPlayerVC()
vc.url = listModel.media_url
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)
DispatchQueue.main.async {
......
......@@ -17,7 +17,7 @@ class YHVideoPlayerVC: YHBaseViewController {
var url:String = ""
var id: Int = 0
typealias Block = (YHWebModel) -> ()
var block: Block?
var updateBlock: Block?
private var operationFlag:Bool = false
......@@ -232,7 +232,7 @@ extension YHVideoPlayerVC {
bottomView.isLike = model.is_like
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