Commit 0aac9cb3 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:
  // 我的证书
parents f361abf2 0f5edca0
......@@ -203,6 +203,7 @@
0477E1782BA41B1300436346 /* YHCertificateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E1772BA41B1300436346 /* YHCertificateViewModel.swift */; };
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E1792BA41C7E00436346 /* YHCertificateModel.swift */; };
0477E17C2BA4238400436346 /* YHMaterialListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */; };
0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */; };
04808C062B4686510056D53C /* ATAuthSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 04808C042B4686510056D53C /* ATAuthSDK.bundle */; };
04808C082B4686C10056D53C /* ATAuthSDK_D.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04808C032B4686510056D53C /* ATAuthSDK_D.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
......@@ -551,6 +552,7 @@
0477E1772BA41B1300436346 /* YHCertificateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateViewModel.swift; sourceTree = "<group>"; };
0477E1792BA41C7E00436346 /* YHCertificateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateModel.swift; sourceTree = "<group>"; };
0477E17B2BA4238400436346 /* YHMaterialListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMaterialListViewController.swift; sourceTree = "<group>"; };
0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCustomNavigationBar.swift; sourceTree = "<group>"; };
04808C032B4686510056D53C /* ATAuthSDK_D.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ATAuthSDK_D.framework; sourceTree = "<group>"; };
04808C042B4686510056D53C /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = ATAuthSDK.bundle; sourceTree = "<group>"; };
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
......@@ -1367,6 +1369,7 @@
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */,
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */,
044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */,
0477E17D2BA4362A00436346 /* YHCustomNavigationBar.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -2155,6 +2158,7 @@
A5C5B3102B57677300A7C5D1 /* YHGestureTableView.swift in Sources */,
045EEE8F2B9F171A0022A143 /* YHPreviewInfoProjectItemView.swift in Sources */,
045EEF152B9F171A0022A143 /* YHHKIDCardModel.swift in Sources */,
0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */,
045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */,
045EEEFB2B9F171A0022A143 /* YHFormPickerView.swift in Sources */,
045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */,
......
......@@ -32,8 +32,6 @@ class YHCertificateResourceUploadVC: YHBaseViewController {
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = .white
......@@ -45,7 +43,7 @@ class YHCertificateResourceUploadVC: YHBaseViewController {
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - YHMaterialListViewController.segmentHeight - k_Height_safeAreaInsetsBottom())
make.height.equalTo(KScreenHeight - k_Height_NavigationtBarAndStatuBar - YHMaterialListViewController.segmentHeight)
}
}
}
......
......@@ -18,8 +18,23 @@ class YHCertificateCategoryItem {
class YHMaterialListViewController: YHBaseViewController {
static let segmentHeight = 53.0
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.title = "资料上传".local
bar.showLeftSecondButtonType(.search)
bar.backBlock = {
self.navigationController?.popViewController(animated: true)
}
bar.leftSecondBtnClick = {
print("点击搜索")
}
return bar
}()
let categoryItems = ["全部".local, "待上传".local, "已驳回".local, "审核中".local, "已通过".local]
var itemVCs:[YHCertificateResourceUploadVC] = []
lazy var segmentedView : JXSegmentedView = {
let segview = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_NavigationtBarAndStatuBar, width: KScreenWidth, height: Self.segmentHeight))
segview.dataSource = segmentedDataSource
......@@ -29,7 +44,8 @@ class YHMaterialListViewController: YHBaseViewController {
indicator.indicatorWidth = 16
indicator.indicatorColor = .brandMainColor
segview.indicators = [indicator]
segview.backgroundColor = .white
segview.backgroundColor = .clear
segview.listContainer = listContainerView
return segview
}()
......@@ -49,7 +65,7 @@ class YHMaterialListViewController: YHBaseViewController {
//分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .scrollView)
return JXSegmentedListContainerView(dataSource: self, type: .collectionView)
}()
lazy var searchView:UIView = {
......@@ -71,15 +87,21 @@ class YHMaterialListViewController: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "资料上传".local
self.gk_navigationBar.isHidden = true
for _ in categoryItems {
let vc = YHCertificateResourceUploadVC()
itemVCs.append(vc)
}
view.addSubview(navBar)
view.addSubview(segmentedView)
view.addSubview(listContainerView)
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
segmentedView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
......@@ -91,6 +113,18 @@ class YHMaterialListViewController: YHBaseViewController {
make.bottom.equalToSuperview()
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//处于第一个item的时候,才允许屏幕边缘手势返回
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
//离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
}
......
//
// YHCustomNavigationBar.swift
// galaxy
//
// Created by edy on 2024/3/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum YHNavLeftSecondBtnType: Int {
case none = 0
case search = 1
}
class YHCustomNavigationBar: UIView {
static let searchLeftIcon = ""
var title: String? {
didSet {
titleLabel.text = title
}
}
var backBlock:(()->())?
var leftSecondBtnClick:(()->())?
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .navTitleColor
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize:17)
label.text = "默认标题"
return label
}()
private lazy var backButton: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "nav_back_icon"), for: .normal)
btn.addTarget(self, action: #selector(didBackBtnClicked), for: .touchUpInside)
return btn
}()
private lazy var leftSecondButton: UIButton = {
let btn = UIButton()
btn.addTarget(self, action: #selector(didleftSecondButtonClicked), for: .touchUpInside)
return btn
}()
static func navBar()-> YHCustomNavigationBar {
let bar = YHCustomNavigationBar(frame:CGRect(x: 0, y: 0, width: KScreenWidth, height: k_Height_NavContentBar))
return bar
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func showLeftSecondButtonType(_ type: YHNavLeftSecondBtnType) {
if type == .search {
leftSecondButton.setImage(UIImage(named: "nav_search_icon"), for: .normal)
}
}
func createUI() {
self.addSubview(titleLabel)
self.addSubview(backButton)
self.addSubview(leftSecondButton)
titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
backButton.snp.makeConstraints { make in
make.width.height.equalTo(30)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(12)
}
leftSecondButton.snp.makeConstraints { make in
make.width.height.equalTo(30)
make.centerY.equalToSuperview()
make.left.equalTo(backButton.snp.right).offset(5)
}
}
}
extension YHCustomNavigationBar {
@objc func didBackBtnClicked() {
if let backBlock = backBlock {
backBlock()
}
}
@objc func didleftSecondButtonClicked() {
if let leftSecondBtnClick = leftSecondBtnClick {
leftSecondBtnClick()
}
}
}
......@@ -66,6 +66,9 @@ extension UIColor {
// 分割线颜色
static let separatorColor: UIColor = UIColor(hexString: "#F0F0F0")!
// 导航栏标题颜色
static let navTitleColor: UIColor = UIColor(hexString: "#0F1214")!
public convenience init(r : CGFloat, g : CGFloat, b : CGFloat,alpha:CGFloat = 1.0) {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 3398@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3398@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