Commit 73c64783 authored by Alex朱枝文's avatar Alex朱枝文

高才-我的方案

parent 6c297ffc
......@@ -605,6 +605,7 @@
04B401952CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */; };
04B4019B2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4019A2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift */; };
04B4019F2CE32175005C61A9 /* YHGCMineSchemeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4019E2CE32175005C61A9 /* YHGCMineSchemeViewController.swift */; };
04B401A22CE331F5005C61A9 /* YHGCSchemeTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401A12CE331F5005C61A9 /* YHGCSchemeTableHeadView.swift */; };
04B4B8D52C89CE5E00ED82BC /* YHButlerServiceMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */; };
04B4B8D72C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */; };
04B4B8DC2C90696E00ED82BC /* YHResignDocumentManagementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */; };
......@@ -1595,6 +1596,7 @@
04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationTypeResultController.swift; sourceTree = "<group>"; };
04B4019A2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCBasicInfoFillViewController.swift; sourceTree = "<group>"; };
04B4019E2CE32175005C61A9 /* YHGCMineSchemeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCMineSchemeViewController.swift; sourceTree = "<group>"; };
04B401A12CE331F5005C61A9 /* YHGCSchemeTableHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCSchemeTableHeadView.swift; sourceTree = "<group>"; };
04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessage.swift; sourceTree = "<group>"; };
04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessageHandler.swift; sourceTree = "<group>"; };
04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentManagementVC.swift; sourceTree = "<group>"; };
......@@ -4057,6 +4059,7 @@
04B4019C2CE3212B005C61A9 /* MyScheme(我的方案) */ = {
isa = PBXGroup;
children = (
04B401A02CE33139005C61A9 /* V */,
04B4019D2CE32135005C61A9 /* C */,
);
path = "MyScheme(我的方案)";
......@@ -4070,6 +4073,14 @@
path = C;
sourceTree = "<group>";
};
04B401A02CE33139005C61A9 /* V */ = {
isa = PBXGroup;
children = (
04B401A12CE331F5005C61A9 /* YHGCSchemeTableHeadView.swift */,
);
path = V;
sourceTree = "<group>";
};
04B4B8D32C89CCE400ED82BC /* M */ = {
isa = PBXGroup;
children = (
......@@ -6275,6 +6286,7 @@
0425E6462BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift in Sources */,
044D0C0F2C2287C500C5CF5E /* YHEditViewModel.swift in Sources */,
045EEEA92B9F171A0022A143 /* YHWorkExperienceListViewController.swift in Sources */,
04B401A22CE331F5005C61A9 /* YHGCSchemeTableHeadView.swift in Sources */,
0414708E2C895A9300B7B688 /* YHButlerServiceViewModel.swift in Sources */,
04CE1AE32C2AD91F001CB80A /* YHApplyActivityAlert.swift in Sources */,
A598E9E42C7EEFD300F84739 /* YHTravelDocsPreparationDetailModel.swift in Sources */,
......
......@@ -17,8 +17,9 @@ class YHGCMineSchemeViewController: YHBaseViewController {
return vm
}()
lazy var headView: YHSchemeTableHeadView = {
let headView = YHSchemeTableHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 566))
lazy var headView: YHGCSchemeTableHeadView = {
let headView = YHGCSchemeTableHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 422))
headView.update(type: .typeA, name: "--")
return headView
}()
......@@ -101,7 +102,10 @@ extension YHGCMineSchemeViewController {
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let param = ["order_id": orderID]
reqSchemeVM.getMySchemeData(params: param) { success, error in
reqSchemeVM.getMySchemeData(params: param) { [weak self] success, error in
guard let self = self else {
return
}
if success == true {
guard let model = self.reqSchemeVM.schemeModel else { return }
......@@ -124,8 +128,7 @@ extension YHGCMineSchemeViewController {
let arrText: [String] = [ageTxt, eduTxtA, workExp, famous_enterprise, talent_list, language, family]
let arrH: [String] = [model.age_score.string, model.education_score_a.string, model.work_experience_score.string, model.famous_enterprise.string, model.talent_list.string, model.language_score.string, model.background_score.string]
self.headView.dataSource = YHScemeHeadModel(totalScore: model.sum_score.string, scoreArray: arrText, scoreLightArray: arrH, addScore: "", name: model.username.defaultStringIfEmpty(), addtionStr: model.education_score_b.string)
self.headView.update(type: .typeA, name: model.username.defaultStringIfEmpty())
} else {
YHHUD.flash(message: error?.errorMsg ?? "请求出错")
}
......
//
// YHGCSchemeTableHeadView.swift
// galaxy
//
// Created by alexzzw on 2024/11/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHGCSchemeTableHeadView: UIView {
private lazy var centerImageView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "gc_scheme_head_bg")
return view
}()
private lazy var centerView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var leftImageView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "scheme_head_left")
return view
}()
private lazy var rightImageView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "scheme_head_right")
return view
}()
private lazy var nameLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 24)
label.textColor = UIColor(hex: 0xFFFFFF)
label.textAlignment = .center
label.lineBreakMode = .byTruncatingMiddle
label.text = "尊敬的--"
return label
}()
private lazy var messageLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor(hex: 0xFFFFFF)
label.textAlignment = .center
label.numberOfLines = 0
label.text = "您好,如电话沟通,这是我们为您定制的申请方案,方案详情如下:"
return label
}()
private lazy var logoImageView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "scheme_head_logo")
return view
}()
private lazy var titleView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xD48638)
return view
}()
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "申请方案"
return label
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .allCorners)
view.backgroundColor = UIColor(hex: 0xCF9764, alpha: 0.12)
return view
}()
private lazy var applicationTypeLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "申请类型:"
return label
}()
private lazy var applicationTypeResultLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 24)
label.textColor = UIColor(hex: 0xD48638)
label.text = "--"
return label
}()
private lazy var dotView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#F2DABF")
view.layer.cornerRadius = 1.0
view.clipsToBounds = true
return view
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "--"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var dashLineView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "scheme_line_image")
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(hex: 0x070E33)
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func update(type: YHGCApplicationType, name: String) {
applicationTypeResultLabel.text = type.titleString
infoDetailLabel.attributed.text = type.attributedTips()
nameLabel.text = name
}
private func setUpView() {
addSubview(centerImageView)
addSubview(centerView)
addSubview(leftImageView)
addSubview(rightImageView)
addSubview(nameLabel)
addSubview(messageLabel)
addSubview(logoImageView)
addSubview(titleView)
addSubview(titleLabel)
addSubview(subContainerView)
subContainerView.addSubview(applicationTypeLabel)
subContainerView.addSubview(applicationTypeResultLabel)
addSubview(dotView)
addSubview(infoDetailLabel)
addSubview(dashLineView)
centerImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(416)
}
centerView.snp.makeConstraints { make in
make.left.equalTo(8)
make.right.equalTo(-8)
make.top.equalTo(416)
make.bottom.equalToSuperview()
}
leftImageView.snp.makeConstraints { make in
make.left.equalTo(35)
make.height.equalTo(80)
make.width.equalTo(65)
make.top.equalTo(27)
}
rightImageView.snp.makeConstraints { make in
make.right.equalTo(-35)
make.height.equalTo(80)
make.width.equalTo(65)
make.top.equalTo(27)
}
nameLabel.snp.makeConstraints { make in
make.right.equalTo(-75)
make.height.equalTo(33.5)
make.left.equalTo(75)
make.top.equalTo(26)
}
messageLabel.snp.makeConstraints { make in
make.right.equalTo(-75)
make.height.equalTo(43)
make.left.equalTo(75)
make.top.equalTo(65.5)
}
logoImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.height.equalTo(22)
make.width.equalTo(58.5)
make.top.equalTo(147)
}
titleView.snp.makeConstraints { make in
make.left.equalTo(28)
make.top.equalTo(238.5)
make.height.equalTo(16.5)
make.width.equalTo(3.5)
}
titleLabel.snp.makeConstraints { make in
make.centerY.equalTo(titleView.snp.centerY)
make.left.equalTo(titleView.snp.right).offset(4)
make.height.equalTo(24)
make.width.equalTo(150)
}
subContainerView.snp.makeConstraints { make in
make.left.equalTo(titleView.snp.left)
make.top.equalTo(titleLabel.snp.bottom).offset(18)
make.right.equalToSuperview().offset(-28)
make.height.equalTo(64)
}
applicationTypeLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.centerY.equalToSuperview()
}
applicationTypeResultLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.left.greaterThanOrEqualTo(applicationTypeLabel.snp.right).offset(10)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(subContainerView.snp.left).offset(11)
make.top.equalTo(subContainerView.snp.bottom).offset(13)
make.right.lessThanOrEqualToSuperview().offset(-28)
}
dotView.snp.makeConstraints { make in
make.right.equalTo(infoDetailLabel.snp.left).offset(-4)
make.top.equalTo(infoDetailLabel.snp.top).offset(8)
make.width.height.equalTo(3)
}
dashLineView.snp.makeConstraints { make in
make.left.equalTo(subContainerView.snp.left)
make.right.equalTo(subContainerView.snp.right)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(28)
make.height.equalTo(1)
}
}
}
private extension YHGCApplicationType {
func attributedTips() -> ASAttributedString {
switch self {
case .typeA:
let attr1: ASAttributedString = .init(string: "根据评估,您近12个月的税前收入超过", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let attr2: ASAttributedString = .init(string: "250万港元", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor(hexString: "#D48638") ?? .brown))
let attr3: ASAttributedString = .init(string: ",符合", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let attr4: ASAttributedString = .init(string: "高才A类", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor(hexString: "#D48638") ?? .brown))
let attr5: ASAttributedString = .init(string: "申请资格。", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
return attr1 + attr2 + attr3 + attr4 + attr5
case .typeB:
let attr1: ASAttributedString = .init(string: "根据评估,您已取得", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let attr2: ASAttributedString = .init(string: "合资格高校学士学位", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor(hexString: "#D48638") ?? .brown))
let attr3: ASAttributedString = .init(string: ",符合", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let attr4: ASAttributedString = .init(string: "高才B类", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor(hexString: "#D48638") ?? .brown))
let attr5: ASAttributedString = .init(string: "申请资格。", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
return attr1 + attr2 + attr3 + attr4 + attr5
case .typeC:
let attr1: ASAttributedString = .init(string: "根据评估,您已取得", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let attr2: ASAttributedString = .init(string: "合资格高校学士学位", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor(hexString: "#D48638") ?? .brown))
let attr3: ASAttributedString = .init(string: ",符合", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let attr4: ASAttributedString = .init(string: "高才C类", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor(hexString: "#D48638") ?? .brown))
let attr5: ASAttributedString = .init(string: "申请资格。", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
return attr1 + attr2 + attr3 + attr4 + attr5
}
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_scheme_head_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_scheme_head_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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