fix(LoginActivity): 登录成功后不跳转

This commit is contained in:
HuanCheng65 2023-03-11 00:11:13 +08:00
parent 87b7e8339a
commit becfa8cbb4
No known key found for this signature in database
GPG Key ID: E9031EF91A805148
1 changed files with 4 additions and 0 deletions

View File

@ -103,6 +103,10 @@ class LoginActivity : BaseActivity(), WebViewListener {
if (it) { if (it) {
AccountUtil.switchUser(this@LoginActivity, account.id) AccountUtil.switchUser(this@LoginActivity, account.id)
snackBar.setText("登录成功,即将跳转") snackBar.setText("登录成功,即将跳转")
handler.postDelayed({
snackBar.dismiss()
finish()
}, 1500)
} else { } else {
snackBar.setText("登录失败 未知错误") snackBar.setText("登录失败 未知错误")
view.loadUrl("https://wappass.baidu.com/passport?login&u=https%3A%2F%2Ftieba.baidu.com%2Findex%2Ftbwise%2Fmine") view.loadUrl("https://wappass.baidu.com/passport?login&u=https%3A%2F%2Ftieba.baidu.com%2Findex%2Ftbwise%2Fmine")