Commit d8b31d5a authored by David黄金龙's avatar David黄金龙

信息完善主页

parent 2ca5fb75
......@@ -119,6 +119,7 @@
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; };
A5D6AB1B2B46A1CC001C10A5 /* YHHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */; };
A5D6AB1D2B46AAFB001C10A5 /* YHHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */; };
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -270,6 +271,7 @@
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; };
A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeModel.swift; sourceTree = "<group>"; };
A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomePageViewModel.swift; sourceTree = "<group>"; };
A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectListVC.swift; sourceTree = "<group>"; };
B6BB01E4C5DB87B66F0ECE84 /* Pods-galaxy.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.release.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
......@@ -673,6 +675,7 @@
children = (
A5ACE9192B4564F7002C94D2 /* YHServiceCenterMainViewController.swift */,
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */,
A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -997,6 +1000,7 @@
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */,
A5ACE9542B4564F7002C94D2 /* YHNavigationController.swift in Sources */,
A5ACE95E2B4571BF002C94D2 /* YHHomeViewController.swift in Sources */,
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
041B52932B5E6CBA007EBCEB /* YHFormTitleCell.swift in Sources */,
041B52952B5E7037007EBCEB /* YHFormAddInfoCell.swift in Sources */,
A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */,
......
//
// YHInformationPerfectListVC.swift
// galaxy
//
// Created by davidhuangA on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*信息完善列表
*/
class YHInformationPerfectListVC: YHBaseViewController {
// private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private var unfoldFlag : Bool = true //是否展开
private lazy var downArrowImagev : UIImageView = {
let imagV = UIImageView(frame: CGRect(x: KScreenWidth - 16 - 32, y: 17, width: 24, height: 24))
imagV.image = UIImage(named: "service_center_down_arrow")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "service_center_head_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.register(YHContractMainItemStatusCell.self,forCellReuseIdentifier: YHContractMainItemStatusCell.cellReuseIdentifier)
return tableView
}()
var myHeadView : UIView = {
let view = UIView()
view.backgroundColor = .purple
let titleLable = UILabel(text: "您好,黄先生")
titleLable.font = kFont(size: 21)
view.addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(24)
make.right.equalTo(-24)
make.height.equalTo(26)
}
let desLable = UILabel(text: "此表由主申请人填写,我们将会根据您的个人信息制作资料清单,请按顺序填写,提交后1-2个工作日内联系您哦~")
desLable.font = kFont(size: 12)
desLable.numberOfLines = 0
desLable.lineBreakMode = .byWordWrapping
view.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(10)
make.left.equalTo(24)
make.right.equalTo(-24)
// make.bottom.equalToSuperview().offset(-16)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
}
extension YHInformationPerfectListVC {
func loadData() {
// self.serviceCenterMainReqVM.getContactList { success, error in
// if success == true {
//
// }
// self.homeTableView.reloadData()
// }
}
func setupUI() {
gk_navTitle = "信息完善"
gk_navBarAlpha = 1.0
gk_navLineHidden = true
view.addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(216)
}
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
}
view.layoutIfNeeded()
myHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 96)
homeTableView.tableHeaderView = myHeadView
}
@objc func clickUnfoldView() {
unfoldFlag = !unfoldFlag
if unfoldFlag == true {
UIView.animate(withDuration: 0.25) {
self.downArrowImagev.transform = CGAffineTransform.identity
}
} else {
UIView.animate(withDuration: 0.25) {
self.downArrowImagev.transform = CGAffineTransform(rotationAngle: .pi)
}
}
homeTableView.reloadSections(IndexSet(integer: 0), with: UITableView.RowAnimation.automatic)
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if unfoldFlag == true {
return 10
}
return 0
}
// func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
// return 0
// }
//
// func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
// let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 60))
// view.backgroundColor = .clear
//
// let lable = UILabel(frame: CGRect(x: 16, y: 0, width: 200, height: 60))
// lable.text = "身份申请"
// lable.font = kFont(size: 17)
// view.addSubview(lable)
// view.addSubview(self.downArrowImagev)
//
// let tap = UITapGestureRecognizer(target: self, action: #selector(clickUnfoldView))
// view.addGestureRecognizer(tap)
// return UIView()
// }
//
// func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
// return 0
// }
//
// func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
// return UIView()
// }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return YHContractMainItemStatusCell.cellHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let newCell = tableView.dequeueReusableCell(withClass: YHContractMainItemStatusCell.self)
newCell.selectionStyle = .none
return newCell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 \(indexPath.section)section --- \(indexPath.row)row")
}
}
......@@ -149,5 +149,7 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 \(indexPath.section)section --- \(indexPath.row)row")
navigationController?.pushViewController(YHInformationPerfectListVC())
}
}
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