Browse Source

Merge branch '推广版' of http://156.254.127.134:3000/tomy/JD_iOS into 推广版

lintong 3 weeks ago
parent
commit
90a0eee34d

+ 0 - 16
Koala/Koala.xcworkspace/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -723,22 +723,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "BA5799F7-BFD6-48D9-AE2F-3C6C33735CBF"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "Koala/Modular/JDMine/VC/JDMineViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "414"
-            endingLineNumber = "414"
-            landmarkName = "tableView(_:didSelectRowAt:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "3F86DABB-C770-4980-B0C5-BD491E3039F3"
             shouldBeEnabled = "No"
             ignoreCount = "0"

+ 8 - 0
Koala/Koala/FX/Macro/PublicMethod.swift

@@ -17,6 +17,14 @@ func isValidEmail(_ email: String) -> Bool {
     return NSPredicate(format: "SELF MATCHES %@", emailRegex).evaluate(with: email)
 }
 
+
+func isValidMobile(_ mobile : String) -> Bool {
+    let idRegex = "[0-9]*"
+
+    return NSPredicate(format: "SELF MATCHES %@", idRegex).evaluate(with: mobile)
+}
+
+
 // 处理数据
 public func handleDic(myData: Any) -> Any {
     guard myData as? NSDictionary == nil else { // 是字典

+ 1 - 0
Koala/Koala/Modular/JDAssets/V/JDContactInfoProofInputCell.swift

@@ -97,6 +97,7 @@ class JDContactInfoProofInputCell: BaseTableViewCell {
     lazy var inputField:UITextField = {
         let v = UITextField()
         v.attributedPlaceholder = NSAttributedString.init(string: switchLanguage("请点击输入与您身份认证一致的姓名"), attributes: [NSAttributedString.Key.font:UIFont.pf_14_regular!,NSAttributedString.Key.foregroundColor:UIColor.K_888888])
+        v.addTarget(self, action: #selector(inputChange(_:)), for: .editingChanged)
         v.textAlignment = .center
         v.font = UIFont.pf_16_regular
         v.textColor = .black

+ 2 - 0
Koala/Koala/Modular/JDAssets/VC/JDIdentityFormViewController.swift

@@ -45,6 +45,7 @@ class JDIdentityFormViewController: BaseViewController {
             return
         }
         
+        
         guard (self.viewModel.file1.length) > 0 else {
             ProgressHUD.showInfo(status: switchLanguage("请上传正面图片"))
 //            ProgressHUD.showInfo(status: String(format: switchLanguage("请上传%@正面图片"), self.viewModel.typeStr))
@@ -176,6 +177,7 @@ class JDIdentityFormViewController: BaseViewController {
             return
         }
         
+        
         guard (self.viewModel.sign.length) > 0 else {
             ProgressHUD.showInfo(status: switchLanguage("请输入签名"))
 //            ProgressHUD.showInfo(status: switchLanguage("请完善信息后再提交"))

+ 1 - 1
Koala/Koala/Modular/JDTrade/V/JDTradeMainMenuCell.swift

@@ -89,7 +89,7 @@ extension JDTradeMainMenuCell: UICollectionViewDelegate {
 //        let pop = JDFuncLimitPopView()
 //        pop.showPopupView(title: "", detail: "") { _ in }
 //        return
-//        
+//
         guard OperationalUserInfoData.getLogin() else {
             currentVc()?.navigationController?.pushViewController(JDLoginViewController(), animated: true)
             return

+ 10 - 0
Koala/Koala/Modular/Login/V/ForgotPassword/JDForgotPasswordNewCell.swift

@@ -434,8 +434,18 @@ extension JDForgotPasswordNewCell {
                 ProgressHUD.showError(status: switchLanguage("邮箱格式错误"))
                 return
             }
+        } else {
+            
+            let phone = self.accountInputView.textField.text ?? ""
+            
+            if !isValidMobile(phone) {
+                ProgressHUD.showError(status: switchLanguage("号码格式错误"))
+                return
+            }
+            
         }
         
+        
         guard (self.codeInputView.textField.text ?? "").length > 0 else {
             ProgressHUD.showError(status: switchLanguage("请输入验证码"))
             return

+ 9 - 0
Koala/Koala/Modular/Login/V/Login/JDLoginNewCell.swift

@@ -385,6 +385,15 @@ extension JDLoginNewCell {
                 ProgressHUD.showError(status: switchLanguage("邮箱格式错误"))
                 return
             }
+        } else {
+            
+            let phone = self.topInputView.textField.text ?? ""
+            
+            if !isValidMobile(phone) {
+                ProgressHUD.showError(status: switchLanguage("号码格式错误"))
+                return
+            }
+            
         }
         
         guard (self.bottomInputView.textField.text ?? "").length > 0 else {

+ 9 - 0
Koala/Koala/Modular/Login/V/Register/JDRegisterProtocolCell.swift

@@ -173,6 +173,15 @@ extension JDRegisterProtocolCell {
                 ProgressHUD.showError(status: switchLanguage("邮箱格式错误"))
                 return
             }
+        } else {
+            
+            let phone = self.registerVM?.account ?? ""
+            
+            if !isValidMobile(phone) {
+                ProgressHUD.showError(status: switchLanguage("号码格式错误"))
+                return
+            }
+            
         }
         
         guard self.registerVM?.code.length ?? 0 > 0 else {

+ 4 - 0
Koala/Koala/Other/Language_CH.plist

@@ -4102,5 +4102,9 @@
 	<array>
 		<string>持仓未满30分钟,无法平仓</string>
 	</array>
+	<key>号码格式错误</key>
+	<array>
+		<string>号码格式错误</string>
+	</array>
 </dict>
 </plist>

+ 4 - 0
Koala/Koala/Other/Language_CHF.plist

@@ -4148,5 +4148,9 @@
 	<array>
 		<string>持倉未滿30分鐘,無法平倉</string>
 	</array>
+	<key>号码格式错误</key>
+	<array>
+		<string>號碼格式錯誤</string>
+	</array>
 </dict>
 </plist>

+ 4 - 0
Koala/Koala/Other/Language_EN.plist

@@ -4640,5 +4640,9 @@
 	<array>
 		<string>Position cannot be closed for less than 30 minutes</string>
 	</array>
+	<key>号码格式错误</key>
+	<array>
+		<string>Number format error</string>
+	</array>
 </dict>
 </plist>

+ 4 - 0
Koala/Koala/Other/Language_RU.plist

@@ -4406,5 +4406,9 @@
 	<array>
 		<string>Хранилище не может быть очищено до 30 минут</string>
 	</array>
+	<key>号码格式错误</key>
+	<array>
+		<string>Ошибка формата номера</string>
+	</array>
 </dict>
 </plist>

+ 4 - 0
Koala/Koala/Other/Language_TH.plist

@@ -4227,5 +4227,9 @@
 	<array>
 		<string>ต่ำกว่า 30 นาทีไม่สามารถลดระดับได้</string>
 	</array>
+	<key>号码格式错误</key>
+	<array>
+		<string>รูปแบบหมายเลขไม่ถูกต้อง</string>
+	</array>
 </dict>
 </plist>

+ 4 - 0
Koala/Koala/Other/Language_VT.plist

@@ -4220,5 +4220,9 @@ Công thức tính tỷ lệ ký quỹ: </string>
 	<array>
 		<string>Giữ vị trí ít hơn 30 phút, không thể đóng cửa</string>
 	</array>
+	<key>号码格式错误</key>
+	<array>
+		<string>Lỗi định dạng số</string>
+	</array>
 </dict>
 </plist>