Commit cb9e558e authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '50a3725a' into xiezhaolin

parents f50220df 50a3725a
...@@ -240,6 +240,7 @@ ...@@ -240,6 +240,7 @@
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; }; 04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; };
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */; }; 04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */; };
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */; }; 04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */; };
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateView.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; }; 6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; }; A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; };
A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; }; A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; };
...@@ -615,6 +616,7 @@ ...@@ -615,6 +616,7 @@
04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; }; 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebViewViewController.swift; sourceTree = "<group>"; }; 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebViewViewController.swift; sourceTree = "<group>"; };
04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginManager.swift; sourceTree = "<group>"; }; 04E86E652B86EB6F00A35F4B /* YHLoginManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginManager.swift; sourceTree = "<group>"; };
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateView.swift; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; }; 58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
...@@ -1442,6 +1444,7 @@ ...@@ -1442,6 +1444,7 @@
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */, 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */,
044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */, 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */,
044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */, 044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */,
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateView.swift */,
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */, 04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */,
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */, 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */,
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */, 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */,
...@@ -2480,6 +2483,7 @@ ...@@ -2480,6 +2483,7 @@
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */, A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */, 045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateView.swift in Sources */,
045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */, 045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */,
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */, 0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */,
045EEECA2B9F171A0022A143 /* YHMyDocumentsListViewController.swift in Sources */, 045EEECA2B9F171A0022A143 /* YHMyDocumentsListViewController.swift in Sources */,
......
...@@ -36,9 +36,38 @@ class YHCertificateResourceUploadVC: YHBaseViewController { ...@@ -36,9 +36,38 @@ class YHCertificateResourceUploadVC: YHBaseViewController {
tableView.backgroundColor = UIColor(hexString:"#F8F8F8") tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHCertificateInfoCell.self, forCellReuseIdentifier: YHCertificateInfoCell.cellReuseIdentifier) tableView.register(YHCertificateInfoCell.self, forCellReuseIdentifier: YHCertificateInfoCell.cellReuseIdentifier)
tableView.backgroundView = emptyDataTipsView
return tableView return tableView
}() }()
lazy var emptyDataTipsView:UIView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 124))
view.isHidden = false
let imgView = UIImageView(image: UIImage(named: "service_center_no_data"))
imgView.contentMode = .scaleAspectFill
view.addSubview(imgView)
let label = UILabel()
label.textColor = UIColor.labelTextColor2
label.font = UIFont.PFSC_R(ofSize: 14)
label.textAlignment = .center
label.text = "没有找到相关资料哦~".local
view.addSubview(label)
imgView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(130)
make.width.height.equalTo(92)
make.centerX.equalTo(view)
}
label.snp.makeConstraints { make in
make.top.equalTo(imgView.snp.bottom).offset(12)
make.centerX.equalTo(view)
}
return view
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.view.backgroundColor = .white self.view.backgroundColor = .white
...@@ -71,6 +100,18 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou ...@@ -71,6 +100,18 @@ extension YHCertificateResourceUploadVC: UITableViewDelegate, UITableViewDataSou
let item = items[indexPath.section] let item = items[indexPath.section]
let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateInfoCell.cellReuseIdentifier, for: indexPath) as! YHCertificateInfoCell let cell = tableView.dequeueReusableCell(withIdentifier: YHCertificateInfoCell.cellReuseIdentifier, for: indexPath) as! YHCertificateInfoCell
cell.updateModel(item) cell.updateModel(item)
cell.templateBlock = {
[weak self] in
guard let self = self else { return }
let view = YHCertificateTemplateView.templateView(item.templateInfo)
view.scanTemplateBlock = {
[weak self] temlateInfo in
guard let self = self else { return }
let vc = UIViewController()
self.navigationController?.pushViewController(vc)
}
view.show()
}
return cell return cell
} }
...@@ -155,6 +196,7 @@ extension YHCertificateResourceUploadVC { ...@@ -155,6 +196,7 @@ extension YHCertificateResourceUploadVC {
} }
items.append(contentsOf: results) items.append(contentsOf: results)
} }
emptyDataTipsView.isHidden = items.count > 0
self.tableView.reloadData() self.tableView.reloadData()
if let errorMsg = error?.errorMsg, errorMsg.count > 0 { if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
......
...@@ -165,7 +165,7 @@ extension YHCertificateSearchViewController { ...@@ -165,7 +165,7 @@ extension YHCertificateSearchViewController {
// 类型 // 类型
"template_cate_id": "", "template_cate_id": "",
// 搜索 // 搜索
"keywork": "", "keyword": "",
*/ */
let keywords = keyWord ?? "" let keywords = keyWord ?? ""
let params:[String:Any] = [ let params:[String:Any] = [
...@@ -174,7 +174,7 @@ extension YHCertificateSearchViewController { ...@@ -174,7 +174,7 @@ extension YHCertificateSearchViewController {
"supplement_ids": [], "supplement_ids": [],
"order_id" : orderId ?? 0, "order_id" : orderId ?? 0,
"category_id": categoryInfo.categoryId, "category_id": categoryInfo.categoryId,
"keywork": keywords] "keyword": keywords]
print(params) print(params)
// state: 3:待上传 2:已驳回 1:已通过 0:审核中 // state: 3:待上传 2:已驳回 1:已通过 0:审核中
......
...@@ -16,21 +16,25 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -16,21 +16,25 @@ class YHCertificateInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHCertificateNameCell" static let cellReuseIdentifier = "YHCertificateNameCell"
var status : YHCertificateUploadStatus = .preUpload var status : YHCertificateUploadStatus = .preUpload
var templateBlock:(()->())?
var whiteView: UIView! var whiteView: UIView!
var nameTextView: UITextView! var nameTextView: UITextView!
var infoLabel: UILabel! var infoLabel: UILabel!
var statusBtn: UIButton! var statusBtn: UIButton!
private lazy var templateLabel : UILabel = { private lazy var templateLabel : UILabel = {
let customLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 48, height: 16)) let label = UILabel(frame: CGRect(x: 0, y: 0, width: 48, height: 16))
customLabel.text = "资料模版" label.text = "资料模版"
customLabel.font = .PFSC_M(ofSize: 10) label.font = .PFSC_M(ofSize: 10)
customLabel.backgroundColor = .brandMainColor8 label.backgroundColor = .brandMainColor8
customLabel.textColor = .brandMainColor label.textColor = .brandMainColor
customLabel.layer.cornerRadius = 3 label.layer.cornerRadius = 3
customLabel.clipsToBounds = true label.clipsToBounds = true
customLabel.textAlignment = .center label.textAlignment = .center
return customLabel label.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action: #selector(didTemplateBtnClicked))
label.addGestureRecognizer(tap)
return label
}() }()
...@@ -69,7 +73,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -69,7 +73,7 @@ class YHCertificateInfoCell: UITableViewCell {
statusBtn.setTitle(title, for: .normal) statusBtn.setTitle(title, for: .normal)
} }
if model.templateInfo.materialPath.isEmpty { if model.templateInfo.materialPath.isEmpty && model.templateInfo.description.isEmpty {
nameTextView.attributed.text = """ nameTextView.attributed.text = """
\(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16)))
...@@ -83,6 +87,12 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -83,6 +87,12 @@ class YHCertificateInfoCell: UITableViewCell {
infoLabel.text = "类型: \(model.typeName) 所属人: \(model.nameExtra.userName)" infoLabel.text = "类型: \(model.typeName) 所属人: \(model.nameExtra.userName)"
} }
@objc func didTemplateBtnClicked() {
if let templateBlock = templateBlock {
templateBlock()
}
}
func setupUI() { func setupUI() {
self.selectionStyle = .none self.selectionStyle = .none
...@@ -121,7 +131,6 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -121,7 +131,6 @@ class YHCertificateInfoCell: UITableViewCell {
statusBtn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -iconWidth, bottom: 0, right: iconWidth) statusBtn.titleEdgeInsets = UIEdgeInsets(top: 0, left: -iconWidth, bottom: 0, right: iconWidth)
statusBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: titleWidth, bottom: 0, right: -titleWidth) statusBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: titleWidth, bottom: 0, right: -titleWidth)
statusBtn.setImage(UIImage(named:"my_cer_arrow_right"), for:.normal) statusBtn.setImage(UIImage(named:"my_cer_arrow_right"), for:.normal)
statusBtn.setTitle("待上传", for:.normal)
statusBtn.setTitleColor(.labelTextColor2, for:.normal) statusBtn.setTitleColor(.labelTextColor2, for:.normal)
whiteView.addSubview(statusBtn) whiteView.addSubview(statusBtn)
......
//
// YHCertificateTemplateView.swift
// galaxy
//
// Created by edy on 2024/3/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
/*
【Usage】
let view = YHCertificateTemplateView.templateView(templateInfo)
view.scanTemplateBlock = {
[weak self] temlateInfo in
guard let self = self else { return }
}
view.show()
*/
import UIKit
class YHCertificateTemplateView: UIView {
static func templateView(_ model: YHTemplateInfo) -> YHCertificateTemplateView {
let sheetView = YHCertificateTemplateView(frame:UIScreen.main.bounds)
sheetView.updateModel(model)
return sheetView
}
var templateInfo: YHTemplateInfo?
var scanTemplateBlock: ((YHTemplateInfo?)->())?
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss))
view.addGestureRecognizer(tap)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var topView:UIView = {
let view = UIView()
view.addSubview(titleLabel)
view.addSubview(closeBtn)
let line = UIView()
line.backgroundColor = .separatorColor
view.addSubview(line)
titleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.right.equalToSuperview()
make.height.equalTo(24)
}
closeBtn.snp.makeConstraints { make in
make.centerY.equalTo(titleLabel)
make.right.equalToSuperview().offset(-20)
make.width.height.equalTo(24)
}
closeBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
line.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(1)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.bottom.equalToSuperview()
}
return view
}()
lazy var scrollView: UIScrollView = {
let view = UIScrollView()
view.addSubview(scrollContentView)
scrollContentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
return view
}()
lazy var scrollContentView: UIView = {
let view = UIView()
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "示例模版"
return label
}()
lazy var closeBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named:"my_cer_sheet_close"), for: .normal)
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return btn
}()
lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:14)
label.numberOfLines = 0
label.text = ""
return label
}()
lazy var templateView: YHCertificateSampleTemplateView = {
let view = YHCertificateSampleTemplateView(frame:CGRectZero)
view.tag = YHCertificateUploadType.sample.rawValue
let tap = UITapGestureRecognizer(target:self, action:#selector(didTemplateViewClicked))
view.addGestureRecognizer(tap)
return view
}()
lazy var knowBtn:UIButton = {
let btn = UIButton()
btn.setTitle("知道了".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString:"#4388FF")
btn.layer.cornerRadius = 8.0
btn.addTarget(self, action: #selector(didClickKnownBtn), 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 updateModel(_ model: YHTemplateInfo) {
templateInfo = model
if !model.name.isEmpty {
titleLabel.text = "\(model.name)示例模版"
}
if !model.description.isEmpty {
tipsLabel.text = "注意事项:\(model.description)"
}
let topMargin = model.description.isEmpty ? 0 : 20
templateView.snp.updateConstraints { make in
make.top.equalTo(tipsLabel.snp.bottom).offset(topMargin)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
whiteContentView.addSubview(topView)
whiteContentView.addSubview(scrollView)
whiteContentView.addSubview(knowBtn)
scrollContentView.addSubview(tipsLabel)
scrollContentView.addSubview(templateView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(484)
}
topView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
}
scrollView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(topView.snp.bottom).offset(20)
make.bottom.equalTo(knowBtn.snp.top).offset(-8)
}
tipsLabel.snp.makeConstraints { make in
let gap = 20.0
make.left.equalToSuperview().offset(gap)
make.right.equalToSuperview().offset(-gap)
make.width.equalTo(KScreenWidth-gap*2.0)
make.top.equalToSuperview()
}
templateView.snp.makeConstraints { make in
let gap = 20.0
make.left.equalToSuperview().offset(gap)
make.right.equalToSuperview().offset(-gap)
make.width.equalTo(KScreenWidth-gap*2.0)
make.height.equalTo(62.0)
make.top.equalTo(tipsLabel.snp.bottom).offset(20)
make.bottom.equalToSuperview().offset(-20)
}
knowBtn.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(48.0)
make.bottom.equalToSuperview().offset(-8-k_Height_safeAreaInsetsBottom())
}
}
func show() -> YHCertificateTemplateView {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
return self
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func didTemplateViewClicked() {
if let scanTemplateBlock = scanTemplateBlock {
scanTemplateBlock(templateInfo)
}
dismiss()
}
@objc func didClickKnownBtn() {
dismiss()
}
}
...@@ -524,11 +524,18 @@ extension YHWorkExperienceItemView: UITextFieldDelegate { ...@@ -524,11 +524,18 @@ extension YHWorkExperienceItemView: UITextFieldDelegate {
return false return false
} }
if (dataSource?.id == .id14 || dataSource?.id == .id16 || dataSource?.id == .id18) && newText.count > 10 { if (dataSource?.id == .id14 || dataSource?.id == .id16 || dataSource?.id == .id18) && newText.count > 10 {
return false return false
} }
if dataSource?.id == .id14 || dataSource?.id == .id16 {
//数据库最大存储问题 Int32 Max = 4294967295
if let value = Int32(newText) {
} else {
YHHUD.flash(message: "数字超过最大范围")
return false
}
}
var data = dataSource ?? YHWorkExperienceModel() var data = dataSource ?? YHWorkExperienceModel()
data.message = newText data.message = newText
......
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