Commit a8654d32 authored by pete谢兆麟's avatar pete谢兆麟

工作经验预览

parent 68b95116
......@@ -27,6 +27,10 @@ class YHWorkExperienceViewController: YHBaseViewController {
let view = YHFileRenameInputView.inputView(defalutText: "请输入名称")
return view
}()
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: self)
return tool
}()
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
......@@ -612,9 +616,11 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
if editType == .preview {
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName: model.fileName)
}
}
}
}
......@@ -624,9 +630,11 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}.show()
} else {
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.fileName)
}
}
}
}
}
......@@ -740,9 +748,11 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
if editType == .preview {
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.fileName)
}
}
}
}
if editType == .delete {
......@@ -750,15 +760,14 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
}.show()
} else {
// let vc = YHImageViewController()
// vc.imgString = model.fileUrl
// UIViewController.current?.navigationController?.pushViewController(vc)
if model.fileUrl.isEmpty == false {
let vc = YHImageViewController()
vc.imgString = model.fileUrl
UIViewController.current?.navigationController?.pushViewController(vc)
self.viewModel.getPublicImageUrl(model.fileUrl) { success, error in
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:model.fileName)
}
}
}
}
}
......
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