Commit 097062e8 authored by lujunye's avatar lujunye

键盘

parent 9623b199
......@@ -15,7 +15,7 @@ protocol loginDelegate {
func successLogin()
}
class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDelegate {
var delegate :loginDelegate?
//MARK: - 输入账号、密码、验证码
@IBOutlet weak var loginBtn: LGButton!
......@@ -31,7 +31,7 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.view.backgroundColor = UIColor(named:"白色背景色")
}
override func viewDidLoad() {
......@@ -53,8 +53,21 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
codeV.delegate = self
codeView.addSubview(codeV);
codeV.changeCaptcha()
passTF.keyboardType = .default
codeTF.keyboardType = .default
codeTF.autocorrectionType = .no
codeTF.autocapitalizationType = .none
passTF.autocorrectionType = .no
passTF.autocapitalizationType = .none
phoneTF.autocorrectionType = .no
phoneTF.autocapitalizationType = .none
passTF.isSecureTextEntry = true
shBtn.isSelected = false
}
//MARK: -跳转忘记密码,登录
@IBAction func forgetPasswordAction(_ sender: Any) {
let alertView = GeliAlertView(frame: self.view.window!.bounds)
......@@ -65,7 +78,7 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
}
func sureGeliAlertViewAction(sender: UIButton) {
UIApplication.shared.openURL(NSURL.init(string: "tel://020-81338860")! as URL)
}
@IBAction func shPassAction(_ sender: UIButton) {
......@@ -82,8 +95,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
@IBAction func loginAction(_ sender: Any) {
//MARK:--登录接口样式
print("\(codeNum) == \(codeTF.text)")
// zxpf
// 123456
// zxpf
// 123456
if phoneTF.text?.count == 0 {
HUD.flash(.label("请填写用户名"), delay: 1.2)
return
......@@ -107,7 +120,7 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
self.delegate?.successLogin()
JPUSHService.setAlias(self.phoneTF.text, completion: { (resCode, alias, num) in
}, seq: 1433223)
}) { (error) in
self.loginBtn.isLoading = false
......@@ -115,8 +128,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
}else{
HUD.flash(.label("请填写正确的验证码"), delay: 1.2)
}
}
}
......@@ -69,7 +69,7 @@
<constraint firstAttribute="width" constant="1" id="U0P-VY-p7C"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您的用户名" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="xEL-ml-rz8">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您的用户名" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="xEL-ml-rz8">
<rect key="frame" x="123.5" y="11.5" width="209" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="w0K-cg-k4c"/>
......@@ -122,7 +122,7 @@
<constraint firstAttribute="width" constant="1" id="Vpp-aL-eh1"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ipW-Al-eG6">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="ipW-Al-eG6">
<rect key="frame" x="123.5" y="11" width="167" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="RUR-1C-sOu"/>
......@@ -206,7 +206,7 @@
<constraint firstAttribute="height" constant="22" id="TBL-ev-Ois"/>
</constraints>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="qfV-go-Nf1">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入验证码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="qfV-go-Nf1">
<rect key="frame" x="123.5" y="11" width="109" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="g6O-S7-x6a"/>
......
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