Commit d6bd663a authored by Alex朱枝文's avatar Alex朱枝文

申请类别结果页

parent 4fe34e37
......@@ -602,6 +602,7 @@
04B4018F2CE1E6DB005C61A9 /* YHGCApplicationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4018E2CE1E6DB005C61A9 /* YHGCApplicationType.swift */; };
04B401912CE20360005C61A9 /* YHGCApplicationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401902CE20360005C61A9 /* YHGCApplicationModel.swift */; };
04B401932CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401922CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift */; };
04B401952CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.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 */; };
......@@ -1587,6 +1588,7 @@
04B4018E2CE1E6DB005C61A9 /* YHGCApplicationType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationType.swift; sourceTree = "<group>"; };
04B401902CE20360005C61A9 /* YHGCApplicationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationModel.swift; sourceTree = "<group>"; };
04B401922CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCVisaProgramPopVC.swift; sourceTree = "<group>"; };
04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationTypeResultController.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>"; };
......@@ -3987,6 +3989,7 @@
isa = PBXGroup;
children = (
04B401892CE1D0C6005C61A9 /* YHGCApplicationTypeController.swift */,
04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */,
04B401922CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift */,
);
path = C;
......@@ -5717,6 +5720,7 @@
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */,
0457921F2CBF62F300EBD99B /* YHResignUploadDetailModel.swift in Sources */,
04F4A5282CB8D4270026D469 /* YHResignAppointScheduleListViewController.swift in Sources */,
04B401952CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift in Sources */,
A598E9E22C7CB32D00F84739 /* YHTravelDocsPreparationListModel.swift in Sources */,
047F3DC62CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift in Sources */,
A598E9D72C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift in Sources */,
......
......@@ -93,8 +93,9 @@ extension YHGCApplicationTypeController {
}
YHCommonAlertView.show("", "确定是否提交申请类别?提交后将不能修改", "取消", "确认", fullGuestureEnable: false) {
//
} callBack: {
//
} callBack: { [weak self] in
let resultVC = YHGCApplicationTypeResultController(type: model.type)
self?.navigationController?.pushViewController(resultVC)
}
}
......@@ -110,7 +111,7 @@ extension YHGCApplicationTypeController {
let ratio = 318.0 / 375.0
bgIcon.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(bgIcon).multipliedBy(ratio)
make.height.equalTo(bgIcon.snp.width).multipliedBy(ratio)
}
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
......
//
// YHGCApplicationTypeResultController.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCApplicationTypeResultController: YHBaseViewController {
private lazy var bgIcon: UIImageView = {
let view = UIImageView()
return view
}()
private lazy var backButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("返回", for: .normal)
button.setTitle("返回", for: .highlighted)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .highlighted)
button.addTarget(self, action: #selector(clickBackButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var headerLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_M(ofSize: 21)
label.text = "您已选定高才申请类型"
return label
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#6D788A")
label.font = .PFSC_R(ofSize: 13)
label.lineBreakMode = .byCharWrapping
label.numberOfLines = 3
return label
}()
private lazy var barView: UIView = {
let view = UIView()
return view
}()
private lazy var actionBtn: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("申请标准", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.setImage(UIImage(named: "right_arrow_black_20"), for: .normal)
button.addTarget(self, action: #selector(actionBtnClicked), for: .touchUpInside)
return button
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .allCorners)
view.backgroundColor = .white
return view
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
var backButtonEvent: (() -> Void)?
private let type: YHGCApplicationType
init(type: YHGCApplicationType) {
self.type = type
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
extension YHGCApplicationTypeResultController {
@objc private func actionBtnClicked() {
showPopVC(type: type)
}
@objc private func clickBackButton() {
backButtonEvent?()
}
private func setupUI() {
gk_navTitle = "申请类别"
gk_navBarAlpha = 0
gk_navigationBar.backgroundColor = .clear
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(bgIcon)
view.addSubview(headerLabel)
view.addSubview(bottomView)
bottomView.addSubview(backButton)
view.addSubview(subContainerView)
subContainerView.addSubview(barView)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(actionBtn)
let ratio = 318.0 / 375.0
bgIcon.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(bgIcon.snp.width).multipliedBy(ratio)
}
headerLabel.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 42)
make.left.equalToSuperview().offset(20)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
subContainerView.snp.makeConstraints { make in
make.top.equalTo(headerLabel.snp.bottom).offset(50)
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(148)
}
barView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalTo(3)
make.height.equalTo(108)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(barView.snp.right).offset(20)
make.top.equalTo(barView.snp.top)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(8)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
actionBtn.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.greaterThanOrEqualTo(infoDetailLabel.snp.bottom).offset(0).priority(.high)
make.bottom.equalTo(barView.snp.bottom)
}
actionBtn.iconInRight(with: 0)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-66)
}
backButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.top.equalToSuperview().offset(8)
make.height.equalTo(48)
}
bgIcon.image = UIImage(named: type.bgIconTitle())
infoTitleLabel.text = type.titleString
infoDetailLabel.text = type.detailString
barView.backgroundColor = type.barColor()
}
private func showPopVC(type: YHGCApplicationType) {
let vc = YHGCVisaProgramPopVC(type: type)
let pc = YHBottomPresentationController(presentedViewController: vc, presenting: self)
pc.customRadius = 8.0
vc.transitioningDelegate = pc
vc.sureButtonEvent = { [weak vc] in
vc?.dismiss(animated: true)
}
present(vc, animated: true, completion: nil)
}
}
private extension YHGCApplicationType {
func bgIconTitle() -> String {
switch self {
case .typeA:
return "gc_application_type_bg_a"
case .typeB:
return "gc_application_type_bg_b"
case .typeC:
return "gc_application_type_bg_c"
}
}
func barColor() -> UIColor? {
switch self {
case .typeA:
return UIColor(hexString: "#EEDBBD")
case .typeB:
return UIColor(hexString: "#BFCDEF")
case .typeC:
return UIColor(hexString: "#BBE1F2")
}
}
}
......@@ -40,7 +40,7 @@ class YHGCVisaProgramPopVC: YHBaseViewController {
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 4, corner: .allCorners)
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
......
......@@ -12,4 +12,26 @@ enum YHGCApplicationType: Int {
case typeA
case typeB
case typeC
var titleString: String {
switch self {
case .typeA:
return "高才A类申请"
case .typeB:
return "高才B类申请"
case .typeC:
return "高才C类申请"
}
}
var detailString: String {
switch self {
case .typeA:
return "近一年度纳税收入250万港元及以上人士"
case .typeB:
return "百强大学毕业,且近5年累积工作经验时长不低于3年人士"
case .typeC:
return "百强大学毕业不足5年,且工作经验时长不足3年人士"
}
}
}
......@@ -77,8 +77,8 @@ class YHGCApplicationTypeSelectCell: UITableViewCell {
}
func setupCellInfo(type: YHGCApplicationType, isCurrentSelected: Bool) {
infoTitleLabel.text = type.titleString()
infoDetailLabel.text = type.detailString()
infoTitleLabel.text = type.titleString
infoDetailLabel.text = type.detailString
iconView.image = UIImage(named: type.iconString())
self.isCurrentSelected = isCurrentSelected
}
......@@ -159,28 +159,6 @@ private extension YHGCApplicationType {
return "gc_application_type_c"
}
}
func titleString() -> String {
switch self {
case .typeA:
return "高才A类申请"
case .typeB:
return "高才B类申请"
case .typeC:
return "高才C类申请"
}
}
func detailString() -> String {
switch self {
case .typeA:
return "近一年度纳税收入250万港元及以上人士"
case .typeB:
return "百强大学毕业,且近5年累积工作经验时长不低于3年人士"
case .typeC:
return "百强大学毕业不足5年,且工作经验时长不足3年人士"
}
}
}
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