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

服务中心顶部title

parent dd391b6e
......@@ -21,6 +21,7 @@ class YHServiceCenterMainViewController: YHBaseViewController {
var orderId: Int = 0
var mobile: String = ""
var model: YHContactItemModel = YHContactItemModel()
var doneCount: Int = 0
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "service_center_head_bkg4")
......@@ -146,9 +147,24 @@ extension YHServiceCenterMainViewController {
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 4, y: k_Height_safeAreaInsetsTop() + 98, width: view.bounds.size.width - 8, height: 48)
listContainerView.frame = CGRect(x: 0, y: k_Height_safeAreaInsetsTop() + 48 + 98, width: view.bounds.size.width, height: view.bounds.size.height - 48 - k_Height_safeAreaInsetsTop() - 98 - k_Height_TabBar)
nameBgImageView.snp.remakeConstraints { make in
make.top.equalTo(92)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(nameLabel.snp.bottom).offset(11)
}
segmentedView.snp.remakeConstraints { make in
make.right.equalTo(-4)
make.left.equalTo(4)
make.top.equalTo(nameBgImageView.snp.bottom).offset(14)
make.height.equalTo(48)
}
listContainerView.snp.remakeConstraints { make in
make.right.left.equalToSuperview()
make.top.equalTo(segmentedView.snp.bottom)
make.bottom.equalTo(-k_Height_TabBar)
}
}
@objc func pushOrderView() {
......@@ -244,26 +260,37 @@ extension YHServiceCenterMainViewController {
}
segmentedView.dataSource = segmentedDataSource
segmentedView.reloadData()
serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) {[weak self] success, error in
guard let self = self else { return }
var name = ""
if let applicant = self.serviceCenterMainReqVM.informationFillStepModel {
if applicant.applicantName.isEmpty {
name = "尊敬的客户"
getStep()
}
}
func getStep() {
serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) {[weak self] success, error in
guard let self = self else { return }
var name = ""
if let applicant = self.serviceCenterMainReqVM.informationFillStepModel {
if applicant.applicantName.isEmpty {
name = "尊敬的客户"
} else {
name = applicant.applicantName
if applicant.sex == 1 {
name = "尊敬的" + name + "先生"
} else if applicant.sex == 2 {
name = "尊敬的" + name + "女士"
} else {
name = applicant.applicantName
if applicant.sex == 1 {
name = name + "先生"
} else if applicant.sex == 2 {
name = name + "女士"
} else {
}
}
}
}
if doneCount == 6 {
let a: ASAttributedString = .init("您好,\(name),您的资料已全部准备完成,已进入", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x121a26)))
let aa: ASAttributedString = .init(NSAttributedString(string: "全套资料审核"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("阶段,审核没问题会安排递交入境处哦~", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x121a26)))
self.nameLabel.attributed.text = a + aa + aaa
} else {
let a: ASAttributedString = .init("您好,\(name),您当前处于", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x121a26)))
let aa: ASAttributedString = .init(NSAttributedString(string: "身份申请"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("阶段", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x121a26)))
let aa: ASAttributedString = .init(NSAttributedString(string: "信息提交"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("阶段,让我们一起共同完成您的身份申请之旅吧~", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor(hex: 0x121a26)))
self.nameLabel.attributed.text = a + aa + aaa
}
}
......@@ -272,7 +299,7 @@ extension YHServiceCenterMainViewController {
func addListView() {
nameBgImageView = {
let view = UIImageView()
view.image = UIImage(named: "service_name_bg")
view.image = UIImage(named: "service_name_bg")?.resizableImage(withCapInsets: UIEdgeInsets(top: 21, left: 68, bottom: 11, right: 14), resizingMode: .stretch)
return view
}()
view.addSubview(nameBgImageView)
......@@ -280,7 +307,7 @@ extension YHServiceCenterMainViewController {
make.top.equalTo(92)
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(50)
make.height.equalTo(68)
}
nameLabel = {
......@@ -288,6 +315,7 @@ extension YHServiceCenterMainViewController {
label.text = "您好,张先生,您当前处于身份申请阶段"
label.font = UIFont.PFSC_M(ofSize: 12)
label.textColor = UIColor.brandMainColor
label.numberOfLines = 0
return label
}()
nameBgImageView.addSubview(nameLabel)
......@@ -295,7 +323,6 @@ extension YHServiceCenterMainViewController {
make.top.equalTo(21)
make.left.equalTo(14)
make.right.equalTo(-14)
make.height.equalTo(17)
}
view.addSubview(noDataView)
......@@ -333,6 +360,8 @@ extension YHServiceCenterMainViewController {
guard let self = self else { return }
arrItemTitles[3] = "已完成(\(count))"
self.updata()
doneCount = count
self.getStep()
}
arrItemVCs.append(controllerOne)
arrItemVCs.append(controllerTwo)
......
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