Commit 2e9ba661 authored by David黄金龙's avatar David黄金龙

检查 orderid是否有效

parent dc8c04b4
......@@ -153,17 +153,19 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
func getData() {
viewModel.getWebDetail(self.id) {[weak self] success, error in
guard let self = self else { return }
if success {
guard let model = self.viewModel.mainModel else { return }
bottomView.likeCount = model.like_count
bottomView.starCount = model.collect_count
bottomView.isStar = model.is_collect
bottomView.isLike = model.is_like
if operationFlag {
self.block?(model)
if id > 0 {
viewModel.getWebDetail(self.id) {[weak self] success, error in
guard let self = self else { return }
if success {
guard let model = self.viewModel.mainModel else { return }
bottomView.likeCount = model.like_count
bottomView.starCount = model.collect_count
bottomView.isStar = model.is_collect
bottomView.isLike = model.is_like
if operationFlag {
self.block?(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