Commit 0b5b04b9 authored by Steven杜宇's avatar Steven杜宇

// 我的证件

parent 6f7fee28
......@@ -114,7 +114,12 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
}
@objc func didClickUploadBtn() {
let sheetView = YHCertificateUploadSheetView.sheetView
if items.count >= 100 {
YHHUD.flash(message: "最多上传100张图片或文件")
return
}
let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.templateInfo = supplementInfo.templateInfo
sheetView.uploadFilesBlock = {
[weak self] fileUrl in
......@@ -483,6 +488,8 @@ extension YHCertificateUploadContentListVC {
items.append(contentsOf: item.contentUrl)
}
}
self.uploadBtn.alpha = (items.count >= 100 ? 0.5 : 1.0)
self.tableView.reloadData()
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
......
......@@ -31,7 +31,10 @@ enum YHCertificateUploadType: Int {
class YHCertificateUploadSheetView: UIView {
static let sheetView = YHCertificateUploadSheetView(frame:UIScreen.main.bounds)
static func sheetView() -> YHCertificateUploadSheetView {
let view = YHCertificateUploadSheetView(frame:UIScreen.main.bounds)
return view
}
func calculateHeight() -> CGFloat {
guard let templateInfo = templateInfo else { return 0.0}
......
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