| | |
| | | Services.updatePwd(cellPhone: phone, password: tf_input.text!, secretCode: secretCode).subscribe(onNext: {data in |
| | | if data.code == 200{ |
| | | Popup_1_View.show(state: .success, title: "修改成功", subtitle: "您的密码已修改成功,快去登录账户吧") { |
| | | self.navigationController?.popToRootViewController(animated: true) |
| | | let loginNav = LoginNav(rootViewController: LoginVC()) |
| | | loginNav.modalPresentationStyle = .fullScreen |
| | | JQ_currentViewController().present(loginNav, animated: true) |
| | | |
| | | UserViewModel.clearToken() |
| | | UserViewModel.clearLoginInfo() |
| | | UserViewModel.clearAvatarInfo() |
| | | |
| | | DispatchQueue.main.asyncAfter(delay: 0.3) { |
| | | NotificationCenter.default.post(name: LoginQuit_Noti, object: nil) |
| | | } |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |