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

// 我的证书

parent 3714728a
...@@ -66,7 +66,8 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou ...@@ -66,7 +66,8 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let item = items[indexPath.section] let item = items[indexPath.section]
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateInfoCell.cellReuseIdentifier, for: indexPath) let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateInfoCell.cellReuseIdentifier, for: indexPath) as! YHCertificateInfoCell
cell.updateModel(item)
return cell return cell
} }
...@@ -76,26 +77,6 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou ...@@ -76,26 +77,6 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// if true {
//
// selectUploadFileFromICouldDrive()
// return
// }
if true {
YHCertificateUploadSheetView.sheetView.show {
[weak self] actionType in
guard let self = self else { return }
print("%d", actionType.rawValue)
}
return
}
YHCertificateFilterView.sheetView.show()
return
print("ZZZ")
let vc = YHUploadContentVC() let vc = YHUploadContentVC()
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
......
...@@ -11,6 +11,9 @@ import IQKeyboardManagerSwift ...@@ -11,6 +11,9 @@ import IQKeyboardManagerSwift
class YHUploadContentVC: YHBaseViewController { class YHUploadContentVC: YHBaseViewController {
var orderId : Int?
var viewModel: YHCertificateViewModel = YHCertificateViewModel()
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"] var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"]
var renameInputView: YHFileRenameInputView = { var renameInputView: YHFileRenameInputView = {
...@@ -270,3 +273,37 @@ extension YHUploadContentVC { ...@@ -270,3 +273,37 @@ extension YHUploadContentVC {
} }
} }
} }
extension YHUploadContentVC {
func requestList() {
let params = [
"order_id" : orderId ?? 0,
"node": "1",
"state": "1",
"category_id": "20",
"status_all": "",
"keywork": "",
"template_cate_id": "",
"supplement_ids": []] as [String: Any]
// state: 3:待上传 2:已驳回 1:已通过 0:审核中
viewModel.getCertificateList(params: params) {
[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)
// }
}
}
}
...@@ -65,6 +65,22 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -65,6 +65,22 @@ class YHCertificateInfoCell: UITableViewCell {
} }
} }
func updateModel(_ model: YHSupplementInfo) {
if model.templateInfo.materialPath.isEmpty {
nameTextView.attributed.text = """
\(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16)))
"""
} else {
nameTextView.attributed.text = """
\(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(.view(templateLabel, .original(.center)))
"""
}
infoLabel.text = "类型: \(model.typeName) 所属人: \(model.nameExtra.userName)"
}
func setupUI() { func setupUI() {
self.selectionStyle = .none self.selectionStyle = .none
......
...@@ -160,22 +160,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -160,22 +160,6 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row >= items.count) { return } if (indexPath.row >= items.count) { return }
if true {
// YHCertificateUploadFailTipsView.tipsView().show()
// let vc = YHUploadContentVC()
// self.navigationController?.pushViewController(vc)
let vc = YHMaterialListViewController()
self.navigationController?.pushViewController(vc)
return
}
if !checkLogin() { if !checkLogin() {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController()) let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom vc.modalPresentationStyle = .custom
......
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