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
0239c319
Commit
0239c319
authored
Mar 31, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:强绑手机号优化
parent
178501b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
12 deletions
+21
-12
BindPhoneJavaParam.kt
m-user/src/main/java/com/yidianling/user/http/request/BindPhoneJavaParam.kt
+3
-1
BindPhoneActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/BindPhoneActivity.kt
+18
-11
No files found.
m-user/src/main/java/com/yidianling/user/http/request/BindPhoneJavaParam.kt
View file @
0239c319
...
...
@@ -13,5 +13,6 @@ data class BindPhoneJavaParam(
var
phoneNumber
:
String
,
//手机号
var
verifyCode
:
String
,
// 验证码
var
uid
:
String
,
var
type
:
Int
=
2
//2:Android
var
type
:
Int
=
2
,
//2:Android
var
transferFlag
:
Int
=
0
// 默认为0,1表示需要转换x账号到y账号触发 1800010011 code提醒触发重新登录标记
)
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/ui/login/BindPhoneActivity.kt
View file @
0239c319
...
...
@@ -67,16 +67,7 @@ class BindPhoneActivity : BaseActivity() {
mIsForceBindPhone
=
intent
.
getBooleanExtra
(
"is_force_bind_phone"
,
false
)
mIsFromGuide
=
intent
.
getBooleanExtra
(
"is_from_guide"
,
false
)
iv_back
.
setOnClickListener
{
if
(
mIsForceBindPhone
)
{
//清除UserInfo
setUserinfo
(
null
)
clearImData
()
logout
()
EventBus
.
getDefault
().
post
(
RefreshRecentContactListEvent
())
finish
()
}
else
{
LoginUtils
.
loginSuccessOperate
(
this
)
}
onBackPressed
()
}
tv_country_code
.
setOnClickListener
{
val
intent
=
Intent
(
this
,
CountryListActivity
::
class
.
java
)
...
...
@@ -229,7 +220,7 @@ class BindPhoneActivity : BaseActivity() {
val
phone
=
et_phone_number
.
text
.
toString
().
replace
(
" "
,
""
)
val
code
=
et_code
.
text
.
toString
()
val
bindPhoneParams
=
BindPhoneJavaParam
(
""
,
countryCode
,
phone
,
code
,
UserHelper
.
getUserInfo
()
!!
.
uid
!!
)
BindPhoneJavaParam
(
""
,
countryCode
,
phone
,
code
,
UserHelper
.
getUserInfo
()
!!
.
uid
!!
,
transferFlag
=
1
)
LoginApiRequestUtil
.
bindPhone
(
bindPhoneParams
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
...
...
@@ -254,6 +245,9 @@ class BindPhoneActivity : BaseActivity() {
}
else
{
finish
()
}
}
else
if
(
it
.
code
==
1800010011
){
RegisterAndLoginActivity
.
startFromGuide
(
this
,
false
,
mIsFromGuide
)
finish
()
}
else
{
ToastUtil
.
toastShort
(
it
.
msg
)
//服务端返回{验证码错误&异常}信息
}
...
...
@@ -262,6 +256,19 @@ class BindPhoneActivity : BaseActivity() {
})
}
override
fun
onBackPressed
()
{
if
(
mIsForceBindPhone
)
{
//清除UserInfo
setUserinfo
(
null
)
clearImData
()
logout
()
EventBus
.
getDefault
().
post
(
RefreshRecentContactListEvent
())
finish
()
}
else
{
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