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
e94cf267
Commit
e94cf267
authored
Aug 11, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改昵称
1.修改简介
parent
7c369f43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
23 deletions
+59
-23
ModifyInfoActivity.kt
m-user/src/main/java/com/yidianling/user/mine/ModifyInfoActivity.kt
+57
-23
user_mine_activity_set_info.xml
m-user/src/main/res/layout/user_mine_activity_set_info.xml
+1
-0
colors.xml
ydl-platform/src/main/res/values/colors.xml
+1
-0
No files found.
m-user/src/main/java/com/yidianling/user/mine/ModifyInfoActivity.kt
View file @
e94cf267
...
...
@@ -67,6 +67,7 @@ class ModifyInfoActivity : BaseActivity() {
if
(
INTRODUCTION
==
from
)
{
tb_title_bar
.
title
=
"简介"
det_set_info
.
layoutParams
.
height
=
RxImageTool
.
dp2px
(
180f
)
det_set_info
.
hint
=
"一句话介绍下自己"
}
val
userInfo
=
findRouteService
(
IUserService
::
class
.
java
).
getUserInfo
()
det_set_info
.
setText
(
userInfo
?.
nick_name
)
...
...
@@ -99,22 +100,9 @@ class ModifyInfoActivity : BaseActivity() {
tv_tip1
.
visible
()
tv_tip1
.
text
=
"七天内可修改一次昵称"
iv_warn
.
visible
()
tv_tip2
.
visible
()
tv_tip2
.
text
=
SpannableString
(
"审核失败 ,昵称中含有违规文字。如有疑问联系客服小壹"
).
also
{
it
.
setSpan
(
ForegroundColorSpan
(
resources
.
getColor
(
R
.
color
.
color_1DA1F2
)),
22
,
it
.
length
,
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
}
tv_tip2
.
setOnClickListener
{
// 客服
ARouter
.
getInstance
().
navigation
(
IImService
::
class
.
java
).
startKefuChat
(
this
,
""
,
0
,
0
)
}
customerService
(
"审核失败 ,昵称中含有违规文字。如有疑问联系客服小壹"
)
}
3
->
{
// 审核成功
3
->
{
// 审核成功
|| 提交审核
if
(
last7Day
)
{
tv_tip1
.
visible
()
tv_tip1
.
text
=
"抱歉,七天内只能修改一次昵称"
...
...
@@ -127,31 +115,57 @@ class ModifyInfoActivity : BaseActivity() {
"抱歉,七天内只能修改一次"
)
}
det_set_info
.
setText
(
modifyAfter
)
userInfo
?.
nick_name
=
modifyAfter
modifyAfter
?.
let
{
det_set_info
.
setText
(
it
)
userInfo
?.
nick_name
=
it
}
}
else
{
tv_tip1
.
visible
()
tv_tip1
.
text
=
"七天内可修改一次昵称"
tb_title_bar
.
setRightTextColor
(
resources
.
getColor
(
R
.
color
.
color_1DA1F2
))
tb_title_bar
.
setOnRightTextClick
{
_
:
View
?,
_
:
Boolean
->
if
(
checkInput
())
{
modifyUserBaseInfo
(
101
)
{
ToastUtil
.
toastShort
(
"提交成功,昵称审核中,预计24小时内审核完成"
)
setResult
(
RESULT_OK
,
intent
)
finish
()
}
}
}
}
}
}
}
else
if
(
INTRODUCTION
==
from
)
{
when
(
auditStatus
)
{
1
->
{
// 审核中
tb_title_bar
.
setRightTextColor
(
resources
.
getColor
(
R
.
color
.
color_9d9ea7
))
tb_title_bar
.
isEnabled
=
false
det_set_info
.
setText
(
modifyAfter
)
det_set_info
.
keyListener
=
null
det_set_info
.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_9d9ea7
))
det_set_info
.
setOnClickListener
{
ToastUtil
.
toastShort
(
"简介审核中,预计24小时内审核完成"
)
}
tv_tip2
.
visible
()
tv_tip2
.
text
=
"审核中 预计24小时内审核完成,暂无法修改"
}
2
->
{
// 审核失败
tb_title_bar
.
setRightTextColor
(
resources
.
getColor
(
R
.
color
.
color_1DA1F2
))
iv_warn
.
visible
()
customerService
(
"审核失败,简介中含违规文字如有疑问联系客服小壹"
)
}
3
->
{
// 审核成功
3
->
{
// 审核成功 || 提交审核
modifyAfter
?.
let
{
det_set_info
.
setText
(
it
)
userInfo
?.
description
=
it
}
tb_title_bar
.
setRightTextColor
(
resources
.
getColor
(
R
.
color
.
color_1DA1F2
))
tb_title_bar
.
setOnClickListener
{
showProgressDialog
(
"保存中"
)
modifyUserBaseInfo
(
103
)
{
dismissProgressDialog
()
ToastUtil
.
toastShort
(
"提交成功,简介审核中,预计24小时内审核完成"
)
userInfo
?.
description
=
finish
()
}
}
}
...
...
@@ -160,6 +174,26 @@ class ModifyInfoActivity : BaseActivity() {
})
}
/**
* 客服提示
*/
private
fun
customerService
(
tip
:
String
)
{
tv_tip2
.
visible
()
tv_tip2
.
text
=
SpannableString
(
tip
).
also
{
it
.
setSpan
(
ForegroundColorSpan
(
resources
.
getColor
(
R
.
color
.
color_1DA1F2
)),
it
.
indexOf
(
"客服"
),
it
.
length
,
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
}
tv_tip2
.
setOnClickListener
{
// 客服
ARouter
.
getInstance
().
navigation
(
IImService
::
class
.
java
).
startKefuChat
(
this
,
""
,
0
,
0
)
}
}
private
fun
checkInput
():
Boolean
{
if
(
det_set_info
.
text
.
isEmpty
())
{
ToastUtil
.
toastShort
(
"请输入昵称"
)
...
...
m-user/src/main/res/layout/user_mine_activity_set_info.xml
View file @
e94cf267
...
...
@@ -32,6 +32,7 @@
android:id=
"@+id/det_set_info"
android:layout_width=
"match_parent"
android:layout_height=
"55dp"
android:textColorHint=
"@color/color_C3C4CA"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:background=
"@drawable/bg_corner_8_white"
...
...
ydl-platform/src/main/res/values/colors.xml
View file @
e94cf267
...
...
@@ -132,5 +132,6 @@
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"color_9d9ea7"
>
#9D9EA7
</color>
<color
name=
"color_C3C4CA"
>
#C3C4CA
</color>
</resources>
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