Commit e0bb6777 authored by pete谢兆麟's avatar pete谢兆麟

新版本UI

parent e689bec4
......@@ -13,7 +13,7 @@ class YHMakePlanViewController: YHBaseViewController {
let viewModel = YHMakePlanViewModel()
lazy var headView: YHMakePlanHeadView = {
let view = YHMakePlanHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 333.fix + 44))
let view = YHMakePlanHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 333.fix + 44 + 45))
view.block = { tag in
self.topView.custtomView.updataData(tag)
let indexPath = IndexPath(row: tag, section: 0)
......
......@@ -70,13 +70,6 @@ class YHMakePlanHeadView: UIView {
make.height.equalTo(333.fix)
}
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(88)
make.bottom.equalTo(centerImageView.snp.bottom).offset(-16)
}
logoImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.height.equalTo(109)
......@@ -84,6 +77,13 @@ class YHMakePlanHeadView: UIView {
make.top.equalTo(96)
}
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(133)
make.top.equalTo(logoImageView.snp.bottom).offset(24)
}
custtomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(44)
......
......@@ -53,6 +53,17 @@ class YHMakePlanStateHeadView: UIView {
return label
}()
private let explainLabel: UILabel = {
let label = UILabel()
label.text = "*该概率为预估概率,最终以实际续签结果为准"
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor(hex: 0x8893a2)
label.textAlignment = .center
label.backgroundColor = UIColor(hex: 0xf8f9fb)
label.layer.cornerRadius = kCornerRadius4
return label
}()
// MARK: - Initialization
override init(frame: CGRect) {
super.init(frame: frame)
......@@ -72,6 +83,7 @@ class YHMakePlanStateHeadView: UIView {
addSubview(yearsDescriptionLabel)
addSubview(percentageLabel)
addSubview(progressDescriptionLabel)
addSubview(explainLabel)
}
private func setupConstraints() {
......@@ -98,6 +110,13 @@ class YHMakePlanStateHeadView: UIView {
make.right.equalToSuperview().offset(-16)
make.left.equalTo(self.snp.centerX)
}
explainLabel.snp.makeConstraints { make in
make.bottom.equalTo(-16)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
make.height.equalTo(29)
}
}
// MARK: - Configuration
......
......@@ -17,10 +17,10 @@ class YHMakePlanTopView: UIView {
let year = dataSource?.year ?? 0
let rate = dataSource?.pass_rate ?? ""
let a: ASAttributedString = .init("预计可续期(年) ", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hex: 0x6a7586)))
let b: ASAttributedString = .init("\(year)", .font(UIFont.PFSC_M(ofSize: 24)), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(year)", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
yearsLabel.attributed.text = a + b
let aa: ASAttributedString = .init("预测续签通过率 ", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hex: 0x6a7586)))
let bb: ASAttributedString = .init("\(rate)", .font(UIFont.PFSC_M(ofSize: 24)), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("\(rate)", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
// let c: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
percentageLabel.attributed.text = aa + bb
}
......
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