Commit 0dfb004c by 徐健

新用户项目基本完成

parent 3746722c
ext {
kotlin_version = "1.3.21"
dev_mode = false
dev_mode = true
ydl_app = [
appName : "心理咨询壹点灵",
......@@ -45,16 +45,16 @@ ext {
"m-confide" : "0.0.48.6",
"m-consultant" : "0.0.57.4",
"m-fm" : "0.0.29.3",
"m-user" : "0.0.59.6",
"m-user" : "0.0.59.8",
"m-home" : "0.0.19.1",
"m-im" : "0.0.15.6",
"m-im" : "0.0.16.0",
"m-dynamic" : "0.0.6.1",
"m-muse" : "0.0.28.9",
"m-tests" : "0.0.24.0",
"m-course" : "0.0.42.0",
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------y-
"m-audioim-api" : "0.0.5",
"m-confide-api" : "0.0.1.1",
"m-consultant-api": "0.0.4",
......
......@@ -100,12 +100,12 @@ object LoginUtils {
}
@JvmStatic
fun LoginSuccessOperate(activity: Activity, isFromGuide: Boolean = false) {
fun LoginSuccessOperate(activity: Activity) {
val size = ActivityManager.getActivitySize()
if (size <= 2) {//当前stack只有两个页面,必然没有MainActivity
ActivityManager.finishAll()
if (StatusUtils.isFirstLogin) {
if (StatusUtils.isFirstLogin && StatusUtils.isFromGuide) {
activity.startActivity(Intent(activity, CollectSexAndBirthActivity::class.java))
}else {
UserIn.mainIntent(activity)
}
......@@ -133,7 +133,7 @@ object LoginUtils {
FingerPrintUtil.instance().setCurrentUnLockTime(System.currentTimeMillis())
} else {
ActivityManager.finishAll()
if (StatusUtils.isFirstLogin) {
if (StatusUtils.isFirstLogin && StatusUtils.isFromGuide) {
activity.startActivity(Intent(activity, CollectSexAndBirthActivity::class.java))
} else {
UserIn.mainIntent(activity)
......
......@@ -2,13 +2,16 @@ package com.yidianling.user;
/**
* 部分实时状态记录类
* isFirstLogin && isFromGuide 表示为注册前置且进行了注册
*/
public class StatusUtils {
/**
* 是否是第一次登录状态记录
* 是否是注册
*/
public static boolean isFirstLogin = false;
/**
* 是否是第一次打开App
*/
public static boolean isFromGuide = false;
}
......@@ -40,6 +40,7 @@ import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils
import com.yidianling.user.R
import com.yidianling.user.StatusUtils
import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.AliAuthBean
......@@ -127,6 +128,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
override fun initDataAndEvent() {
isUmengLoginState = intent.getBooleanExtra(BIND_PHONE, false)
isFromGuide = intent.getBooleanExtra(IS_FROM_GUIDE, false)
StatusUtils.isFromGuide = isFromGuide
setWindowStatusBarColor()
initAuthHelper()
......@@ -468,7 +470,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
tv_reg_title.text = "手机号绑定"
tv_protocol.visibility = View.GONE
} else {
LoginUtils.LoginSuccessOperate(this, isFromGuide)
LoginUtils.LoginSuccessOperate(this)
}
}
......
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