Commit 727066a3 authored by Steven杜宇's avatar Steven杜宇

// 上传失败提示组件

parent c364b41c
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; }; 0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */; }; 044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */; };
044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */; }; 044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */; };
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */; };
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */; }; 045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */; };
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */; }; 045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */; };
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */; }; 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */; };
...@@ -354,6 +355,7 @@ ...@@ -354,6 +355,7 @@
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; }; 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; };
044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterView.swift; sourceTree = "<group>"; }; 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterView.swift; sourceTree = "<group>"; };
044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterItemCell.swift; sourceTree = "<group>"; }; 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterItemCell.swift; sourceTree = "<group>"; };
044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadFailTipsView.swift; sourceTree = "<group>"; };
045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewViewModel.swift; sourceTree = "<group>"; }; 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewViewModel.swift; sourceTree = "<group>"; };
045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewForOtherInfoModel.swift; sourceTree = "<group>"; }; 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewForOtherInfoModel.swift; sourceTree = "<group>"; };
045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPersonInfoCellModel2.swift; sourceTree = "<group>"; }; 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPersonInfoCellModel2.swift; sourceTree = "<group>"; };
...@@ -1339,6 +1341,7 @@ ...@@ -1339,6 +1341,7 @@
04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */, 04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */,
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */, 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */,
044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */, 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */,
044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */,
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */, 04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */,
04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */, 04A6715D2B9FFCA700C1FB91 /* YHCertificateNameCell.swift */,
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */, 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */,
...@@ -1991,6 +1994,7 @@ ...@@ -1991,6 +1994,7 @@
045EEEF02B9F171A0022A143 /* YHChildPrimaryInfoVC.swift in Sources */, 045EEEF02B9F171A0022A143 /* YHChildPrimaryInfoVC.swift in Sources */,
0468D4202B49320900CFB916 /* YHVerificationCodeLoginController.swift in Sources */, 0468D4202B49320900CFB916 /* YHVerificationCodeLoginController.swift in Sources */,
045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */, 045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */,
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */, 045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */, A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */,
045EEEEF2B9F171A0022A143 /* YHCertificateInfoController.swift in Sources */, 045EEEEF2B9F171A0022A143 /* YHCertificateInfoController.swift in Sources */,
......
//
// YHCertificateUploadFailTipsView.swift
// galaxy
//
// Created by edy on 2024/3/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
/*
【Usage】
YHCertificateUploadFailTipsView.tipsView().show()
*/
import UIKit
class YHCertificateUploadFailTipsView: UIView {
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
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
view.layer.cornerRadius = 6.0
return view
}()
lazy var failIconImgView: UIImageView = {
let imgV = UIImageView(image: UIImage(named: "my_cer_upload_fail"))
return imgV
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize:17)
label.text = "上传失败"
return label
}()
lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = .labelTextColor2
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize:14)
label.numberOfLines = 0
label.text = "请检查文件格式是否为docx、jpg、doc、png、pptx、pdf".local
return label
}()
lazy var knowBtn:UIButton = {
let btn = UIButton()
btn.setTitle("我知道了".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString:"#4388FF")
btn.layer.cornerRadius = 6.0
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return btn
}()
static func tipsView() -> YHCertificateUploadFailTipsView {
let view = YHCertificateUploadFailTipsView(frame:UIScreen.main.bounds)
return view
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
whiteContentView.addSubview(failIconImgView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(tipsLabel)
whiteContentView.addSubview(knowBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(38)
make.right.equalToSuperview().offset(-38)
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
}
failIconImgView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(30)
make.centerX.equalToSuperview()
make.width.height.equalTo(53)
}
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(24)
make.top.equalTo(failIconImgView.snp.bottom).offset(16)
}
tipsLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalTo(titleLabel.snp.bottom).offset(8)
}
knowBtn.snp.makeConstraints { make in
make.left.equalToSuperview().offset(21)
make.right.equalToSuperview().offset(-21)
make.height.equalTo(45)
make.top.equalTo(tipsLabel.snp.bottom).offset(31)
make.bottom.equalToSuperview().offset(-21)
}
}
}
extension YHCertificateUploadFailTipsView {
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
}
...@@ -169,6 +169,21 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -169,6 +169,21 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row >= items.count) { return } if (indexPath.row >= items.count) { return }
// if true {
// YHCertificateUploadFailTipsView.tipsView().show()
// let vc = YHUploadContentVC()
// self.navigationController?.pushViewController(vc)
// let vc = YHCertificateResourceUploadVC()
// self.navigationController?.pushViewController(vc)
// return
// }
if !checkLogin() { if !checkLogin() {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController()) let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom vc.modalPresentationStyle = .custom
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 3034@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3034@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