Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
0dfb004c
Commit
0dfb004c
authored
Mar 09, 2020
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新用户项目基本完成
parent
3746722c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
12 deletions
+17
-12
config.gradle
config.gradle
+4
-4
LoginUtils.kt
m-user/src/main/java/com/yidianling/user/LoginUtils.kt
+4
-4
StatusUtils.java
m-user/src/main/java/com/yidianling/user/StatusUtils.java
+6
-3
RegisterAndLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
+3
-1
No files found.
config.gradle
View file @
0dfb004c
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
fals
e
dev_mode
=
tru
e
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.1
5.6
"
,
"m-im"
:
"0.0.1
6.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"
,
...
...
m-user/src/main/java/com/yidianling/user/LoginUtils.kt
View file @
0dfb004c
...
...
@@ -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
)
...
...
m-user/src/main/java/com/yidianling/user/StatusUtils.java
View file @
0dfb004c
...
...
@@ -2,13 +2,16 @@ package com.yidianling.user;
/**
* 部分实时状态记录类
* isFirstLogin && isFromGuide 表示为注册前置且进行了注册
*/
public
class
StatusUtils
{
/**
* 是否是
第一次登录状态记录
* 是否是
注册
*/
public
static
boolean
isFirstLogin
=
false
;
/**
* 是否是第一次打开App
*/
public
static
boolean
isFromGuide
=
false
;
}
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
View file @
0dfb004c
...
...
@@ -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
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment