Commit 849906f1 authored by David黄金龙's avatar David黄金龙

图片链接 不为空时 可预览

parent 0cc0dbaa
...@@ -290,16 +290,31 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -290,16 +290,31 @@ class YHIdentityCardCell: UITableViewCell {
@objc func frontImageClick() { @objc func frontImageClick() {
if type == .identity { if type == .identity {
if viewModel.mainModel.certificates.cnIdentityCard.imgFront.count != 0 { if viewModel.mainModel.certificates.cnIdentityCard.imgFront.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cnIdentityCard.imgFront // vc.imgString = viewModel.mainModel.certificates.cnIdentityCard.imgFront
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.cnIdentityCard.imgFront.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cnIdentityCard.imgFront
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} else { } else {
if viewModel.mainModel.certificates.hkMacaoPass.imgFront.count != 0 { if viewModel.mainModel.certificates.hkMacaoPass.imgFront.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hkMacaoPass.imgFront // vc.imgString = viewModel.mainModel.certificates.hkMacaoPass.imgFront
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.hkMacaoPass.imgFront.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hkMacaoPass.imgFront
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} }
...@@ -337,16 +352,29 @@ class YHIdentityCardCell: UITableViewCell { ...@@ -337,16 +352,29 @@ class YHIdentityCardCell: UITableViewCell {
@objc func backSurfaceImageClick() { @objc func backSurfaceImageClick() {
if type == .identity { if type == .identity {
if viewModel.mainModel.certificates.cnIdentityCard.imgBack.count != 0 { if viewModel.mainModel.certificates.cnIdentityCard.imgBack.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cnIdentityCard.imgBack // vc.imgString = viewModel.mainModel.certificates.cnIdentityCard.imgBack
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.cnIdentityCard.imgBack.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cnIdentityCard.imgBack
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} else { } else {
if viewModel.mainModel.certificates.hkMacaoPass.imgBack.count != 0 { if viewModel.mainModel.certificates.hkMacaoPass.imgBack.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hkMacaoPass.imgBack // vc.imgString = viewModel.mainModel.certificates.hkMacaoPass.imgBack
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.hkMacaoPass.imgBack.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hkMacaoPass.imgBack
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} }
......
...@@ -298,16 +298,29 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -298,16 +298,29 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
@objc func frontImageClick() { @objc func frontImageClick() {
if type == .identity { if type == .identity {
if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 { if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front // vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.cn_identity_card.img_front.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} else { } else {
if viewModel.mainModel.certificates.hk_macao_pass.img_front.count != 0 { if viewModel.mainModel.certificates.hk_macao_pass.img_front.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_front // vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_front
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.hk_macao_pass.img_front.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_front
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} }
...@@ -344,16 +357,29 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -344,16 +357,29 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
@objc func backSurfaceImageClick() { @objc func backSurfaceImageClick() {
if type == .identity { if type == .identity {
if viewModel.mainModel.certificates.cn_identity_card.img_back.count != 0 { if viewModel.mainModel.certificates.cn_identity_card.img_back.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_back // vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_back
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.cn_identity_card.img_back.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_back
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} else { } else {
if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 { if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_back // vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_back
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if viewModel.mainModel.certificates.hk_macao_pass.img_back.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_back
UIViewController.current?.navigationController?.pushViewController(vc)
}
return return
} }
} }
......
...@@ -150,15 +150,19 @@ extension YHPreviewInfoCertificatePictureItemView { ...@@ -150,15 +150,19 @@ extension YHPreviewInfoCertificatePictureItemView {
} }
@objc func frontImagTapped(gesture: UITapGestureRecognizer) { @objc func frontImagTapped(gesture: UITapGestureRecognizer) {
let vc = YHImageViewController() if let url = dataModel?.frontUrl,url.isEmpty == false {
vc.imgString = dataModel?.frontUrl let vc = YHImageViewController()
UIViewController.current?.navigationController?.pushViewController(vc) vc.imgString = url
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
@objc func backImagTapped(gesture: UITapGestureRecognizer) { @objc func backImagTapped(gesture: UITapGestureRecognizer) {
let vc = YHImageViewController() if let url = dataModel?.backUrl,url.isEmpty == false {
vc.imgString = dataModel?.backUrl let vc = YHImageViewController()
UIViewController.current?.navigationController?.pushViewController(vc) vc.imgString = dataModel?.backUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
} }
......
...@@ -97,10 +97,7 @@ extension YHPreviewInfoWorkSummaryView { ...@@ -97,10 +97,7 @@ extension YHPreviewInfoWorkSummaryView {
@objc func handleTap(_ gestureRecognizer: UITapGestureRecognizer) { @objc func handleTap(_ gestureRecognizer: UITapGestureRecognizer) {
guard let label = gestureRecognizer.view else { return } guard let label = gestureRecognizer.view else { return }
if label.tag < arrFiles.count { if label.tag < arrFiles.count {
// let vc = YHImageViewController()
// vc.imgString = arrFiles[label.tag].fileUrl
// UIViewController.current?.navigationController?.pushViewController(vc)
YHHUD.show(.progress(message: "")) YHHUD.show(.progress(message: ""))
self.viewModel.getPublicImageUrl(arrFiles[label.tag].fileUrl) { success, error in self.viewModel.getPublicImageUrl(arrFiles[label.tag].fileUrl) { success, error in
YHHUD.hide() YHHUD.hide()
......
...@@ -610,18 +610,23 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo ...@@ -610,18 +610,23 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
renameInputView.textField.becomeFirstResponder() renameInputView.textField.becomeFirstResponder()
} }
if editType == .preview { if editType == .preview {
let vc = YHImageViewController() if model.fileUrl.isEmpty == false {
vc.imgString = model.fileUrl let vc = YHImageViewController()
UIViewController.current?.navigationController?.pushViewController(vc) vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
if editType == .delete { if editType == .delete {
self.showDeleteAlert(model) self.showDeleteAlert(model)
} }
}.show() }.show()
} else { } else {
let vc = YHImageViewController() if model.fileUrl.isEmpty == false {
vc.imgString = model.fileUrl let vc = YHImageViewController()
UIViewController.current?.navigationController?.pushViewController(vc) vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
} }
cell.selectIntroductionBlock = { [weak self] in cell.selectIntroductionBlock = { [weak self] in
...@@ -731,18 +736,27 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo ...@@ -731,18 +736,27 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
renameInputView.textField.becomeFirstResponder() renameInputView.textField.becomeFirstResponder()
} }
if editType == .preview { if editType == .preview {
let vc = YHImageViewController() if model.fileUrl.isEmpty == false {
vc.imgString = model.fileUrl let vc = YHImageViewController()
UIViewController.current?.navigationController?.pushViewController(vc) vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
if editType == .delete { if editType == .delete {
self.showDeleteAlert(model) self.showDeleteAlert(model)
} }
}.show() }.show()
} else { } else {
let vc = YHImageViewController() // let vc = YHImageViewController()
vc.imgString = model.fileUrl // vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc) // UIViewController.current?.navigationController?.pushViewController(vc)
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
} }
cell.selectIntroductionBlock = { [weak self] in cell.selectIntroductionBlock = { [weak self] in
......
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