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
58b1ac72
Commit
58b1ac72
authored
Aug 11, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并修改昵称
parent
c48beb55
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
ModifyInfoActivity.kt
m-user/src/main/java/com/yidianling/user/mine/ModifyInfoActivity.kt
+20
-7
bg_corner_8_white.xml
m-user/src/main/res/drawable/bg_corner_8_white.xml
+6
-0
user_mine_activity_set_info.xml
m-user/src/main/res/layout/user_mine_activity_set_info.xml
+1
-1
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 @
58b1ac72
...
@@ -7,6 +7,7 @@ import android.text.style.ForegroundColorSpan
...
@@ -7,6 +7,7 @@ import android.text.style.ForegroundColorSpan
import
android.view.View
import
android.view.View
import
android.view.animation.Animation
import
android.view.animation.Animation
import
android.view.animation.AnimationUtils
import
android.view.animation.AnimationUtils
import
android.widget.ImageView
import
android.widget.TextView
import
android.widget.TextView
import
com.alibaba.android.arouter.launcher.ARouter
import
com.alibaba.android.arouter.launcher.ARouter
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
...
@@ -14,6 +15,8 @@ import com.ydl.ydlcommon.bean.StatusBarOptions
...
@@ -14,6 +15,8 @@ import com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.view.DeleteEditTextView
import
com.ydl.ydlcommon.view.DeleteEditTextView
import
com.ydl.ydlcommon.view.TitleBar
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.user.R
import
com.yidianling.user.R
...
@@ -29,8 +32,8 @@ import io.reactivex.schedulers.Schedulers
...
@@ -29,8 +32,8 @@ import io.reactivex.schedulers.Schedulers
* 昵称修改
* 昵称修改
* 简介修改
* 简介修改
*/
*/
const
val
nickName
=
1
const
val
NICKNAME
=
1
const
val
introduction
=
2
const
val
INTRODUCTION
=
2
class
ModifyInfoActivity
:
BaseActivity
()
{
class
ModifyInfoActivity
:
BaseActivity
()
{
override
fun
getStatusViewOptions
():
StatusBarOptions
{
override
fun
getStatusViewOptions
():
StatusBarOptions
{
...
@@ -43,29 +46,37 @@ class ModifyInfoActivity : BaseActivity() {
...
@@ -43,29 +46,37 @@ class ModifyInfoActivity : BaseActivity() {
private
lateinit
var
det_set_info
:
DeleteEditTextView
private
lateinit
var
det_set_info
:
DeleteEditTextView
private
lateinit
var
tv_tip1
:
TextView
private
lateinit
var
tv_tip1
:
TextView
private
lateinit
var
tv_tip2
:
TextView
private
lateinit
var
tb_title_bar
:
TitleBar
private
lateinit
var
iv_warn
:
ImageView
override
fun
layoutResId
():
Int
=
R
.
layout
.
user_mine_activity_set_info
override
fun
layoutResId
():
Int
=
R
.
layout
.
user_mine_activity_set_info
private
fun
findView
()
{
private
fun
findView
()
{
det_set_info
=
findViewById
(
R
.
id
.
det_set_info
)
det_set_info
=
findViewById
(
R
.
id
.
det_set_info
)
tv_tip1
=
findViewById
(
R
.
id
.
tv_tip1
)
tv_tip1
=
findViewById
(
R
.
id
.
tv_tip1
)
tv_tip2
=
findViewById
(
R
.
id
.
tv_tip2
)
tb_title_bar
=
findViewById
(
R
.
id
.
tb_title_bar
)
iv_warn
=
findViewById
(
R
.
id
.
iv_warn
)
}
}
@SuppressLint
(
"SetTextI18n"
)
@SuppressLint
(
"SetTextI18n"
)
override
fun
initDataAndEvent
()
{
override
fun
initDataAndEvent
()
{
findView
()
findView
()
val
from
=
intent
.
getIntExtra
(
"from"
,
0
)
val
from
=
intent
.
getIntExtra
(
"from"
,
0
)
if
(
INTRODUCTION
==
from
)
{
det_set_info
.
layoutParams
.
height
=
RxImageTool
.
dp2px
(
180f
)
}
val
userInfo
=
findRouteService
(
IUserService
::
class
.
java
).
getUserInfo
()
val
userInfo
=
findRouteService
(
IUserService
::
class
.
java
).
getUserInfo
()
det_set_info
.
setText
(
userInfo
?.
nick_name
)
det_set_info
.
setText
(
userInfo
?.
nick_name
)
mDisposable
.
add
(
mDisposable
.
add
(
UserHttpImpl
.
getInstance
().
getUserAuditInfo
(
ModifyBaseInfo
(
null
,
101
))
getInstance
().
getUserAuditInfo
(
ModifyBaseInfo
(
null
,
if
(
NICKNAME
==
from
)
101
else
103
))
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
response
:
BaseAPIResponse
<
UserModifyAuditRespDto
>
->
.
subscribe
{
response
:
BaseAPIResponse
<
UserModifyAuditRespDto
>
->
if
(
response
.
code
==
"200"
)
{
if
(
response
.
code
!=
"200"
)
return
@subscribe
val
(
_
,
auditStatus
,
_
,
_
,
_
,
_
,
_
,
last7Day
,
modifyAfter
)
=
response
.
data
val
(
_
,
auditStatus
,
_
,
_
,
_
,
_
,
_
,
last7Day
,
modifyAfter
)
=
response
.
data
if
(
NICKNAME
==
from
)
{
if
(
last7Day
)
{
// 7天内
if
(
last7Day
)
{
// 7天内
tv_tip1
.
text
=
"抱歉,七天内只能修改一次昵称"
tv_tip1
.
text
=
"抱歉,七天内只能修改一次昵称"
tv_tip1
.
visibility
=
View
.
VISIBLE
tv_tip1
.
visibility
=
View
.
VISIBLE
...
@@ -137,6 +148,8 @@ class ModifyInfoActivity : BaseActivity() {
...
@@ -137,6 +148,8 @@ class ModifyInfoActivity : BaseActivity() {
}
}
}
}
}
}
}
else
if
(
INTRODUCTION
==
from
)
{
}
}
})
})
}
}
...
...
m-user/src/main/res/drawable/bg_corner_8_white.xml
0 → 100644
View file @
58b1ac72
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"8dp"
/>
<solid
android:color=
"@android:color/white"
/>
</shape>
\ No newline at end of file
m-user/src/main/res/layout/user_mine_activity_set_info.xml
View file @
58b1ac72
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<com.ydl.ydlcommon.view.DeleteEditTextView
<com.ydl.ydlcommon.view.DeleteEditTextView
android:id=
"@+id/det_set_info"
android:id=
"@+id/det_set_info"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
55dp
"
android:layout_marginStart=
"16dp"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:layout_marginEnd=
"16dp"
android:background=
"@drawable/bg_corner_8_white"
android:background=
"@drawable/bg_corner_8_white"
...
...
ydl-platform/src/main/res/values/colors.xml
View file @
58b1ac72
...
@@ -131,5 +131,6 @@
...
@@ -131,5 +131,6 @@
<color
name=
"color_EFEFF1"
>
#EFEFF1
</color>
<color
name=
"color_EFEFF1"
>
#EFEFF1
</color>
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"color_9d9ea7"
>
#9D9EA7
</color>
</resources>
</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