Commit 90aaf9f4 authored by Steven杜宇's avatar Steven杜宇

// 我的证书

parent 85123e4a
...@@ -46,7 +46,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -46,7 +46,7 @@ class YHCertificateInfoCell: UITableViewCell {
titleColor = .failColor titleColor = .failColor
title = "已驳回".local title = "已驳回".local
case .review: case .review:
titleColor = .labelTextColor2 titleColor = .warnColor
title = "审核中".local title = "审核中".local
case .finish: case .finish:
titleColor = .labelTextColor2 titleColor = .labelTextColor2
......
...@@ -14,6 +14,7 @@ class YHCertificateNameCell: UITableViewCell { ...@@ -14,6 +14,7 @@ class YHCertificateNameCell: UITableViewCell {
var editBlock:((YHContentUrl)->())? var editBlock:((YHContentUrl)->())?
var whiteView: UIView!
var iconImgV: UIImageView! var iconImgV: UIImageView!
var nameLabel: UILabel! var nameLabel: UILabel!
var timeLabel: UILabel! var timeLabel: UILabel!
...@@ -36,7 +37,7 @@ class YHCertificateNameCell: UITableViewCell { ...@@ -36,7 +37,7 @@ class YHCertificateNameCell: UITableViewCell {
nameLabel.text = model.name nameLabel.text = model.name
timeLabel.text = "上传于\(model.updatedAt)" timeLabel.text = "上传于\(model.updatedAt)"
var suffix = model.getFileSuffixName() let suffix = model.getFileSuffixName()
var iconImgName = "" var iconImgName = ""
if suffix == "jpeg" { if suffix == "jpeg" {
...@@ -73,37 +74,47 @@ class YHCertificateNameCell: UITableViewCell { ...@@ -73,37 +74,47 @@ class YHCertificateNameCell: UITableViewCell {
self.selectionStyle = .none self.selectionStyle = .none
contentView.backgroundColor = .white contentView.backgroundColor = .white
whiteView = UIView()
contentView.addSubview(whiteView)
iconImgV = UIImageView(image:UIImage(named:"my_cer_type_jpg")) iconImgV = UIImageView(image:UIImage(named:"my_cer_type_jpg"))
contentView.addSubview(iconImgV) whiteView.addSubview(iconImgV)
nameLabel = UILabel() nameLabel = UILabel()
nameLabel.textColor = UIColor.mainTextColor nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left nameLabel.textAlignment = .left
nameLabel.numberOfLines = 0 nameLabel.numberOfLines = 0
nameLabel.font = UIFont.PFSC_M(ofSize:14) nameLabel.font = UIFont.PFSC_M(ofSize:14)
contentView.addSubview(nameLabel) whiteView.addSubview(nameLabel)
timeLabel = UILabel() timeLabel = UILabel()
timeLabel.textColor = UIColor.labelTextColor2 timeLabel.textColor = UIColor.labelTextColor2
timeLabel.textAlignment = .left timeLabel.textAlignment = .left
timeLabel.font = UIFont.PFSC_R(ofSize:11) timeLabel.font = UIFont.PFSC_R(ofSize:11)
contentView.addSubview(timeLabel) whiteView.addSubview(timeLabel)
editBtn = UIButton() editBtn = UIButton()
editBtn.setImage(UIImage(named:"my_cer_btn_edit"), for:.normal) editBtn.setImage(UIImage(named:"my_cer_btn_edit"), for:.normal)
editBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30) editBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 30, left: 30, bottom: 30, right: 30)
editBtn.addTarget(self, action: #selector(didEditBtnClicked), for: .touchUpInside) editBtn.addTarget(self, action: #selector(didEditBtnClicked), for: .touchUpInside)
contentView.addSubview(editBtn) whiteView.addSubview(editBtn)
whiteView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview()
make.top.equalToSuperview().offset(15)
make.bottom.equalToSuperview()
}
iconImgV.snp.makeConstraints { make in iconImgV.snp.makeConstraints { make in
make.width.height.equalTo(31) make.width.height.equalTo(31)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(20+6) make.left.equalToSuperview().offset(6)
} }
nameLabel.snp.makeConstraints { make in nameLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgV.snp.right).offset(18) make.left.equalTo(iconImgV.snp.right).offset(18)
make.top.equalToSuperview().offset(15+7) make.top.equalToSuperview().offset(7)
make.right.equalTo(editBtn.snp.left) make.right.equalTo(editBtn.snp.left)
} }
......
...@@ -34,7 +34,7 @@ class YHCertificateSearchBar: UIView { ...@@ -34,7 +34,7 @@ class YHCertificateSearchBar: UIView {
lazy var textField:UITextField = { lazy var textField:UITextField = {
let textField = UITextField() let textField = UITextField()
textField.backgroundColor = .clear textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "输入关键词搜索资料", attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor]) textField.attributedPlaceholder = NSAttributedString(string: "请输出资料名称搜索".local, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
textField.font = UIFont.PFSC_M(ofSize: 12) textField.font = UIFont.PFSC_M(ofSize: 12)
textField.tintColor = UIColor(hexString: "#3D88F8") textField.tintColor = UIColor(hexString: "#3D88F8")
textField.textColor = UIColor.mainTextColor textField.textColor = UIColor.mainTextColor
......
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