Commit 17a3af89 authored by Steven杜宇's avatar Steven杜宇

// 我的证书

parent d865a790
......@@ -274,10 +274,13 @@ extension YHCertificateListVC {
let size = String(format: "%.2fM", Double(fileData.count)/(1024.0 * 1024.0))
print("\(size)")
// 先OSS上传得到URL
YHHUD.show(.progress(message: "上传中..."))
self.viewModel.uploadFile(fileUrl.absoluteString) {
[weak self] successUrl, error in
guard let self = self else { return }
YHHUD.hide()
// 再调用业务接口
if let successUrl = successUrl, !successUrl.isEmpty {
let fileName = successUrl.lastPathComponent
......
......@@ -287,10 +287,11 @@ extension YHCertificateSearchViewController {
let size = String(format: "%.2fM", Double(fileData.count)/(1024.0 * 1024.0))
print("\(size)")
// 先OSS上传得到URL
YHHUD.show(.progress(message: "上传中..."))
self.viewModel.uploadFile(fileUrl.absoluteString) {
[weak self] successUrl, error in
guard let self = self else { return }
YHHUD.hide()
// 再调用业务接口
if let successUrl = successUrl, !successUrl.isEmpty {
let fileName = successUrl.lastPathComponent
......
......@@ -116,8 +116,8 @@ class YHCertificateUploadContentListVC: YHBaseViewController {
@objc func didClickUploadBtn() {
if items.count >= 100 {
YHHUD.flash(message: "最多上传100张图片或文件")
if items.count >= 99 {
YHHUD.flash(message: "已达上限,最多上传99张图片或文件")
return
}
let sheetView = YHCertificateUploadSheetView.sheetView()
......@@ -544,10 +544,11 @@ extension YHCertificateUploadContentListVC {
let size = String(format: "%.2fM", Double(fileData.count)/(1024.0 * 1024.0))
print("\(size)")
// 先OSS上传得到URL
YHHUD.show(.progress(message: "上传中..."))
self.viewModel.uploadFile(fileUrl.absoluteString) {
[weak self] successUrl, error in
guard let self = self else { return }
YHHUD.hide()
// 再调用业务接口
if let successUrl = successUrl, !successUrl.isEmpty {
let fileName = successUrl.lastPathComponent
......
......@@ -63,8 +63,8 @@ class YHCertificateInfoCell: UITableViewCell {
if !model.typeName.isEmpty {
typeStr = model.typeName
}
if !model.nameExtra.userName.isEmpty {
ownerStr = model.nameExtra.userName
if !model.nameExtra.applicant.isEmpty {
ownerStr = model.nameExtra.applicant
}
infoLabel.text = "类型: \(typeStr) 所属人: \(ownerStr)"
......@@ -124,6 +124,7 @@ class YHCertificateInfoCell: UITableViewCell {
templateButton.clipsToBounds = true
templateButton.backgroundColor = .brandMainColor8
templateButton.addTarget(self, action: #selector(didTemplateBtnClicked), for: .touchUpInside)
templateButton.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
nameTextView.attributed.text = """
\("资料名称", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(.view(templateButton, .original(.center))))
......
......@@ -225,7 +225,15 @@ class YHCertificateViewModel: YHBaseViewModel {
"operation" : operation,
]
YHHUD.show(.progress(message: "数据加载中..."))
var msg = ""
if operation == "add" {
msg = "上传中"
} else if operation == "del" {
msg = "删除中"
} else if operation == "rename" {
msg = "重命名中"
}
YHHUD.show(.progress(message: msg))
self.updateCertificates(params: params) {
[weak self] success, error 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