Commit 69daf5ab authored by Steven杜宇's avatar Steven杜宇

Merge branch 'develop' into duyu

parents 117605e1 e8c68bf6
......@@ -86,6 +86,9 @@
A5573EF52B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF42B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift */; };
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */; };
A57F1F252B48F09200B644E6 /* ATAuthSDK_D.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04808C032B4686510056D53C /* ATAuthSDK_D.framework */; };
A58556BA2B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58556B92B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift */; };
A58556C02B6C82AF003746B2 /* YHScoreResultBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58556BF2B6C82AF003746B2 /* YHScoreResultBaseModel.swift */; };
A58556C22B6C8412003746B2 /* YHScoreResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58556C12B6C8412003746B2 /* YHScoreResultModel.swift */; };
A58951C52B398D1000225C19 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A58951C42B398D1000225C19 /* Launch Screen.storyboard */; };
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */; };
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */; };
......@@ -302,6 +305,9 @@
A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = galaxyUITests.swift; sourceTree = "<group>"; };
A5573EF42B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = galaxyUITestsLaunchTests.swift; sourceTree = "<group>"; };
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractMainItemStatusCell.swift; sourceTree = "<group>"; };
A58556B92B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPersonInfoFillStepModel.swift; sourceTree = "<group>"; };
A58556BF2B6C82AF003746B2 /* YHScoreResultBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScoreResultBaseModel.swift; sourceTree = "<group>"; };
A58556C12B6C8412003746B2 /* YHScoreResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScoreResultModel.swift; sourceTree = "<group>"; };
A58951C42B398D1000225C19 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginViewController.swift; sourceTree = "<group>"; };
A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeView.swift; sourceTree = "<group>"; };
......@@ -643,20 +649,22 @@
name = Frameworks;
sourceTree = "<group>";
};
A5167B292B6A174B0084C08F /* MyScore */ = {
A5167B292B6A174B0084C08F /* MyScore(我的评分) */ = {
isa = PBXGroup;
children = (
A5167B2C2B6A17660084C08F /* C */,
A5167B2B2B6A175F0084C08F /* V */,
A5167B2A2B6A175A0084C08F /* M */,
);
path = MyScore;
path = "MyScore(我的评分)";
sourceTree = "<group>";
};
A5167B2A2B6A175A0084C08F /* M */ = {
isa = PBXGroup;
children = (
A5FD63DE2B6639AD00D1D9DA /* YHScoreDataModel.swift */,
A58556BF2B6C82AF003746B2 /* YHScoreResultBaseModel.swift */,
A58556C12B6C8412003746B2 /* YHScoreResultModel.swift */,
);
path = M;
sourceTree = "<group>";
......@@ -778,6 +786,37 @@
path = galaxyUITests;
sourceTree = "<group>";
};
A58556BB2B6BD81C003746B2 /* BaseInformation(基本资料) */ = {
isa = PBXGroup;
children = (
A58556BC2B6BD84C003746B2 /* M */,
A58556BD2B6BD85A003746B2 /* V */,
A58556BE2B6BD85E003746B2 /* C */,
);
path = "BaseInformation(基本资料)";
sourceTree = "<group>";
};
A58556BC2B6BD84C003746B2 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
A58556BD2B6BD85A003746B2 /* V */ = {
isa = PBXGroup;
children = (
);
path = V;
sourceTree = "<group>";
};
A58556BE2B6BD85E003746B2 /* C */ = {
isa = PBXGroup;
children = (
);
path = C;
sourceTree = "<group>";
};
A5ACE8D72B4564F7002C94D2 /* Classes */ = {
isa = PBXGroup;
children = (
......@@ -972,6 +1011,7 @@
A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */,
A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */,
A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */,
A58556B92B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift */,
);
path = M;
sourceTree = "<group>";
......@@ -1097,8 +1137,9 @@
A5C382C82B5E101E00C5E65C /* ServiceProcess(流程) */ = {
isa = PBXGroup;
children = (
A58556BB2B6BD81C003746B2 /* BaseInformation(基本资料) */,
A5167B2D2B6A23D10084C08F /* PersonInfoList(个人信息表) */,
A5167B292B6A174B0084C08F /* MyScore */,
A5167B292B6A174B0084C08F /* MyScore(我的评分) */,
0468D43D2B61F68100CFB916 /* MainApplicantInformation */,
041B52882B5E13EB007EBCEB /* FamilyMember */,
);
......@@ -1350,6 +1391,7 @@
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */,
A58556C22B6C8412003746B2 /* YHScoreResultModel.swift in Sources */,
0468D47A2B68A08600CFB916 /* YHAddressPickViewTableViewCell.swift in Sources */,
0468D4342B56587B00CFB916 /* YHOSSManager.swift in Sources */,
A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */,
......@@ -1430,6 +1472,7 @@
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */,
042FBBC12B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift in Sources */,
A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */,
A58556BA2B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift in Sources */,
A5FD63D42B65F99500D1D9DA /* YHScoreItemCell.swift in Sources */,
A5ACE9432B4564F7002C94D2 /* UILable+Extension.swift in Sources */,
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
......@@ -1443,6 +1486,7 @@
0468D47B2B68A08600CFB916 /* YHAddressPresentAnimated.swift in Sources */,
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */,
0468D4782B68A08600CFB916 /* YHAddressModel.swift in Sources */,
A58556C02B6C82AF003746B2 /* YHScoreResultBaseModel.swift in Sources */,
A5C5B2EA2B4ECA4D00A7C5D1 /* YHDavidModel0.swift in Sources */,
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */,
042FBBC92B64DC8900F9DE23 /* YHFormItemExpireDateCell.swift in Sources */,
......
......@@ -12,11 +12,9 @@ import UIKit
*信息完善列表
*/
class YHInformationPerfectListVC: YHBaseViewController {
// private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private var arrData : [YHInformationPerfectModel] = []
private var myTargetIndex : Int32 = 1 //for test hjl
var orderId : Int?
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private var hasSubmitFlag : Bool = false {
didSet {
submitBtn.isHidden = hasSubmitFlag
......@@ -25,13 +23,13 @@ class YHInformationPerfectListVC: YHBaseViewController {
if hasSubmitFlag == true {
headerTitleDesLable.text = "您已提交信息表"
} else {
headerTitleDesLable.text = "您好,DavidHuang先生"
headerTitleDesLable.text = "您好," + (serviceCenterMainReqVM.informationFillStepModel?.applicantName ?? "-")
}
}
}
private lazy var headerTitleDesLable : UILabel = {
let titleLable = UILabel(text: "您好,黄先生")
let titleLable = UILabel(text: "您好,-")
titleLable.font = UIFont.PFSC_B(ofSize: 21)
titleLable.textColor = UIColor.mainTextColor
return titleLable
......@@ -81,38 +79,63 @@ class YHInformationPerfectListVC: YHBaseViewController {
super.viewDidLoad()
setupUI()
loadData()
}
}
extension YHInformationPerfectListVC {
func submitSweetNotify() {
let params = ["option":1,"orderId":orderId]
serviceCenterMainReqVM.submitSweetNotifyOp(params: params as [String : Any]) { success, error in
if success == true {
self.hasSubmitFlag = true
} else {
YHHUD.flash(message: error?.errorMsg ?? "发生错误,请重试")
}
}
}
func showTipsAlert() {
YHInformationFillTipsAlertView.showCheckView { agree in
if agree == true {
printLog("点击了 确认 按钮")
self.submitSweetNotify()
} else {
printLog("点击了 取消 按钮")
}
}
}
}
extension YHInformationPerfectListVC {
func loadData() {
// self.serviceCenterMainReqVM.getContactList { success, error in
// if success == true {
//
// }
// self.homeTableView.reloadData()
// }
guard let orderId = orderId else { return}
self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in
if success == true {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
}
if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
self.hasSubmitFlag = true
} else {
self.hasSubmitFlag = false
}
}
self.homeTableView.reloadData()
}
}
@objc func goScoreVC() {
//我的评分
navigationController?.pushViewController(YHScoreDetailViewController())
let vc = YHScoreDetailViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
@objc func goInfoListVC() {
//个人信息表
navigationController?.pushViewController(YHPersonInformMainViewController())
let vc = YHPersonInformMainViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
@objc func clickSubmitBtn() {
......@@ -139,34 +162,6 @@ extension YHInformationPerfectListVC {
gk_navBarAlpha = 1.0
gk_navLineHidden = true
let arr = [1,2,3,4,5,6]
let target = myTargetIndex //for test hjl 待填写的项目
for item in arr {
let model = YHInformationPerfectModel()
model.type = item
arrData.append(model)
if item < target {
model.isFinished = true
} else {
model.isFinished = false
}
if item == target {
model.isDoing = true
}
if item == target + 1 {
model.isNextDoingCell = true
} else {
model.isNextDoingCell = false
}
}
view.addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
......@@ -187,18 +182,20 @@ extension YHInformationPerfectListVC {
submitBtn.setTitle("提交信息", for: .normal)
submitBtn.setTitleColor(UIColor.white, for: .normal)
submitBtn.setBackgroundImage(UIImage.from(color: UIColor(hex: 0x4D9FF8, alpha: 1.0)), for: .normal)
submitBtn.layer.cornerRadius = 8
submitBtn.layer.cornerRadius = kCornerRadius6
submitBtn.clipsToBounds = true
myBottomView.addSubview(submitBtn)
submitBtn.addTarget(self, action: #selector(clickSubmitBtn), for: .touchUpInside)
submitBtn.snp.makeConstraints { make in
make.top.equalTo(8)
make.left.equalTo(16)
make.right.equalTo(-16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(48)
}
submitBtn.layoutIfNeeded()
submitBtn.backgroundGradient()
submitBtn.isHidden = hasSubmitFlag
submitHoldView.isHidden = !hasSubmitFlag
......@@ -206,8 +203,8 @@ extension YHInformationPerfectListVC {
myBottomView.addSubview(submitHoldView)
submitHoldView.snp.makeConstraints { make in
make.top.equalTo(8)
make.left.equalTo(16)
make.right.equalTo(-16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(48)
}
......@@ -215,13 +212,13 @@ extension YHInformationPerfectListVC {
let scoreButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("我的评分", for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
button.layer.cornerRadius = 8
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x3c86f8).cgColor
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.addTarget(self, action: #selector(goScoreVC), for: .touchUpInside)
return button
}()
......@@ -234,11 +231,12 @@ extension YHInformationPerfectListVC {
let infoButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("个人信息表", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 8
button.setTitleColor(.white, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.addTarget(self, action: #selector(goInfoListVC), for: .touchUpInside)
return button
}()
......@@ -247,6 +245,8 @@ extension YHInformationPerfectListVC {
make.right.top.bottom.equalToSuperview()
make.left.equalTo(submitHoldView.snp.centerX).offset(6)
}
infoButton.layoutIfNeeded()
infoButton.backgroundGradient()
homeTableView.delegate = self
homeTableView.dataSource = self
......@@ -297,7 +297,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 6
return serviceCenterMainReqVM.arrInfoFillStep.count
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
......@@ -307,15 +307,15 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let newCell = tableView.dequeueReusableCell(withClass: YHInformationPerfectCell.self)
newCell.selectionStyle = .none
newCell.dataModel = arrData[indexPath.row]
newCell.dataModel = serviceCenterMainReqVM.arrInfoFillStep[indexPath.row]
return newCell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 \(indexPath.section)section --- \(indexPath.row)row")
let model = arrData[indexPath.row]
if (indexPath.row + 1 > myTargetIndex) {
let model = serviceCenterMainReqVM.arrInfoFillStep[indexPath.row]
if (indexPath.row + 1 > serviceCenterMainReqVM.myInfoFillStep) {
let message = "请先完成" + model.name + "填写"
YHHUD.flash(message: message)
} else {
......
......@@ -161,7 +161,9 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
if indexPath.row == 0 {
navigationController?.pushViewController(YHInformationPerfectListVC())
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if indexPath.row == 1 {
} else {
......
......@@ -47,7 +47,7 @@ class YHInformationPerfectModel {
var isFinished : Bool = false {
didSet {
status = isFinished ? "已完成" : "待完善"
color = isFinished ? UIColor(hex: 0x222222, alpha: 1.0) : UIColor(hex: 0x888F98, alpha: 1.0)
color = isFinished ? UIColor.mainTextColor : UIColor.labelTextColor2
statusColor = isFinished ? UIColor.successColor : UIColor.labelTextColor2
if type != 1 {
icon = isFinished ? icon : (icon + "_grey")
......@@ -57,8 +57,8 @@ class YHInformationPerfectModel {
var isDoing : Bool = false {
didSet {
color = isDoing ? UIColor(hex: 0x222222, alpha: 1.0) : UIColor(hex: 0x888F98, alpha: 1.0)
statusColor = isDoing ? UIColor(hex: 0x3F8BF8, alpha: 1.0) : UIColor(hex: 0x888F98, alpha: 1.0)
color = isFinished ? UIColor.mainTextColor : UIColor.labelTextColor2
statusColor = isDoing ? UIColor.brandMainColor : UIColor.labelTextColor2
if type != 1 {
icon = isDoing ? icon : (icon + "_grey")
}
......
//
// YHPersonInfoFillStepModel.swift
// galaxy
//
// Created by davidhuangA on 2024/2/1.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHPersonInfoFillStepModel: SmartCodable {
var step : Int = 0
var applicantName : String = ""
var sweet_notify_status : Int = 0
}
......@@ -13,8 +13,7 @@ import GKNavigationBarSwift
*/
class YHScoreDetailViewController: YHBaseViewController {
var orderId : Int?
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
//头部背景图片
......@@ -41,34 +40,27 @@ class YHScoreDetailViewController: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
//0.0
serviceCenterMainReqVM.loadLocalScoreData()
//1.0
initView()
//2.0
loadData()
}
}
// MARK: - private methods
extension YHScoreDetailViewController {
private func initView()->Void {
gk_navigationBar.isHidden = false
gk_backStyle = .white
gk_navTitle = "我的评分"
gk_navBackgroundColor = UIColor(hex: 0x528bf1)
gk_navTitleColor = .white
gk_navBarAlpha = 1
view.addSubview(headBkgImagV)
headBkgImagV.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalToSuperview()
make.height.equalTo(326)
make.top.left.right.equalToSuperview()
make.height.equalTo(414)
}
......@@ -78,11 +70,23 @@ extension YHScoreDetailViewController {
homeTableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
}
}
private func loadData() {
guard let orderId = orderId else { return}
let param = ["order_id":orderId]
serviceCenterMainReqVM.getMyScoreDetail(params: param) { success, error in
if success == true {
} else {
YHHUD.flash(message: error?.errorMsg ?? "发生错误,请重试")
}
self.homeTableView.reloadData()
}
// homeTableView.backgroundColor = .purple //for test hjl
}
}
......@@ -127,15 +131,13 @@ extension YHScoreDetailViewController : UITableViewDelegate,UITableViewDataSourc
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHScorePersonInfoCell.self)
cell.selectionStyle = .none
cell.dataModel = serviceCenterMainReqVM.myScoreResultData
return cell
}
let cell = tableView.dequeueReusableCell(withClass: YHScoreItemCell.self)
cell.selectionStyle = .none
cell.optionData = self.serviceCenterMainReqVM.localScoreData?[indexPath.row + 1]
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.row)")
}
}
......@@ -53,7 +53,23 @@ class YHScoreSessionModel : SmartCodable {
var name : String = "" //"年龄得分"
var score : String = "" //(最高30分)
var options : [YHScoreOptiosModel] = []
var resultData : YHScoreResultBaseModel? {
didSet {
for (index,item) in options.enumerated() {
if let model = resultData {
if model.answer.isEmpty == true {
item.isSelected = false
} else {
if model.answer.contains(index+1) {
item.isSelected = true
continue
}
}
}
item.isSelected = false
}
}
}
required init() {
}
}
//
// YHScoreResultModel.swift
// galaxy
//
// Created by davidhuangA on 2024/2/2.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHScoreResultBaseModel: SmartCodable {
var result : String = ""
var answer : [Int] = []
var score : Int = 0
}
//
// YHScoreResultModel.swift
// galaxy
//
// Created by davidhuangA on 2024/2/2.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHScoreResultModel: SmartCodable {
var age_score : YHScoreResultBaseModel?
var language_score : YHScoreResultBaseModel?
var background_score : YHScoreResultBaseModel?
var work_experience_score : YHScoreResultBaseModel?
var education_score : YHScoreResultBaseModel?
var talent_list_score : YHScoreResultBaseModel?
var total_score : YHScoreSumscore?
var user_info : YHScoreUserInfo?
}
struct YHScoreUserInfo : SmartCodable {
var head_url : String = ""
var mobile : String = ""
var username : String = ""
}
struct YHScoreSumscore : SmartCodable {
var sum_score : Int = 0
}
......@@ -44,11 +44,6 @@ class YHScoreItemCell: UITableViewCell {
var titleView : YHScoreTitleView!
private var scoreOptionsView1 : YHScoreOptionsView!
private var scoreOptionsView2 : YHScoreOptionsView!
private var scoreOptionsView3 : YHScoreOptionsView!
private var scoreOptionsView4 : YHScoreOptionsView!
}
extension YHScoreItemCell {
......@@ -94,9 +89,7 @@ extension YHScoreItemCell {
make.right.equalTo(titleView.snp.right)
make.height.equalTo(YHScoreTitleView.viewH)
}
resultView.dataModel = optionData?.resultData
var tagView : UIView = resultView
for (index,item) in arrData.enumerated() {
......
......@@ -41,10 +41,10 @@ class YHScoreOptionsView: UIView {
private lazy var customLabel : UILabel = {
let customLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 40, height: 20))
customLabel.text = "-"
customLabel.font = .PFSC_R(ofSize: 12)
customLabel.font = .PFSC_M(ofSize: 12)
customLabel.backgroundColor = UIColor(hex:0xF8F9FB)
customLabel.textColor = UIColor(hex: 0x888F98)
customLabel.layer.cornerRadius = 4
customLabel.layer.cornerRadius = 3
customLabel.clipsToBounds = true
customLabel.textAlignment = .center
return customLabel
......@@ -68,9 +68,9 @@ private extension YHScoreOptionsView {
addSubview(nameTextView)
nameTextView.snp.makeConstraints { make in
make.top.equalTo(16)
make.top.equalTo(kMargin)
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomLine.snp.top).offset(-16)
make.bottom.equalTo(bottomLine.snp.top).offset(-kMargin)
}
}
......@@ -86,17 +86,17 @@ private extension YHScoreOptionsView {
if model.isSelected == true {
nameTextView.attributed.text = """
\(model.scoreName, .foreground(UIColor(hex: 0x3C86F8)), .font(UIFont.PFSC_R(ofSize: 14))) \(.view(customLabel, .original(.center)))
\(model.scoreName, .foreground(UIColor.brandMainColor), .font(UIFont.PFSC_R(ofSize: 14))) \(.view(customLabel, .original(.center)))
"""
customLabel.backgroundColor = UIColor(hex:0x3C86F8,alpha:0.12)
customLabel.textColor = UIColor(hex: 0x3C86F8)
customLabel.backgroundColor = UIColor.brandMainColor8
customLabel.textColor = UIColor.brandMainColor
} else {
nameTextView.attributed.text = """
\(model.scoreName, .foreground(UIColor(hex: 0x4E4E4E)), .font(UIFont.PFSC_R(ofSize: 14))) \(.view(customLabel, .original(.center)))
"""
customLabel.backgroundColor = UIColor(hex:0xF8F9FB)
customLabel.textColor = UIColor(hex: 0x888F98)
customLabel.textColor = UIColor.labelTextColor2
}
}
}
......@@ -12,17 +12,25 @@ import AttributedString
class YHScorePersonInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHScorePersonInfoCell"
var dataModel : YHScoreResultModel? {
didSet {
updateUI()
}
}
//头像
private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "score_header_default"))
imageV.contentMode = .scaleAspectFit
imageV.contentMode = .scaleAspectFill
imageV.layer.cornerRadius = 20.5
imageV.clipsToBounds = true
return imageV
}()
//姓名
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "DavidHuang")
lable0.textColor = UIColor(hex: 0x222222)
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 16)
return lable0
}()
......@@ -30,7 +38,7 @@ class YHScorePersonInfoCell: UITableViewCell {
//电话号码
private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "15818743775")
lable0.textColor = UIColor(hex: 0x888F98)
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 12)
return lable0
}()
......@@ -40,7 +48,7 @@ class YHScorePersonInfoCell: UITableViewCell {
private lazy var scoreLable : UILabel = {
let lable0 = UILabel(text: "92 分")
lable0.textColor = UIColor(hex: 0x3C86F8)
lable0.font = UIFont.PFSC_B(ofSize: 43)
lable0.font = UIFont.PFSC_B(ofSize: 68)
lable0.textAlignment = .right
return lable0
}()
......@@ -76,59 +84,65 @@ extension YHScorePersonInfoCell {
let lable0 = UILabel(text: "香港优才评分报告")
lable0.textColor = .white
lable0.font = UIFont.PFSC_B(ofSize: 24)
lable0.font = UIFont.PFSC_B(ofSize: 26)
contentView.addSubview(lable0)
lable0.snp.makeConstraints { make in
make.top.equalTo(32)
make.left.equalTo(8)
make.right.equalTo(-8)
make.height.equalTo(34)
make.top.equalTo(26.5)
make.left.equalTo(7)
make.right.equalTo(7)
make.height.equalTo(36.5)
}
let lable1 = UILabel(text: "根据您填写的资料情况生成")
lable1.textColor = UIColor(hex: 0xffffff,alpha: 0.8)
lable1.font = UIFont.PFSC_R(ofSize: 12)
lable1.font = UIFont.PFSC_R(ofSize: 13)
contentView.addSubview(lable1)
lable1.snp.makeConstraints { make in
make.top.equalTo(lable0.snp.bottom).offset(6)
make.left.equalTo(lable0.snp.left)
make.left.equalTo(25)
make.right.equalTo(lable0.snp.right)
make.height.equalTo(17)
make.height.equalTo(18)
}
let iconImagV = UIImageView(image: UIImage(named: "score_icon_0"))
iconImagV.contentMode = .scaleAspectFill
contentView.addSubview(iconImagV)
iconImagV.snp.makeConstraints { make in
make.centerY.equalTo(lable1)
make.left.equalTo(lable0.snp.left)
make.width.equalTo(10)
make.height.equalTo(12)
}
let holdView = UIView()
holdView.backgroundColor = .white
holdView.layer.cornerRadius = 12
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
contentView.addSubview(holdView)
holdView.snp.makeConstraints { make in
make.top.equalTo(lable1.snp.bottom).offset(30)
make.top.equalTo(lable1.snp.bottom).offset(28.5)
make.left.right.equalToSuperview()
make.height.equalTo(89)
make.height.equalTo(74)
make.bottom.equalToSuperview().offset(-14)
}
let holdViewBkgV = UIImageView(image: UIImage(named: "score_icon_bkg1"))
holdViewBkgV.contentMode = .scaleAspectFill
holdView.addSubview(holdViewBkgV)
holdViewBkgV.snp.makeConstraints { make in
make.edges.equalTo(0)
}
let bkgImageV = UIImageView(image: UIImage(named: "score_icon_bkg"))
bkgImageV.contentMode = .scaleAspectFill
holdView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.right.bottom.equalToSuperview()
make.width.equalTo(178)
}
let interHoldView = UIView()
interHoldView.layer.borderWidth = 1
interHoldView.layer.borderColor = UIColor(red: 0.235, green: 0.525, blue: 0.973, alpha: 0.2).cgColor
interHoldView.layer.cornerRadius = 10
interHoldView.clipsToBounds = true
holdView.addSubview(interHoldView)
interHoldView.snp.makeConstraints { make in
make.top.left.equalTo(4)
make.right.bottom.equalTo(-4)
make.top.equalTo(15)
make.right.equalTo(-31.5)
make.width.equalTo(68)
make.height.equalTo(74)
}
......@@ -136,54 +150,55 @@ extension YHScorePersonInfoCell {
holdView.addSubview(headImagV)
headImagV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(21)
make.width.height.equalTo(42)
make.left.equalTo(18)
make.width.height.equalTo(41)
}
holdView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalTo(headImagV.snp.top)
make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(24)
make.width.equalTo(200)
make.left.equalTo(headImagV.snp.right).offset(15)
make.height.equalTo(23)
make.right.equalToSuperview().offset(-kMargin)
}
holdView.addSubview(phoneLable)
phoneLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom)
make.left.equalTo(headImagV.snp.right).offset(12)
make.left.equalTo(nameLable.snp.left)
make.height.equalTo(20)
make.width.equalTo(200)
}
holdView.addSubview(scoreLable)
contentView.addSubview(scoreLable)
scoreLable.snp.makeConstraints { make in
make.top.equalTo(10)
make.right.equalToSuperview().offset(-21)
make.height.equalTo(50)
make.bottom.equalTo(holdView.snp.top).offset(-kMargin)
make.right.equalTo(holdView.snp.right).offset(-5)
make.height.equalTo(79)
}
let a: ASAttributedString = .init("95", .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let a: ASAttributedString = .init("-", .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x3C86F8)))
scoreLable.attributed.text = a + b
let lable3 = UILabel(text: "综合得分")
lable3.textColor = UIColor(hex: 0x888F98)
lable3.font = UIFont.PFSC_R(ofSize: 12)
lable3.textAlignment = .right
contentView.addSubview(lable3)
lable3.snp.makeConstraints { make in
make.top.equalTo(scoreLable.snp.bottom).offset(-4)
make.right.equalTo(scoreLable.snp.right)
make.height.equalTo(20)
}
private func updateUI() {
guard let model = dataModel else {
return
}
nameLable.text = "DavidHuang for test"//model.user_info?.username ?? "-"
phoneLable.text = model.user_info?.mobile ?? "-"
let score : String = String(model.total_score?.sum_score ?? 0)
let a: ASAttributedString = .init(NSAttributedString(string: score), .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0xFFEEB0)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(.white))
scoreLable.attributed.text = a + b
}
}
......@@ -9,11 +9,16 @@
import UIKit
class YHScoreResultView: UIView {
var dataModel : YHScoreResultBaseModel? {
didSet {
updateUI()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
......@@ -22,7 +27,7 @@ class YHScoreResultView: UIView {
//固定高度
static let viewH : CGFloat = 52.0
static let viewH : CGFloat = 60.5
//icon
......@@ -64,24 +69,61 @@ private extension YHScoreResultView {
make.height.equalTo(0.5)
}
addSubview(iconImageV)
let holdView = UIView()
holdView.backgroundColor = UIColor.contentBkgColor
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
addSubview(holdView)
holdView.snp.makeConstraints { make in
make.bottom.equalTo(bottomLine.snp.top).offset(-kMargin)
make.left.right.equalToSuperview()
make.height.equalTo(44)
}
holdView.addSubview(iconImageV)
iconImageV.snp.makeConstraints { make in
make.left.equalToSuperview()
make.centerY.equalToSuperview().offset(-0.5)
make.left.equalTo(12)
make.centerY.equalToSuperview()
make.width.height.equalTo(14)
}
addSubview(nameLable)
holdView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.centerY.equalTo(iconImageV.snp.centerY)
make.left.equalTo(iconImageV.snp.right).offset(12)
make.bottom.equalTo(bottomLine.snp.top)
make.centerY.equalToSuperview()
make.left.equalTo(iconImageV.snp.right).offset(8)
}
addSubview(desLable)
let line = UIView()
line.backgroundColor = UIColor.labelTextColor2
holdView.addSubview(line)
line.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(nameLable.snp.right).offset(20)
make.height.equalTo(13.5)
make.width.equalTo(0.5)
}
holdView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.centerY.equalTo(nameLable.snp.centerY)
make.left.equalTo(nameLable.snp.right).offset(6)
make.centerY.equalToSuperview()
make.left.equalTo(line.snp.right).offset(20)
}
}
private func updateUI() {
guard let model = dataModel else { return }
if model.answer.isEmpty {
iconImageV.image = UIImage(named: "score_satisfy_1")
nameLable.text = "不满足"
} else {
iconImageV.image = UIImage(named: "score_satisfy_0")
nameLable.text = model.result
}
let score = "得分:" + String(model.score) + "分"
desLable.text = score
}
}
......@@ -23,47 +23,34 @@ class YHScoreTitleView: UIView {
//固定高度
static let viewH : CGFloat = 52.0
static let viewH : CGFloat = 56.0
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "年龄得分")
lable0.textColor = UIColor(hex: 0x222222)
let lable0 = UILabel(text: "-")
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 17)
return lable0
}()
private lazy var desLable : UILabel = {
let lable0 = UILabel(text: "(最高30分)")
lable0.textColor = UIColor(hex: 0x888F98)
let lable0 = UILabel(text: "-")
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 14)
return lable0
}()
private lazy var bottomLine : UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex:0xF0F0F0)
return view
}()
}
private extension YHScoreTitleView {
func setupUI() {
addSubview(bottomLine)
bottomLine.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
}
addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.left.equalToSuperview()
make.bottom.equalTo(bottomLine.snp.top)
make.centerY.equalToSuperview()
make.left.equalToSuperview()
make.height.equalTo(24)
}
addSubview(desLable)
desLable.snp.makeConstraints { make in
make.centerY.equalTo(nameLable.snp.centerY)
......
......@@ -22,7 +22,7 @@ class YHMainApplicantInfoViewController: YHPersonInfoBaseViewController {
}
private extension YHMainApplicantInfoViewController {
func fakeData() {
func installData() {
do {
//国家信息
let tmp0 = YHPersonInfoBaseModel(name: "国家/国籍:", description: "中国-China")
......@@ -97,7 +97,8 @@ private extension YHMainApplicantInfoViewController {
}
func setupUI() {
fakeData()
installData()
self.homeTableView.register(YHPersonInfoCommonCell.self,forCellReuseIdentifier: YHPersonInfoCommonCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
......
......@@ -21,17 +21,17 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
let arrItemTitles = ["主申请人信息","家庭成员信息","基本资料","学历/专业资格","工作经验","其他信息"]
var arrItemVCs : [YHPersonInfoBaseViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 58))
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true
// dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16)
dataSource.titleSelectedColor = UIColor(hex: 0x888F98)
dataSource.titleSelectedColor = UIColor.labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = UIColor(hex: 0x4388FF)
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleSelectedColor = UIColor.brandMainColor
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
......@@ -48,11 +48,6 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// for _ in arrItemTitles {
// let vc = YHMainApplicantInfoViewController()
// arrItemVCs.append(vc)
// }
do {
let vc = YHMainApplicantInfoViewController()
arrItemVCs.append(vc)
......@@ -103,7 +98,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
indicator.indicatorWidth = 16
indicator.indicatorHeight = 4
indicator.indicatorCornerRadius = 2
indicator.indicatorColor = UIColor(hex:0x4388FF)
indicator.verticalOffset = 4
indicator.indicatorColor = UIColor.brandMainColor
segmentedView.indicators = [indicator]
}
......@@ -124,8 +120,8 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 58)
listContainerView.frame = CGRect(x: 0, y: 58, width: view.bounds.size.width, height: view.bounds.size.height - 58)
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 55)
listContainerView.frame = CGRect(x: 0, y: 55, width: view.bounds.size.width, height: view.bounds.size.height - 55)
segmentedView.backgroundColor = .white
......
......@@ -10,8 +10,9 @@ import UIKit
import GKNavigationBarSwift
class YHPersonInformMainViewController: YHBaseViewController {
var canScroll : Bool = true
var orderId : Int?
var canScroll : Bool = true
var myCellHeight : CGFloat {
get {
return view.bounds.size.height - k_Height_NavigationtBarAndStatuBar
......@@ -31,7 +32,7 @@ class YHPersonInformMainViewController: YHBaseViewController {
var myHeadView : UIView = {
let view = UIView(frame: CGRect(x: 16, y: 0, width: KScreenWidth - 16 * 2, height: 128))
let view = UIView(frame: CGRect(x: kMargin, y: 0, width: KScreenWidth - kMargin * 2, height: 131))
return view
}()
......@@ -39,23 +40,27 @@ class YHPersonInformMainViewController: YHBaseViewController {
//头像
private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "score_header_default"))
imageV.contentMode = .scaleAspectFit
imageV.contentMode = .scaleAspectFill
imageV.layer.cornerRadius = 26.5
imageV.clipsToBounds = true
imageV.layer.borderWidth = 2
imageV.layer.borderColor = UIColor.white.cgColor
return imageV
}()
//姓名
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "DavidHuang")
lable0.textColor = UIColor(hex: 0x222222)
lable0.font = UIFont.PFSC_M(ofSize: 16)
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 19)
return lable0
}()
//电话号码
private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "15818743775")
lable0.textColor = UIColor(hex: 0x888F98)
lable0.font = UIFont.PFSC_R(ofSize: 12)
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 14)
return lable0
}()
......@@ -129,6 +134,7 @@ extension YHPersonInformMainViewController {
gk_navBackgroundColor = .white
gk_navTitleColor = UIColor(hex:0x0F1214)
gk_navBarAlpha = 1
gk_navTitleFont = UIFont.PFSC_B(ofSize: 17)
......@@ -145,13 +151,13 @@ extension YHPersonInformMainViewController {
let headSubView = UIView()
headSubView.backgroundColor = .clear
headSubView.layer.cornerRadius = 12
headSubView.layer.cornerRadius = kCornerRadius6
headSubView.clipsToBounds = true
myHeadView.addSubview(headSubView)
headSubView.snp.makeConstraints { make in
make.top.equalTo(17)
make.left.equalTo(16)
make.right.equalTo(-16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(105)
}
......@@ -167,16 +173,18 @@ extension YHPersonInformMainViewController {
headSubView.addSubview(headImagV)
headImagV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(21)
make.width.height.equalTo(42)
make.left.equalTo(20.5)
make.width.height.equalTo(53)
}
headSubView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalTo(headImagV.snp.top)
make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(24)
make.right.equalTo(-12)
make.height.equalTo(26.5)
make.right.equalTo(-kMargin)
}
headSubView.addSubview(phoneLable)
......@@ -184,41 +192,23 @@ extension YHPersonInformMainViewController {
make.top.equalTo(nameLable.snp.bottom)
make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(20)
make.right.equalTo(-12)
}
let iconImageV = UIImageView(image: UIImage(named: "person_info_head_icon"))
iconImageV.contentMode = .scaleAspectFill
headSubView.addSubview(iconImageV)
iconImageV.snp.makeConstraints { make in
make.top.bottom.right.equalToSuperview()
make.width.equalTo(125)
}
// self.homeTableView.es.addPullToRefresh {
// self.loadFirstItem()
// }
// self.homeTableView.es.startPullToRefresh()
// self.homeTableView.es.addInfiniteScrolling {
// self.loadFakeData()
// }
}
private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.homeTableView.reloadData()
make.right.equalTo(-20.5)
}
}
private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopLoadingMore()
self.homeTableView.reloadData()
}
}
// private func loadFirstItem() {
// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// self.homeTableView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
// self.homeTableView.reloadData()
// }
// }
//
// private func loadFakeData() {
// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// self.homeTableView.es.stopLoadingMore()
// self.homeTableView.reloadData()
// }
// }
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
......
......@@ -20,7 +20,7 @@ class YHPersonInfoCellView: UIView {
//title
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x888F98)
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 14)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byCharWrapping
......@@ -31,7 +31,7 @@ class YHPersonInfoCellView: UIView {
//title
private lazy var subtitleLable : UILabel = {
let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x222222)
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_R(ofSize: 14)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
......
......@@ -30,7 +30,7 @@ class YHPersonInfoCommonCell: UITableViewCell {
}
private lazy var holdView : UIView = {
private lazy var holdView : YHPersonInfoSessionHoldView = {
let contryInfoView = YHPersonInfoSessionHoldView()
return contryInfoView
}()
......
......@@ -27,7 +27,7 @@ class YHPersonInfoIdentificationCardView: UIView {
private lazy var titleLable : UILabel = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x222222)
lable.textColor = UIColor.mainTextColor
lable.font = UIFont.PFSC_M(ofSize: 14)
return lable
}()
......@@ -55,7 +55,7 @@ class YHPersonInfoIdentificationCardView: UIView {
private lazy var subtitleFrontLable : UILabel = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x888F98)
lable.textColor = UIColor.labelTextColor2
lable.font = UIFont.PFSC_R(ofSize: 14)
lable.text = "身份证头像面"
lable.textAlignment = .center
......@@ -65,7 +65,7 @@ class YHPersonInfoIdentificationCardView: UIView {
private lazy var subtitleBackLable : UILabel = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x888F98)
lable.textColor = UIColor.labelTextColor2
lable.font = UIFont.PFSC_R(ofSize: 14)
lable.text = "身份证国徽面"
lable.textAlignment = .center
......@@ -88,21 +88,21 @@ extension YHPersonInfoIdentificationCardView {
make.top.equalTo(18)
make.left.equalTo(18)
make.right.equalTo(-18)
make.height.equalTo(17)
make.height.equalTo(20)
}
addSubview(subtitleFrontLable)
subtitleFrontLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(20)
make.height.equalTo(17)
make.left.equalTo(16)
make.top.equalTo(titleLable.snp.bottom).offset(18)
make.height.equalTo(20)
make.left.equalTo(titleLable.snp.left)
make.right.equalTo(self.snp.centerX).offset(-4)
}
addSubview(frontImagV)
frontImagV.snp.makeConstraints { make in
make.top.equalTo(subtitleFrontLable.snp.bottom).offset(13)
make.top.equalTo(subtitleFrontLable.snp.bottom).offset(11)
make.height.equalTo(95)
make.left.equalTo(subtitleFrontLable.snp.left)
make.right.equalTo(subtitleFrontLable.snp.right)
......@@ -112,8 +112,8 @@ extension YHPersonInfoIdentificationCardView {
addSubview(subtitleBackLable)
subtitleBackLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(20)
make.height.equalTo(17)
make.top.equalTo(subtitleFrontLable.snp.top)
make.height.equalTo(20)
make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX).offset(4)
}
......@@ -121,7 +121,7 @@ extension YHPersonInfoIdentificationCardView {
addSubview(backImagV)
backImagV.snp.makeConstraints { make in
make.top.equalTo(subtitleBackLable.snp.bottom).offset(13)
make.top.equalTo(subtitleBackLable.snp.bottom).offset(11)
make.height.equalTo(95)
make.left.equalTo(subtitleBackLable.snp.left)
make.right.equalTo(subtitleBackLable.snp.right)
......@@ -131,7 +131,7 @@ extension YHPersonInfoIdentificationCardView {
addSubview(bottomLine)
bottomLine.snp.makeConstraints { make in
make.top.equalTo(backImagV.snp.bottom).offset(15)
make.top.equalTo(backImagV.snp.bottom).offset(15.5)
make.height.equalTo(0.5)
make.left.right.equalToSuperview()
......
......@@ -12,7 +12,7 @@ class YHPersonInfoSessionHoldView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
layer.cornerRadius = 6
layer.cornerRadius = kCornerRadius6
clipsToBounds = true
}
......
......@@ -21,7 +21,7 @@ class YHPersonInfoSessionView: UIView {
//title
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x222222)
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 17)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
......@@ -44,8 +44,8 @@ class YHPersonInfoSessionView: UIView {
addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(16)
make.bottom.equalTo(bottomLine.snp.top).offset(-16)
make.top.equalToSuperview().offset(kMargin)
make.bottom.equalTo(bottomLine.snp.top).offset(-kMargin)
}
}
}
......
......@@ -76,7 +76,7 @@ class YHInformationFillTipsAlertView: UIView {
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 8
view.layer.cornerRadius = kCornerRadius8
return view
}()
addSubview(centerView)
......@@ -99,14 +99,15 @@ class YHInformationFillTipsAlertView: UIView {
checkBtn.addTarget(self, action: #selector(onClickReadyBtn), for: .touchUpInside)
checkBtn.setTitle("准备完毕", for: .normal)
checkBtn.setTitleColor(.white, for: .normal)
checkBtn.layer.cornerRadius = 8
checkBtn.layer.cornerRadius = kCornerRadius6
checkBtn.clipsToBounds = true
checkBtn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
bottomView.addSubview(checkBtn)
checkBtn.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-40)
make.left.equalTo(16)
make.right.equalTo(-16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(48)
}
checkBtn.layoutIfNeeded()//非常重要!!!!
......@@ -115,8 +116,8 @@ class YHInformationFillTipsAlertView: UIView {
let lable00 = UILabel(text: "我确认我所提供的材料真实有效,并知悉其中内容。")
lable00.font = kFont(size: 12)
lable00.textColor = UIColor(red: 0.533, green: 0.561, blue: 0.596, alpha: 1)
lable00.font = UIFont.PFSC_R(ofSize: 12)
lable00.textColor = UIColor.labelTextColor2
let tap = UITapGestureRecognizer(target: self, action: #selector(onClickAgree))
lable00.isUserInteractionEnabled = true
lable00.addGestureRecognizer(tap)
......@@ -151,8 +152,8 @@ class YHInformationFillTipsAlertView: UIView {
let lable01 = UILabel(text: "信息填写提示")
lable01.font = UIFont.PFSC_B(ofSize: 18)
lable01.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable01.font = UIFont.PFSC_M(ofSize: 17)
lable01.textColor = UIColor.mainTextColor
topView.addSubview(lable01)
lable01.snp.makeConstraints { make in
......@@ -164,7 +165,7 @@ class YHInformationFillTipsAlertView: UIView {
let line = UIView()
line.backgroundColor = UIColor(red: 0.941, green: 0.941, blue: 0.941, alpha: 1)
line.backgroundColor = UIColor(hexString: "#F0F0F0")
topView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(21)
......
......@@ -58,8 +58,8 @@ extension YHInformationFillTipsCell {
//添加元素
let lable0 = UILabel(text: " 您好!欢迎来到香港优才申请系统,请按照实际情况填写。")
lable0.font = kFont(size: 14)
lable0.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable0.font = UIFont.PFSC_R(ofSize: 14)
lable0.textColor = UIColor.mainTextColor
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
......@@ -72,12 +72,12 @@ extension YHInformationFillTipsCell {
let lable1 = UILabel(text: " 1. 如您填写途中想离开系统,记得点击保存,在您有空闲的时间再继续进行填写;")
lable1.font = UIFont.PFSC_R(ofSize: 14)
lable1.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable1.textColor = UIColor.mainTextColor
lable1.numberOfLines = 0
lable1.lineBreakMode = .byWordWrapping
let a: ASAttributedString = .init(" 1. 如您填写途中想离开系统,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)))
let b: ASAttributedString = .init("记得点击保存", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(hex:0x3271F5)))
let c: ASAttributedString = .init(",在您有空闲的时间再继续进行填写;", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)))
let a: ASAttributedString = .init(" 1. 如您填写途中想离开系统,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("记得点击保存", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",在您有空闲的时间再继续进行填写;", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
lable1.attributed.text = a + b + c
holdView.addSubview(lable1)
......@@ -88,13 +88,13 @@ extension YHInformationFillTipsCell {
let lable2 = UILabel(text: " 2. 此次填写将花费您30-40分钟,系统将根据您所填写的信息,形成详细资料清单,一起为香港身份起航吧~")
lable2.font = UIFont.PFSC_R(ofSize: 14)
lable2.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable2.textColor = UIColor.mainTextColor
lable2.numberOfLines = 0
lable2.lineBreakMode = .byWordWrapping
let aa: ASAttributedString = .init(" 2. 此次填写将花费您", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)))
let bb: ASAttributedString = .init("30-40分钟", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(hex:0x3271F5)))
let cc: ASAttributedString = .init(",系统将根据您所填写的信息,形成详细资料清单,一起为香港身份起航吧~", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)))
let aa: ASAttributedString = .init(" 2. 此次填写将花费您", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("30-40分钟", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.brandMainColor))
let cc: ASAttributedString = .init(",系统将根据您所填写的信息,形成详细资料清单,一起为香港身份起航吧~", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
lable2.attributed.text = aa + bb + cc
......@@ -106,8 +106,8 @@ extension YHInformationFillTipsCell {
}
let holdView2 = UIView()
holdView2.backgroundColor = UIColor(red: 0.973, green: 0.976, blue: 0.984, alpha: 1)
holdView2.layer.cornerRadius = 8
holdView2.backgroundColor = UIColor.contentBkgColor
holdView2.layer.cornerRadius = kCornerRadius6
holdView2.clipsToBounds = true
holdView.addSubview(holdView2)
holdView2.snp.makeConstraints { make in
......@@ -117,7 +117,7 @@ extension YHInformationFillTipsCell {
let view0 = UIView()
view0.backgroundColor = UIColor(red: 0.196, green: 0.443, blue: 0.961, alpha: 1)
view0.backgroundColor = UIColor.brandMainColor
holdView2.addSubview(view0)
view0.snp.makeConstraints { make in
make.top.equalTo(15.5)
......@@ -130,7 +130,7 @@ extension YHInformationFillTipsCell {
let lable3 = UILabel(text: "准备材料:")
lable3.font = UIFont.PFSC_M(ofSize: 14)
lable3.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable3.textColor = UIColor.mainTextColor
holdView2.addSubview(lable3)
lable3.snp.makeConstraints { make in
make.centerY.equalTo(view0)
......@@ -155,7 +155,7 @@ extension YHInformationFillTipsCell {
let lable4 = UILabel(text: "身份证正反面照片(外国国籍准备护照)")
lable4.font = UIFont.PFSC_R(ofSize: 14)
lable4.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable4.textColor = UIColor.mainTextColor
holdView2.addSubview(lable4)
lable4.snp.makeConstraints { make in
make.centerY.equalTo(imageV0)
......@@ -176,7 +176,7 @@ extension YHInformationFillTipsCell {
let lable5 = UILabel(text: "护照(如有)")
lable5.font = UIFont.PFSC_R(ofSize: 14)
lable5.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable5.textColor = UIColor.mainTextColor
holdView2.addSubview(lable5)
lable5.snp.makeConstraints { make in
make.centerY.equalTo(imageV1)
......@@ -198,7 +198,7 @@ extension YHInformationFillTipsCell {
let lable6 = UILabel(text: "港澳通行证正反面照片(如有)")
lable6.font = UIFont.PFSC_R(ofSize: 14)
lable6.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable6.textColor = UIColor.mainTextColor
holdView2.addSubview(lable6)
lable6.snp.makeConstraints { make in
make.centerY.equalTo(imageV2)
......@@ -220,7 +220,7 @@ extension YHInformationFillTipsCell {
let lable7 = UILabel(text: "简历/工作总结")
lable7.font = UIFont.PFSC_R(ofSize: 14)
lable7.textColor = UIColor(red: 0.133, green: 0.133, blue: 0.133, alpha: 1)
lable7.textColor = UIColor.mainTextColor
holdView2.addSubview(lable7)
lable7.snp.makeConstraints { make in
make.centerY.equalTo(imageV3)
......@@ -232,17 +232,23 @@ extension YHInformationFillTipsCell {
let holdView3 = UIView()
holdView3.backgroundColor = UIColor(red: 0.973, green: 0.976, blue: 0.984, alpha: 1)
holdView3.layer.cornerRadius = 8
holdView3.backgroundColor = UIColor.clear
holdView3.layer.cornerRadius = kCornerRadius6
holdView3.clipsToBounds = true
holdView3.layer.borderWidth = 1
holdView3.layer.borderColor = UIColor(hexString: "#E4EEFF").cgColor
holdView.addSubview(holdView3)
holdView3.snp.makeConstraints { make in
make.top.equalTo(holdView2.snp.bottom).offset(12)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-8)//for test hjl
make.bottom.equalToSuperview().offset(-8)
}
let imageV4 = UIImageView()
imageV4.image = UIImage(named: "tips_icon")
imageV4.contentMode = .scaleAspectFill
......@@ -255,8 +261,8 @@ extension YHInformationFillTipsCell {
let lable8 = UILabel(text: "温馨提示:")
lable8.font = UIFont.PFSC_R(ofSize: 12)
lable8.textColor = UIColor(red: 0.263, green: 0.533, blue: 1, alpha: 1)
lable8.font = UIFont.PFSC_M(ofSize: 12)
lable8.textColor = UIColor.brandMainColor
holdView3.addSubview(lable8)
lable8.snp.makeConstraints { make in
make.centerY.equalTo(imageV4)
......@@ -270,12 +276,11 @@ extension YHInformationFillTipsCell {
lable9.numberOfLines = 0
lable9.lineBreakMode = .byWordWrapping
lable9.font = UIFont.PFSC_R(ofSize: 12)
lable9.textColor = UIColor(red: 0.263, green: 0.533, blue: 1, alpha: 1)
lable9.textColor = UIColor.brandMainColor
holdView3.addSubview(lable9)
lable9.snp.makeConstraints { make in
make.top.equalTo(lable8.snp.bottom).offset(7)
make.left.equalTo(imageV4.snp.left)
// make.height.equalTo(28)
make.right.equalToSuperview().offset(-16)
}
......@@ -284,7 +289,7 @@ extension YHInformationFillTipsCell {
lable10.numberOfLines = 0
lable10.lineBreakMode = .byWordWrapping
lable10.font = UIFont.PFSC_R(ofSize: 12)
lable10.textColor = UIColor(red: 0.533, green: 0.561, blue: 0.596, alpha: 1)
lable10.textColor = UIColor.labelTextColor2
holdView3.addSubview(lable10)
lable10.snp.makeConstraints { make in
make.top.equalTo(lable9.snp.bottom).offset(7)
......@@ -292,5 +297,16 @@ extension YHInformationFillTipsCell {
make.right.equalToSuperview().offset(-16)
make.bottom.equalToSuperview().offset(-18)
}
holdView3.layoutIfNeeded()
let imageV44 = UIImageView()
imageV44.frame = holdView3.bounds
imageV44.image = UIImage(named: "tips_cell_bkg")
imageV44.contentMode = .scaleAspectFill
imageV44.layer.zPosition = -1
holdView3.addSubview(imageV44)
// imageV44.snp.makeConstraints { make in
// make.edges.equalTo(0)
// }
}
}
......@@ -103,6 +103,9 @@ extension YHInformationPerfectCell {
func updateUI() {
itemNameLable.text = dataModel?.name
itemNameLable.textColor = dataModel?.color
if dataModel?.isDoing == true {
itemNameLable.textColor = UIColor.mainTextColor
}
itemStatusLable.text = dataModel?.status
itemStatusLable.textColor = dataModel?.statusColor
......@@ -169,7 +172,7 @@ extension YHInformationPerfectCell {
midImagV.layer.zPosition = 10
midImagV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(16)
make.left.equalTo(kMargin)
make.width.height.equalTo(14)
}
......@@ -178,29 +181,29 @@ extension YHInformationPerfectCell {
topImagV.snp.makeConstraints { make in
make.centerX.equalTo(midImagV)
make.top.equalToSuperview()
make.bottom.equalTo(midImagV.snp.top)
make.width.equalTo(4)
make.bottom.equalTo(midImagV.snp.top).offset(-4)
make.width.equalTo(2)
}
contentView.addSubview(bottomImagV)
bottomImagV.snp.makeConstraints { make in
make.centerX.equalTo(midImagV)
make.top.equalTo(midImagV.snp.bottom)
make.width.equalTo(4)
make.top.equalTo(midImagV.snp.bottom).offset(4)
make.width.equalTo(2)
make.bottom.equalToSuperview()
}
let holdView = UIView()
holdView.backgroundColor = .white
holdView.layer.cornerRadius = 12
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
contentView.addSubview(holdView)
holdView.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.height.equalTo(68)
make.right.equalTo(-16)
make.right.equalTo(-kMargin)
make.left.equalTo(midImagV.snp.right).offset(16)
}
......@@ -215,7 +218,7 @@ extension YHInformationPerfectCell {
holdView.addSubview(nextImgV)
nextImgV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-18)
make.right.equalTo(-kMargin)
make.width.height.equalTo(16)
}
......
......@@ -61,7 +61,7 @@ class YHSubmintAllInfoSuccessTipView: UIView {
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 12
view.layer.cornerRadius = kCornerRadius8
return view
}()
addSubview(centerView)
......@@ -89,8 +89,8 @@ class YHSubmintAllInfoSuccessTipView: UIView {
let lable = UILabel(text: "提交成功")
lable.textAlignment = .center
lable.font = kFont(name: "PingFangSC-Medium", size: 17)
lable.textColor = UIColor(hex:0x222222)
lable.font = UIFont.PFSC_M(ofSize: 17)
lable.textColor = UIColor.mainTextColor
headBkgImagV.addSubview(lable)
lable.snp.makeConstraints { make in
......@@ -102,8 +102,8 @@ class YHSubmintAllInfoSuccessTipView: UIView {
let lable2 = UILabel(text: "根据您填写的资料,您的评分如下:")
lable2.textAlignment = .center
lable2.font = kFont(name: "PingFangSC-Medium", size: 14)
lable2.textColor = UIColor(hex:0x222222)
lable2.font = UIFont.PFSC_R(ofSize: 14)
lable2.textColor = UIColor.mainTextColor
centerView.addSubview(lable2)
lable2.snp.makeConstraints { make in
......@@ -127,26 +127,27 @@ class YHSubmintAllInfoSuccessTipView: UIView {
make.height.equalTo(50)
}
let a: ASAttributedString = .init("90", .font(UIFont.PFSC_R(ofSize: 32)),.foreground(UIColor(hex:0xFF9900)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x888F98)))
let a: ASAttributedString = .init("90", .font(UIFont.PFSC_M(ofSize: 43)),.foreground(UIColor.warnColor))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.labelTextColor2))
messageLabel.attributed.text = a + b
disAgressButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = kBoldFont(size: 14)
button.backgroundColor = .white
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
button.layer.cornerRadius = 8
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x3c86f8).cgColor
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
centerView.addSubview(disAgressButton)
disAgressButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.left.equalTo(kMargin)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
......@@ -154,22 +155,24 @@ class YHSubmintAllInfoSuccessTipView: UIView {
agreeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("评分详情", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 8
button.setTitleColor(.white, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.addTarget(self, action: #selector(agree), for: .touchUpInside)
return button
}()
centerView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.right.equalTo(-kMargin)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
}
agreeButton.layoutIfNeeded()
agreeButton.backgroundGradient()
}
......
......@@ -72,9 +72,8 @@ class YHSubmitAllInfoCheckView: UIView {
messageLabel = {
let label = UILabel()
label.text = "确定是否提交信息?提交后将不能修改"
label.font = kFont(size: 16)
label.textColor = UIColor(hex:0x222222)
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize: 16)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
return label
}()
......@@ -82,26 +81,27 @@ class YHSubmitAllInfoCheckView: UIView {
messageLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.height.equalTo(42)
// make.height.equalTo(42)
make.top.equalTo(40)
}
disAgressButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = kBoldFont(size: 14)
button.backgroundColor = .white
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
button.layer.cornerRadius = 8
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x3c86f8).cgColor
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
centerView.addSubview(disAgressButton)
disAgressButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.left.equalTo(kMargin)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
......@@ -109,22 +109,24 @@ class YHSubmitAllInfoCheckView: UIView {
agreeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("确认", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 8
button.clipsToBounds = true
button.setTitleColor(.white, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.addTarget(self, action: #selector(agree), for: .touchUpInside)
return button
}()
centerView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.right.equalTo(-kMargin)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
}
agreeButton.layoutIfNeeded()
agreeButton.backgroundGradient()
}
......
......@@ -12,15 +12,58 @@ class YHServiceCenterMainViewModel: YHBaseViewModel {
//合同列表 数据
var arrContactList : [YHContactItemModel] = []
//评分相关的 本地数据
var localScoreData : YHScoreDataModel?
//合同对应的状态
var arrContactStausItmes: [YHContactMainItemStatusModel] = []
//信息完善列表
var arrInfoFillStep : [YHInformationPerfectModel] = []
var myInfoFillStep : Int = 0
var informationFillStepModel : YHPersonInfoFillStepModel?
//我的评分
var myScoreResultData : YHScoreResultModel?//网络请求的结果数据
var localScoreData : YHScoreDataModel? //本地缓存的数据
}
//请求接口
extension YHServiceCenterMainViewModel {
//获取我的评分结果
func getMyScoreDetail( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
loadLocalScoreData()
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Order.scoreDetailApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
guard let model = NetBaseModel.deserialize(dict: json) else {
let error : YHErrorModel = YHErrorModel(errorCode:YHErrorCode.dictParseError.rawValue,errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,error)
return
}
printLog("model 是 ==> \(model)")
let dic = model.data?.peel
guard let resultModel = YHScoreResultModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
callBackBlock(false,nil)
return
}
self.myScoreResultData = resultModel
if let localScoreData = self.localScoreData {
localScoreData.age_score!.resultData = resultModel.age_score
localScoreData.language_score!.resultData = resultModel.language_score
localScoreData.background_score!.resultData = resultModel.background_score
localScoreData.work_experience_score!.resultData = resultModel.work_experience_score
localScoreData.education_score!.resultData = resultModel.education_score
localScoreData.talent_list_score!.resultData = resultModel.talent_list_score
}
callBackBlock(true,nil)
} failBlock: { err in
callBackBlock(false,err)
}
}
//请求合同项
func getContactList(callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Order.contractListApi
......@@ -35,12 +78,12 @@ extension YHServiceCenterMainViewModel {
printLog("model 是 ==> \(model)")
let dic = model.data?.peel
guard let resultModel = YHContactItemHoldModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
self.arrContactList = []
arrContactList = []
callBackBlock(false,nil)
return
}
self.arrContactList = resultModel.orders
arrContactList = resultModel.orders
callBackBlock(true,nil)
} failBlock: { err in
callBackBlock(false,err)
......@@ -102,12 +145,91 @@ extension YHServiceCenterMainViewModel {
callBackBlock(false,err)
}
}
//请求 信息表的填写状态
func getPersonInfoFillStep( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Order.informationStepApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
guard let model = NetBaseModel.deserialize(dict: json) else {
let error : YHErrorModel = YHErrorModel(errorCode:YHErrorCode.dictParseError.rawValue,errorMsg: YHErrorCode.dictParseError.description())
self.arrInfoFillStep = []
informationFillStepModel = nil
callBackBlock(false,error)
return
}
printLog("model 是 ==> \(model)")
let dic = model.data?.peel
guard let resultModel = YHPersonInfoFillStepModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
self.arrInfoFillStep = []
informationFillStepModel = nil
callBackBlock(false,nil)
return
}
informationFillStepModel = resultModel
myInfoFillStep = resultModel.step
let arr = [1,2,3,4,5,6]
let target = myInfoFillStep //for test hjl 待填写的项目
for item in arr {
let model = YHInformationPerfectModel()
model.type = item
arrInfoFillStep.append(model)
if item < target {
model.isFinished = true
} else {
model.isFinished = false
}
if item == target {
model.isDoing = true
}
if item == target + 1 {
model.isNextDoingCell = true
} else {
model.isNextDoingCell = false
}
}
callBackBlock(true,nil)
} failBlock: { err in
self.arrInfoFillStep = []
self.informationFillStepModel = nil
callBackBlock(false,err)
}
}
//提交 温馨提示弹窗
func submitSweetNotifyOp( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Users.submitSweetNotifyApi
let _ = YHNetRequest.postRequest(url: strUrl,params: params) {json, code in
//1. json字符串 转 对象
guard let model = NetBaseModel.deserialize(dict: json) else {
let error : YHErrorModel = YHErrorModel(errorCode:YHErrorCode.dictParseError.rawValue,errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,error)
return
}
printLog("model 是 ==> \(model)")
callBackBlock(true,nil)
} failBlock: { err in
callBackBlock(false,err)
}
}
}
//其他方法
extension YHServiceCenterMainViewModel {
//加载本地 plist数据
func loadLocalScoreData() {
private func loadLocalScoreData() {
if let path = Bundle.main.path(forResource: "scoreOptionData", ofType: "plist") {
if let plistData = FileManager.default.contents(atPath: path) {
do {
......
......@@ -20,13 +20,27 @@ class YHAllApiName {
struct Order {
//合同列表
static let contractListApi = "frontend/order/list"
//合同填写进度
static let contractStatusApi = "frontend/order/progress"
//信息表的填写进度
static let informationStepApi = "frontend/order/information/step"
//我的评分结果
static let scoreDetailApi = "frontend/order-assessment/score_detail"
// 获取家庭成员信息 添加家庭成员也用这个
static let familyInfoApi = "frontend/order/information/family"
// 删除家庭成员信息
static let familyMemberDeleteApi = "frontend/order/information/family/delete"
}
//Users
struct Users {
//提交 温馨提示信息
static let submitSweetNotifyApi = "frontend/users/sweet-notify/submit"
}
}
{
"images" : [
{
"filename" : "Rectangle 2418.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2418@2x.png",
"filename" : "信息表背景图@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2418@3x.png",
"filename" : "信息表背景图@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "Group 3431.png",
"idiom" : "universal",
"scale" : "1x"
},
......
{
"images" : [
{
"filename" : "Group 2499.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2499@2x.png",
"filename" : "Group 2505@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2499@3x.png",
"filename" : "Group 2505@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "Ellipse 18.png",
"idiom" : "universal",
"scale" : "1x"
},
......
{
"images" : [
{
"filename" : "Ellipse 18.png",
"idiom" : "universal",
"scale" : "1x"
},
......
{
"images" : [
{
"filename" : "Group 2849.png",
"idiom" : "universal",
"scale" : "1x"
},
......
{
"images" : [
{
"filename" : "Rectangle 2490.png",
"idiom" : "universal",
"scale" : "1x"
},
......
{
"images" : [
{
"filename" : "Group 33334300.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33334300@2x.png",
"filename" : "Group 3040@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33334300@3x.png",
"filename" : "Group 3040@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "截屏2023-04-10 上午9.43.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "截屏2023-04-10 上午9.43@2x.png",
"filename" : "Rectangle 2461@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "截屏2023-04-10 上午9.43@3x.png",
"filename" : "Rectangle 2461@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "温馨提示.png",
"idiom" : "universal",
"scale" : "1x"
},
......
{
"images" : [
{
"filename" : "Group 3460.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 3460@2x.png",
"filename" : "Group 3471@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3460@3x.png",
"filename" : "Group 3471@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "Group 581.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 581@2x.png",
"filename" : "Group 582@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 581@3x.png",
"filename" : "Group 582@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "Group 33335867.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33335867@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33335867@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "我的评分-卡片背景图.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "我的评分-卡片背景图@2x.png",
"filename" : "Group 33333280@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "我的评分-卡片背景图@3x.png",
"filename" : "Group 33333280@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2418@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2418@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Group 2919.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2919@2x.png",
"filename" : "Group 2699@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2919@3x.png",
"filename" : "Group 2699@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
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