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

处理一处 展示的bug

parent 4253395b
...@@ -249,6 +249,7 @@ ...@@ -249,6 +249,7 @@
A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; }; A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; }; A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; }; A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; }; A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; };
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; }; A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; };
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; }; A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; };
...@@ -636,6 +637,7 @@ ...@@ -636,6 +637,7 @@
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; }; A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; }; A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; }; A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; }; A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; };
A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; }; A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; };
A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; }; A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -2023,6 +2025,7 @@ ...@@ -2023,6 +2025,7 @@
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */, A5D001292BABC84A001F003C /* YHFileListBottomView.swift */,
A58AC0A02BAC0B2900A30FA9 /* YHFileListItemView.swift */, A58AC0A02BAC0B2900A30FA9 /* YHFileListItemView.swift */,
A58AC09E2BAC05BA00A30FA9 /* YHFileListItemsView.swift */, A58AC09E2BAC05BA00A30FA9 /* YHFileListItemsView.swift */,
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2299,6 +2302,7 @@ ...@@ -2299,6 +2302,7 @@
045EEEB42B9F171A0022A143 /* YHWorkExampleMessageTableViewCell.swift in Sources */, 045EEEB42B9F171A0022A143 /* YHWorkExampleMessageTableViewCell.swift in Sources */,
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */, 045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */, 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */,
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */,
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */, 045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */, 045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */,
045EEE812B9F171A0022A143 /* YHPreviewQuestionAndAnswerModel.swift in Sources */, 045EEE812B9F171A0022A143 /* YHPreviewQuestionAndAnswerModel.swift in Sources */,
......
...@@ -15,6 +15,9 @@ class YHFileListModel: SmartCodable { ...@@ -15,6 +15,9 @@ class YHFileListModel: SmartCodable {
var checks_tatus : Int = -1 var checks_tatus : Int = -1
var supplement_list : [YHFileListSubModel] = [] var supplement_list : [YHFileListSubModel] = []
var type : Int = 0 //0-数据来自服务端 1-客户端自己添加的
var arrTxt : [String] = [] //type=1时使用的内容
required init() { required init() {
} }
} }
......
...@@ -25,7 +25,6 @@ class YHFileListContentView: UIView { ...@@ -25,7 +25,6 @@ class YHFileListContentView: UIView {
} }
} }
private extension YHFileListContentView { private extension YHFileListContentView {
func initView() { func initView() {
backgroundColor = .clear backgroundColor = .clear
...@@ -65,38 +64,47 @@ extension YHFileListContentView { ...@@ -65,38 +64,47 @@ extension YHFileListContentView {
var lastView : UIView? var lastView : UIView?
for (index,item) in arrData.enumerated() { for (index,item) in arrData.enumerated() {
let view = YHFileListItemsView() if let iii = item {
view.dataModel = item var view : UIView = YHFileListItemsView()
addSubview(view)
if iii.type == 0 {
if let tttttt = lastView { (view as! YHFileListItemsView).dataModel = item
if index == arrData.count - 1 { } else {
view.snp.makeConstraints { make in //if item?.type == 1
make.top.equalTo(tttttt.snp.bottom) view = YHFileListItemsView2()
make.left.right.equalToSuperview() (view as! YHFileListItemsView2).dataModel = item
make.bottom.equalToSuperview().offset(-20)
}
} else {
view.snp.makeConstraints { make in
make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
}
} }
} else { addSubview(view)
if index == arrData.count - 1 {
view.snp.makeConstraints { make in if let tttttt = lastView {
make.top.equalToSuperview() if index == arrData.count - 1 {
make.left.right.equalToSuperview() view.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-20) make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-20)
}
} else {
view.snp.makeConstraints { make in
make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
}
} }
} else { } else {
view.snp.makeConstraints { make in if index == arrData.count - 1 {
make.top.equalToSuperview() view.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.top.equalToSuperview()
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-20)
}
} else {
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
}
} }
} }
lastView = view
} }
lastView = view
} }
} }
} }
//
// YHFileListItemsView2.swift
// galaxy
//
// Created by davidhuangA on 2024/3/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFileListItemsView2: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var dataModel : YHFileListModel? {
didSet {
updateUI()
}
}
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "file_list_session_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var titleLable : UILabel = {
let lable0 = UILabel(text: "title")
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_R(ofSize: 18)
lable0.textAlignment = .center
return lable0
}()
}
private extension YHFileListItemsView2 {
func updateUI() {
removeSubviews()
guard let dataModel = dataModel else { return }
addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.equalTo(22)
make.centerX.equalToSuperview()
make.width.equalTo(146)
make.height.equalTo(28)
}
titleLable.text = dataModel.ApplicantName.defaultStringIfEmpty(detaultValue: "--")
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalTo(22)
make.centerX.equalToSuperview()
make.left.right.equalToSuperview()
make.height.equalTo(28)
}
var lastView : UIView = topBkg
for (index,item) in dataModel.arrTxt.enumerated() {
let view = UILabel()
view.text = item
view.textColor = UIColor(hex: 0x333333, alpha: 1.0)
view.numberOfLines = 0
view.lineBreakMode = .byWordWrapping
view.font = UIFont.PFSC_R(ofSize: 12)
addSubview(view)
if index == dataModel.arrTxt.count - 1 {
view.snp.makeConstraints { make in
make.top.equalTo(lastView.snp.bottom).offset(kMargin)
make.left.equalTo(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.bottom.equalToSuperview()
}
} else {
var offset = kMargin
if index == 0 {
offset = 20
}
view.snp.makeConstraints { make in
make.top.equalTo(lastView.snp.bottom).offset(offset)
make.left.equalTo(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
}
lastView = view
}
}
}
...@@ -61,21 +61,30 @@ class YHCertificateViewModel: YHBaseViewModel { ...@@ -61,21 +61,30 @@ class YHCertificateViewModel: YHBaseViewModel {
} }
for (index,item) in resultModel.enumerated() { for (_,item) in resultModel.enumerated() {
let arr = item?.supplement_list.filter { (item) -> Bool in let arr = item?.supplement_list.filter { (item) -> Bool in
return item.check_status == 2 || item.check_status == 3 return item.check_status == 2 || item.check_status == 3
} }
item?.supplement_list = arr ?? [] item?.supplement_list = arr ?? []
} }
let arr = resultModel.filter { (item) -> Bool in var arr = resultModel.filter { (item) -> Bool in
if let ttt = item,ttt.supplement_list.count > 0 { if let ttt = item,ttt.supplement_list.count > 0 {
return true return true
} }
return false return false
} }
//添加 写死的数据类型
let tmpModel = YHFileListModel()
tmpModel.ApplicantName = "温馨提示"
tmpModel.type = 1
tmpModel.arrTxt = ["1.以上资料请提供清晰完整的彩色扫描件。","2.照片最好同时提供电子档及时通知我们以避免对申请结果产生影响。","3.申请递交之后,如目前所报备的情况有任何变化(包含婚姻状况、新生子女、工作情况、亲属关系变化,请及时通知我们以避免对申请结果产生影响。"]
arr.append(tmpModel)
self.arrFileListData = arr self.arrFileListData = arr
callBackBlock(true,nil) callBackBlock(true,nil)
} else { } else {
......
...@@ -37,7 +37,7 @@ class YHBaseUrlManager { ...@@ -37,7 +37,7 @@ class YHBaseUrlManager {
} }
func curOssURL() -> String { func curOssURL() -> String {
return YHBaseUrlManager.baseUrlTest //for test hjl return YHBaseUrlManager.baseOSSUrlTest //for test hjl
#if DEBUG #if DEBUG
return YHBaseUrlManager.baseOSSUrlTest return YHBaseUrlManager.baseOSSUrlTest
#else #else
......
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