Commit 8e0d1f12 authored by Steven杜宇's avatar Steven杜宇

Merge branch 'develop' into duyu

# Conflicts:
#	galaxy/galaxy/AppDelegate.swift
parents 0bcfccdc 2f8ad61f
This diff is collapsed.
...@@ -12,32 +12,178 @@ import JXSegmentedView ...@@ -12,32 +12,178 @@ import JXSegmentedView
*主申请人信息 *主申请人信息
*/ */
class YHMainApplicantInfoViewController: YHBaseViewController { class YHMainApplicantInfoViewController: YHBaseViewController {
var arrData : [YHPersonInfoCellModel] = []
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
view.backgroundColor = .red// for test hjl // view.backgroundColor = .red// for test hjl
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
setupUI()
} }
let contryInfoView = YHPersonInfoSessionHoldView()
let baseInfoView = YHPersonInfoSessionHoldView()
var homeTableView: YHGestureTableView = {
let tableView = YHGestureTableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.register(YHPersonInfoCommonCell.self,forCellReuseIdentifier: YHPersonInfoCommonCell.cellReuseIdentifier)
return tableView
}()
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation // MARK: - JXSegmentedListContainerViewListDelegate
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { extension YHMainApplicantInfoViewController: JXSegmentedListContainerViewListDelegate {
// Get the new view controller using segue.destination. func listView() -> UIView {
// Pass the selected object to the new view controller. return view
} }
*/ }
private extension YHMainApplicantInfoViewController {
func fakeData() {
do {
//国家信息
let tmp0 = YHPersonInfoBaseModel(name: "国家/国籍:", description: "中国-China")
let tmp1 = YHPersonInfoBaseModel(name: "港澳通行证:", description: "未办理")
let arr = [tmp0,tmp1]
let model1 = YHPersonInfoCellModel(cellType: 0, cellTitle: "国籍信息", cellData0: arr)
arrData.append(model1)
}
do {
//基本信息
let tmp0 = YHPersonInfoBaseModel(name: "主申请人:", description: "DavidHuang")
let tmp1 = YHPersonInfoBaseModel(name: "曾用名:", description: "--")
let tmp2 = YHPersonInfoBaseModel(name: "婚前姓氏:", description: "--")
let tmp3 = YHPersonInfoBaseModel(name: "出生日期:", description: "1990年8月18日")
let tmp4 = YHPersonInfoBaseModel(name: "出生城市:", description: "国内 吉林省/吉林市")
let tmp5 = YHPersonInfoBaseModel(name: "性别:", description: "男")
let tmp6 = YHPersonInfoBaseModel(name: "婚姻状况:", description: "已婚")
let tmp7 = YHPersonInfoBaseModel(name: "手机号:", description: "13572984488")
let tmp8 = YHPersonInfoBaseModel(name: "邮箱:", description: "13572984488@nn.com")
let tmp9 = YHPersonInfoBaseModel(name: "现居住地址:", description: "现居住地址:现居住地址:现居住地址:现居住地址:现居住地址:现居住地址:")
let tmp10 = YHPersonInfoBaseModel(name: "详细地址:", description: "锐度公园世家北区10-1-701锐度公园世家北区10-1-701")
let tmp11 = YHPersonInfoBaseModel(name: "是否办理过香港身份证:", description: "是")
let tmp12 = YHPersonInfoBaseModel(name: "香港身份证:", description: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12]
let model2 = YHPersonInfoCellModel(cellType: 0, cellTitle: "基本信息", cellData0: arr)
arrData.append(model2)
}
do {
//证件信息
let tmp0 = YHPersonInfoBaseModel(name: "中国身份证号码:", description: "2203381990287633390")
let tmp1 = YHPersonInfoBaseModel(name: "签发地:", description: "北京市分局")
let tmp2 = YHPersonInfoBaseModel(name: "签发日期:", description: "2018-07-17")
let tmp3 = YHPersonInfoBaseModel(name: "届满日期:", description: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPersonInfoBaseModel(name: "旅行社证件号码:", description: "c2345639")
let tmp5 = YHPersonInfoBaseModel(name: "签发地:", description: "北京市分局")
let tmp6 = YHPersonInfoBaseModel(name: "签发日期:", description: "2018-07-17")
let tmp7 = YHPersonInfoBaseModel(name: "届满日期:", description: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPersonInfoBaseModel(name: "证件类别:", description: "护照")
let tmp9 = YHPersonInfoBaseModel(name: "证件号码:", description: "p2345639")
let tmp10 = YHPersonInfoBaseModel(name: "签发地:", description: "北京市分局")
let tmp11 = YHPersonInfoBaseModel(name: "签发日期:", description: "2028-07-31")
let tmp12 = YHPersonInfoBaseModel(name: "届满日期:", description: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPersonInfoCellModel(cellType: 1, cellTitle: "证件信息", cellData1: arr)
arrData.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPersonInfoCellModel(cellType: 2, cellTitle: "证件照片", cellData2: arr)
arrData.append(model4)
}
}
func setupUI() {
fakeData()
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
}
// homeTableView.backgroundColor = .red //for test hjl
homeTableView.reloadData()
}
} }
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHMainApplicantInfoViewController: JXSegmentedListContainerViewListDelegate { // MARK: - UITableViewDelegate 和 UITableViewDataSource
func listView() -> UIView { extension YHMainApplicantInfoViewController : UITableViewDelegate,UITableViewDataSource {
// func numberOfSections(in tableView: UITableView) -> Int {
// return 1
// }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrData.count
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0.001
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
return view return view
} }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.001
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
return view
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPersonInfoCommonCell.self)
cell.model = arrData[indexPath.row]
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.row)")
}
} }
...@@ -54,7 +54,7 @@ class YHPersonInfoControllerHoldViewController: UIViewController { ...@@ -54,7 +54,7 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
// arrItemVCs.append(vc) // arrItemVCs.append(vc)
// } // }
//添加
arrItemVCs.append(YHMainApplicantInfoViewController()) arrItemVCs.append(YHMainApplicantInfoViewController())
arrItemVCs.append(YHFamilyMemberViewController()) arrItemVCs.append(YHFamilyMemberViewController())
...@@ -65,6 +65,10 @@ class YHPersonInfoControllerHoldViewController: UIViewController { ...@@ -65,6 +65,10 @@ class YHPersonInfoControllerHoldViewController: UIViewController {
arrItemVCs.append(YHFamilyMemberViewController())//for test hjl arrItemVCs.append(YHFamilyMemberViewController())//for test hjl
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!! //segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self segmentedView.delegate = self
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
import UIKit import UIKit
import GKNavigationBarSwift import GKNavigationBarSwift
//import JXSegmentedView
class YHPersonInformMainViewController: YHBaseViewController { class YHPersonInformMainViewController: YHBaseViewController {
var canScroll : Bool = true var canScroll : Bool = true
...@@ -21,11 +20,6 @@ class YHPersonInformMainViewController: YHBaseViewController { ...@@ -21,11 +20,6 @@ class YHPersonInformMainViewController: YHBaseViewController {
let cellView: YHPersonInfoControllerHoldViewController = YHPersonInfoControllerHoldViewController() let cellView: YHPersonInfoControllerHoldViewController = YHPersonInfoControllerHoldViewController()
// //model 及网络请求
// lazy var homeReqVM : YHHomePageViewModel = {
// return YHHomePageViewModel()
// }()
var homeTableView: YHGestureTableView = { var homeTableView: YHGestureTableView = {
let tableView = YHGestureTableView(frame: .zero, style: .grouped) let tableView = YHGestureTableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
......
//
// YHPersonInfoBaseModel.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHPersonInfoBaseModel: SmartCodable {
var name : String = ""
var description : String = ""
}
//
// YHPersonInfoCellModel.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHPersonInfoCellModel: SmartCodable {
var cellType : Int = 0 // 0-国籍信息 类型 1-证件信息 类型 2-证件照片 类型
var cellTitle : String = ""
var cellData0 : [YHPersonInfoBaseModel]? = nil
var cellData1 : [YHPersonInfoCellModel1]? = nil
var cellData2 : [YHPersonInfoCellModel2]? = nil
}
//
// YHPersonInfoCellModel1.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHPersonInfoCellModel1: SmartCodable {
var cellTitle : String = ""
var cellData : [YHPersonInfoBaseModel] = []
}
//
// YHPersonInfoCellModel1.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHPersonInfoCellModel2: SmartCodable {
var cellTitle : String = ""
var frontUrl : String = "" //正面url
var backUrl : String = "" //反面url
//1- 中国身份证 2-港澳通行证
var idType: Int = 1 {
didSet {
if idType == 1 {
cellTitle = "中国身份证"
} else if idType == 2 {
cellTitle = "港澳通行证"
}
}
}
}
//
// YHPersonInfoIdentityCardModel.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
struct YHPersonInfoIdentityCardModel: SmartCodable {
var frontUrl : String = "" //正面url
var backUrl : String = "" //反面url
}
//
// YHPersonInfoCellView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPersonInfoCellView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//title
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x888F98)
lable0.font = UIFont.PingFangScR(ofSize: 14)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byCharWrapping
return lable0
}()
//title
private lazy var subtitleLable : UILabel = {
let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x222222)
lable0.font = UIFont.PingFangScR(ofSize: 14)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
lable0.textAlignment = .right
return lable0
}()
private func setupUI() {
addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(18)
make.left.equalToSuperview()
make.width.lessThanOrEqualTo(154)
make.height.equalTo(17)
}
nameLable.setContentCompressionResistancePriority(.required, for: .horizontal)
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.top)
make.right.equalToSuperview()
make.left.equalTo(nameLable.snp.right).offset(10)
make.bottom.equalToSuperview()
}
}
}
extension YHPersonInfoCellView {
func update(title : String,subtitle : String) {
nameLable.text = title
subtitleLable.text = subtitle
}
}
//
// YHPersonInfoCommonCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPersonInfoCommonCell: UITableViewCell {
static let cellReuseIdentifier = "YHPersonInfoCommonCell"
var model : YHPersonInfoCellModel? {
didSet{
updateUI()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
private lazy var holdView : UIView = {
let contryInfoView = YHPersonInfoSessionHoldView()
return contryInfoView
}()
}
extension YHPersonInfoCommonCell {
func updateUI() {
for item in holdView.subviews {
item.removeFromSuperview()
}
holdView.removeFromSuperview()
backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(holdView)
holdView.snp.makeConstraints { make in
make.top.equalTo(14)
make.left.right.bottom.equalToSuperview()
}
if model?.cellType == 0 {
guard let model = model else { return }
guard let arrData = model.cellData0,arrData.count > 0 else { return }
let sessionView = YHPersonInfoSessionView()
sessionView.updateTitle(title: model.cellTitle)
holdView.addSubview(sessionView)
sessionView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
if arrData.count == 1 {
let item = arrData[0]
let cellView = YHPersonInfoCellView()
cellView.update(title: item.name, subtitle: item.description)
holdView.addSubview(cellView)
cellView.snp.makeConstraints { make in
make.top.equalTo(sessionView.snp.bottom)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
make.bottom.equalToSuperview().offset(-21)
}
} else {
var tmp : UIView = sessionView
for(index,item) in arrData.enumerated() {
let cellView = YHPersonInfoCellView()
cellView.update(title: item.name, subtitle: item.description)
holdView.addSubview(cellView)
if index == arrData.count - 1 {
cellView.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
make.bottom.equalToSuperview().offset(-21)
}
} else {
cellView.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
}
tmp = cellView
}
}
}
else if model?.cellType == 1 {
guard let model = model else { return }
guard let arrData = model.cellData1,arrData.count > 0 else { return }
let sessionView = YHPersonInfoSessionView()
sessionView.updateTitle(title: model.cellTitle)
holdView.addSubview(sessionView)
sessionView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
var tmp : UIView = sessionView
for (index0,item0) in arrData.enumerated() {
let lable = UILabel()
lable.text = item0.cellTitle
lable.textColor = UIColor(hex: 0x222222)
lable.font = UIFont.PingFangScM(ofSize: 14)
holdView.addSubview(lable)
lable.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom).offset(18)
make.left.equalTo(18)
make.right.equalTo(-18)
make.height.equalTo(17)
}
tmp = lable
let arrData0 = item0.cellData
if arrData0.count > 0 {
for(index,item) in arrData0.enumerated() {
let cellView = YHPersonInfoCellView()
cellView.update(title: item.name, subtitle: item.description)
holdView.addSubview(cellView)
if index == 0 {
//第一个
cellView.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom).offset(10) //for test hjl
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
} else if index == arrData0.count - 1 {
//最后一个
if index0 == arrData.count - 1 {
//最后一个cell
cellView.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
make.bottom.equalToSuperview().offset(-21)
}
} else {
cellView.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
let bottomLine = UIView()
bottomLine.backgroundColor = UIColor(hex: 0xF0F0F0)
holdView.addSubview(bottomLine)
bottomLine.snp.makeConstraints { make in
make.top.equalTo(cellView.snp.bottom).offset(28)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
make.height.equalTo(0.5)
}
tmp = bottomLine
continue
}
} else {
//中间
cellView.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
}
tmp = cellView
}
}
}
}
else if model?.cellType == 2 {
guard let model = model else { return }
guard let arrData = model.cellData2,arrData.count > 0 else { return }
let sessionView = YHPersonInfoSessionView()
sessionView.updateTitle(title: model.cellTitle)
holdView.addSubview(sessionView)
sessionView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.left.equalToSuperview().offset(18)
}
var tmp : UIView = sessionView
for (index0,item0) in arrData.enumerated() {
let view = YHPersonInfoIdentificationCardView()
view.dataModel = item0
holdView.addSubview(view)
if index0 == arrData.count - 1 {
view.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview()
make.left.equalToSuperview()
make.bottom.equalToSuperview()
view.bottomLine.isHidden = true
}
} else {
view.snp.makeConstraints { make in
make.top.equalTo(tmp.snp.bottom)
make.right.equalToSuperview()
make.left.equalToSuperview()
}
view.bottomLine.isHidden = false
}
tmp = view
}
}
}
}
//
// YHPersonInfoIdentificationCardView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPersonInfoIdentificationCardView: UIView {
var dataModel : YHPersonInfoCellModel2? {
didSet {
updateUI()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private lazy var titleLable : UILabel = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x222222)
lable.font = UIFont.PingFangScM(ofSize: 14)
return lable
}()
private lazy var frontImagV : UIImageView = {
let lable = UIImageView()
lable.image = UIImage(named: "person_info_id_front")
lable.contentMode = .scaleAspectFit
lable.layer.cornerRadius = 6
lable.clipsToBounds = true
return lable
}()
private lazy var backImagV : UIImageView = {
let lable = UIImageView()
lable.image = UIImage(named: "person_info_id_back")
lable.contentMode = .scaleAspectFit
lable.layer.cornerRadius = 6
lable.clipsToBounds = true
return lable
}()
private lazy var subtitleFrontLable : UILabel = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x888F98)
lable.font = UIFont.PingFangScR(ofSize: 14)
lable.text = "身份证头像面"
lable.textAlignment = .center
return lable
}()
private lazy var subtitleBackLable : UILabel = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x888F98)
lable.font = UIFont.PingFangScR(ofSize: 14)
lable.text = "身份证国徽面"
lable.textAlignment = .center
return lable
}()
lazy var bottomLine : UIView = {
let lable = UIView()
lable.backgroundColor = UIColor(hex: 0xF0F0F0)
return lable
}()
}
extension YHPersonInfoIdentificationCardView {
func setupUI() {
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalTo(18)
make.left.equalTo(18)
make.right.equalTo(-18)
make.height.equalTo(17)
}
addSubview(subtitleFrontLable)
subtitleFrontLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(20)
make.height.equalTo(17)
make.left.equalTo(16)
make.right.equalTo(self.snp.centerX).offset(-4)
}
addSubview(frontImagV)
frontImagV.snp.makeConstraints { make in
make.top.equalTo(subtitleFrontLable.snp.bottom).offset(13)
make.height.equalTo(95)
make.left.equalTo(subtitleFrontLable.snp.left)
make.right.equalTo(subtitleFrontLable.snp.right)
}
addSubview(subtitleBackLable)
subtitleBackLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(20)
make.height.equalTo(17)
make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX).offset(4)
}
addSubview(backImagV)
backImagV.snp.makeConstraints { make in
make.top.equalTo(subtitleBackLable.snp.bottom).offset(13)
make.height.equalTo(95)
make.left.equalTo(subtitleBackLable.snp.left)
make.right.equalTo(subtitleBackLable.snp.right)
}
addSubview(bottomLine)
bottomLine.snp.makeConstraints { make in
make.top.equalTo(backImagV.snp.bottom).offset(15)
make.height.equalTo(0.5)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
}
}
extension YHPersonInfoIdentificationCardView {
func updateUI() {
guard let dataModel = dataModel else { return }
titleLable.text = dataModel.cellTitle
subtitleFrontLable.text = dataModel.idType == 1 ? "身份证头像面" : "港澳通行证正面"
subtitleBackLable.text = dataModel.idType == 1 ? "身份证国徽面" : "港澳通行证反面"
}
}
//
// YHPersonInfoSessionHoldView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPersonInfoSessionHoldView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
layer.cornerRadius = 12
clipsToBounds = true
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
//
// YHPersonInfoSessionView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPersonInfoSessionView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//title
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "--")
lable0.textColor = UIColor(hex: 0x222222)
lable0.font = UIFont.PingFangScM(ofSize: 17)
lable0.numberOfLines = 0
lable0.lineBreakMode = .byWordWrapping
return lable0
}()
private lazy var bottomLine : UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xF0F0F0)
return view
}()
private func setupUI() {
addSubview(bottomLine)
bottomLine.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(16)
make.bottom.equalTo(bottomLine.snp.top).offset(-16)
}
}
}
extension YHPersonInfoSessionView {
func updateTitle(title : String) {
nameLable.text = title
}
}
{
"images" : [
{
"filename" : "截屏2023-03-21 16.03 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "截屏2023-03-21 16.03 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "截屏2023-03-21 16.03 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "截屏2023-03-21 16.11 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "截屏2023-03-21 16.11 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "截屏2023-03-21 16.11 1@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