Commit 3f92d228a20d74da2587c36a6b27ae47857c1366

Authored by “张旭”
1 parent 99bab52d

数字简历页面-官方认证-标题要正常字体显示,看怎么放大一些,一排三个

metaCode/Classes/Main/HomePage/Controller/DigitalAuth/数字简历相关页面/CNLiveDigitalResumePreViewController.swift
... ... @@ -422,7 +422,14 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD
422 422 if cellType == .realName{
423 423 return 177+51
424 424 }else if cellType == .guanFang{
425   - return self.succDataArray.count == 0 ? DefaultPreViewCellHeight+15 : 218+15
  425 +// return self.succDataArray.count == 0 ? DefaultPreViewCellHeight+15 : 15+58+100+10+34+20
  426 + let cellH:CGFloat = DefaultPreViewCellHeight
  427 + if self.succDataArray.count == 0{
  428 + return cellH
  429 + }else{
  430 + let hang:CGFloat = CGFloat((self.succDataArray.count-1)/3+1)
  431 + return 65+100*hang+10+34+20
  432 + }
426 433 }else if cellType == .cer{
427 434 return self.threeCerDataArray.count == 0 ? DefaultPreViewCellHeight+15 : 227+15
428 435 }else if cellType == .work{
... ...
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreViewSecCell.swift
... ... @@ -61,9 +61,13 @@ class CNLiveDigitalResumePreViewSecCell: UITableViewCell, UICollectionViewDelega
61 61 let kCNLiveDigitalResumePreViewSecCollectCellID = "kCNLiveDigitalResumePreViewSecCollectCellID"
62 62 lazy var threeCollectionView: UICollectionView = {
63 63 let layout = UICollectionViewFlowLayout()
64   - layout.itemSize = CGSizeMake(60, 60+3+17+14)
65   - layout.minimumLineSpacing = (KSreenWidth-30-60*3-36)/2//22
66   - layout.scrollDirection = .horizontal
  64 +// layout.itemSize = CGSizeMake(60, 60+3+17+14)
  65 +// layout.minimumLineSpacing = (KSreenWidth-30-60*3-36)/2//22
  66 +// layout.scrollDirection = .horizontal
  67 + layout.itemSize = CGSizeMake(100, 100)
  68 + layout.minimumLineSpacing = 0//(KSreenWidth-30- 100*3-36)/2//22
  69 + layout.minimumInteritemSpacing = 0 // 图标之间的间距
  70 + layout.scrollDirection = .vertical
67 71 let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
68 72 collectionView.delegate = self
69 73 collectionView.dataSource = self
... ... @@ -96,16 +100,16 @@ class CNLiveDigitalResumePreViewSecCell: UITableViewCell, UICollectionViewDelega
96 100 }
97 101 self.whiteView.addSubview(self.myIdentityTitleLabel)
98 102 self.myIdentityTitleLabel.snp.makeConstraints { make in
99   - make.top.equalToSuperview().offset(adapt_length(length: 15))
  103 + make.top.equalToSuperview().offset(15)
100 104 make.left.equalTo(adapt_length(length: 15))
101 105 }
102 106  
103 107 self.whiteView.addSubview(self.threeCollectionView)
104 108 self.threeCollectionView.snp.makeConstraints { make in
105   - make.left.right.equalToSuperview().offset(18)
106   - make.top.equalTo(53)
107   - make.height.equalTo(60+7+17+14)
108   - make.width.equalToSuperview().offset(-36)
  109 + make.left.equalToSuperview().offset(adapt_length(length: 18))
  110 + make.top.equalTo(self.myIdentityTitleLabel.snp.bottom).offset(15)
  111 + make.bottom.equalToSuperview().offset(-34-20-10)
  112 + make.width.equalToSuperview().offset(adapt_length(length: -36))
109 113 }
110 114  
111 115 self.whiteView.addSubview(self.zhengshuBtn)
... ... @@ -163,7 +167,15 @@ class CNLiveDigitalResumePreViewSecCell: UITableViewCell, UICollectionViewDelega
163 167 cell.authListModel = self.digitalListModels?[indexPath.row]
164 168 return cell
165 169 }
166   -
  170 + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
  171 + // 假设图标高度为100
  172 + let padding: CGFloat = 0//(KSreenWidth-30-100*3-36)/2//10 // 图标间的间距
  173 + let numberOfItemsPerRow: CGFloat = 3
  174 + let availableWidth = collectionView.bounds.width - (numberOfItemsPerRow - 1) * padding
  175 + let itemWidth = availableWidth / numberOfItemsPerRow
  176 + return CGSize(width: itemWidth, height: 100) // 假设图标高度为100
  177 + }
  178 +
167 179 func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
168 180 self.threeCollectionView.reloadData()
169 181 }
... ...
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreViewSecCollectionCell.swift
... ... @@ -47,9 +47,25 @@ class CNLiveDigitalResumePreViewSecCollectionCell: UICollectionViewCell {
47 47  
48 48 override init(frame: CGRect) {
49 49 super.init(frame: frame)
  50 + self.contentView.backgroundColor = .clear
50 51 self.contentView.addSubview(self.iconImgView)
  52 + self.iconImgView.snp.makeConstraints { make in
  53 + make.top.equalToSuperview()
  54 + make.width.height.equalTo(60)
  55 + make.centerX.equalToSuperview()
  56 + }
51 57 self.contentView.addSubview(self.titleLabel)
  58 + self.titleLabel.snp.makeConstraints { make in
  59 + make.top.equalTo(self.iconImgView.snp.bottom).offset(8)
  60 + make.left.right.equalToSuperview()
  61 + }
52 62 self.contentView.addSubview(self.hangyeImgView)
  63 + self.hangyeImgView.snp.makeConstraints { make in
  64 + make.bottom.equalToSuperview().offset(-5)
  65 + make.height.equalTo(13)
  66 + make.width.equalTo(60)
  67 + make.centerX.equalToSuperview()
  68 + }
53 69 }
54 70  
55 71 required init?(coder: NSCoder) {
... ...