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

启动页 协议展示

parent aae685f3
...@@ -133,6 +133,14 @@ private extension YHStartPageViewController { ...@@ -133,6 +133,14 @@ private extension YHStartPageViewController {
} }
} }
agreeAlertView.urlBlock = { [weak self] url in
guard let self = self else { return }
let vc = YHWebViewViewController()
vc.url = url
self.navigationController?.pushViewController(vc)
}
} }
} }
......
...@@ -7,11 +7,16 @@ ...@@ -7,11 +7,16 @@
// //
import UIKit import UIKit
import AttributedString
class YHAgreementAlertView: UIView { class YHAgreementAlertView: UIView {
typealias UrlBlock = (_ url: String) -> ()
var urlBlock: UrlBlock?
typealias AgreeBlock = () -> () typealias AgreeBlock = () -> ()
var agreeBlock: AgreeBlock? var agreeBlock: AgreeBlock?
var cancelBlock:AgreeBlock? var cancelBlock:AgreeBlock?
var centerView: UIView! var centerView: UIView!
var titleLabel: UILabel! var titleLabel: UILabel!
var lineView: UIView! var lineView: UIView!
...@@ -83,7 +88,7 @@ class YHAgreementAlertView: UIView { ...@@ -83,7 +88,7 @@ class YHAgreementAlertView: UIView {
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 16) label.font = UIFont.PFSC_R(ofSize: 16)
label.numberOfLines = 0 label.numberOfLines = 0
label.text = "感谢您信任并使用智汇银河App,我们将通过《智汇银河App隐私协议》和《智汇银河App用户条款》帮助您了解我们收集、使用、存储和共享个人信息的情况,特别是我们所采取的个人信息类型和用途的对应关系。此外,您还能了解到您所享受的相关权利以及实现途径。认真阅读之后,如您同意,请点击下方的按钮开始接受我们的服务。" label.text = ""
return label return label
}() }()
...@@ -135,6 +140,30 @@ class YHAgreementAlertView: UIView { ...@@ -135,6 +140,30 @@ class YHAgreementAlertView: UIView {
make.width.equalTo(itemW) make.width.equalTo(itemW)
make.left.equalTo(disAgressButton.snp.right).offset(10) make.left.equalTo(disAgressButton.snp.right).offset(10)
} }
let a: ASAttributedString = .init("感谢您信任并使用智汇银河App,我们将通过", .font(UIFont.PFSC_R(ofSize: 16)),.foreground(UIColor.mainTextColor))
let aa: ASAttributedString = .init("《智汇银河App隐私协议》", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.brandMainColor), .action {
if let block = self.urlBlock {
block("https://www.baidu.com")
}
})
let and: ASAttributedString = .init("和", .font(UIFont.PFSC_R(ofSize: 16)),.foreground(UIColor.mainTextColor))
let aab: ASAttributedString = .init("《智汇银河App用户条款》", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.brandMainColor), .action {
if let block = self.urlBlock {
block("https://www.baidu.com")
}
})
let aaa: ASAttributedString = .init("帮助您了解我们收集、使用、存储和共享个人信息的情况,特别是我们所采取的个人信息类型和用途的对应关系。此外,您还能了解到您所享受的相关权利以及实现途径。认真阅读之后,如您同意,请点击下方的按钮开始接受我们的服务。", .font(UIFont.PFSC_R(ofSize: 16)),.foreground(UIColor.mainTextColor))
messageLabel.attributed.text = a + aa + and + aab + aaa
} }
@objc func agree() { @objc func agree() {
......
...@@ -277,7 +277,6 @@ extension YHServiceCenterMainViewModel { ...@@ -277,7 +277,6 @@ extension YHServiceCenterMainViewModel {
model.isFinished = false model.isFinished = false
} }
if item == target { if item == target {
model.isDoing = true model.isDoing = true
} }
......
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