Commit 8267256574e90270181ff84e23c55722b2f10898
1 parent
2eafa14f
企业提示 , 机构提示 , 已认证卡片上移 , 大图详情页没裁剪问题
Showing
2 changed files
with
55 additions
and
3 deletions
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
| ... | ... | @@ -56,6 +56,22 @@ class CNFrontMainView : UIView{ |
| 56 | 56 | make.bottom.equalToSuperview() |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + | |
| 60 | + frontDescContentView.addSubview(self.agencyTipsLabel) | |
| 61 | + agencyTipsLabel.snp.makeConstraints { make in | |
| 62 | + make.centerX.equalToSuperview() | |
| 63 | + make.bottom.equalToSuperview().offset(-62-36-8) | |
| 64 | + make.width.equalTo(self.width-60) | |
| 65 | + } | |
| 66 | + | |
| 67 | + frontDescContentView.addSubview(self.enterpriseTipsLabel) | |
| 68 | + enterpriseTipsLabel.snp.makeConstraints { make in | |
| 69 | + make.centerX.equalToSuperview() | |
| 70 | + make.bottom.equalTo(self.agencyTipsLabel.snp.top).offset(-2) | |
| 71 | + make.width.equalTo(self.agencyTipsLabel.snp.width) | |
| 72 | + } | |
| 73 | + | |
| 74 | + | |
| 59 | 75 | frontDescContentView.addSubview(self.addStandBtn) |
| 60 | 76 | addStandBtn.snp.makeConstraints { make in |
| 61 | 77 | make.centerX.equalToSuperview() |
| ... | ... | @@ -116,6 +132,27 @@ class CNFrontMainView : UIView{ |
| 116 | 132 | return textView |
| 117 | 133 | }() |
| 118 | 134 | |
| 135 | + ///未认证-企业认证提示 | |
| 136 | + lazy var enterpriseTipsLabel: UILabel = { | |
| 137 | + let enterpriseTipsLabel = UILabel.init(frame: CGRectMake(0, 0, 0, 0)) | |
| 138 | + enterpriseTipsLabel.textColor = .white | |
| 139 | + enterpriseTipsLabel.textAlignment = .center | |
| 140 | + enterpriseTipsLabel.font = Font(9) | |
| 141 | + enterpriseTipsLabel.text = "企业认证适合企业、个体工商户申请" | |
| 142 | + enterpriseTipsLabel.adjustsFontSizeToFitWidth=true | |
| 143 | + return enterpriseTipsLabel | |
| 144 | + }() | |
| 145 | + ///未认证-机构认证提示 | |
| 146 | + lazy var agencyTipsLabel: UILabel = { | |
| 147 | + let agencyTipsLabel = UILabel.init(frame: CGRectMake(0, 0, 0, 0)) | |
| 148 | + agencyTipsLabel.textColor = .white | |
| 149 | + agencyTipsLabel.textAlignment = .center | |
| 150 | + agencyTipsLabel.font = Font(9) | |
| 151 | + agencyTipsLabel.text = "机构认证适合国家机构、社会组织、高校等申请" | |
| 152 | + agencyTipsLabel.adjustsFontSizeToFitWidth=true | |
| 153 | + return agencyTipsLabel | |
| 154 | + }() | |
| 155 | + | |
| 119 | 156 | ///未认证-店铺认证 按钮(一个按钮时) |
| 120 | 157 | lazy var addStandBtn: UIButton = { |
| 121 | 158 | let addStandBtn = UIButton(type: .custom) |
| ... | ... | @@ -297,7 +334,7 @@ class CNFrontMainView : UIView{ |
| 297 | 334 | frontCardContentView.addSubview(self.iDCardView) |
| 298 | 335 | iDCardView.snp.makeConstraints { make in |
| 299 | 336 | make.centerX.equalToSuperview() |
| 300 | - make.bottom.equalToSuperview().offset(-(45-30)/2.0-30-10) | |
| 337 | + make.bottom.equalToSuperview().offset(-62) | |
| 301 | 338 | make.width.equalTo(262*KSreenWidth/375) |
| 302 | 339 | make.height.equalTo(0.52*262*KSreenWidth/375) |
| 303 | 340 | } |
| ... | ... | @@ -467,6 +504,22 @@ class CNFrontMainView : UIView{ |
| 467 | 504 | self.enterpriseStandBtn.isHidden = true |
| 468 | 505 | self.unStandBtnBgView.isHidden = true |
| 469 | 506 | } |
| 507 | + | |
| 508 | + //有企业认证显示提示lbl | |
| 509 | + if idModel!.enterpriseAuth{ | |
| 510 | + self.enterpriseTipsLabel.isHidden = false | |
| 511 | + self.enterpriseTipsLabel.textColor = HexColor(newValue!.backgroundColor) | |
| 512 | + }else{ | |
| 513 | + self.enterpriseTipsLabel.isHidden = true | |
| 514 | + } | |
| 515 | + //有机构认证显示提示lbl | |
| 516 | + if idModel!.agencyAuth{ | |
| 517 | + self.agencyTipsLabel.isHidden = false | |
| 518 | + self.agencyTipsLabel.textColor = HexColor(newValue!.backgroundColor) | |
| 519 | + }else{ | |
| 520 | + self.agencyTipsLabel.isHidden = false | |
| 521 | + } | |
| 522 | + | |
| 470 | 523 | } |
| 471 | 524 | |
| 472 | 525 | self.addStandBtn.backgroundColor = HexColor(newValue!.backgroundColor) | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumImageCell.swift
| ... | ... | @@ -13,7 +13,6 @@ class CNLiveAlbumImageCell:UITableViewCell{ |
| 13 | 13 | lazy var iconImgView :UIImageView = { |
| 14 | 14 | let iconImgView = UIImageView(frame: CGRect(x: (KSreenWidth - KSreenWidth*(KSreenWidth/DownSlideSingleCourseW))/2, y: 0, width: KSreenWidth*(KSreenWidth/DownSlideSingleCourseW), height: KSreenWidth*(KSreenWidth/DownSlideSingleCourseW))) |
| 15 | 15 | iconImgView.contentMode = .scaleAspectFill |
| 16 | - iconImgView.clipsToBounds = true | |
| 17 | 16 | return iconImgView |
| 18 | 17 | }() |
| 19 | 18 | |
| ... | ... | @@ -30,7 +29,7 @@ class CNLiveAlbumImageCell:UITableViewCell{ |
| 30 | 29 | private func setupUI() { |
| 31 | 30 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) |
| 32 | 31 | self.contentView.addSubview(self.iconImgView) |
| 33 | - | |
| 32 | + self.contentView.clipsToBounds = true | |
| 34 | 33 | } |
| 35 | 34 | |
| 36 | 35 | ... | ... |