Commit 06954d7a by 刘鹏

feat: 一键登录反复切换问题修复

parent 60a45ede
......@@ -8,7 +8,7 @@ ext {
"m-confide" : "0.0.50.42",
"m-consultant" : "0.0.60.70",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55",
"m-user" : "0.0.62.61",
"m-home" : "0.0.23.95",
"m-im" : "0.0.21.63",
"m-dynamic" : "0.0.7.74",
......@@ -16,15 +16,11 @@ ext {
"m-muse" : "0.0.28.81",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.39",
//-------------- 功能组件 --------------
//mdt 组件
"ydl-tuicore" : "0.0.25",
//第一步
"ydl-platform" : "0.0.41.44",
//第二步 若干
"ydl-webview" : "0.0.38.94",
"ydl-media" : "0.0.21.52",
......@@ -94,7 +90,7 @@ ext {
"m-confide" : "0.0.50.42",
"m-consultant" : "0.0.60.70",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55",
"m-user" : "0.0.62.61",
"m-home" : "0.0.23.95",
"m-im" : "0.0.21.63",
"m-dynamic" : "0.0.7.74",
......
......@@ -12,7 +12,6 @@ import android.view.View
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import com.blankj.utilcode.util.ToastUtils
import com.mobile.auth.gatewayauth.*
import com.mobile.auth.gatewayauth.model.TokenRet
import com.ydl.ydlcommon.base.BaseActivity
......@@ -131,10 +130,13 @@ object OneKeyLoginHelp {
*/
private fun toLoginActivity() {
if (mOpenPageIsSuccess) {
RegisterAndLoginActivity.start(mActivity, isFromOneKey = true, isFromGuide = false)
RegisterAndLoginActivity.start(mActivity, isFromOneKey = true, isFromGuide = mIsFromGuide)
} else {
RegisterAndLoginActivity.start(mActivity, false, mIsFromGuide)
}
if (!mIsFromGuide) {
quitLoginPage()
}
}
/**
......@@ -150,7 +152,10 @@ object OneKeyLoginHelp {
if (mOpenPageIsSuccess) {
RegisterAndLoginActivity.start(mActivity)
} else {
RegisterAndLoginActivity.start(mActivity, isFromOneKey = false, isFromGuide = true)
RegisterAndLoginActivity.start(mActivity, isFromOneKey = false, isFromGuide = !isOpenDialog)
}
if (!mIsFromGuide) {
quitLoginPage()
}
}
}
......@@ -630,7 +635,10 @@ object OneKeyLoginHelp {
if (mOpenPageIsSuccess) {
RegisterAndLoginActivity.start(context)
} else {
RegisterAndLoginActivity.start(context, isFromOneKey = false, isFromGuide = true)
RegisterAndLoginActivity.start(context, isFromOneKey = false, isFromGuide = !isOpenDialog)
}
if (isOpenDialog) {
quitLoginPage()
}
}
}
......
......@@ -113,7 +113,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
intent.putExtra(IS_FROM_GUIDE, isFromGuide)
context.startActivity(intent)
}
/**
* 注意:此方法仅限于启动页调用,其他页面不要调用此方法
*/
......@@ -723,7 +722,11 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
super.onBackPressed()
}
} else {
OneKeyLoginHelp.checkEnvAvailable(PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN)
if (!OneKeyLoginHelp.mIsFromGuide) {
finish()
}else{
OneKeyLoginHelp.checkEnvAvailable(PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN)
}
super.onBackPressed()
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment