|
@@ -16,9 +16,8 @@ class MVLoginController: MVBaseController {
|
|
|
|
|
|
@available(iOS 13.0, *)
|
|
|
lazy var appleSignBtn: ASAuthorizationAppleIDButton = {
|
|
|
- let appleSignBtn: ASAuthorizationAppleIDButton = ASAuthorizationAppleIDButton(type: .signIn, style: .white)
|
|
|
+ let appleSignBtn: ASAuthorizationAppleIDButton = ASAuthorizationAppleIDButton(type: .signIn, style: .black)
|
|
|
appleSignBtn.cornerRadius = nomalH / 2
|
|
|
- // appleSignBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#333333")
|
|
|
appleSignBtn.isHidden = true
|
|
|
appleSignBtn.frame = CGRect(x: 0, y: 0, width: nomalH, height: nomalH)
|
|
|
appleSignBtn.center = view.center
|
|
@@ -28,11 +27,15 @@ class MVLoginController: MVBaseController {
|
|
|
|
|
|
lazy var protocolLab: TYAttributedLabel = {
|
|
|
let protocolLab = TYAttributedLabel()
|
|
|
- protocolLab.highlightedLinkBackgroundColor = UIColor.black
|
|
|
- protocolLab.backgroundColor = UIColor.white
|
|
|
+ protocolLab.highlightedLinkBackgroundColor = UIColor.white
|
|
|
protocolLab.delegate = self
|
|
|
protocolLab.numberOfLines = 0
|
|
|
protocolLab.font = UIFont.systemFont(ofSize: 12)
|
|
|
+ protocolLab.text = "登录即表明同意"
|
|
|
+ protocolLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
|
|
|
+ protocolLab.appendLink(withText: "《软件许可及服务协议》", linkFont: UIFont.systemFont(ofSize: 12), linkColor: UIColor.hexColor(hexadecimal: "#08B706"), underLineStyle: CTUnderlineStyle.single, linkData: cUserProtocol)
|
|
|
+ protocolLab.appendLink(withText: "和", linkFont: UIFont.systemFont(ofSize: 12), linkColor: UIColor.hexColor(hexadecimal: "#999999"), underLineStyle: CTUnderlineStyle(), linkData: nil)
|
|
|
+ protocolLab.appendLink(withText: "《隐私政策》", linkFont: UIFont.systemFont(ofSize: 12), linkColor: UIColor.hexColor(hexadecimal: "#08B706"), underLineStyle: CTUnderlineStyle.single, linkData: cPrivacy)
|
|
|
protocolLab.textAlignment = CTTextAlignment.center
|
|
|
return protocolLab
|
|
|
}()
|
|
@@ -57,7 +60,7 @@ class MVLoginController: MVBaseController {
|
|
|
|
|
|
phoneLoginBtn.titleLabel?.font = UIFont.systemFont(ofSize: 12)
|
|
|
phoneLoginBtn.setImage(UIImage(named: "icon_phone"), for: .normal)
|
|
|
- phoneLoginBtn.backgroundColor = UIColor.white
|
|
|
+ phoneLoginBtn.backgroundColor = UIColor.black
|
|
|
phoneLoginBtn.addCorner(corner: nomalH / 2)
|
|
|
return phoneLoginBtn
|
|
|
}()
|
|
@@ -65,7 +68,6 @@ class MVLoginController: MVBaseController {
|
|
|
//icon
|
|
|
lazy var IconView: UIImageView = {
|
|
|
let IconView = UIImageView.init(image: UIImage(named: "1024x1024px"))
|
|
|
-
|
|
|
return IconView
|
|
|
}()
|
|
|
|
|
@@ -100,6 +102,7 @@ class MVLoginController: MVBaseController {
|
|
|
self?.view.addSubview(self!.loginBtn)
|
|
|
self?.view.addSubview(self!.phoneLoginBtn)
|
|
|
self?.view.addSubview(self!.protocolLab)
|
|
|
+ PQSingletoMemoryUtil.shared.needLogin = true
|
|
|
if PQSingletoMemoryUtil.shared.needLogin {
|
|
|
if #available(iOS 13.0, *) {
|
|
|
self?.view.addSubview(self!.appleSignBtn)
|
|
@@ -107,14 +110,18 @@ class MVLoginController: MVBaseController {
|
|
|
self?.loginBtn.setTitle(nil, for: .normal)
|
|
|
self?.phoneLoginBtn.setTitle(nil, for: .normal)
|
|
|
}
|
|
|
+ self?.loginBtn.setImage(UIImage.init(named: "mi_upload_share_friend"), for: .normal)
|
|
|
+ self?.loginBtn.backgroundColor = UIColor.black
|
|
|
+ }else{
|
|
|
+ self?.loginBtn.setImage(UIImage.init(named: "weichatLogin"), for: .normal)
|
|
|
+ self?.loginBtn.backgroundColor = UIColor.white
|
|
|
}
|
|
|
self?.addLayout()
|
|
|
self?.phoneLoginBtn.isHidden = !PQSingletoMemoryUtil.shared.needLogin
|
|
|
}
|
|
|
|
|
|
IconView.snp.makeConstraints { make in
|
|
|
- make.top.equalTo(view).offset(241)
|
|
|
- make.centerX.equalTo(view)
|
|
|
+ make.center.equalToSuperview()
|
|
|
make.height.width.equalTo(260)
|
|
|
}
|
|
|
}
|
|
@@ -218,8 +225,9 @@ extension MVLoginController: TYAttributedLabelDelegate {
|
|
|
}
|
|
|
}
|
|
|
let detail = PQBaseWebViewController()
|
|
|
+ detail.modalPresentationStyle = .fullScreen
|
|
|
detail.baseUrl = link
|
|
|
- navigationController?.pushViewController(detail, animated: true)
|
|
|
+ present(detail, animated: true, completion: nil)
|
|
|
}
|
|
|
}
|
|
|
|