|
@@ -8,6 +8,7 @@
|
|
|
import UIKit
|
|
|
import RxSwift
|
|
|
import RxCocoa
|
|
|
+import SwiftyUserDefaults
|
|
|
|
|
|
class RegisteViewController: ADHBaseVC {
|
|
|
|
|
@@ -63,7 +64,7 @@ class RegisteViewController: ADHBaseVC {
|
|
|
}
|
|
|
|
|
|
accountField.inputFigure(maxLength: 20) {
|
|
|
- self.phone = "\(self.areaCode ?? "")\(self.accountField.text ?? "")"
|
|
|
+ self.phone = "\(self.accountField.text ?? "")"
|
|
|
}
|
|
|
|
|
|
inviteField.inputText(maxLength: 20) {
|
|
@@ -101,7 +102,7 @@ class RegisteViewController: ADHBaseVC {
|
|
|
vc.backCountryCode = { [weak self] country, code in
|
|
|
self?.areaBtn.setTitle("+\(code ?? "")", for: .normal)
|
|
|
self?.areaCode = code
|
|
|
- self?.phone = "\(self?.areaCode ?? "")\(self?.accountField.text ?? "")"
|
|
|
+ self?.phone = "\(self?.accountField.text ?? "")"
|
|
|
}
|
|
|
self.navigationController?.pushViewController(vc, animated: true)
|
|
|
}
|
|
@@ -130,6 +131,11 @@ class RegisteViewController: ADHBaseVC {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ if areaCode?.count ?? 0 == 0{
|
|
|
+ self.hud.showWarning(LanguagesUtil.createTextBy(Ctext: "请选择地区", Etext: "Please select a Area"))
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if phone?.count ?? 0 == 0{
|
|
|
self.hud.showWarning(LanguagesUtil.createTextBy(Ctext: "请输入手机号", Etext: "Please input your phone number"))
|
|
|
return
|
|
@@ -153,6 +159,7 @@ class RegisteViewController: ADHBaseVC {
|
|
|
vc.password = self.pswStr
|
|
|
vc.inviteCode = self.inviteNum
|
|
|
vc.areaCode = self.areaCode
|
|
|
+ Defaults[\.areaCode] = self.areaCode
|
|
|
self.navigationController?.pushViewController(vc, animated: true)
|
|
|
return
|
|
|
}
|