Commit dea5ace6 by 刘鹏

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

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