Commit 9f15dd92 authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 原则批 信封UI
  我的文书我的签字 添加实名认证UI及逻辑
  //  原则批
parents b223b127 efe3d0f5
......@@ -301,6 +301,7 @@
047AA3F62C50E773009C4554 /* YHShareCashOutModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F52C50E773009C4554 /* YHShareCashOutModel.swift */; };
047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F72C5CC7B0009C4554 /* YHShareStepView.swift */; };
047AA3FA2C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */; };
047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */; };
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
......@@ -354,6 +355,9 @@
04AF82D82C291E960028CE2A /* YHMatchUserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF82D72C291E960028CE2A /* YHMatchUserViewModel.swift */; };
04B360E32C60A346001EB053 /* YHPrinciplePhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E22C60A346001EB053 /* YHPrinciplePhotoCell.swift */; };
04B360E52C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */; };
04B360E72C60CD37001EB053 /* YHPrincipleUploadFileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */; };
04B360EB2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */; };
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */; };
04B9EE5A2C06CC3100A4018D /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */; };
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
......@@ -936,6 +940,7 @@
047AA3F52C50E773009C4554 /* YHShareCashOutModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHShareCashOutModel.swift; sourceTree = "<group>"; };
047AA3F72C5CC7B0009C4554 /* YHShareStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHShareStepView.swift; sourceTree = "<group>"; };
047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInvitationWithGiftsSelectItemView.swift; sourceTree = "<group>"; };
047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignAppendStepView.swift; sourceTree = "<group>"; };
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
......@@ -989,6 +994,9 @@
04AF82D72C291E960028CE2A /* YHMatchUserViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMatchUserViewModel.swift; sourceTree = "<group>"; };
04B360E22C60A346001EB053 /* YHPrinciplePhotoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrinciplePhotoCell.swift; sourceTree = "<group>"; };
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrinciplePhotoCollectCell.swift; sourceTree = "<group>"; };
04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleUploadFileCell.swift; sourceTree = "<group>"; };
04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleCongratulationAlertView.swift; sourceTree = "<group>"; };
04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeCell.swift; sourceTree = "<group>"; };
04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOtherLoginViewController.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
......@@ -1920,6 +1928,7 @@
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */,
044CF8D32BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift */,
0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */,
047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -2196,6 +2205,9 @@
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleUnapprovedCell.swift */,
04B360E22C60A346001EB053 /* YHPrinciplePhotoCell.swift */,
04B360E42C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift */,
04B360E62C60CD37001EB053 /* YHPrincipleUploadFileCell.swift */,
04B360EC2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift */,
04B360EA2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -3567,6 +3579,7 @@
045EEEC22B9F171A0022A143 /* YHOtherInfoFillViewController.swift in Sources */,
045EEE7C2B9F171A0022A143 /* YHPreviewInfoSessionModel.swift in Sources */,
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */,
04B360EB2C60E88C001EB053 /* YHPrincipleCongratulationAlertView.swift in Sources */,
04CE1AD42C2AD91F001CB80A /* YHActivityDetailModel.swift in Sources */,
045EEF112B9F171A0022A143 /* YHMainInformationModel.swift in Sources */,
A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */,
......@@ -3587,6 +3600,7 @@
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */,
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */,
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */,
045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */,
A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */,
......@@ -3702,6 +3716,7 @@
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */,
04FB01D02C23FA420040115D /* YHMatchUserInfo.swift in Sources */,
045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */,
04B360E72C60CD37001EB053 /* YHPrincipleUploadFileCell.swift in Sources */,
04F957472C203033003C631C /* YHMyGoodFriendsVC.swift in Sources */,
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */,
045EEEDF2B9F171A0022A143 /* YHCollegeSearchBar.swift in Sources */,
......@@ -4039,6 +4054,7 @@
045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */,
A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */,
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */,
047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */,
044D0C1E2C22CFBF00C5CF5E /* YHEditWorkViewController.swift in Sources */,
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */,
......
......@@ -24,7 +24,7 @@ class YHPrincipleReviewListVC: YHBaseViewController {
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleGroupReviewListCell.self, forCellReuseIdentifier: YHPrincipleGroupReviewListCell.cellReuseIdentifier)
tableView.register(YHPrincipleGroupUploadCell.self, forCellReuseIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier)
tableView.register(YHPrinciplePhotoCell.self, forCellReuseIdentifier: YHPrinciplePhotoCell.cellReuseIdentifier)
tableView.register(YHPrincipleEnvelopeCell.self, forCellReuseIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier)
return tableView
}()
......@@ -108,7 +108,7 @@ extension YHPrincipleReviewListVC: UITableViewDelegate, UITableViewDataSource {
// YHPrinciplePhotoCell
// YHPrincipleUnapprovedCell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrinciplePhotoCell.cellReuseIdentifier, for: indexPath) as! YHPrinciplePhotoCell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleEnvelopeCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleEnvelopeCell
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
......
//
// YHPrincipleCongratulationAlertView.swift
// galaxy
//
// Created by edy on 2024/8/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHPrincipleCongratulationAlertView: UIView {
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = .alertMaskColor
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
lazy var closeBtn:UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "update_close"), for: .normal)
btn.addTarget(self, action: #selector(didCloseBtnClicked), for: .touchUpInside)
return btn
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 24)
label.textColor = UIColor.brandMainColor
label.text = "祝贺获批!"
return label
}()
lazy var detailLabel: UILabel = {
var label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14.0)
let a: ASAttributedString = .init("恭喜您申请的【优秀人才入境计划】", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let b: ASAttributedString = .init("已获得港府的甄选名额!", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
label.attributed.text = a+b
return label
}()
lazy var bgImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "principle_congratulation_bg"))
let bottomView = UIImageView(image: UIImage(named: "principle_congratulation_alpha"))
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(58.0)
}
return view
}()
lazy var lookBtn: UIButton = {
let button = UIButton()
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.setTitle("查看详情", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(didLookBtnClicked), for: .touchUpInside)
return button
}()
static func alertView() -> YHPrincipleCongratulationAlertView {
let view = YHPrincipleCongratulationAlertView(frame: UIScreen.main.bounds)
return view
}
@objc func didCloseBtnClicked() {
self.dismiss()
}
@objc func didLookBtnClicked() {
}
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
self.addSubview(closeBtn)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(detailLabel)
whiteContentView.addSubview(bgImgView)
whiteContentView.addSubview(lookBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(38)
make.right.equalTo(-38)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(24)
make.top.equalTo(32)
make.height.equalTo(34)
}
detailLabel.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(20)
}
bgImgView.snp.makeConstraints { make in
make.width.equalTo(245)
make.height.equalTo(170)
make.top.equalTo(detailLabel.snp.bottom).offset(20)
make.centerX.equalToSuperview()
}
lookBtn.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-16)
make.height.equalTo(45)
make.top.equalTo(bgImgView.snp.bottom)
}
closeBtn.snp.makeConstraints { make in
make.width.height.equalTo(24)
make.top.equalTo(whiteContentView.snp.bottom).offset(24)
make.centerX.equalTo(whiteContentView)
}
}
}
//
// YHPrincipleEnvelopeCell.swift
// galaxy
//
// Created by edy on 2024/8/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPrincipleEnvelopeCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleEnvelopeCell"
var itemModel:YHPrincleGroupModel?
var items: [String] = []
var expandClick:((Bool)->())?
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 15)
label.textColor = UIColor.mainTextColor
label.text = "申请资料已递交港府留档"
return label
}()
lazy var iconImgView:UIImageView = {
let view = UIImageView(image: UIImage(named: "custom_service_icon_right"))
return view
}()
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 6.0
view.clipsToBounds = true
return view
}()
lazy var expandBtn:UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "custom_service_expand_0"), for: .normal)
btn.addTarget(self, action: #selector(didExpandBtnClicked), for: .touchUpInside)
return btn
}()
lazy var envelopImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "principle_envelope_unsee"))
view.addSubview(self.nameLabel)
nameLabel.snp.makeConstraints { make in
make.top.equalTo(58.0)
make.centerX.equalToSuperview()
make.height.equalTo(25)
}
return view
}()
lazy var nameLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 18)
label.textColor = UIColor(hex: 0xB75E24)
label.text = "XXXX"
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
@objc func didExpandBtnClicked() {
guard let model = itemModel else { return }
expandClick?(!model.isExpand)
}
func updateModel(_ model:YHPrincleGroupModel) {
itemModel = model
items.removeAll()
items.append(contentsOf: model.fileList)
whiteView.isHidden = !model.isExpand
let imgName = model.isExpand ? "custom_service_expand_1" : "custom_service_expand_0"
expandBtn.setImage(UIImage(named: imgName), for: .normal)
expandBtn.isHidden = items.count <= 0
if !model.isExpand || items.count <= 0 {
whiteView.removeSubviews()
whiteView.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(0.0)
make.height.equalTo(0.0)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-32)
}
self.setNeedsLayout()
self.layoutIfNeeded()
return
}
whiteView.removeSubviews()
whiteView.addSubview(self.envelopImgView)
whiteView.snp.remakeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(16.0)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-32)
}
envelopImgView.snp.remakeConstraints { make in
make.top.equalTo(16)
make.centerX.equalToSuperview()
make.width.equalTo(194)
make.height.equalTo(179)
make.bottom.equalTo(-17)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
contentView.addSubview(iconImgView)
contentView.addSubview(titleLabel)
contentView.addSubview(expandBtn)
contentView.addSubview(whiteView)
whiteView.addSubview(self.envelopImgView)
iconImgView.snp.makeConstraints { make in
make.left.equalTo(20)
make.width.height.equalTo(15.0)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgView.snp.right).offset(6)
make.right.equalTo(expandBtn.snp.left)
make.top.equalTo(0)
make.height.equalTo(20)
}
expandBtn.snp.makeConstraints { make in
make.width.height.equalTo(20.0)
make.centerY.equalTo(titleLabel)
make.right.equalTo(-20.0)
}
whiteView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(0.0)
make.height.equalTo(0.0)
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalTo(-32)
}
envelopImgView.snp.makeConstraints { make in
make.top.equalTo(16)
make.centerX.equalToSuperview()
make.width.equalTo(194)
make.height.equalTo(179)
}
}
}
......@@ -14,10 +14,12 @@ class YHPrincipleGroupUploadCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleGroupUploadCell"
let btnTitleColor:UIColor = .brandMainColor
let uploadBtnSize = CGSize(width: (KScreenWidth-(40)*2), height: 44)
var isNeedTemplate: Bool = false
lazy var grayView: UIView = {
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0xf8f9fb)
view.backgroundColor = UIColor.white
view.layer.cornerRadius = 6.0
view.clipsToBounds = true
return view
......@@ -37,6 +39,17 @@ class YHPrincipleGroupUploadCell: UITableViewCell {
return label
}()
lazy var titleView: UITextView = {
let view = UITextView()
view.text = "《赴港居留同意书》"
view.textColor = UIColor.mainTextColor
view.font = UIFont.PFSC_M(ofSize: 17)
view.isScrollEnabled = false
view.isEditable = false
view.isSelectable = false
return view
}()
lazy var detailLabel: UILabel = {
var label = UILabel()
label.numberOfLines = 0
......@@ -86,19 +99,23 @@ class YHPrincipleGroupUploadCell: UITableViewCell {
}
func updateStatus(_ status: Int) {
}
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = UIColor.white
contentView.addSubview(grayView)
grayView.addSubview(titleLabel)
grayView.addSubview(lineView)
grayView.addSubview(detailLabel)
grayView.addSubview(uploadBtn)
contentView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
contentView.addSubview(whiteView)
whiteView.addSubview(titleLabel)
whiteView.addSubview(lineView)
whiteView.addSubview(detailLabel)
whiteView.addSubview(uploadBtn)
uploadBtn.layer.addSublayer(dotLineLayer)
grayView.snp.makeConstraints { make in
whiteView.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.bottom.equalTo(0)
......
//
// YHPrincipleUploadFileCell.swift
// galaxy
//
// Created by edy on 2024/8/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPrincipleUploadFileCell: UITableViewCell {
static let cellReuseIdentifier = "YHPrincipleUploadFileCell"
static let height = 55.0
var iconImgV: UIImageView!
var titleLabel: UILabel!
var timeLabel: UILabel!
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
func updateModel(_ str: String) {
titleLabel.text = str
timeLabel.text = "上传于2023.02.06"
}
func setupUI() {
iconImgV = UIImageView(image: UIImage(named: "my_cer_type_pdf"))
self.addSubview(iconImgV)
titleLabel = UILabel()
titleLabel.font = UIFont.PFSC_M(ofSize: 14)
titleLabel.textColor = UIColor.mainTextColor
titleLabel.text = "新公司在职证明.pdf"
self.addSubview(titleLabel)
timeLabel = UILabel()
timeLabel.font = UIFont.PFSC_R(ofSize: 11)
timeLabel.textColor = UIColor.labelTextColor2
timeLabel.text = "上传于2024.12.12"
self.addSubview(timeLabel)
iconImgV.snp.makeConstraints { make in
make.left.equalTo(22)
make.centerY.equalToSuperview()
make.width.height.equalTo(31.0)
}
titleLabel.snp.makeConstraints { make in
make.bottom.equalTo(self.snp.centerY).offset(-1)
make.left.equalTo(iconImgV.snp.right).offset(18)
make.right.equalTo(-16)
make.height.equalTo(20)
}
timeLabel.snp.makeConstraints { make in
make.top.equalTo(self.snp.centerY).offset(1)
make.left.equalTo(iconImgV.snp.right).offset(18)
make.height.equalTo(20)
make.right.equalTo(-16)
}
}
}
......@@ -558,6 +558,18 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
present(safariViewController, animated: true, completion: nil)
})
}
} else if error?.errorCode == 1008612 {
YHSignAppendStepView.show {[weak self] name, phone in
guard let self = self else { return }
self.viewModel.requestSignaturePersonalWithNameAndPhoneURL(name: name, phone: phone, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
let url = URL(string: self.viewModel.personalUrl) ?? URL(fileURLWithPath: "")
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.delegate = self
safariViewController.modalPresentationStyle = .fullScreen
})
}
} else {
if success ?? false {
let url = URL(string: self.viewModel.pageUrl) ?? URL(fileURLWithPath: "")
......
......@@ -175,6 +175,30 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel {
}
}
func requestSignaturePersonalWithNameAndPhoneURL(name: String, phone: String,callBackBlock:@escaping (_ success: Bool?, _ error: YHErrorModel?)->()) {
let params: [String : Any] = ["user_name": name,
"mobile": phone]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.personalUrl
let _ = YHNetRequest.postRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
let dic = json.data
guard let result = YHMySignatureURLModel.deserialize(from: dic as? Dictionary) else {
callBackBlock(false,nil)
return
}
self.personalUrl = result.url
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func requestSignatureLook(_ id: String, callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
let params: [String : Any] = ["id": id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.look
......
......@@ -408,6 +408,18 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
present(safariViewController, animated: true, completion: nil)
})
}
} else if error?.errorCode == 1008612 {
YHSignAppendStepView.show {[weak self] name, phone in
guard let self = self else { return }
self.viewModel.requestSignaturePersonalWithNameAndPhoneURL(name: name, phone: phone, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
let url = URL(string: self.viewModel.personalUrl) ?? URL(fileURLWithPath: "")
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.delegate = self
safariViewController.modalPresentationStyle = .fullScreen
})
}
} else {
if success ?? false {
let url = URL(string: self.viewModel.pageUrl) ?? URL(fileURLWithPath: "")
......
......@@ -88,6 +88,30 @@ class YHMySignatureDetailViewModel: YHBaseViewModel {
}
}
func requestSignaturePersonalWithNameAndPhoneURL(name: String, phone: String,callBackBlock:@escaping (_ success: Bool?, _ error: YHErrorModel?)->()) {
let params: [String : Any] = ["user_name": name,
"mobile": phone]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.personalUrl
let _ = YHNetRequest.postRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
let dic = json.data
guard let result = YHMySignatureURLModel.deserialize(from: dic as? Dictionary) else {
callBackBlock(false,nil)
return
}
self.personalUrl = result.url
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func requestSignCallBack(_ id: String, callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
// let params: [String : Any] = ["order_id": orderId]
let params: [String : Any] = ["id": id]
......
......@@ -331,16 +331,19 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if (indexPath.row >= items.count) { return }
if !checkLogin() {
return
}
// if true {
// let vc = YHPrincipleReviewListVC()
// self.navigationController?.pushViewController(vc)
// return
// }
if true {
// YHPrincipleCongratulationAlertView.alertView().show()
let vc = YHPrincipleReviewListVC()
self.navigationController?.pushViewController(vc)
return
}
let item: PersonalModuleItem = items[indexPath.row]
switch item.type {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346241677@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346241677@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194607@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194607@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "已查看@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "已查看@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "点击查看@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "点击查看@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_step_tips@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_step_tips@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