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

图片预览 添加错误提示

parent 53497574
...@@ -66,7 +66,15 @@ class YHImageViewController: YHBaseViewController { ...@@ -66,7 +66,15 @@ class YHImageViewController: YHBaseViewController {
func getData() { func getData() {
self.viewModel.getPublicImageUrl(imgString) {[weak self] success, error in self.viewModel.getPublicImageUrl(imgString) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard success != nil else { return }
if success == nil {
let msg = error?.errorMsg ?? "出现错误"
YHHUD.flash(message: msg)
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.back()
}
}
self.resultView.kf.setImage(with: URL(string: success)) self.resultView.kf.setImage(with: URL(string: success))
} }
} }
......
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