Commit 26f65c50 authored by Steven杜宇's avatar Steven杜宇

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

parents 4ee9e8e7 c32bc6a1
...@@ -651,6 +651,10 @@ ...@@ -651,6 +651,10 @@
A5CA3F502C7447FB00EB22F5 /* YHUploadCertificateVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F4F2C7447FB00EB22F5 /* YHUploadCertificateVC.swift */; }; A5CA3F502C7447FB00EB22F5 /* YHUploadCertificateVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F4F2C7447FB00EB22F5 /* YHUploadCertificateVC.swift */; };
A5CA3F522C744A5000EB22F5 /* YHUploadCertificateTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F512C744A4F00EB22F5 /* YHUploadCertificateTitleCell.swift */; }; A5CA3F522C744A5000EB22F5 /* YHUploadCertificateTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F512C744A4F00EB22F5 /* YHUploadCertificateTitleCell.swift */; };
A5CA3F542C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F532C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift */; }; A5CA3F542C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F532C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift */; };
A5CA3F562C74850200EB22F5 /* YHUploadCertificateDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F552C74850100EB22F5 /* YHUploadCertificateDetailVC.swift */; };
A5CA3F582C749E0100EB22F5 /* YHUploadCertificateDateItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F572C749E0100EB22F5 /* YHUploadCertificateDateItem.swift */; };
A5CA3F5A2C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F592C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift */; };
A5CA3F5C2C74C4C200EB22F5 /* YHHKCardTemplateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CA3F5B2C74C4C200EB22F5 /* YHHKCardTemplateView.swift */; };
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */; }; A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */; };
A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */; }; A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */; };
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001292BABC84A001F003C /* YHFileListBottomView.swift */; }; A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001292BABC84A001F003C /* YHFileListBottomView.swift */; };
...@@ -1379,6 +1383,10 @@ ...@@ -1379,6 +1383,10 @@
A5CA3F4F2C7447FB00EB22F5 /* YHUploadCertificateVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateVC.swift; sourceTree = "<group>"; }; A5CA3F4F2C7447FB00EB22F5 /* YHUploadCertificateVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateVC.swift; sourceTree = "<group>"; };
A5CA3F512C744A4F00EB22F5 /* YHUploadCertificateTitleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateTitleCell.swift; sourceTree = "<group>"; }; A5CA3F512C744A4F00EB22F5 /* YHUploadCertificateTitleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateTitleCell.swift; sourceTree = "<group>"; };
A5CA3F532C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateDetailCell.swift; sourceTree = "<group>"; }; A5CA3F532C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateDetailCell.swift; sourceTree = "<group>"; };
A5CA3F552C74850100EB22F5 /* YHUploadCertificateDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateDetailVC.swift; sourceTree = "<group>"; };
A5CA3F572C749E0100EB22F5 /* YHUploadCertificateDateItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateDateItem.swift; sourceTree = "<group>"; };
A5CA3F592C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSmallWhiteNoteTemplateView.swift; sourceTree = "<group>"; };
A5CA3F5B2C74C4C200EB22F5 /* YHHKCardTemplateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKCardTemplateView.swift; sourceTree = "<group>"; };
A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHChoiceButtonHoldView.swift; sourceTree = "<group>"; }; A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHChoiceButtonHoldView.swift; sourceTree = "<group>"; };
A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListHeaerView.swift; sourceTree = "<group>"; }; A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListHeaerView.swift; sourceTree = "<group>"; };
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; }; A5D001292BABC84A001F003C /* YHFileListBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; };
...@@ -3649,6 +3657,7 @@ ...@@ -3649,6 +3657,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5CA3F4F2C7447FB00EB22F5 /* YHUploadCertificateVC.swift */, A5CA3F4F2C7447FB00EB22F5 /* YHUploadCertificateVC.swift */,
A5CA3F552C74850100EB22F5 /* YHUploadCertificateDetailVC.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3658,6 +3667,9 @@ ...@@ -3658,6 +3667,9 @@
children = ( children = (
A5CA3F512C744A4F00EB22F5 /* YHUploadCertificateTitleCell.swift */, A5CA3F512C744A4F00EB22F5 /* YHUploadCertificateTitleCell.swift */,
A5CA3F532C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift */, A5CA3F532C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift */,
A5CA3F572C749E0100EB22F5 /* YHUploadCertificateDateItem.swift */,
A5CA3F592C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift */,
A5CA3F5B2C74C4C200EB22F5 /* YHHKCardTemplateView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4078,6 +4090,7 @@ ...@@ -4078,6 +4090,7 @@
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */, 048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */, 04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */,
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */, 04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */,
A5CA3F582C749E0100EB22F5 /* YHUploadCertificateDateItem.swift in Sources */,
045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */, 045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */,
0485DFD62C64E70200B50293 /* YHPrincipleApprovedWaitSubmitVC.swift in Sources */, 0485DFD62C64E70200B50293 /* YHPrincipleApprovedWaitSubmitVC.swift in Sources */,
A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */, A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */,
...@@ -4319,6 +4332,7 @@ ...@@ -4319,6 +4332,7 @@
0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */, 0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */,
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */, 045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */,
044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */, 044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */,
A5CA3F562C74850200EB22F5 /* YHUploadCertificateDetailVC.swift in Sources */,
A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */, A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */,
04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */, 04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */,
045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */, 045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */,
...@@ -4412,6 +4426,7 @@ ...@@ -4412,6 +4426,7 @@
04256DEE2C73338200A37BA4 /* YHGrabNumberListCell.swift in Sources */, 04256DEE2C73338200A37BA4 /* YHGrabNumberListCell.swift in Sources */,
045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */, 045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */,
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */, 0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
A5CA3F5A2C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift in Sources */,
045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */, 045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */,
04CE1AD62C2AD91F001CB80A /* YHApplyActivityResultViewController.swift in Sources */, 04CE1AD62C2AD91F001CB80A /* YHApplyActivityResultViewController.swift in Sources */,
044D0BF82C21572B00C5CF5E /* YHAllowSettingTableViewCell.swift in Sources */, 044D0BF82C21572B00C5CF5E /* YHAllowSettingTableViewCell.swift in Sources */,
...@@ -4518,6 +4533,7 @@ ...@@ -4518,6 +4533,7 @@
04CE1AD92C2AD91F001CB80A /* YHActivityDetailBottomView.swift in Sources */, 04CE1AD92C2AD91F001CB80A /* YHActivityDetailBottomView.swift in Sources */,
04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */, 04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */,
0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */, 0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */,
A5CA3F5C2C74C4C200EB22F5 /* YHHKCardTemplateView.swift in Sources */,
044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */, 044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */,
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */, A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */,
A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */, A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */,
......
//
// YHUploadCertificateDetailVC.swift
// galaxy
//
// Created by davidhuangA on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
enum UploadCertificateDetailType : Int {
case SmallWhiteNote
case HongKongCard
}
class YHUploadCertificateDetailVC: YHBaseViewController {
var detailType : UploadCertificateDetailType = .SmallWhiteNote
lazy var topImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "xbt_tips")) // 343 90
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
view.backgroundColor = .white
return view
}()
private lazy var titleTextView : UITextView = {
let lable0 = UITextView()
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 17)
lable0.isScrollEnabled = false
lable0.isEditable = false
lable0.isSelectable = false
return lable0
}()
private lazy var customLabel : UILabel = {
let lable = UILabel(frame: CGRect(x: 0, y: 0, width: 48, height: 16))
lable.text = "示例模板"
lable.font = .PFSC_M(ofSize: 10)
lable.backgroundColor = UIColor(hex:0x2F7EF6,transparency: 0.08)
lable.textColor = .brandMainColor
lable.layer.cornerRadius = kCornerRadius3
lable.clipsToBounds = true
lable.textAlignment = .center
lable.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action: #selector(tapExampleMudel))
lable.addGestureRecognizer(tap)
return lable
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
private lazy var cardLabel : UILabel = {
let lable = UILabel()
lable.text = "小白条正面"
lable.font = .PFSC_R(ofSize: 12)
lable.textColor = UIColor.mainTextColor50
lable.clipsToBounds = true
lable.textAlignment = .center
return lable
}()
private lazy var cardButton : YHCardButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(clickCardButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius4
button.clipsToBounds = true
return button
}()
private lazy var startDateItem : YHUploadCertificateDateItem = {
let view = YHUploadCertificateDateItem()
return view
}()
lazy var lineView2 : UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
private lazy var endDateItem : YHUploadCertificateDateItem = {
let view = YHUploadCertificateDateItem()
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
detailType = .HongKongCard //for test hjl
setupUI()
}
}
private extension YHUploadCertificateDetailVC {
@objc func tapExampleMudel() {
if detailType == .SmallWhiteNote {
// navTitle = "上传小白条"
let view = YHSmallWhiteNoteTemplateView.sheetView()
view.show()
} else if detailType == .HongKongCard {
// navTitle = "上传香港身份证"
let view = YHHKCardTemplateView.sheetView()
view.show()
}
}
@objc func clickCardButton() {
}
func setupUI() {
var navTitle = ""
if detailType == .SmallWhiteNote {
navTitle = "上传小白条"
} else if detailType == .HongKongCard {
navTitle = "上传香港身份证"
}
gk_navTitle = navTitle
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(whiteContentView)
if detailType == .SmallWhiteNote {
let topImgViewH : CGFloat = 90 * (KScreenWidth - 16 * 2) / 343.0
view.addSubview(topImgView)
topImgView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + kMargin)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(topImgViewH)
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.top.equalTo(topImgView.snp.bottom).offset(14)
}
} else if detailType == .HongKongCard {
whiteContentView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + kMargin)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
}
}
titleTextView.attributed.text = """
\("*", .foreground(UIColor.failColor), .font(UIFont.PFSC_M(ofSize: 17)))\(" 张三的第一次赴港激活小白条 ", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 17)))\(.view(customLabel, .original(.center)))
"""
whiteContentView.addSubview(titleTextView)
titleTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-18)
make.top.equalToSuperview().offset(kMargin)
}
whiteContentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.top.equalTo(titleTextView.snp.bottom).offset(12)
make.height.equalTo(1)
}
whiteContentView.addSubview(cardLabel)
cardLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalTo(lineView.snp.bottom).offset(12)
make.height.equalTo(20)
make.width.equalTo(160)
}
if detailType == .SmallWhiteNote {
whiteContentView.addSubview(cardButton)
cardButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalTo(cardLabel.snp.bottom).offset(9)
make.height.equalTo(99)
make.width.equalTo(160)
make.bottom.equalToSuperview().offset(-kMargin)
}
} else if detailType == .HongKongCard {
whiteContentView.addSubview(cardButton)
cardButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalTo(cardLabel.snp.bottom).offset(9)
make.height.equalTo(99)
make.width.equalTo(160)
}
whiteContentView.addSubview(startDateItem)
startDateItem.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.top.equalTo(cardButton.snp.bottom).offset(32)
make.height.equalTo(20)
}
whiteContentView.addSubview(lineView2)
lineView2.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.top.equalTo(startDateItem.snp.bottom).offset(16)
make.height.equalTo(1)
}
whiteContentView.addSubview(endDateItem)
endDateItem.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.top.equalTo(lineView2.snp.bottom).offset(16)
make.height.equalTo(20)
make.bottom.equalToSuperview().offset(-kMargin)
}
}
}
}
...@@ -144,6 +144,11 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource { ...@@ -144,6 +144,11 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
if 0 <= indexPath.section && indexPath.section < items.count { if 0 <= indexPath.section && indexPath.section < items.count {
let vc = YHUploadCertificateDetailVC()
vc.detailType = .SmallWhiteNote
self.navigationController?.pushViewController(vc)
} }
} }
......
//
// YHHKCardTemplateView.swift
// galaxy
//
// Created by davidhuangA on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKCardTemplateView: UIView {
static let contentViewH : CGFloat = (518 / 375 ) * KScreenWidth
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var titleLable: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "香港身份证示例模板"
label.textAlignment = .center
return label
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .clear
view.addSubview(self.rewardBtn)
self.rewardBtn.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
}
view.layer.zPosition = 10
return view
}()
//知道了
lazy var rewardBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("知道了", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickSureBtn), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button
}()
lazy var closeBtn: UIButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
button.setImage(UIImage(named: "work_example_close"), for: .normal)
button.setImage(UIImage(named: "work_example_close"), for: .selected)
return button
}()
lazy var myScrollView: UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .clear
view.showsVerticalScrollIndicator = false
return view
}()
lazy var bkgImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "hkCard_template")
imageV.contentMode = .scaleToFill
imageV.clipsToBounds = true
return imageV
}()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
}
extension YHHKCardTemplateView {
static func sheetView() -> YHHKCardTemplateView {
let view = YHHKCardTemplateView(frame:UIScreen.main.bounds)
return view
}
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
UIView.animate(withDuration: 0.5) {
let whiteHeight = YHHKCardTemplateView.contentViewH
self.whiteContentView.frame = CGRect(x: 0, y: KScreenHeight - whiteHeight, width: KScreenWidth, height: whiteHeight)
}
}
@objc func dismiss() {
removeFromSuperview()
}
@objc func clickSureBtn() {
dismiss()
}
}
private extension YHHKCardTemplateView {
func setupUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.clipsToBounds = true
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
let whiteHeight = YHHKCardTemplateView.contentViewH
whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight)
whiteContentView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(98)
}
whiteContentView.addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(kMargin)
make.left.right.equalToSuperview()
make.height.equalTo(24)
}
whiteContentView.addSubview(closeBtn)
closeBtn.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-21)
make.height.width.equalTo(24)
make.centerY.equalTo(titleLable.snp.centerY)
}
whiteContentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(12)
make.left.equalToSuperview().offset(21)
make.right.equalToSuperview().offset(-21)
make.height.equalTo(1)
}
whiteContentView.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(21)
make.right.equalToSuperview().offset(-21)
make.width.equalTo(KScreenWidth - 21 * 2)
make.height.equalTo(whiteHeight-98 - 16 - 24 - 12 - 1 - 21)
}
if let tmpImage = UIImage(named:"hkCard_template") {
let scale = Double(tmpImage.size.height / tmpImage.size.width)
let imageH = scale * (KScreenWidth - 21 * 2)
myScrollView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.width.equalTo(KScreenWidth - 21 * 2)
make.height.equalTo(imageH)
}
myScrollView.contentSize = CGSize(width: KScreenWidth - 21 * 2, height: imageH)
}
}
}
//
// YHSmallWhiteNoteTemplateView.swift
// galaxy
//
// Created by davidhuangA on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSmallWhiteNoteTemplateView: UIView {
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var titleLable: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "小白条示例模板"
label.textAlignment = .center
return label
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .clear
view.addSubview(self.rewardBtn)
self.rewardBtn.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
}
view.layer.zPosition = 10
return view
}()
//知道了
lazy var rewardBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("知道了", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickSureBtn), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button
}()
lazy var closeBtn: UIButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
button.setImage(UIImage(named: "work_example_close"), for: .normal)
button.setImage(UIImage(named: "work_example_close"), for: .selected)
return button
}()
lazy var myScrollView: UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .clear
view.showsVerticalScrollIndicator = false
return view
}()
lazy var bkgImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "xbt_template")
imageV.contentMode = .scaleToFill
imageV.clipsToBounds = true
return imageV
}()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
}
extension YHSmallWhiteNoteTemplateView {
static func sheetView() -> YHSmallWhiteNoteTemplateView {
let view = YHSmallWhiteNoteTemplateView(frame:UIScreen.main.bounds)
return view
}
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
UIView.animate(withDuration: 0.5) {
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
self.whiteContentView.frame = CGRect(x: 0, y: KScreenHeight - whiteHeight, width: KScreenWidth, height: whiteHeight)
}
}
@objc func dismiss() {
removeFromSuperview()
}
@objc func clickSureBtn() {
dismiss()
}
}
private extension YHSmallWhiteNoteTemplateView {
func setupUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.clipsToBounds = true
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight)
whiteContentView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(98)
}
whiteContentView.addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(kMargin)
make.left.right.equalToSuperview()
make.height.equalTo(24)
}
whiteContentView.addSubview(closeBtn)
closeBtn.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-21)
make.height.width.equalTo(24)
make.centerY.equalTo(titleLable.snp.centerY)
}
whiteContentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(12)
make.left.equalToSuperview().offset(21)
make.right.equalToSuperview().offset(-21)
make.height.equalTo(1)
}
whiteContentView.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(21)
make.right.equalToSuperview().offset(-21)
make.width.equalTo(KScreenWidth - 21 * 2)
make.height.equalTo(whiteHeight-98 - 16 - 24 - 12 - 1 - 21)
}
if let tmpImage = UIImage(named:"xbt_template") {
let scale = Double(tmpImage.size.height / tmpImage.size.width)
let imageH = scale * (KScreenWidth - 21 * 2)
myScrollView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.width.equalTo(KScreenWidth - 21 * 2)
make.height.equalTo(imageH)
}
myScrollView.contentSize = CGSize(width: KScreenWidth - 21 * 2, height: imageH)
}
}
}
//
// YHUploadCertificateDateItem.swift
// galaxy
//
// Created by davidhuangA on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHUploadCertificateDateItem: UIView {
static let viewH : CGFloat = 20.0
private lazy var cardLabel : UILabel = {
let lable = UILabel()
lable.text = "入境日期"
lable.font = .PFSC_R(ofSize: 14)
lable.textColor = UIColor.mainTextColor
return lable
}()
lazy var dateTextField:UITextField = {
let textField = UITextField()
textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "请输入".local, attributes: [NSAttributedString.Key.foregroundColor : UIColor.mainTextColor30])
textField.font = UIFont.PFSC_M(ofSize: 14)
textField.tintColor = UIColor.brandMainColor
textField.textColor = UIColor.mainTextColor
textField.isEnabled = false
return textField
}()
lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var statusImageView: UIImageView = {
let view = UIImageView(image: UIImage(named: "grey_right_arrow"))
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
private extension YHUploadCertificateDateItem {
func setupUI() {
addSubview(cardLabel)
cardLabel.snp.makeConstraints { make in
make.top.left.bottom.equalToSuperview()
}
let a: ASAttributedString = .init("*", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.failColor))
let b: ASAttributedString = .init(" 入境日期", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
cardLabel.attributed.text = a + b
addSubview(dateTextField)
dateTextField.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalTo(cardLabel.snp.right).offset(48)
}
addSubview(statusImageView)
statusImageView.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.height.width.equalTo(20)
}
}
}
extension YHUploadCertificateDateItem {
}
...@@ -252,4 +252,3 @@ extension YHOffivialApprovalGuildLineCheckView : UIScrollViewDelegate { ...@@ -252,4 +252,3 @@ extension YHOffivialApprovalGuildLineCheckView : UIScrollViewDelegate {
} }
} }
} }
...@@ -68,7 +68,6 @@ class YHImageViewController: YHBaseViewController { ...@@ -68,7 +68,6 @@ class YHImageViewController: YHBaseViewController {
self.back() self.back()
} }
} }
// self.resultView.kf.setImage(with: URL(string: success))
self.resultView.kf.setImage(with: URL(string: success), placeholder: UIImage(named: "global_default_image")) self.resultView.kf.setImage(with: URL(string: success), placeholder: UIImage(named: "global_default_image"))
} }
} }
......
...@@ -19,6 +19,9 @@ extension UIColor { ...@@ -19,6 +19,9 @@ extension UIColor {
//品牌主色 30 //品牌主色 30
static let brandMainColor30 : UIColor = UIColor(hexString: "#0046B4",transparency: 0.3)! static let brandMainColor30 : UIColor = UIColor(hexString: "#0046B4",transparency: 0.3)!
//品牌主色 50
static let brandMainColor50 : UIColor = UIColor(hexString: "#0046B4",transparency: 0.5)!
//品牌主色 16 //品牌主色 16
static let brandMainColor16 : UIColor = UIColor(hexString: "#0046B4",transparency: 0.16)! static let brandMainColor16 : UIColor = UIColor(hexString: "#0046B4",transparency: 0.16)!
...@@ -34,7 +37,6 @@ extension UIColor { ...@@ -34,7 +37,6 @@ extension UIColor {
} }
//标题/主内容 //标题/主内容
// static let mainTextColor : UIColor = UIColor(hexString: "#222222")!
static let mainTextColor : UIColor = UIColor(hexString: "#121A26")! static let mainTextColor : UIColor = UIColor(hexString: "#121A26")!
static let mainTextColor5 : UIColor = UIColor(hexString: "#121A26",transparency: 0.05)! static let mainTextColor5 : UIColor = UIColor(hexString: "#121A26",transparency: 0.05)!
static let mainTextColor18 : UIColor = UIColor(hexString: "#121A26",transparency: 0.18)! static let mainTextColor18 : UIColor = UIColor(hexString: "#121A26",transparency: 0.18)!
......
{
"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" : "Group 2033195760@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033195760@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033195759@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033195759@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33332540@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33332540@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