Commit 8e2c6ad6 authored by David黄金龙's avatar David黄金龙

已点赞 才给提示

parent d25cb97b
...@@ -170,7 +170,6 @@ extension YHHomeCollectionViewCell { ...@@ -170,7 +170,6 @@ extension YHHomeCollectionViewCell {
make.height.equalTo(listModel.img_height_use) make.height.equalTo(listModel.img_height_use)
} }
if let url = URL(string: listModel.img_url) { if let url = URL(string: listModel.img_url) {
// titleImageView.kf.setImage(with: url)
titleImageView.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image")) titleImageView.kf.setImage(with: url, placeholder: UIImage(named: "global_default_image"))
} }
...@@ -207,7 +206,6 @@ extension YHHomeCollectionViewCell { ...@@ -207,7 +206,6 @@ extension YHHomeCollectionViewCell {
viewModel.getLike(listModel.id, 1) {[weak self] success, error in viewModel.getLike(listModel.id, 1) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "已点赞")
listModel.is_like = true listModel.is_like = true
listModel.like_count = listModel.like_count + 1 listModel.like_count = listModel.like_count + 1
updataSubViews() updataSubViews()
...@@ -217,7 +215,6 @@ extension YHHomeCollectionViewCell { ...@@ -217,7 +215,6 @@ extension YHHomeCollectionViewCell {
viewModel.getLike(listModel.id, 0) {[weak self] success, error in viewModel.getLike(listModel.id, 0) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "已取消点赞")
listModel.is_like = false listModel.is_like = false
listModel.like_count = listModel.like_count - 1 listModel.like_count = listModel.like_count - 1
updataSubViews() updataSubViews()
......
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