Commit 5dd433bb authored by Steven杜宇's avatar Steven杜宇

// 证件号缺失提示

parent d52ecd5d
......@@ -41,6 +41,14 @@ class YHResignInfoValidTimeItemView: UIView {
return label
}()
lazy var errorTipsLabel = {
let errorTipsLabel = UILabel()
errorTipsLabel.font = UIFont.PFSC_R(ofSize: 12)
errorTipsLabel.textColor = UIColor.failColor
errorTipsLabel.text = "证件有效期不足"
return errorTipsLabel
}()
lazy var grayContentView: UIView = {
let view = UIView()
......@@ -50,10 +58,6 @@ class YHResignInfoValidTimeItemView: UIView {
view.addGestureRecognizer(tap)
view.clipsToBounds = true
let errorTipsLabel = UILabel()
errorTipsLabel.font = UIFont.PFSC_R(ofSize: 12)
errorTipsLabel.textColor = UIColor.failColor
errorTipsLabel.text = "证件有效期不足"
view.addSubview(errorTipsLabel)
let arrowImgV = UIImageView(image: UIImage(named: "file_list_right_arrow_blue"))
......@@ -154,11 +158,21 @@ class YHResignInfoValidTimeItemView: UIView {
make.height.greaterThanOrEqualTo(20)
}
// 是否隐藏有效期不足灰色视图
// 是否隐藏红色提示语灰色视图
var isNeedHiddenGrayView = true
if let identity = familyInfo.identity {
isNeedHiddenGrayView = identity.isValidDateEnough()
if identity.number.isEmpty {
isNeedHiddenGrayView = false
errorTipsLabel.text = "证件号缺失"
} else if !identity.isValidDateEnough() {
isNeedHiddenGrayView = false
errorTipsLabel.text = "证件有效期不足"
} else {
isNeedHiddenGrayView = true
errorTipsLabel.text = ""
}
}
grayContentView.isHidden = isNeedHiddenGrayView
grayContentView.snp.remakeConstraints { make in
......
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