Browse Source

【轻会员】重置密码界面,密码隐藏完善

lizhe 1 year ago
parent
commit
548e852039

+ 12 - 0
PDF Office/PDF Office/Class/KMLightMember/Controller/Login&Register/View/KMResetPasswordView.swift

@@ -51,12 +51,14 @@ class KMResetPasswordView: KMBaseXibView {
         
         
         
         
         self.passwordTextField.delegate = self
         self.passwordTextField.delegate = self
+        self.passwordSecureTextField.delegate = self
         self.passwordTextField.onFocus = {
         self.passwordTextField.onFocus = {
             self.passwordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
             self.passwordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
         }
         }
         
         
         
         
         self.rePasswordTextField.delegate = self
         self.rePasswordTextField.delegate = self
+        self.rePasswordSecureTextField.delegate = self
         self.rePasswordTextField.onFocus = {
         self.rePasswordTextField.onFocus = {
             self.rePasswordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
             self.rePasswordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
         }
         }
@@ -222,6 +224,16 @@ extension KMResetPasswordView: NSTextFieldDelegate {
             textField == self.rePasswordSecureTextField) {
             textField == self.rePasswordSecureTextField) {
             self.rePasswordContentView.border(NSColor(hex: "#DFE1E5"), 1, 4)
             self.rePasswordContentView.border(NSColor(hex: "#DFE1E5"), 1, 4)
         }
         }
+        
+        if (textField == self.passwordSecureTextField ||
+            textField == self.passwordTextField) {
+            self.presenter.changePassword(string: textField!.stringValue)
+        }
+        
+        if (textField == self.rePasswordSecureTextField ||
+            textField == self.rePasswordTextField) {
+            self.presenter.changeRePassword(string: textField!.stringValue)
+        }
     }
     }
     
     
     func controlTextDidChange(_ obj: Notification) {
     func controlTextDidChange(_ obj: Notification) {