Ver Fonte

【会员系统】修改登录模块验证码Send按钮不同场景下外观及可点击状态

wanjun há 4 meses atrás
pai
commit
486f4da7d3

+ 4 - 7
PDF Office/PDF Master/MemberCenter/View/KMSignUpView.swift

@@ -260,7 +260,8 @@ class KMSignUpView: KMBaseXibView {
     
     private func sendBoxRefresh() -> Void {
         sendLabel.stringValue = viewModel.sendContent
-        if viewModel.sendContent == NSLocalizedString("Send", tableName: "MemberCenterLocalizable", comment: "") {
+        if viewModel.sendContent == NSLocalizedString("Send", tableName: "MemberCenterLocalizable", comment: "") ||
+            viewModel.sendContent == NSLocalizedString("Resend", tableName: "MemberCenterLocalizable", comment: "") {
             if viewModel.email.count > 0 {
                 if viewModel.isValidEmail() {
                     sendBox.fillColor = NSColor(named: "273C62") ?? NSColor.blue
@@ -271,12 +272,8 @@ class KMSignUpView: KMBaseXibView {
                 sendBox.fillColor = NSColor(named: "273C62_0.4") ?? NSColor.blue
             }
         } else {
-            if viewModel.sendContent == NSLocalizedString("Resend", tableName: "MemberCenterLocalizable", comment: "") {
-                sendBox.fillColor = NSColor(named: "273C62") ?? NSColor.blue
-            } else {
-                sendBox.fillColor = NSColor(named: "DADBDE") ?? NSColor.gray
-                sendLabel.stringValue = String(format: "%@s", viewModel.sendContent)
-            }
+            sendBox.fillColor = NSColor(named: "DADBDE") ?? NSColor.gray
+            sendLabel.stringValue = String(format: "%@s", viewModel.sendContent)
         }
     }