Commit cdd04085 by 刘鹏

Merge branch 'fix/lp/lp_fix_login' into 'release'

feat: 修复一键登录提示问题,修复绑定手机号问题

See merge request app_android_lib/YDL-Component!166
parents a5a9259e dea5ace6
......@@ -5,10 +5,10 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.26",
"m-confide" : "0.0.50.27",
"m-consultant" : "0.0.60.68",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.51",
"m-user" : "0.0.62.54",
"m-home" : "0.0.23.90",
"m-im" : "0.0.21.58",
"m-dynamic" : "0.0.7.74",
......@@ -92,10 +92,10 @@ ext {
ydlCompileVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.26",
"m-confide" : "0.0.50.27",
"m-consultant" : "0.0.60.68",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.51",
"m-user" : "0.0.62.54",
"m-home" : "0.0.23.90",
"m-im" : "0.0.21.58",
"m-dynamic" : "0.0.7.74",
......
......@@ -43,6 +43,7 @@ import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.service.IImService
import com.yidianling.user.api.event.UserBindPhoneEvent
import com.yidianling.user.api.event.UserLoginEvent
import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus
......@@ -580,8 +581,12 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
wv_content.destroy()
EventBus.getDefault().unregister(this)
}
//登录成功
fun onEvent(event: UserLoginEvent) {
loadUrl()
}
//绑定成功
fun onEvent(event: UserBindPhoneEvent) {
loadUrl()
}
}
\ No newline at end of file
......@@ -118,19 +118,15 @@ object LoginUtils {
val size = ActivityManager.getActivitySize()
if (size <= 2) {//当前stack只有两个页面,必然没有MainActivity
ActivityManager.finishAll()
if (StatusUtils.isFirstLogin && StatusUtils.isFirstStartApp) {
UserIn.mainIntent(activity)
// activity.startActivity(Intent(activity, CollectSexAndBirthActivity::class.java))
} else {
UserIn.mainIntent(activity)
}
UserIn.mainIntent(activity)
} else {//需要判断stack中是否有MainActivity
//这里不能引用到MainActivity 想别的办法
var flag = 0
//判断stack中activity是否属于登录相关的三个页面
var containMainActivity = false
for (activity in ActivityManager.getInstance().getActivitys()) {
if (activity.javaClass.name == "com.cxzapp.yidianling.activity.MainActivity") {
if (activity.javaClass.name == "com.cxzapp.yidianling.activity.MainActivity"
|| activity.javaClass.name == "com.cxzapp.xinlizixun.activity.MainActivity") {
containMainActivity = true
}
if (activity is RegisterAndLoginActivity
......@@ -155,12 +151,7 @@ object LoginUtils {
}
} else {
ActivityManager.finishAll()
if (StatusUtils.isFirstLogin && StatusUtils.isFirstStartApp) {
UserIn.mainIntent(activity)
// activity.startActivity(Intent(activity, CollectSexAndBirthActivity::class.java))
} else {
UserIn.mainIntent(activity)
}
UserIn.mainIntent(activity)
}
}
}
......
......@@ -98,8 +98,6 @@ object OneKeyLoginHelp {
}
}
// 获取渠道
// val channel = WalleChannelReader.getChannel(activity.applicationContext)
// checkBoxHidden = !(channel == "huawei" || channel == "vivo")
LogUtil.e("checkBoxHidde:$checkBoxHidden")
if (!checkBoxHidden) {
mPrivacyBeforeText = "同意"
......@@ -335,6 +333,7 @@ object OneKeyLoginHelp {
.setRootViewId(AuthRegisterViewConfig.RootViewId.ROOT_VIEW_ID_BODY)
.setCustomInterface {
UserIn.mainIntent(mActivity)
quitLoginPage()
}
.build()
)
......@@ -536,7 +535,6 @@ object OneKeyLoginHelp {
// }
}
else -> { // 其它失败原因
ToastUtils.showShort("您的网络环境较差,请输入手机号码进行登录。")
mPhoneNumberAuthHelper?.hideLoginLoading()
// 跳转到原生登录界面
mActivity.runOnUiThread {
......
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