Commit ab6cefed authored by Steven杜宇's avatar Steven杜宇

// 赴港办证

parent c8b6ee63
......@@ -55,6 +55,8 @@
04256DEE2C73338200A37BA4 /* YHGrabNumberListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DED2C73338200A37BA4 /* YHGrabNumberListCell.swift */; };
04256DF02C733B2D00A37BA4 /* YHGrabNumberInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DEF2C733B2D00A37BA4 /* YHGrabNumberInfoView.swift */; };
04256DF22C734E7E00A37BA4 /* YHGrabFileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DF12C734E7E00A37BA4 /* YHGrabFileCell.swift */; };
04256DF42C73626900A37BA4 /* YHServiceSelectAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DF32C73626900A37BA4 /* YHServiceSelectAlertView.swift */; };
04256DF62C736A0800A37BA4 /* YHServiceItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256DF52C736A0800A37BA4 /* YHServiceItemCell.swift */; };
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */; };
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */; };
0425E6422BA95B1B00A5E763 /* YHSchemeTableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */; };
......@@ -736,6 +738,8 @@
04256DED2C73338200A37BA4 /* YHGrabNumberListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGrabNumberListCell.swift; sourceTree = "<group>"; };
04256DEF2C733B2D00A37BA4 /* YHGrabNumberInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGrabNumberInfoView.swift; sourceTree = "<group>"; };
04256DF12C734E7E00A37BA4 /* YHGrabFileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGrabFileCell.swift; sourceTree = "<group>"; };
04256DF32C73626900A37BA4 /* YHServiceSelectAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceSelectAlertView.swift; sourceTree = "<group>"; };
04256DF52C736A0800A37BA4 /* YHServiceItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceItemCell.swift; sourceTree = "<group>"; };
0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableViewCell.swift; sourceTree = "<group>"; };
0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScemeItemModel.swift; sourceTree = "<group>"; };
0425E6412BA95B1B00A5E763 /* YHSchemeTableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableFooterView.swift; sourceTree = "<group>"; };
......@@ -1522,10 +1526,12 @@
04256DE72C7314B500A37BA4 /* YHSelectApplicantCell.swift */,
04256DED2C73338200A37BA4 /* YHGrabNumberListCell.swift */,
04256DF12C734E7E00A37BA4 /* YHGrabFileCell.swift */,
04256DF52C736A0800A37BA4 /* YHServiceItemCell.swift */,
04256DE32C72E3FA00A37BA4 /* YHInfoItemOptionView.swift */,
04256DE92C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift */,
04256DEB2C732F6900A37BA4 /* YHGrabNumberListView.swift */,
04256DEF2C733B2D00A37BA4 /* YHGrabNumberInfoView.swift */,
04256DF32C73626900A37BA4 /* YHServiceSelectAlertView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -3911,6 +3917,7 @@
045EEEE52B9F171A0022A143 /* YHMySignatureDetailViewController.swift in Sources */,
A5ACE92F2B4564F7002C94D2 /* YHMyViewController.swift in Sources */,
A5ACE9332B4564F7002C94D2 /* NetBaseModel.swift in Sources */,
04256DF62C736A0800A37BA4 /* YHServiceItemCell.swift in Sources */,
A5FF0F3A2C32F20A0069852B /* YHActivityDetailCell0.swift in Sources */,
045EEE9B2B9F171A0022A143 /* YHWorkExperienceViewModel.swift in Sources */,
04AD31772C22DE6600DF5655 /* YHEditInterestViewController.swift in Sources */,
......@@ -3993,6 +4000,7 @@
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */,
044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */,
0485DFE12C6A0B6200B50293 /* YHPrincipleApprovedResultVC.swift in Sources */,
04256DF42C73626900A37BA4 /* YHServiceSelectAlertView.swift in Sources */,
04F5F8702C1AC4C2004A463C /* YHHKEventWebViewController.swift in Sources */,
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */,
......
......@@ -78,6 +78,15 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let view = YHServiceSelectAlertView.alertView()
view.items = [YHServiceItem(id:1, title: "开户"),
YHServiceItem(id:1, title: "开户"),
YHServiceItem(id:1, title: "开户"),
YHServiceItem(id:1, title: "开户"),
YHServiceItem(id:1, title: "开户"),
YHServiceItem(id:1, title: "开户"),]
view.show()
if 0 <= indexPath.section && indexPath.section < items.count {
}
......
......@@ -29,7 +29,6 @@ class YHGrabFileCell: UICollectionViewCell {
func createUI() {
self.layer.cornerRadius = 5.0
self.layer.borderWidth = 0.5
self.layer.borderColor = UIColor.separatorColor.cgColor
self.backgroundColor = UIColor.init(hex: 0xD8D8D8)
self.layer.borderColor = UIColor.init(hex: 0xD8D8D8).cgColor
}
}
//
// YHServiceItemCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHServiceItemCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHServiceItemCell"
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 13)
label.textColor = .mainTextColor
label.textAlignment = .center
return label
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func updateItem(_ item: YHServiceItem) {
titleLabel.text = item.title
if item.isSelect {
self.layer.borderWidth = 1.0
self.layer.borderColor = UIColor.brandMainColor.cgColor
titleLabel.textColor = UIColor.brandMainColor
} else {
self.layer.borderWidth = 0.0
self.layer.borderColor = nil
titleLabel.textColor = UIColor.mainTextColor
}
}
func createUI() {
self.layer.cornerRadius = kCornerRadius3
self.backgroundColor = UIColor.init(hex: 0xF4F6FA)
self.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
}
//
// YHServiceSelectAlertView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHServiceItem {
var id = 0
var title = ""
var isSelect: Bool = false
init(id: Int = 0, title: String = "") {
self.id = id
self.title = title
}
}
class YHServiceSelectAlertView: UICollectionViewCell {
var items:[YHServiceItem] = [] {
didSet {
var rowCount = items.count/3
if items.count%3 != 0 {
rowCount += 1
}
var height = 0.0
if rowCount > 0 {
height = 42.0 * Double(rowCount) + 16.0 * Double(rowCount-1)
}
collectionView.reloadData()
collectionView.snp.updateConstraints { make in
make.height.equalTo(height)
}
}
}
// 底层蒙版
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 bgImgView: UIView = {
let view = UIImageView(image: UIImage(named: "service_list_bg"))
return view
}()
lazy var iconImgView: UIView = {
let view = UIImageView(image: UIImage(named: "service_list_icon"))
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("期望银河在", .font(UIFont.PFSC_B(ofSize: 18)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("办证阶段", .font(UIFont.PFSC_B(ofSize: 18)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init("\n提供哪些服务", .font(UIFont.PFSC_B(ofSize: 18)),.foreground(UIColor.mainTextColor))
label.attributed.text = a+b+c
return label
}()
lazy var collectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .vertical
layout.minimumInteritemSpacing = 8.0
layout.minimumLineSpacing = 16
let collectView = UICollectionView(frame:.zero, collectionViewLayout: layout)
collectView.delegate = self
collectView.dataSource = self
collectView.backgroundColor = .clear
// 注册自定义单元格
collectView.register(YHServiceItemCell.self, forCellWithReuseIdentifier: YHServiceItemCell.cellReuseIdentifier)
return collectView
}()
lazy var confirmBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.titleLabel?.font = .PFSC_M(ofSize: 14)
btn.setTitle("确认", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.layer.cornerRadius = kCornerRadius3
btn.addTarget(self, action: #selector(didConfirmBtnClicked), for: .touchUpInside)
return btn
}()
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
}()
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(bgImgView)
whiteContentView.addSubview(iconImgView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(confirmBtn)
whiteContentView.addSubview(collectionView)
whiteContentView.addSubview(confirmBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(38)
make.right.equalTo(-38)
make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-24)
}
bgImgView.snp.makeConstraints { make in
make.left.right.top.equalTo(0)
make.height.equalTo(153)
}
iconImgView.snp.makeConstraints { make in
make.width.equalTo(102)
make.height.equalTo(84)
make.top.equalTo(16)
make.right.equalTo(-16)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(34)
make.left.equalTo(18)
make.right.equalTo(iconImgView.snp.left)
}
collectionView.snp.makeConstraints { make in
make.top.equalTo(iconImgView.snp.bottom).offset(20)
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(0)
make.bottom.equalTo(confirmBtn.snp.top).offset(-30)
}
confirmBtn.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-16)
make.height.equalTo(45)
}
closeBtn.snp.makeConstraints { make in
make.width.height.equalTo(24)
make.top.equalTo(whiteContentView.snp.bottom).offset(24)
make.centerX.equalTo(whiteContentView)
}
}
static func alertView() -> YHServiceSelectAlertView {
let alertView = YHServiceSelectAlertView(frame:UIScreen.main.bounds)
return alertView
}
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func didConfirmBtnClicked() {
dismiss()
}
@objc func didCloseBtnClicked() {
dismiss()
}
}
extension YHServiceSelectAlertView: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
// 返回单元格数量
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
// 返回每个单元格的大小
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = floorl((KScreenWidth-54.0*2.0-10.0*2.0)/3.0)
return CGSize(width: width, height: 42)
}
// 返回自定义单元格
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHServiceItemCell.cellReuseIdentifier, for: indexPath) as! YHServiceItemCell
if 0 <= indexPath.item && indexPath.item < items.count {
let item = items[indexPath.item]
cell.updateItem(item)
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if 0 <= indexPath.item && indexPath.item < items.count {
let item = items[indexPath.item]
item.isSelect = !item.isSelect
collectionView.reloadData()
}
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Mask group@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Mask group@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033195689@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033195689@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