Commit c48beb55 by 王佳洋

合并修改昵称

parent 78398331
...@@ -7,6 +7,7 @@ import com.ydl.ydlcommon.data.http.BaseResponse ...@@ -7,6 +7,7 @@ import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.user.api.bean.UserResponseBean import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.CollectFocusItemBean import com.yidianling.user.bean.CollectFocusItemBean
import com.yidianling.user.http.LoginApiRequestUtil.Companion.LOGIN_USER_PORT import com.yidianling.user.http.LoginApiRequestUtil.Companion.LOGIN_USER_PORT
import com.yidianling.user.http.request.UserModifyAuditRespDto
import com.yidianling.user.http.response.* import com.yidianling.user.http.response.*
import com.yidianling.user.mine.bean.RedPacketId import com.yidianling.user.mine.bean.RedPacketId
import io.reactivex.Observable import io.reactivex.Observable
...@@ -251,4 +252,16 @@ interface UserApi { ...@@ -251,4 +252,16 @@ interface UserApi {
@POST("login/v2/is_need_strong_bind") @POST("login/v2/is_need_strong_bind")
@Headers( YDL_DOMAIN+ YDL_DOMAIN_LOGIN_BASE_URL, LOGIN_USER_PORT) @Headers( YDL_DOMAIN+ YDL_DOMAIN_LOGIN_BASE_URL, LOGIN_USER_PORT)
fun isNeedForceBindPhone(@Body map: Map<String,String>): Observable<BaseAPIResponse<Boolean>> fun isNeedForceBindPhone(@Body map: Map<String,String>): Observable<BaseAPIResponse<Boolean>>
/**
* 修改昵称、头像、简介等基本信息
*/
@POST("user/v1/baseInfo/modify")
fun modifyUserBaseInfo(@Body map: Map<String,String>): Observable<BaseAPIResponse<Boolean>>
/**
* 获取用户审核信息
*/
@POST("user/v1/getUserAuditInfo")
fun getUserAuditInfo(@Body map: Map<String,String>): Observable<BaseAPIResponse<UserModifyAuditRespDto>>
} }
\ No newline at end of file
...@@ -18,6 +18,7 @@ import com.yidianling.user.mine.bean.RedPacketId ...@@ -18,6 +18,7 @@ import com.yidianling.user.mine.bean.RedPacketId
import com.yidianling.user.mine.bean.RedPacketIdCmd import com.yidianling.user.mine.bean.RedPacketIdCmd
import com.yidianling.user.http.response.* import com.yidianling.user.http.response.*
import io.reactivex.Observable import io.reactivex.Observable
import retrofit2.http.Body
/** /**
* author : Zhangwenchao * author : Zhangwenchao
...@@ -84,4 +85,8 @@ interface UserHttp { ...@@ -84,4 +85,8 @@ interface UserHttp {
/**用户注销账号*/ /**用户注销账号*/
fun accountLogOff(param: UserForbidLoginParam):Observable<BaseAPIResponse<Boolean>> fun accountLogOff(param: UserForbidLoginParam):Observable<BaseAPIResponse<Boolean>>
fun modifyUserBaseInfo(param: ModifyBaseInfo): Observable<BaseAPIResponse<Boolean>>
fun getUserAuditInfo(param: ModifyBaseInfo): Observable<BaseAPIResponse<UserModifyAuditRespDto>>
} }
\ No newline at end of file
package com.yidianling.user.http.request
import com.ydl.ydlcommon.data.http.BaseCommand
data class ModifyBaseInfo(val modifyValue: String?,
val type: Int // 101:用户昵称 102:用户头像 103:用户简介
) : BaseCommand()
\ No newline at end of file
package com.yidianling.user.http.request
import com.ydl.ydlcommon.data.http.BaseCommand
data class UserModifyAuditRespDto(
val auditReason: String?, // 审核原因
val auditStatus: Int, // 审核状态 1待审核,2审核失败,3已审核
val auditTime: String?, // 审核时间
val auditor: String?, // 审核人
val auditorId: String?, // 审核人id
val createTime: String?, // 申请时间
val id: Int,
val last7Day: Boolean, // 最近7天申请修改
val modifyAfter: String?, // 变更后
val modifyBefore: String?, // 变更前
val modifyField: String? // 变更字段
) : BaseCommand()
\ No newline at end of file
...@@ -7,11 +7,13 @@ import android.text.style.ForegroundColorSpan ...@@ -7,11 +7,13 @@ 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.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
import com.ydl.ydlcommon.bean.StatusBarOptions 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.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
...@@ -22,7 +24,6 @@ import com.yidianling.user.http.request.ModifyBaseInfo ...@@ -22,7 +24,6 @@ import com.yidianling.user.http.request.ModifyBaseInfo
import com.yidianling.user.http.request.UserModifyAuditRespDto import com.yidianling.user.http.request.UserModifyAuditRespDto
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.user_mine_activity_set_info.*
/** /**
* 昵称修改 * 昵称修改
...@@ -40,10 +41,20 @@ class ModifyInfoActivity : BaseActivity() { ...@@ -40,10 +41,20 @@ class ModifyInfoActivity : BaseActivity() {
AnimationUtils.loadAnimation(this, R.anim.user_mine_shake) AnimationUtils.loadAnimation(this, R.anim.user_mine_shake)
} }
private lateinit var det_set_info: DeleteEditTextView
private lateinit var tv_tip1: TextView
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() {
det_set_info = findViewById(R.id.det_set_info)
tv_tip1 = findViewById(R.id.tv_tip1)
}
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun initDataAndEvent() { override fun initDataAndEvent() {
findView()
val from = intent.getIntExtra("from", 0) val from = intent.getIntExtra("from", 0)
val userInfo = findRouteService(IUserService::class.java).getUserInfo() val userInfo = findRouteService(IUserService::class.java).getUserInfo()
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
...@@ -8,31 +9,63 @@ ...@@ -8,31 +9,63 @@
<com.ydl.ydlcommon.view.TitleBar <com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title_bar" android:id="@+id/tb_title_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height" android:layout_height="44dp"
app:pa_left_text="取消"
app:pa_right_text="保存"
android:background="@color/platform_white" android:background="@color/platform_white"
app:pa_title_text="title" /> app:pa_left_start_icon="@drawable/platform_common_back"
app:pa_right_text="保存"
app:pa_title_text="修改昵称" />
<ImageView <TextView
android:id="@+id/tv_tip1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width" android:layout_height="wrap_content"
android:layout_marginTop="14dp" android:layout_marginStart="26dp"
android:background="#EDEDED" /> android:layout_marginTop="16dp"
android:layout_marginBottom="12dp"
android:textColor="@color/color_9d9ea7"
android:textSize="14sp"
android:visibility="gone"
tools:text="七天内可修改一次昵称"
tools:visibility="visible" />
<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="wrap_content"
android:background="@android:color/white" android:layout_marginStart="16dp"
android:padding="@dimen/platform_default_dis_size" android:layout_marginEnd="16dp"
android:background="@drawable/bg_corner_8_white"
android:paddingStart="10dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:singleLine="true" /> android:singleLine="true" />
<ImageView <LinearLayout
android:layout_marginTop="12dp"
android:layout_marginStart="26dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width" android:layout_height="wrap_content"
android:background="#EDEDED" /> android:orientation="horizontal">
<ImageView
android:id="@+id/iv_warn"
android:visibility="gone"
tools:visibility="visible"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:src="@drawable/modify_warn"/>
<TextView
android:id="@+id/tv_tip2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/color_9d9ea7"
android:textSize="12sp"
android:visibility="gone"
tools:text="审核中,预计24小时内审核完成,暂无法修改。"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout> </LinearLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment