Commit 41aa7513a12109fc719fd1b4838a80e2bb8aae0a
1 parent
78b5b13b
* [x] 证书列表页-证书UI调整
* [x] 数字简历页面-证书的icon调整
Showing
9 changed files
with
92 additions
and
3 deletions
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Certificate/CNLiveCertificateCollectionCell.swift
| @@ -27,6 +27,7 @@ class CNLiveCertificateCollectionCell: UICollectionViewCell { | @@ -27,6 +27,7 @@ class CNLiveCertificateCollectionCell: UICollectionViewCell { | ||
| 27 | iconImgView.contentMode = .scaleAspectFill | 27 | iconImgView.contentMode = .scaleAspectFill |
| 28 | iconImgView.clipsToBounds = true | 28 | iconImgView.clipsToBounds = true |
| 29 | iconImgView.backgroundColor = .white | 29 | iconImgView.backgroundColor = .white |
| 30 | + iconImgView.layer.cornerRadius = 5 | ||
| 30 | return iconImgView | 31 | return iconImgView |
| 31 | }() | 32 | }() |
| 32 | 33 | ||
| @@ -64,6 +65,30 @@ class CNLiveCertificateCollectionCell: UICollectionViewCell { | @@ -64,6 +65,30 @@ class CNLiveCertificateCollectionCell: UICollectionViewCell { | ||
| 64 | } | 65 | } |
| 65 | 66 | ||
| 66 | func setupNewUI(model:CNLiveVitaeCertificateModel){ | 67 | func setupNewUI(model:CNLiveVitaeCertificateModel){ |
| 67 | - self.iconImgView.kf.setImage(with: URL(string: model.img)) | 68 | + self.iconImgView.subviews.forEach { view in |
| 69 | + if view.tag >= 1000{ | ||
| 70 | + view.removeFromSuperview() | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | +// self.iconImgView.kf.setImage(with: URL(string: model.img)) | ||
| 74 | + if model.status == 1{ | ||
| 75 | + self.iconImgView.image = UIImage(named: "mine_jianli_cerBg_authed") | ||
| 76 | + }else{ | ||
| 77 | + self.iconImgView.image = UIImage(named: "mine_jianli_cerBg_unauthed") | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + let titleX:Float = Float(15*self.iconImgView.width/85) | ||
| 81 | + let titleY:Float = Float(19*self.iconImgView.width/85) | ||
| 82 | + let titleW:Float = Float(55*self.iconImgView.width/85) | ||
| 83 | + let titleH:Float = 30 | ||
| 84 | + let titleLbl = UILabel() | ||
| 85 | + titleLbl.frame = CGRect(x: CGFloat(titleX), y: CGFloat(titleY), width: CGFloat(titleW), height: CGFloat(titleH)) | ||
| 86 | + titleLbl.numberOfLines = 2 | ||
| 87 | + titleLbl.font = BoldFont_11 | ||
| 88 | + titleLbl.textColor = HexColor("#333333") | ||
| 89 | + titleLbl.textAlignment = .center | ||
| 90 | + titleLbl.tag = 1001 | ||
| 91 | + self.iconImgView.addSubview(titleLbl) | ||
| 92 | + titleLbl.text = model.title | ||
| 68 | } | 93 | } |
| 69 | } | 94 | } |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Certificate/CNLiveVocationalCertificateFirCell.swift
| @@ -227,6 +227,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | @@ -227,6 +227,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | ||
| 227 | self.cerNameDetailTitleLabel.snp.makeConstraints { make in | 227 | self.cerNameDetailTitleLabel.snp.makeConstraints { make in |
| 228 | make.top.equalTo(self.cerNameTitleLabel.snp.bottom).offset(3) | 228 | make.top.equalTo(self.cerNameTitleLabel.snp.bottom).offset(3) |
| 229 | make.left.equalTo(15) | 229 | make.left.equalTo(15) |
| 230 | + make.right.equalToSuperview().offset(-5) | ||
| 230 | } | 231 | } |
| 231 | self.whiteBgView.addSubview(self.cerLevelTitleLabel) | 232 | self.whiteBgView.addSubview(self.cerLevelTitleLabel) |
| 232 | self.cerLevelTitleLabel.snp.makeConstraints { make in | 233 | self.cerLevelTitleLabel.snp.makeConstraints { make in |
| @@ -257,6 +258,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | @@ -257,6 +258,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | ||
| 257 | make.top.equalTo(self.cerNumberTitleLabel.snp.bottom).offset(3) | 258 | make.top.equalTo(self.cerNumberTitleLabel.snp.bottom).offset(3) |
| 258 | make.left.equalTo(self.cerNumberTitleLabel.snp.left) | 259 | make.left.equalTo(self.cerNumberTitleLabel.snp.left) |
| 259 | make.left.greaterThanOrEqualTo(self.cerLevelDetailTitleLabel.snp.right).offset(5) | 260 | make.left.greaterThanOrEqualTo(self.cerLevelDetailTitleLabel.snp.right).offset(5) |
| 261 | + make.right.equalToSuperview().offset(-5) | ||
| 260 | } | 262 | } |
| 261 | self.whiteBgView.addSubview(self.cerJiGouTitleLabel) | 263 | self.whiteBgView.addSubview(self.cerJiGouTitleLabel) |
| 262 | self.cerJiGouTitleLabel.snp.makeConstraints { make in | 264 | self.cerJiGouTitleLabel.snp.makeConstraints { make in |
| @@ -267,6 +269,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | @@ -267,6 +269,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | ||
| 267 | self.cerJiGouDetailTitleLabel.snp.makeConstraints { make in | 269 | self.cerJiGouDetailTitleLabel.snp.makeConstraints { make in |
| 268 | make.top.equalTo(self.cerJiGouTitleLabel.snp.bottom).offset(3) | 270 | make.top.equalTo(self.cerJiGouTitleLabel.snp.bottom).offset(3) |
| 269 | make.left.equalTo(15) | 271 | make.left.equalTo(15) |
| 272 | + make.right.equalToSuperview().offset(-5) | ||
| 270 | } | 273 | } |
| 271 | self.whiteBgView.addSubview(self.cerStatusTitleLabel) | 274 | self.whiteBgView.addSubview(self.cerStatusTitleLabel) |
| 272 | self.cerStatusTitleLabel.snp.makeConstraints { make in | 275 | self.cerStatusTitleLabel.snp.makeConstraints { make in |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreviewThreeCell.swift
| @@ -143,12 +143,29 @@ class CNLiveDigitalResumePreviewThreeCell: UITableViewCell { | @@ -143,12 +143,29 @@ class CNLiveDigitalResumePreviewThreeCell: UITableViewCell { | ||
| 143 | imgView.contentMode = .scaleAspectFit | 143 | imgView.contentMode = .scaleAspectFit |
| 144 | imgView.tag = 1000+i | 144 | imgView.tag = 1000+i |
| 145 | let cerModel = modelsArr[i]//CNLiveVitaeCertificateModel | 145 | let cerModel = modelsArr[i]//CNLiveVitaeCertificateModel |
| 146 | - let imgUrl = cerModel.img | ||
| 147 | - imgView.kf.setImage(with: URL(string: imgUrl)) | 146 | +// let imgUrl = cerModel.img |
| 147 | +// imgView.kf.setImage(with: URL(string: imgUrl)) | ||
| 148 | + if cerModel.status == 1{ | ||
| 149 | + imgView.image = UIImage(named: "mine_jianli_cerBg_authed") | ||
| 150 | + }else{ | ||
| 151 | + imgView.image = UIImage(named: "mine_jianli_cerBg_unauthed") | ||
| 152 | + } | ||
| 148 | imgView.clipsToBounds = true | 153 | imgView.clipsToBounds = true |
| 149 | imgView.layer.cornerRadius = 5 | 154 | imgView.layer.cornerRadius = 5 |
| 150 | self.whiteView.addSubview(imgView) | 155 | self.whiteView.addSubview(imgView) |
| 151 | 156 | ||
| 157 | + let titleX:Float = 15*imgW/85 | ||
| 158 | + let titleY:Float = 19*imgW/85 | ||
| 159 | + let titleW:Float = 55*imgW/85 | ||
| 160 | + let titleH:Float = 30 | ||
| 161 | + let titleLbl = UILabel() | ||
| 162 | + titleLbl.frame = CGRect(x: CGFloat(titleX), y: CGFloat(titleY), width: CGFloat(titleW), height: CGFloat(titleH)) | ||
| 163 | + titleLbl.numberOfLines = 2 | ||
| 164 | + titleLbl.font = BoldFont_11 | ||
| 165 | + titleLbl.textColor = HexColor("#333333") | ||
| 166 | + titleLbl.textAlignment = .center | ||
| 167 | + imgView.addSubview(titleLbl) | ||
| 168 | + titleLbl.text = cerModel.title | ||
| 152 | } | 169 | } |
| 153 | 170 | ||
| 154 | }else{ | 171 | }else{ |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_cerBg_authed.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_jianli_cerBg_authed@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_jianli_cerBg_authed@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_cerBg_authed.imageset/mine_jianli_cerBg_authed@2x.png
0 → 100644
15.9 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_cerBg_authed.imageset/mine_jianli_cerBg_authed@3x.png
0 → 100644
34 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_cerBg_unauthed.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "mine_jianli_cerBg_unauthed@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "mine_jianli_cerBg_unauthed@3x.png", | ||
| 14 | + "idiom" : "universal", | ||
| 15 | + "scale" : "3x" | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "info" : { | ||
| 19 | + "author" : "xcode", | ||
| 20 | + "version" : 1 | ||
| 21 | + } | ||
| 22 | +} |
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_cerBg_unauthed.imageset/mine_jianli_cerBg_unauthed@2x.png
0 → 100644
15.6 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/jianli/mine_jianli_cerBg_unauthed.imageset/mine_jianli_cerBg_unauthed@3x.png
0 → 100644
33.5 KB