Commit 437ff8b8 authored by David黄金龙's avatar David黄金龙

title 修改

parent f5cf58cb
......@@ -357,7 +357,6 @@
A592FE932BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */; };
A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */; };
A592FE972BA6DB340062FACA /* YHCertificateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE962BA6DB340062FACA /* YHCertificateViewModel.swift */; };
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */; };
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */; };
A5ACE9292B4564F7002C94D2 /* YHSmsCodeInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */; };
A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E42B4564F7002C94D2 /* YHLoginStyleButton.swift */; };
......@@ -820,7 +819,6 @@
A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEntryBottomView.swift; sourceTree = "<group>"; };
A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEntryCell.swift; sourceTree = "<group>"; };
A592FE962BA6DB340062FACA /* YHCertificateViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateViewModel.swift; sourceTree = "<group>"; };
A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginViewController.swift; sourceTree = "<group>"; };
A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeView.swift; sourceTree = "<group>"; };
A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeInputView.swift; sourceTree = "<group>"; };
A5ACE8E42B4564F7002C94D2 /* YHLoginStyleButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginStyleButton.swift; sourceTree = "<group>"; };
......@@ -2046,7 +2044,6 @@
A5ACE8DA2B4564F7002C94D2 /* C */ = {
isa = PBXGroup;
children = (
A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */,
0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */,
0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */,
0468D4252B495A5400CFB916 /* YHPickPhoneAddressViewController.swift */,
......@@ -2930,7 +2927,6 @@
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */,
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */,
0414BDAD2BC7F02C00225367 /* YHMyNotifySettingVC.swift in Sources */,
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */,
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */,
A5D335F92BCE51E700236F21 /* YHServiceCenterProgressModel.swift in Sources */,
045EEECC2B9F171A0022A143 /* YHScoreResultModel.swift in Sources */,
......
......@@ -138,7 +138,7 @@ private extension YHStartPageViewController {
guard let self = self else { return }
let vc = YHWebViewViewController()
vc.url = url
vc.navTitle = "隐私协议"
vc.navTitle = "银河港生活服务协议"
self.navigationController?.pushViewController(vc)
}
......
//
// YHLoginViewController.swift
// galaxy
//
// Created by EDY on 2023/12/26.
//
import UIKit
import DeviceKit
class YHLoginViewController: YHBaseViewController {
var bgImageView: UIImageView!
var loginTitleLabel: UILabel!
var loginSubTitleLabel: UILabel!
var loginPhoneLabel: UILabel!
var loginButton: UIButton!
var messageButton: YHLoginStyleButton!
var emailButton: YHLoginStyleButton!
var centerLine: UIView!
var centerImageView: UIImageView!
var promptsLabel: UILabel!
var wxButton: UIButton!
var privacyView: YHLoginPrivacyView!
override func viewDidLoad() {
super.viewDidLoad()
setView()
gk_navBackgroundColor = .clear
gk_navShadowColor = .clear
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
YHAnalytics.timeStrat("loginTime")
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
YHAnalytics.timeEnd("loginTime")
}
func setView() {
bgImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "login_bg_image")
return imageView
}()
view.addSubview(bgImageView)
bgImageView.snp.makeConstraints { make in
make.left.right.top.bottom.equalTo(view)
}
loginTitleLabel = {
let label = UILabel()
label.text = "登录后更精彩"
label.font = UIFont.PFSC_M(ofSize: 32)
label.textColor = UIColor(hex:0xffffff)
return label
}()
view.addSubview(loginTitleLabel)
loginTitleLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.top.equalTo(111)
make.height.equalTo(39)
}
loginSubTitleLabel = {
let label = UILabel()
label.text = "香港美好生活期待与你的相遇"
label.font = UIFont.PFSC_R(ofSize: 20)
label.textColor = UIColor(hex:0xffffff)
return label
}()
view.addSubview(loginSubTitleLabel)
loginSubTitleLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.top.equalTo(159)
make.height.equalTo(24)
}
loginPhoneLabel = {
let label = UILabel()
label.text = "+86 133****3800"
label.font = UIFont.PFSC_M(ofSize: 20)
label.textAlignment = .center
label.textColor = UIColor(hex:0xffffff)
return label
}()
view.addSubview(loginPhoneLabel)
loginPhoneLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.top.equalTo(245)
make.height.equalTo(24)
}
loginButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x4d9ff8)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("本机号码一键登录", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 24
button.addTarget(self, action: #selector(aliCloudLogin), for: .touchUpInside)
return button
}()
view.addSubview(loginButton)
loginButton.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.top.equalTo(289)
make.height.equalTo(48)
}
centerLine = {
let view = UIView()
view.backgroundColor = UIColor(hex:0xffffff)
return view
}()
view.addSubview(centerLine)
centerLine.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(368)
make.height.equalTo(20)
make.width.equalTo(1)
}
messageButton = {
let button = YHLoginStyleButton()
button.setContent(image: UIImage(named: "login_style_message")!, message: "验证码登录")
button.addTarget(self, action: #selector(messageLogin), for: .touchUpInside)
return button
}()
view.addSubview(messageButton)
messageButton.snp.makeConstraints { make in
make.right.equalTo(centerLine.snp.left).offset(-10)
make.centerY.equalTo(centerLine)
make.height.equalTo(20)
make.width.equalTo(110)
}
emailButton = {
let button = YHLoginStyleButton()
button.setContent(image: UIImage(named: "login_style_email")!, message: "邮箱登录")
return button
}()
view.addSubview(emailButton)
emailButton.snp.makeConstraints { make in
make.left.equalTo(centerLine.snp.right).offset(10)
make.centerY.equalTo(centerLine)
make.height.equalTo(20)
make.width.equalTo(93)
}
centerImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "login_center_image")
return imageView
}()
view.addSubview(centerImageView)
centerImageView.snp.makeConstraints { make in
make.centerX.equalTo(view)
make.width.equalTo(153)
make.height.equalTo(108)
make.bottom.equalTo(-188)
}
promptsLabel = {
let label = UILabel()
label.text = "其他登录方式(第三方账号注册需绑定手机号)"
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor(hex:0xffffff)
label.textAlignment = .center
return label
}()
view.addSubview(promptsLabel)
promptsLabel.snp.makeConstraints { make in
make.left.equalTo(14)
make.right.equalTo(-14)
make.bottom.equalTo(-89)
make.height.equalTo(20)
}
wxButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "login_style_wx"), for: .normal)
return button
}()
view.addSubview(wxButton)
wxButton.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.bottom.equalTo(-59)
make.height.equalTo(18)
make.width.equalTo(21)
}
privacyView = {
let view = YHLoginPrivacyView()
return view
}()
view.addSubview(privacyView)
privacyView.snp.makeConstraints { make in
make.bottom.equalTo(-24)
make.centerX.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(308)
}
//测试
}
@objc func messageLogin() {
YHAnalytics.track("Login")
if privacyView.isAgree {
let vc = YHVerificationCodeLoginController()
self.navigationController?.pushViewController(vc)
} else {
let view = YHPrivacyAlertView(frame: view.bounds)
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
}
}
extension YHLoginViewController {
@objc func aliCloudLogin() {
// if Device.current.isSimulator == false {
//
// let handler = TXCommonHandler.sharedInstance()
// handler.accelerateLoginPage(withTimeout:10) { dic in
//
// let resultCode = dic["resultCode"] as? String ?? ""
// print("resultCode:\(resultCode)")
// }
//
//
// let model = TXCustomModel()
// model.navColor = .orange
// let attributes = [
// NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20),
// NSAttributedString.Key.foregroundColor: UIColor.white,
// ]
//
// model.navTitle = NSAttributedString(string: "一键登录", attributes: attributes)
// model.supportedInterfaceOrientations = UIInterfaceOrientationMask.portrait
//
// handler.getLoginToken(withTimeout: 10.0, controller:self, model:model) { dic in
// printLog(dic)
//
// }
//
//
// }
}
}
......@@ -205,11 +205,16 @@ class YHPhoneLoginViewController: YHBaseViewController {
})
} else {
let view = YHPrivacyAlertView(frame: view.bounds)
view.urlBlock = { [weak self] url in
view.urlBlock = { [weak self] (type,url) in
guard let self = self else { return }
let vc = YHWebViewViewController()
vc.url = url
vc.navTitle = "隐私协议"
if type == 0 {
vc.navTitle = "银河港生活服务协议"
} else if type == 1 {
vc.navTitle = "银河港生活个人信息保护政策"
}
self.navigationController?.pushViewController(vc)
}
view.agreeBlock = { [weak self] in
......
......@@ -117,14 +117,14 @@ class YHLoginPrivacyView: UIView {
@objc func firstUrlClick() {
let vc = YHWebViewViewController()
vc.url = YHBaseUrlManager.shared.curPrivacyAgreementUrl()
vc.navTitle = "隐私协议"
vc.navTitle = "银河港生活服务协议"
UIViewController.current?.navigationController?.pushViewController(vc)
}
@objc func secondUrlClick() {
let vc = YHWebViewViewController()
vc.url = YHBaseUrlManager.shared.curUserItemsUrl()
vc.navTitle = "用户条款"
vc.navTitle = "银河港生活个人信息保护政策"
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
......@@ -10,7 +10,7 @@ import UIKit
import AttributedString
class YHPrivacyAlertView: UIView {
typealias UrlBlock = (_ url: String) -> ()
typealias UrlBlock = (_ type : Int,_ url: String) -> ()
typealias AgreeBlock = () -> ()
var urlBlock: UrlBlock?
var agreeBlock: AgreeBlock?
......@@ -58,13 +58,13 @@ class YHPrivacyAlertView: UIView {
let aa: ASAttributedString = .init("请先阅读并同意", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
let cc: ASAttributedString = .init("《隐私协议》", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.brandMainColor), .action {
if let block = self.urlBlock {
block(YHBaseUrlManager.shared.curPrivacyAgreementUrl())
block(0,YHBaseUrlManager.shared.curPrivacyAgreementUrl())
}
})
let bb: ASAttributedString = .init("和", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
let dd: ASAttributedString = .init("《用户条款》", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.brandMainColor), .action {
if let block = self.urlBlock {
block(YHBaseUrlManager.shared.curUserItemsUrl())
block(1,YHBaseUrlManager.shared.curUserItemsUrl())
}
})
messageLabel.attributed.text = aa + cc + bb + dd
......
......@@ -205,14 +205,14 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
// 用户条款
let vc = YHWebViewViewController()
vc.url = YHBaseUrlManager.shared.curUserItemsUrl()
vc.navTitle = "用户条款"
vc.navTitle = "银河港生活个人信息保护政策"
UIViewController.current?.navigationController?.pushViewController(vc)
} else if item.type == .privaceAgreement {
//隐私政策
let vc = YHWebViewViewController()
vc.url = YHBaseUrlManager.shared.curPrivacyAgreementUrl()
vc.navTitle = "隐私政策"
vc.navTitle = "银河港生活服务协议"
UIViewController.current?.navigationController?.pushViewController(vc)
}
......
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