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

// 消息

parent 00abc83d
...@@ -40,6 +40,12 @@ class YHOrderTipsItemView: UIView { ...@@ -40,6 +40,12 @@ class YHOrderTipsItemView: UIView {
} else if msg.type == YHMessageType.identityApproved.rawValue { } else if msg.type == YHMessageType.identityApproved.rawValue {
return "身份获批" return "身份获批"
} else if msg.type == YHMessageType.goToHK.rawValue {
return "赴港办证"
} else if msg.type == YHMessageType.renewal.rawValue {
return "身份续签"
} else { } else {
return "--" return "--"
} }
......
...@@ -272,6 +272,12 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -272,6 +272,12 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
} else if self.type == YHMessageType.identityApproved.rawValue { // 身份获批 } else if self.type == YHMessageType.identityApproved.rawValue { // 身份获批
self.navigationController?.popToRootViewController(animated: false) self.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service) goTabBarBy(tabType: .service)
} else if self.type == YHMessageType.goToHK.rawValue { // 赴港办证
} else if self.type == YHMessageType.renewal.rawValue { // 身份续签
} }
} }
} }
......
...@@ -190,6 +190,16 @@ class YHMessageListVC: YHBaseViewController { ...@@ -190,6 +190,16 @@ class YHMessageListVC: YHBaseViewController {
hasUnreadMsg = true hasUnreadMsg = true
} }
// 赴港办证
if !self.viewModel.msgList.goToHK.lastMessage.isEmpty {
hasUnreadMsg = true
}
// 身份续签
if !self.viewModel.msgList.renewal.lastMessage.isEmpty {
hasUnreadMsg = true
}
if hasUnreadMsg { if hasUnreadMsg {
if !isHidden { if !isHidden {
msgArr.append(self.viewModel.msgList.information) msgArr.append(self.viewModel.msgList.information)
...@@ -200,6 +210,9 @@ class YHMessageListVC: YHBaseViewController { ...@@ -200,6 +210,9 @@ class YHMessageListVC: YHBaseViewController {
} }
msgArr.append(self.viewModel.msgList.approval) msgArr.append(self.viewModel.msgList.approval)
msgArr.append(self.viewModel.msgList.goToHK)
msgArr.append(self.viewModel.msgList.renewal)
} }
} }
emptyDataTipsView.isHidden = msgArr.count > 0 emptyDataTipsView.isHidden = msgArr.count > 0
......
...@@ -17,6 +17,8 @@ enum YHMessageType: Int { ...@@ -17,6 +17,8 @@ enum YHMessageType: Int {
case fileSign = 4 // 文件签字 case fileSign = 4 // 文件签字
case infoSubmit = 5 // 资料递交 case infoSubmit = 5 // 资料递交
case identityApproved = 6 // 身份获批 case identityApproved = 6 // 身份获批
case goToHK = 7 // 赴港办证
case renewal = 8 // 身份续签
} }
class YHMessageInfoModel: SmartCodable { class YHMessageInfoModel: SmartCodable {
...@@ -54,6 +56,12 @@ class YHMessageInfoModel: SmartCodable { ...@@ -54,6 +56,12 @@ class YHMessageInfoModel: SmartCodable {
} else if type == YHMessageType.identityApproved.rawValue { } else if type == YHMessageType.identityApproved.rawValue {
return "身份获批" return "身份获批"
} else if type == YHMessageType.goToHK.rawValue {
return "赴港办证"
} else if type == YHMessageType.renewal.rawValue {
return "身份续签"
} }
return "" return ""
} }
...@@ -66,6 +74,8 @@ class YHMsgListModel: SmartCodable { ...@@ -66,6 +74,8 @@ class YHMsgListModel: SmartCodable {
var signature: YHMessageInfoModel = YHMessageInfoModel() var signature: YHMessageInfoModel = YHMessageInfoModel()
var dataSubmission: YHMessageInfoModel = YHMessageInfoModel() var dataSubmission: YHMessageInfoModel = YHMessageInfoModel()
var approval: YHMessageInfoModel = YHMessageInfoModel() var approval: YHMessageInfoModel = YHMessageInfoModel()
var goToHK: YHMessageInfoModel = YHMessageInfoModel()
var renewal: YHMessageInfoModel = YHMessageInfoModel()
required init() { required init() {
self.information.type = YHMessageType.infoFill.rawValue self.information.type = YHMessageType.infoFill.rawValue
...@@ -74,11 +84,14 @@ class YHMsgListModel: SmartCodable { ...@@ -74,11 +84,14 @@ class YHMsgListModel: SmartCodable {
self.signature.type = YHMessageType.fileSign.rawValue self.signature.type = YHMessageType.fileSign.rawValue
self.dataSubmission.type = YHMessageType.infoSubmit.rawValue self.dataSubmission.type = YHMessageType.infoSubmit.rawValue
self.approval.type = YHMessageType.identityApproved.rawValue self.approval.type = YHMessageType.identityApproved.rawValue
self.goToHK.type = YHMessageType.goToHK.rawValue
self.renewal.type = YHMessageType.renewal.rawValue
} }
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case information, certificate, draft, signature, approval case information, certificate, draft, signature, approval, renewal
case dataSubmission = "data_submission" case dataSubmission = "data_submission"
case goToHK = "go_to_hk"
} }
} }
......
...@@ -59,6 +59,12 @@ class YHDetailMessageCell: UITableViewCell { ...@@ -59,6 +59,12 @@ class YHDetailMessageCell: UITableViewCell {
} else if type == YHMessageType.identityApproved.rawValue { } else if type == YHMessageType.identityApproved.rawValue {
bottomBtn.setTitle("去查看".local, for: .normal) bottomBtn.setTitle("去查看".local, for: .normal)
} else if type == YHMessageType.goToHK.rawValue {
bottomBtn.setTitle("去查看".local, for: .normal)
} else if type == YHMessageType.renewal.rawValue {
bottomBtn.setTitle("去查看".local, for: .normal)
} }
} }
......
...@@ -51,6 +51,12 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -51,6 +51,12 @@ class YHMessageSessionCell: UITableViewCell {
} else if model.type == YHMessageType.identityApproved.rawValue { } else if model.type == YHMessageType.identityApproved.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_identity_approved") self.iconImgView.image = UIImage(named: "msg_icon_identity_approved")
} else if model.type == YHMessageType.goToHK.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_goToHK")
} else if model.type == YHMessageType.renewal.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_renewal")
} }
self.badgeLabel.isHidden = model.unreadCount <= 0 self.badgeLabel.isHidden = model.unreadCount <= 0
......
...@@ -38,8 +38,9 @@ class YHMsgViewModel: NSObject { ...@@ -38,8 +38,9 @@ class YHMsgViewModel: NSObject {
self.msgList.signature.type = YHMessageType.fileSign.rawValue self.msgList.signature.type = YHMessageType.fileSign.rawValue
self.msgList.dataSubmission.type = YHMessageType.infoSubmit.rawValue self.msgList.dataSubmission.type = YHMessageType.infoSubmit.rawValue
self.msgList.approval.type = YHMessageType.identityApproved.rawValue self.msgList.approval.type = YHMessageType.identityApproved.rawValue
self.msgList.goToHK.type = YHMessageType.goToHK.rawValue
self.msgList.renewal.type = YHMessageType.renewal.rawValue
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Message_fugangbanzheng@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Message_fugangbanzheng@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Mask group@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Mask group@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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