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
d3d16055
Commit
d3d16055
authored
Sep 17, 2020
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:去除无用导包
parent
4f7c7e1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
9 deletions
+50
-9
VerificationCodeActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/VerificationCodeActivity.kt
+50
-9
No files found.
m-user/src/main/java/com/yidianling/user/ui/login/VerificationCodeActivity.kt
View file @
d3d16055
...
...
@@ -10,6 +10,7 @@ import android.view.View
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.ActivityManager
import
com.ydl.ydlcommon.utils.DeviceTool
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...
...
@@ -40,7 +41,9 @@ import java.util.concurrent.TimeUnit
* @Company 壹点灵
* @date 2018/11/29
*/
class
VerificationCodeActivity
:
BaseMvpActivity
<
IVerificationCodeContract
.
View
,
IVerificationCodeContract
.
Presenter
>(),
IVerificationCodeContract
.
View
{
class
VerificationCodeActivity
:
BaseMvpActivity
<
IVerificationCodeContract
.
View
,
IVerificationCodeContract
.
Presenter
>(),
IVerificationCodeContract
.
View
{
private
var
codeType
=
STATUS_LOGIN_BY_CODE
//页面状态: 1 忘记密码界面 2验证码登录界面
private
var
userPhoneNumber
:
String
?
=
null
...
...
@@ -66,7 +69,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
/**
* @param isBindPhone 是否是绑定手机号
*/
fun
start
(
activity
:
Activity
,
phone
:
String
,
countryCode
:
String
,
type
:
Int
,
isBindPhone
:
Boolean
)
{
fun
start
(
activity
:
Activity
,
phone
:
String
,
countryCode
:
String
,
type
:
Int
,
isBindPhone
:
Boolean
)
{
if
(
TextUtils
.
isEmpty
(
phone
))
{
ToastUtil
.
toastShort
(
"手机号不能为空"
)
return
...
...
@@ -83,7 +92,14 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
* @param isBindPhone 是否是绑定手机号
* @param hasPassword 是否有密码
*/
fun
start
(
activity
:
Activity
,
phone
:
String
,
countryCode
:
String
,
type
:
Int
,
isBindPhone
:
Boolean
,
hasPassword
:
Boolean
)
{
fun
start
(
activity
:
Activity
,
phone
:
String
,
countryCode
:
String
,
type
:
Int
,
isBindPhone
:
Boolean
,
hasPassword
:
Boolean
)
{
if
(
TextUtils
.
isEmpty
(
phone
))
{
ToastUtil
.
toastShort
(
"手机号不能为空"
)
return
...
...
@@ -169,7 +185,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
if
(
ActivityManager
.
getInstance
().
getSecondTaskActivity
()
==
null
)
{
closeAnim
(
true
)
}
else
{
if
(
ActivityManager
.
getInstance
().
getSecondTaskActivity
()
is
InputPassWordActivity
)
{
if
(
ActivityManager
.
getInstance
()
.
getSecondTaskActivity
()
is
InputPassWordActivity
)
{
closeAnim
(
false
)
}
else
{
closeAnim
(
true
)
...
...
@@ -197,7 +215,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
if
(
ActivityManager
.
getInstance
().
getSecondTaskActivity
()
==
null
)
{
closeAnim
(
true
)
}
else
{
if
(
ActivityManager
.
getInstance
().
getSecondTaskActivity
()
is
InputPassWordActivity
)
{
if
(
ActivityManager
.
getInstance
()
.
getSecondTaskActivity
()
is
InputPassWordActivity
)
{
closeAnim
(
false
)
}
else
{
closeAnim
(
true
)
...
...
@@ -220,7 +240,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
val
msgCode
=
pc_1
.
phoneCode
if
(
codeType
==
STATUS_LOGIN_BY_CODE
)
{
//验证码登录界面
if
(
isBindPhone
)
{
var
param
=
BindPhoneJavaParam
(
""
,
countryCode
!!
,
userPhoneNumber
!!
,
msgCode
,
UserHelper
.
getUserInfo
()
!!
.
uid
!!
)
var
param
=
BindPhoneJavaParam
(
""
,
countryCode
!!
,
userPhoneNumber
!!
,
msgCode
,
UserHelper
.
getUserInfo
()
!!
.
uid
!!
)
mPresenter
.
bindPhone
(
param
)
}
else
{
mPresenter
.
loginByMsgCode
(
userPhoneNumber
!!
,
countryCode
!!
,
msgCode
)
...
...
@@ -232,7 +258,11 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
override
fun
baiduActionBury
()
{
ActionCountUtils
.
baiduCount
(
UserBIConstants
.
APP_REGISTER_PAGE
,
UserBIConstants
.
POSITION_CODE_REGISTER_CLICK
,
25
)
ActionCountUtils
.
baiduCount
(
UserBIConstants
.
APP_REGISTER_PAGE
,
UserBIConstants
.
POSITION_CODE_REGISTER_CLICK
,
25
)
}
/**
...
...
@@ -299,7 +329,12 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
},
{
tv_countdown_time
.
isEnabled
=
true
tv_countdown_time
.
text
=
"重新发送"
tv_countdown_time
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_color_2EB0FF
))
tv_countdown_time
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_color_2EB0FF
)
)
})
}
...
...
@@ -307,7 +342,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
* 重置密码的验证码校验成功
*/
override
fun
checkResetCodeSuccess
(
code
:
String
)
{
InputPassWordActivity
.
start
(
this
,
userPhoneNumber
!!
,
countryCode
!!
,
InputPassWordActivity
.
STATUS_SET_PWD
,
code
)
InputPassWordActivity
.
start
(
this
,
userPhoneNumber
!!
,
countryCode
!!
,
InputPassWordActivity
.
STATUS_SET_PWD
,
code
)
overridePendingTransition
(
0
,
0
)
}
...
...
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