Commit 7e6b0894 authored by Steven杜宇's avatar Steven杜宇

// 消息

parent b51195dc
......@@ -198,6 +198,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
if 0 <= indexPath.row && indexPath.row < msgArr.count {
let item = msgArr[indexPath.row]
cell.updateModel(item)
cell.updateBottomBtn(type: self.type)
}
return cell
}
......@@ -213,16 +214,32 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
printLog("order_id: \(item.orderId)")
if self.type == YHMessageType.infoFill.rawValue { // 资料填写
if let orderId = Int(item.orderId), orderId > 0 {
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if self.type == YHMessageType.cerUpload.rawValue { // 证件上传
let vc = YHMineCertificateEntryViewController()
vc.orderId = Int(item.orderId)
navigationController?.pushViewController(vc)
if let orderId = Int(item.orderId), orderId > 0 {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if self.type == YHMessageType.draft.rawValue { // 文书定稿
if let orderId = Int(item.orderId), orderId > 0 {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if self.type == YHMessageType.fileSign.rawValue { // 文件签字
if let orderId = Int(item.orderId), orderId > 0 {
let vc = YHMySignatureListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
}
}
}
......
......@@ -76,10 +76,7 @@ class YHDetailMessageModel: SmartCodable {
}
enum CodingKeys: String, CodingKey {
case id = "id"
case title = "title"
case content = "content"
case time = "time"
case id, title, content, time
case isRead = "is_read"
case orderId = "order_id"
}
......
......@@ -38,6 +38,21 @@ class YHDetailMessageCell: UITableViewCell {
timeLabel.text = formatTimestamp(Double(model.time))
}
func updateBottomBtn(type:Int) {
if type == YHMessageType.infoFill.rawValue {
bottomBtn.setTitle("去填写".local, for: .normal)
} else if type == YHMessageType.cerUpload.rawValue {
bottomBtn.setTitle("去上传".local, for: .normal)
} else if type == YHMessageType.draft.rawValue {
bottomBtn.setTitle("去定稿".local, for: .normal)
} else if type == YHMessageType.fileSign.rawValue {
bottomBtn.setTitle("去签字".local, for: .normal)
}
}
func formatTimestamp(_ timestamp: TimeInterval) -> String {
let currentDate = Date()
let calendar = Calendar.current
......@@ -104,6 +119,7 @@ class YHDetailMessageCell: UITableViewCell {
whiteView.addSubview(lineView)
bottomBtn = UIButton()
bottomBtn.isUserInteractionEnabled = false
bottomBtn.setTitle("去填写".local, for: .normal)
bottomBtn.setTitleColor(UIColor(hex: 0x3570DC), for: .normal)
bottomBtn.titleLabel?.font = .PFSC_R(ofSize: 14)
......
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