|
@@ -295,7 +295,7 @@ class KMSignUpViewModel: ObservableObject {
|
|
|
|
|
|
self.timer?.cancel()
|
|
|
self.sendContent = NSLocalizedString("Resend", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
-
|
|
|
+
|
|
|
KMMemberInfo.shared.avatarImage = nil
|
|
|
} else {
|
|
|
if(resultDict.code == 305) {
|
|
@@ -326,19 +326,12 @@ class KMSignUpViewModel: ObservableObject {
|
|
|
}
|
|
|
} else {
|
|
|
callback?(false)
|
|
|
-
|
|
|
print("错误信息:%@", msg as Any)
|
|
|
- DispatchQueue.main.async {
|
|
|
- let alert = NSAlert()
|
|
|
- alert.messageText = NSLocalizedString(msg!, comment: "")
|
|
|
- alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
|
|
|
- let response = alert.runModal()
|
|
|
+ KMMemberCenterManager.showAlert(code: .init(rawValue: resultDict.code), message: resultDict.msg) { response, _ in
|
|
|
if response == .alertFirstButtonReturn {
|
|
|
if(resultDict.code == 317) {
|
|
|
self.signUpState = .verificationCode
|
|
|
self.countDown(type: .login, callback: nil)
|
|
|
- } else {
|
|
|
- KMMemberCenterManager.showAlert(code: .init(rawValue: resultDict.code), message: resultDict.msg, callback: nil)
|
|
|
}
|
|
|
}
|
|
|
}
|