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

// 消息

parent b9893093
...@@ -135,22 +135,18 @@ class YHMessageListVC: YHBaseViewController { ...@@ -135,22 +135,18 @@ class YHMessageListVC: YHBaseViewController {
msgArr.removeAll() msgArr.removeAll()
// 资料填写 // 资料填写
if let infoMsg = msgList.information { if let infoMsg = msgList.information {
infoMsg.customType = .infoFill
msgArr.append(infoMsg) msgArr.append(infoMsg)
} }
// 证件上传 // 证件上传
if let cerMsg = msgList.certificate { if let cerMsg = msgList.certificate {
cerMsg.customType = .cerUpload
msgArr.append(cerMsg) msgArr.append(cerMsg)
} }
// 文书定稿 // 文书定稿
if let dratMsg = msgList.draft { if let dratMsg = msgList.draft {
dratMsg.customType = .draft
msgArr.append(dratMsg) msgArr.append(dratMsg)
} }
// 文件签字 // 文件签字
if let signMsg = msgList.signature { if let signMsg = msgList.signature {
signMsg.customType = .fileSign
msgArr.append(signMsg) msgArr.append(signMsg)
} }
emptyDataTipsView.isHidden = msgArr.count > 0 emptyDataTipsView.isHidden = msgArr.count > 0
......
...@@ -22,9 +22,7 @@ class YHMessageInfoModel: SmartCodable { ...@@ -22,9 +22,7 @@ class YHMessageInfoModel: SmartCodable {
var lastMessage: String = "" var lastMessage: String = ""
var lastMessageTime: Int = 0 var lastMessageTime: Int = 0
var type: Int = 0 var type: Int = 0
var customType: YHMessageType = .none
required init() { required init() {
} }
...@@ -33,20 +31,19 @@ class YHMessageInfoModel: SmartCodable { ...@@ -33,20 +31,19 @@ class YHMessageInfoModel: SmartCodable {
case unreadCount = "unread_count" case unreadCount = "unread_count"
case lastMessage = "last_message" case lastMessage = "last_message"
case lastMessageTime = "last_message_time" case lastMessageTime = "last_message_time"
case type
} }
func getTitle() -> String { func getTitle() -> String {
if customType == .infoFill { if type == YHMessageType.infoFill.rawValue {
return "资料填写" return "资料填写"
} else if customType == .cerUpload { } else if type == YHMessageType.cerUpload.rawValue {
return "证件上传" return "证件上传"
} else if customType == .draft { } else if type == YHMessageType.draft.rawValue {
return "文书定稿" return "文书定稿"
} else if customType == .fileSign { } else if type == YHMessageType.fileSign.rawValue {
return "文件签字" return "文件签字"
} }
return "" return ""
......
...@@ -34,16 +34,16 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -34,16 +34,16 @@ class YHMessageSessionCell: UITableViewCell {
self.nameLabel.text = model.getTitle() self.nameLabel.text = model.getTitle()
if model.customType == .infoFill { if model.type == YHMessageType.infoFill.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_info_fill") self.iconImgView.image = UIImage(named: "msg_icon_info_fill")
} else if model.customType == .cerUpload { } else if model.type == YHMessageType.cerUpload.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_cer_upload") self.iconImgView.image = UIImage(named: "msg_icon_cer_upload")
} else if model.customType == .draft { } else if model.type == YHMessageType.draft.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_draft") self.iconImgView.image = UIImage(named: "msg_icon_draft")
} else if model.customType == .fileSign { } else if model.type == YHMessageType.fileSign.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_file_sign") self.iconImgView.image = UIImage(named: "msg_icon_file_sign")
} }
......
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