杨锴
2024-08-14 909e20941e45f8712c012db602034b47da0bfdb0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
//  ForgotPasswordChangeVC.swift
//  XQMuse
//
//  Created by 无故事王国 on 2024/8/13.
//
 
import UIKit
import QMUIKit
import JQTools
 
class ForgotPasswordChangeVC: BaseVC {
 
                @IBOutlet weak var tf_input: QMUITextField!
                @IBOutlet weak var btn_complete: UIButton!
                private let shadowView = UIView()
 
                override func viewDidLoad() {
        super.viewDidLoad()
        title = "找回密码"
    }
 
                override func setUI() {
                                view.addSubview(shadowView)
                                shadowView.backgroundColor = .white
                                shadowView.snp.makeConstraints { make in
                                                make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top).offset(0)
                                                make.left.right.equalToSuperview()
                                                make.height.equalTo(30)
                                }
                }
 
                override func viewDidLayoutSubviews() {
                                super.viewDidLayoutSubviews()
 
                                btn_complete.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 20)
 
                                shadowView.jq_gradientColor(colorArr: [UIColor(hexStr: "#F5F5F5").withAlphaComponent(0.15).cgColor,UIColor.white.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0, y: 1), bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW, height: 30),locations: [0.1,0.9])
 
                }
 
                @IBAction func completeAction(_ sender: UIButton) {
                                guard !tf_input.text!.isEmpty else {alertError(msg: "请输入密码");return}
                                guard tf_input.text!.count >= 8 else {alertError(msg: "密码至少8个字符,不能全是字母或数字");return}
                                guard tf_input.text!.jq_isComplexPassword else {alertError(msg: "密码至少8个字符,不能全是字母或数字");return}
                                view.endEditing(true)
                                Popup_1_View.show(state: .success, title: "修改成功", subtitle: "您的密码已修改成功,快去登录账户吧") {
                                                self.navigationController?.popToRootViewController(animated: true)
                                }
                }
}