Commit 42ba0c01 authored by Steven杜宇's avatar Steven杜宇

Merge branch 'develop' into duyu

parents c9c142f8 5a28bab0
......@@ -128,6 +128,7 @@
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */; };
A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */; };
A5FD63C32B63438A00D1D9DA /* YHContactMainItemStatusModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */; };
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -288,6 +289,7 @@
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectCell.swift; sourceTree = "<group>"; };
A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectModel.swift; sourceTree = "<group>"; };
A5FD63C22B63438A00D1D9DA /* YHContactMainItemStatusModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContactMainItemStatusModel.swift; sourceTree = "<group>"; };
A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSubmitAllInfoCheckView.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 */
......@@ -749,6 +751,7 @@
A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */,
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */,
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */,
A5FD63C42B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -1079,6 +1082,7 @@
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
A5ACE9512B4564F7002C94D2 /* YhConstant.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* BsHUDProgressView.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */,
0468D4342B56587B00CFB916 /* YHOSSManager.swift in Sources */,
......
......@@ -38,8 +38,6 @@ class YHInformationPerfectListVC: YHBaseViewController {
var myHeadView : UIView = {
let view = UIView()
// view.backgroundColor = .purple//for test hjl
let titleLable = UILabel(text: "您好,黄先生")
titleLable.font = kFont(size: 21)
......@@ -65,6 +63,13 @@ class YHInformationPerfectListVC: YHBaseViewController {
return view
}()
var myBottomView : UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
......@@ -83,6 +88,16 @@ extension YHInformationPerfectListVC {
// }
}
@objc func clickSubmitBtn() {
YHSubmitAllInfoCheckView.showCheckView { agree in
if agree == true {
printLog("点击了 确认 按钮")
} else {
printLog("点击了 取消 按钮")
}
}
}
func setupUI() {
gk_navTitle = "信息完善"
gk_navBarAlpha = 1.0
......@@ -123,23 +138,44 @@ extension YHInformationPerfectListVC {
}
view.addSubview(myBottomView)
myBottomView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.right.equalToSuperview()
make.height.equalTo(84)
}
let submitBtn = UIButton(type: .custom)
submitBtn.layer.opacity = 0.4
submitBtn.setTitle("提交信息", for: .normal)
submitBtn.setTitleColor(UIColor.white, for: .normal)
// submitBtn.addGradualLayer([UIColor(hex: 0x2274EE, alpha: 1.0),UIColor(hex: 0x3A85FC, alpha: 1.0)])
submitBtn.setBackgroundImage(UIImage.from(color: UIColor(hex: 0x4D9FF8, alpha: 1.0)), for: .normal)
submitBtn.layer.cornerRadius = 8
submitBtn.clipsToBounds = true
myBottomView.addSubview(submitBtn)
submitBtn.addTarget(self, action: #selector(clickSubmitBtn), for: .touchUpInside)
submitBtn.snp.makeConstraints { make in
make.top.equalTo(8)
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(48)
}
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()
make.bottom.equalTo(myBottomView.snp.top)
}
// view.layoutIfNeeded()
myHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 96)
homeTableView.tableHeaderView = myHeadView
homeTableView.reloadData()
}
}
......@@ -168,7 +204,6 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 \(indexPath.section)section --- \(indexPath.row)row")
let model = arrData[indexPath.row]
if (indexPath.row + 1 > myTargetIndex) {
let message = "请先完成" + model.name + "填写"
......
......@@ -132,11 +132,14 @@ extension YHInformationPerfectCell {
//middle
if dataModel?.isFinished == true {
midImagV.image = UIImage(named: "mid_image")
contentView.layer.opacity = 1.0
} else {
if dataModel?.isDoing == true {
midImagV.image = UIImage(named: "mid_image1")
contentView.layer.opacity = 1.0
} else {
midImagV.image = UIImage(named: "mid_image2")
contentView.layer.opacity = 0.4
}
}
......@@ -153,6 +156,9 @@ extension YHInformationPerfectCell {
}
}
}
func setupUI() {
......
//
// YHSubmitAllInfoCheckView.swift
// galaxy
//
// Created by davidhuangA on 2024/1/26.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSubmitAllInfoCheckView: UIView {
typealias Block = (Bool) -> ()
var block: Block?
var centerView: UIView!
var titleLabel: UILabel!
var messageLabel: UILabel!
var agreeButton: UIButton!
var disAgressButton: UIButton!
static func showCheckView(callBack: @escaping Block) {
let view = YHSubmitAllInfoCheckView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = callBack
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 12
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.width.equalTo(299)
make.height.equalTo(165)
}
// titleLabel = {
// let label = UILabel()
// label.text = "同意隐私协议"
// label.font = kFont(size: 16)
// label.textColor = UIColor(hex:0x222222)
// label.textAlignment = .center
// return label
// }()
// centerView.addSubview(titleLabel)
// titleLabel.snp.makeConstraints { make in
// make.left.right.equalToSuperview()
// make.height.equalTo(19)
// make.top.equalTo(27)
// }
messageLabel = {
let label = UILabel()
label.text = "确定是否提交信息?提交后将不能修改"
label.font = kFont(size: 16)
label.textColor = UIColor(hex:0x222222)
label.textAlignment = .left
label.numberOfLines = 0
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.height.equalTo(42)
make.top.equalTo(40)
}
disAgressButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = kBoldFont(size: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
button.layer.cornerRadius = 8
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x3c86f8).cgColor
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
centerView.addSubview(disAgressButton)
disAgressButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
}
agreeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = kBoldFont(size: 14)
button.contentHorizontalAlignment = .center
button.setTitle("确认", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 8
button.addTarget(self, action: #selector(agree), for: .touchUpInside)
return button
}()
centerView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.bottom.equalTo(-21)
make.width.equalTo(128)
make.height.equalTo(45)
}
}
@objc func agree() {
block?(true)
dismiss()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func disagree() {
block?(false)
dismiss()
}
func dismiss() {
removeFromSuperview()
}
}
extension YHSubmitAllInfoCheckView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
......@@ -31,6 +31,7 @@ class YHPrivacyAlertView: UIView {
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
......
......@@ -21,8 +21,8 @@ extension UIView {
let gradientLayer = CAGradientLayer()
gradientLayer.colors = colors
gradientLayer.locations = [0, 1.0]
gradientLayer.startPoint = CGPoint(x: 0.02, y: 0.5)
gradientLayer.endPoint = CGPoint(x: 1.0, y: 0.5)
gradientLayer.startPoint = CGPoint(x: 0.12, y: 0.25)
gradientLayer.endPoint = CGPoint(x: 0.38, y: 0.25)
gradientLayer.frame = self.bounds
self.layer.addSublayer(gradientLayer)
}
......
......@@ -107,7 +107,7 @@ extension YHHUD{
duration:TimeInterval = 0.5,
isRemoveBefore: Bool = true,
insets: UIEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 120, right: 20),
contentInsets: UIEdgeInsets = UIEdgeInsets(top: 8, left: 12, bottom: 8, right: 12),
contentInsets: UIEdgeInsets = UIEdgeInsets(top: 12, left: 21, bottom: 12, right: 21),
containerWindow: UIWindow? = nil,
walk:((UILabel)->Void)? = nil){
if isRemoveBefore{
......
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