Commit ab582b1ea442dbae570cb66562c5a3607e25f245
1 parent
942abd6d
数字简历页面-官方认证-数字资产页-其他证书-改为一排三个多少排都展示, 点击证书跳转到证书详情页 选中对应的证书
Showing
5 changed files
with
33 additions
and
6 deletions
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/数字认证身份相关页面/CNLiveDigitalAssetsController.swift
| @@ -162,14 +162,13 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | @@ -162,14 +162,13 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | ||
| 162 | return adapt_length(length: 53)+100*hang+15 | 162 | return adapt_length(length: 53)+100*hang+15 |
| 163 | } | 163 | } |
| 164 | }else{ | 164 | }else{ |
| 165 | - var cellH:CGFloat = 317+15+72+15 | ||
| 166 | if self.certificatesArr.count > 0{ | 165 | if self.certificatesArr.count > 0{ |
| 167 | let hang:CGFloat = CGFloat((self.certificatesArr.count-1)/3+1) | 166 | let hang:CGFloat = CGFloat((self.certificatesArr.count-1)/3+1) |
| 168 | let imgW:CGFloat = CGFloat((KSreenWidth-80-30)/3.0) | 167 | let imgW:CGFloat = CGFloat((KSreenWidth-80-30)/3.0) |
| 169 | let imgH:CGFloat = 101*imgW/85.0 | 168 | let imgH:CGFloat = 101*imgW/85.0 |
| 170 | return 15+125+(imgH+10)*hang-10+92 | 169 | return 15+125+(imgH+10)*hang-10+92 |
| 171 | }else{ | 170 | }else{ |
| 172 | - return cellH | 171 | + return 15+193+72+15 |
| 173 | } | 172 | } |
| 174 | } | 173 | } |
| 175 | } | 174 | } |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/证书相关页面/CNLiveVitaeVocationalCertificateController.swift
| @@ -9,7 +9,8 @@ import Foundation | @@ -9,7 +9,8 @@ import Foundation | ||
| 9 | import SnapKit | 9 | import SnapKit |
| 10 | 10 | ||
| 11 | class CNLiveVitaeVocationalCertificateController:CNLiveBaseViewController,UITableViewDataSource, UITableViewDelegate{ | 11 | class CNLiveVitaeVocationalCertificateController:CNLiveBaseViewController,UITableViewDataSource, UITableViewDelegate{ |
| 12 | - | 12 | + var currSeleIndex = 0 |
| 13 | + | ||
| 13 | lazy var dataArray :NSMutableArray = { | 14 | lazy var dataArray :NSMutableArray = { |
| 14 | let dataArray = NSMutableArray() | 15 | let dataArray = NSMutableArray() |
| 15 | return dataArray | 16 | return dataArray |
| @@ -95,6 +96,7 @@ class CNLiveVitaeVocationalCertificateController:CNLiveBaseViewController,UITabl | @@ -95,6 +96,7 @@ class CNLiveVitaeVocationalCertificateController:CNLiveBaseViewController,UITabl | ||
| 95 | let cell = CNLiveVocationalCertificateFirCell() | 96 | let cell = CNLiveVocationalCertificateFirCell() |
| 96 | return cell | 97 | return cell |
| 97 | } | 98 | } |
| 99 | + cell.currSeleIndex = self.currSeleIndex | ||
| 98 | cell.cerListArr = self.cerListArr | 100 | cell.cerListArr = self.cerListArr |
| 99 | return cell | 101 | return cell |
| 100 | } | 102 | } |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Certificate/CNLiveVocationalCertificateFirCell.swift
| @@ -295,6 +295,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | @@ -295,6 +295,7 @@ class CNLiveVocationalCertificateFirCell: UITableViewCell, UICollectionViewDataS | ||
| 295 | func setupNewUI(cerListArr : Array<CNLiveVitaeCertificatesModel>){ | 295 | func setupNewUI(cerListArr : Array<CNLiveVitaeCertificatesModel>){ |
| 296 | self.yuanmaDescLabel.text = "共 \(cerListArr.count) 条" | 296 | self.yuanmaDescLabel.text = "共 \(cerListArr.count) 条" |
| 297 | self.collectionView.reloadData() | 297 | self.collectionView.reloadData() |
| 298 | + self.collectionView.scrollToItem(at: IndexPath(item: self.currSeleIndex, section: 0), at: .centeredHorizontally, animated: true) | ||
| 298 | } | 299 | } |
| 299 | func setupCerDetailNewUI(cerModel : CNLiveVitaeCertificatesModel){ | 300 | func setupCerDetailNewUI(cerModel : CNLiveVitaeCertificatesModel){ |
| 300 | self.cerNameDetailTitleLabel.text = (cerModel.title.count > 0) ? cerModel.title : "无" | 301 | self.cerNameDetailTitleLabel.text = (cerModel.title.count > 0) ? cerModel.title : "无" |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreviewThreeCell.swift
| @@ -152,6 +152,8 @@ class CNLiveDigitalResumePreviewThreeCell: UITableViewCell { | @@ -152,6 +152,8 @@ class CNLiveDigitalResumePreviewThreeCell: UITableViewCell { | ||
| 152 | } | 152 | } |
| 153 | imgView.clipsToBounds = true | 153 | imgView.clipsToBounds = true |
| 154 | imgView.layer.cornerRadius = 5 | 154 | imgView.layer.cornerRadius = 5 |
| 155 | + imgView.isUserInteractionEnabled = true | ||
| 156 | + imgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(cerTapAction))) | ||
| 155 | self.whiteView.addSubview(imgView) | 157 | self.whiteView.addSubview(imgView) |
| 156 | 158 | ||
| 157 | let titleX:Float = 15*imgW/85 | 159 | let titleX:Float = 15*imgW/85 |
| @@ -175,7 +177,17 @@ class CNLiveDigitalResumePreviewThreeCell: UITableViewCell { | @@ -175,7 +177,17 @@ class CNLiveDigitalResumePreviewThreeCell: UITableViewCell { | ||
| 175 | self.zhengshuNoDescTitleLabel.isHidden = false | 177 | self.zhengshuNoDescTitleLabel.isHidden = false |
| 176 | } | 178 | } |
| 177 | } | 179 | } |
| 178 | - | 180 | + @objc func cerTapAction(ges:UITapGestureRecognizer){ |
| 181 | + if let getView = ges.view{ | ||
| 182 | + let tag = getView.tag-1000 | ||
| 183 | + let vc = CNLiveVitaeVocationalCertificateController() | ||
| 184 | + vc.currSeleIndex = tag | ||
| 185 | + //跳转 证书列表页面 | ||
| 186 | + navigationViewController().pushViewController(vc, animated: true) | ||
| 187 | + | ||
| 188 | + } | ||
| 189 | + } | ||
| 190 | + | ||
| 179 | @objc func zhengshuBtnAction(){ | 191 | @objc func zhengshuBtnAction(){ |
| 180 | //跳转 选择证书页面 | 192 | //跳转 选择证书页面 |
| 181 | let vc = CNLiveDigitalResumePreViewSelectRenzhengCerController() | 193 | let vc = CNLiveDigitalResumePreViewSelectRenzhengCerController() |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/数字资产cell/CNLiveDigitalThreeCell.swift
| @@ -128,7 +128,7 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | @@ -128,7 +128,7 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | ||
| 128 | make.left.equalToSuperview().offset(adapt_length(length: 15)) | 128 | make.left.equalToSuperview().offset(adapt_length(length: 15)) |
| 129 | make.right.equalToSuperview().offset(adapt_length(length: -15)) | 129 | make.right.equalToSuperview().offset(adapt_length(length: -15)) |
| 130 | make.top.equalTo(self.authNameTitleLabel.snp.bottom).offset(adapt_length(length: 15)) | 130 | make.top.equalTo(self.authNameTitleLabel.snp.bottom).offset(adapt_length(length: 15)) |
| 131 | - make.bottom.equalToSuperview().offset(-54-15) | 131 | + make.bottom.equalToSuperview().offset(-15) |
| 132 | } | 132 | } |
| 133 | self.zhengshuView.addSubview(self.zhengshuTitleLabel) | 133 | self.zhengshuView.addSubview(self.zhengshuTitleLabel) |
| 134 | self.zhengshuTitleLabel.snp.makeConstraints { make in | 134 | self.zhengshuTitleLabel.snp.makeConstraints { make in |
| @@ -144,7 +144,7 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | @@ -144,7 +144,7 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | ||
| 144 | self.whiteView.addSubview(self.zhengshuBtn) | 144 | self.whiteView.addSubview(self.zhengshuBtn) |
| 145 | self.zhengshuBtn.snp.makeConstraints { make in | 145 | self.zhengshuBtn.snp.makeConstraints { make in |
| 146 | make.centerX.equalToSuperview() | 146 | make.centerX.equalToSuperview() |
| 147 | - make.bottom.equalToSuperview().offset(-20) | 147 | + make.bottom.equalToSuperview().offset(-20-15) |
| 148 | make.width.equalTo(86) | 148 | make.width.equalTo(86) |
| 149 | make.height.equalTo(34) | 149 | make.height.equalTo(34) |
| 150 | } | 150 | } |
| @@ -237,6 +237,17 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | @@ -237,6 +237,17 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | ||
| 237 | // navigationViewController().pushViewController(CNLiveVitaeVocationalCertificateController(), animated: true) | 237 | // navigationViewController().pushViewController(CNLiveVitaeVocationalCertificateController(), animated: true) |
| 238 | // } | 238 | // } |
| 239 | 239 | ||
| 240 | + @objc func cerTapAction(ges:UITapGestureRecognizer){ | ||
| 241 | + if let getView = ges.view{ | ||
| 242 | + let tag = getView.tag-1000 | ||
| 243 | + let vc = CNLiveVitaeVocationalCertificateController() | ||
| 244 | + vc.currSeleIndex = tag | ||
| 245 | + //跳转 证书列表页面 | ||
| 246 | + navigationViewController().pushViewController(vc, animated: true) | ||
| 247 | + | ||
| 248 | + } | ||
| 249 | + } | ||
| 250 | + | ||
| 240 | @objc func zhengshuBtnAction(){ | 251 | @objc func zhengshuBtnAction(){ |
| 241 | //跳转 证书列表页面 | 252 | //跳转 证书列表页面 |
| 242 | navigationViewController().pushViewController(CNLiveVitaeVocationalCertificateController(), animated: true) | 253 | navigationViewController().pushViewController(CNLiveVitaeVocationalCertificateController(), animated: true) |
| @@ -283,6 +294,8 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | @@ -283,6 +294,8 @@ class CNLiveDigitalThreeCell: UITableViewCell{//, UICollectionViewDelegate, UICo | ||
| 283 | let imgView = UIImageView(frame: CGRect(x: CGFloat(imgLeftGap+(imgGap+imgW)*Float(lie)), y: CGFloat((imgH+10)*Float(hang))+125, width: CGFloat(imgW), height: CGFloat(imgH))) | 294 | let imgView = UIImageView(frame: CGRect(x: CGFloat(imgLeftGap+(imgGap+imgW)*Float(lie)), y: CGFloat((imgH+10)*Float(hang))+125, width: CGFloat(imgW), height: CGFloat(imgH))) |
| 284 | imgView.contentMode = .scaleAspectFit | 295 | imgView.contentMode = .scaleAspectFit |
| 285 | imgView.tag = 1000+i | 296 | imgView.tag = 1000+i |
| 297 | + imgView.isUserInteractionEnabled = true | ||
| 298 | + imgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(cerTapAction))) | ||
| 286 | let cerModel = modelsArr[i]//CNLiveVitaeCertificateModel | 299 | let cerModel = modelsArr[i]//CNLiveVitaeCertificateModel |
| 287 | // let imgUrl = cerModel.img | 300 | // let imgUrl = cerModel.img |
| 288 | // imgView.kf.setImage(with: URL(string: imgUrl)) | 301 | // imgView.kf.setImage(with: URL(string: imgUrl)) |