Commit aa85a7b0 authored by David黄金龙's avatar David黄金龙

1、文件 清单 优化

2、使用同一变量
parent 175f3733
......@@ -26,12 +26,8 @@ class YHHomeBannerView: UIView {
bannerView.selectItem(at: 0, animated: false)
// 开启定时器开始滚动
bannerView.automaticSlidingInterval = bannerSildingInterval
bannerView.removesInfiniteLoopForSingleItem = true
bannerView.alwaysBounceHorizontal = true
}
}
......
......@@ -53,15 +53,28 @@ class YHFileListItemView: UIView {
//status
private lazy var statusLable : UILabel = {
let lable0 = UILabel(text: "状态")
let lable0 = UILabel(text: "待提交")
lable0.textColor = UIColor.brandMainColor
lable0.font = UIFont.PFSC_R(ofSize: 12)
lable0.numberOfLines = 0
lable0.font = UIFont.PFSC_M(ofSize: 12)
lable0.lineBreakMode = .byWordWrapping
lable0.textAlignment = .right
return lable0
}()
private lazy var nextImageView : UIImageView = {
let view = UIImageView()
view.contentMode = .scaleAspectFill
view.image = UIImage(named: "file_list_right_arrow_blue")
return view
}()
private lazy var statusHoldView : UIView = {
let view = UIView()
view.backgroundColor = .clear
return view
}()
//line
private lazy var line : UIView = {
let view = UIView()
......@@ -70,6 +83,12 @@ class YHFileListItemView: UIView {
}()
var dataModel : YHSupplementInfo? {
didSet {
......@@ -98,15 +117,40 @@ private extension YHFileListItemView {
make.centerY.equalToSuperview()
}
addSubview(statusLable)
statusLable.snp.makeConstraints { make in
// addSubview(statusLable)
// statusLable.snp.makeConstraints { make in
// make.right.equalTo(-26)
// make.centerY.equalToSuperview()
// make.height.equalTo(20)
// make.width.equalTo(60)
// }
addSubview(statusHoldView)
statusHoldView.snp.makeConstraints { make in
make.right.equalTo(-26)
make.centerY.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(60 + 16)
}
statusHoldView.addSubview(nextImageView)
nextImageView.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.height.width.equalTo(16)
}
statusHoldView.addSubview(statusLable)
statusLable.snp.makeConstraints { make in
make.right.equalTo(nextImageView.snp.left).offset(0)
make.centerY.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(60)
}
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalTo(kMargin)
......@@ -145,9 +189,11 @@ extension YHFileListItemView {
if dataModel.checkStatus == 2 {
text = "需重传"
color = .failColor
nextImageView.image = UIImage(named: "file_list_right_arrow_red")
} else if dataModel.checkStatus == 3 {
text = "待提交"
color = .brandMainColor
nextImageView.image = UIImage(named: "file_list_right_arrow_blue")
} else {
text = "需过滤" + String(dataModel.checkStatus)
color = UIColor.purple
......
......@@ -68,11 +68,42 @@ private extension YHFileListItemsView {
}
if dataModel.supplement_list.isEmpty {
let holdView : UIView = UIView()
holdView.backgroundColor = UIColor(hex: 0xE5E9F2, alpha: 0.3)
addSubview(holdView)
holdView.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(14)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.bottom.equalToSuperview()
make.height.equalTo(72)
}
let lable = UILabel()
lable.text = "暂无待完善清单"
lable.font = UIFont.PFSC_R(ofSize: 12)
lable.textColor = UIColor(hex: 0x94A3B8, alpha: 1.0)
holdView.addSubview(lable)
lable.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
}
return
}
let holdView : UIView = UIView()
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
holdView.layer.borderWidth = 0.5
holdView.layer.borderColor = UIColor.separatorColor.cgColor
holdView.layer.borderColor = UIColor(hex: 0xDEE5F1, alpha: 1.0).cgColor
addSubview(holdView)
holdView.snp.makeConstraints { make in
......@@ -83,7 +114,7 @@ private extension YHFileListItemsView {
}
let sessionView : UIView = UIView()
sessionView.backgroundColor = UIColor(hex: 0xD9E4FD, alpha: 1.0)
sessionView.backgroundColor = UIColor(hex: 0xE5E9F2, alpha: 0.3)
holdView.addSubview(sessionView)
if dataModel.supplement_list.isEmpty {
......@@ -167,6 +198,3 @@ private extension YHFileListItemsView {
holdView.layer.borderColor = UIColor(hex: 0xDEE5F1, alpha: 1.0).cgColor
}
}
......@@ -390,7 +390,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
} else if supplementInfo.checkStatus == YHCertificateUploadStatus.rejected.rawValue {
text = "已驳回".local
textColor = UIColor(hexString: "#F81D22")!
textColor = UIColor.failColor
bgColor = UIColor(hexString: "#F81D22", transparency: 0.08)!
}
statusLabel.text = text
......
......@@ -76,7 +76,7 @@ class YHFormItemDegreeInfoCell: UITableViewCell {
let btn = UIButton()
btn.setTitle("删除", for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
btn.setTitleColor(UIColor(hex: 0xF81D22), for: .normal)
btn.setTitleColor(UIColor.failColor, for: .normal)
btn.addTarget(self, action: #selector(didClickDeleteBtn(btn:)), for: .touchUpInside)
btn.isHidden = true
return btn
......
......@@ -109,7 +109,7 @@ class YHDetailMessageCell: UITableViewCell {
whiteView.addSubview(titleLabel)
unreadPointView = UIView()
unreadPointView.backgroundColor = UIColor(hex:0xF81D22)
unreadPointView.backgroundColor = UIColor.failColor
unreadPointView.layer.cornerRadius = Self.unreadPointWidth/2.0
unreadPointView.clipsToBounds = true
whiteView.addSubview(unreadPointView)
......
......@@ -110,7 +110,7 @@ class YHMessageSessionCell: UITableViewCell {
iconContentView.addSubview(iconImgView)
badgeLabel = UILabel()
badgeLabel.backgroundColor = UIColor(hex:0xF81D22)
badgeLabel.backgroundColor = UIColor.failColor
badgeLabel.textColor = .white
badgeLabel.textAlignment = .center
badgeLabel.font = UIFont.PFSC_M(ofSize:10)
......
......@@ -28,7 +28,7 @@ class YHPersonalCenterCell: UITableViewCell {
lazy var redPointView:UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xF81D22)
view.backgroundColor = UIColor.failColor
view.layer.cornerRadius = Self.redPointWidth/2.0
view.clipsToBounds = true
return view
......
......@@ -62,7 +62,6 @@ extension UIColor {
//提示 color
static let tipsColor : UIColor = UIColor(hexString: "#2F7EF6")!
//页面背景
static let pageBkgColor : UIColor = UIColor(hexString: "#F8F8F8")!
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194932@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194932@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194932@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194932@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