Kaynağa Gözat

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

lizhe 1 yıl önce
ebeveyn
işleme
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.passwordSecureTextField.delegate = self
         self.passwordTextField.onFocus = {
             self.passwordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
         }
         
         
         self.rePasswordTextField.delegate = self
+        self.rePasswordSecureTextField.delegate = self
         self.rePasswordTextField.onFocus = {
             self.rePasswordContentView.border(NSColor(hex: "#1770F4"), 1, 4)
         }
@@ -222,6 +224,16 @@ extension KMResetPasswordView: NSTextFieldDelegate {
             textField == self.rePasswordSecureTextField) {
             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) {