Commit 5eb1146e authored by David黄金龙's avatar David黄金龙

启动协议

parent 54a8f2fb
...@@ -310,6 +310,7 @@ ...@@ -310,6 +310,7 @@
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; }; A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; }; A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; };
A53D38202BC243F1006AE6F7 /* YHStartPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */; }; A53D38202BC243F1006AE6F7 /* YHStartPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */; };
A53F05ED2BCE86E50071D35A /* YHAgreementAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F05EC2BCE86E50071D35A /* YHAgreementAlertView.swift */; };
A53F42B92BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */; }; A53F42B92BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */; };
A53F42BB2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */; }; A53F42BB2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */; };
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; }; A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; };
...@@ -759,6 +760,7 @@ ...@@ -759,6 +760,7 @@
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; }; A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; }; A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; };
A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHStartPageViewController.swift; sourceTree = "<group>"; }; A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHStartPageViewController.swift; sourceTree = "<group>"; };
A53F05EC2BCE86E50071D35A /* YHAgreementAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAgreementAlertView.swift; sourceTree = "<group>"; };
A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockModel.swift; sourceTree = "<group>"; }; A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockModel.swift; sourceTree = "<group>"; };
A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockItem.swift; sourceTree = "<group>"; }; A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockItem.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>"; };
...@@ -2227,6 +2229,7 @@ ...@@ -2227,6 +2229,7 @@
044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */, 044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */,
A50A747D2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift */, A50A747D2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift */,
048787D22BCE6B7D0036E221 /* YHServiceOrderAlertView.swift */, 048787D22BCE6B7D0036E221 /* YHServiceOrderAlertView.swift */,
A53F05EC2BCE86E50071D35A /* YHAgreementAlertView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2733,6 +2736,7 @@ ...@@ -2733,6 +2736,7 @@
A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */, A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */,
045EEE9C2B9F171A0022A143 /* YHCompanyViewModel.swift in Sources */, 045EEE9C2B9F171A0022A143 /* YHCompanyViewModel.swift in Sources */,
A58556BA2B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift in Sources */, A58556BA2B6BCF1A003746B2 /* YHPersonInfoFillStepModel.swift in Sources */,
A53F05ED2BCE86E50071D35A /* YHAgreementAlertView.swift in Sources */,
045EEEC92B9F171A0022A143 /* YHOtherInfoSessionView.swift in Sources */, 045EEEC92B9F171A0022A143 /* YHOtherInfoSessionView.swift in Sources */,
045EEEE22B9F171A0022A143 /* YHMySignatureDetailViewModel.swift in Sources */, 045EEEE22B9F171A0022A143 /* YHMySignatureDetailViewModel.swift in Sources */,
045EEE7D2B9F171A0022A143 /* YHWorkExpDataModel.swift in Sources */, 045EEE7D2B9F171A0022A143 /* YHWorkExpDataModel.swift in Sources */,
......
...@@ -35,8 +35,13 @@ class YHStartPageViewController: UIViewController { ...@@ -35,8 +35,13 @@ class YHStartPageViewController: UIViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
initView() initView()
self.startTimer()
} }
lazy var agreeAlertView : YHAgreementAlertView = {
let view = YHAgreementAlertView()
view.isHidden = true
return view
}()
} }
...@@ -89,6 +94,15 @@ private extension YHStartPageViewController { ...@@ -89,6 +94,15 @@ private extension YHStartPageViewController {
make.height.equalTo(28) make.height.equalTo(28)
} }
closeBtn.addTarget(self, action: #selector(clickCancelBtn), for: .touchUpInside) closeBtn.addTarget(self, action: #selector(clickCancelBtn), for: .touchUpInside)
view.addSubview(agreeAlertView)
agreeAlertView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
// agreeAlertView.isHidden = false
// cancelTimer()
// closeBtn.isHidden = true//for test hjl
} }
@objc func clickCancelBtn() { @objc func clickCancelBtn() {
......
//
// YHAgreementAlertView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAgreementAlertView: UIView {
typealias AgreeBlock = () -> ()
var agreeBlock: AgreeBlock?
var centerView: UIView!
var titleLabel: UILabel!
var lineView: UIView!
var messageLabel: UILabel!
var agreeButton: UIButton!
var disAgressButton: UIButton!
// static func show(_ title: String? = nil, _ message: String? = nil, _ leftButtonString: String? = nil, _ rightButtonString: String? = nil, callBack: @escaping (() -> Void)) {
// let view = YHCommonAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
// view.agreeBlock = callBack
// view.setContent(title, message, leftButtonString, rightButtonString)
// 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()
}
// func setContent(_ title: String? = nil, _ message: String? = nil, _ leftButtonString: String? = nil, _ rightButtonString: String? = nil) {
// self.titleLabel.text = title
// self.messageLabel.text = message
// self.disAgressButton.setTitle(leftButtonString, for: .normal)
// self.agreeButton.setTitle(rightButtonString, for: .normal)
//
// if title?.count == 0 || title == nil {
// centerView.snp.remakeConstraints { make in
// make.center.equalToSuperview()
// make.width.equalTo(299)
// make.height.equalTo(164)
// }
//
// messageLabel.snp.remakeConstraints { make in
// make.left.equalTo(22)
// make.right.equalTo(-22)
// make.height.lessThanOrEqualTo(60)
// make.top.equalTo(37)
// }
// }
// }
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 = kCornerRadius6
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.left.equalTo(38)
make.right.equalTo(-38)
}
titleLabel = {
let label = UILabel()
label.textAlignment = .center
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize: 17)
label.numberOfLines = 0
label.text = "欢迎使用超级APP"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.top.equalTo(kMargin)
}
lineView = {
let line = UIView()
line.backgroundColor = UIColor(hex: 0xF0F0F0)
return line
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalTo(0)
make.height.equalTo(1)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
messageLabel = {
let label = UILabel()
label.textAlignment = .center
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 16)
label.numberOfLines = 0
label.text = "感谢您信任并使用超级APP,我们将通过《超级APP隐私协议》和《超级APP用户条款》帮助您了解我们收集、使用、存储和共享个人信息的情况,特别是我们所采取的个人信息类型和用途的对应关系。此外,您还能了解到您所享受的相关权利以及实现途径。认真阅读之后,如您同意,请点击下方的按钮开始接受我们的服务。"
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(lineView.snp.bottom).offset(kMargin)
}
disAgressButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x3c86f8).cgColor
button.addTarget(self, action: #selector(disagree), for: .touchUpInside)
return button
}()
let itemW = (KScreenWidth - kMargin * 2 - 10 - 38 * 2) / 2.0
centerView.addSubview(disAgressButton)
disAgressButton.snp.makeConstraints { make in
make.top.equalTo(messageLabel.snp.bottom).offset(21)
make.left.equalTo(kMargin)
make.bottom.equalTo(-kMargin)
make.height.equalTo(45)
make.width.equalTo(itemW)
}
agreeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("确认", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.addTarget(self, action: #selector(agree), for: .touchUpInside)
return button
}()
centerView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.height.equalTo(disAgressButton.snp.height)
make.top.equalTo(disAgressButton.snp.top)
make.width.equalTo(itemW)
make.left.equalTo(disAgressButton.snp.right).offset(10)
}
}
@objc func agree() {
if let block = self.agreeBlock {
block()
}
dismiss()
}
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func disagree() {
dismiss()
}
func dismiss() {
removeFromSuperview()
}
}
extension YHAgreementAlertView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
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