Commit cf8f6b90 authored by Steven杜宇's avatar Steven杜宇

// 我的证件

parent cd1ef10b
......@@ -14,10 +14,10 @@ class YHUploadContentVC: YHBaseViewController {
var orderId : Int?
var viewModel: YHCertificateViewModel = YHCertificateViewModel()
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"]
var items:[YHContentUrl] = []
var renameInputView: YHFileRenameInputView = {
let view = YHFileRenameInputView.inputView(defalutText:"adfasfsf", editBlock: {
let view = YHFileRenameInputView.inputView(defalutText:"请输入名称", editBlock: {
text in
print("\(text)")
})
......@@ -149,7 +149,7 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let item = items[indexPath.row]
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateNameCell.cellReuseIdentifier, for: indexPath)
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateNameCell.cellReuseIdentifier, for: indexPath) as! YHCertificateNameCell
return cell
}
......@@ -293,16 +293,19 @@ extension YHUploadContentVC {
[weak self] listInfo, error in
guard let self = self else { return }
// items.removeAll()
// if let listInfo = listInfo {
// let arr = listInfo.supplementList
// items.append(contentsOf: arr)
// self.tableView.reloadData()
// }
//
// if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
// YHHUD.flash(message: errorMsg, duration:3)
// }
items.removeAll()
if let listInfo = listInfo {
let arr = listInfo.supplementList
if let info = arr.first {
let arr = info.contentUrl
items.append(contentsOf: arr)
}
self.tableView.reloadData()
}
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg, duration:3)
}
}
}
}
......
......@@ -9,13 +9,6 @@
import UIKit
import AttributedString
enum YHCertificateUploadStatus : Int {
case unknown = 0
case preUpload = 1
case review = 2
case rejected = 3
case finish = 4
}
class YHCertificateInfoCell: UITableViewCell {
......
......@@ -28,6 +28,11 @@ class YHCertificateNameCell: UITableViewCell {
setupUI()
}
func updateModel(_ model: YHContentUrl) {
nameLabel.text = model.name
timeLabel.text = "上传于\(model.updatedAt)"
}
func setupUI() {
self.selectionStyle = .none
......
......@@ -10,6 +10,29 @@
import UIKit
import SmartCodable
enum YHCertificateCategoryId: Int {
// 子女
case child = 18
// 配偶
case spouse = 19
// 主申请人
case mainApplicant = 20
}
enum YHCertificateUploadStatus : Int {
// 未知
case unknown = -1
// 审核中
case review = 0
// 已完成
case finish = 1
// 审核中
case rejected = 2
// 待上传
case preUpload = 3
}
class YHCertificateViewModel: YHBaseViewModel {
var certificateEntryModel : YHCertificateEntryModel?
var arrQuestionAndAnswer : [YHQuestionAndAnswerModel?] = []
......
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