个人信息修改
This commit is contained in:
parent
d58eb5782a
commit
1ae185f9e1
@ -8,8 +8,19 @@
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="../../../../../layout/custom_preview.xml" value="0.1789568345323741" />
|
||||
<entry key="cm_utils/src/main/res/layout/base_activity.xml" value="0.2504528985507246" />
|
||||
<entry key="moduleactivity/src/main/res/layout/activity_detail.xml" value="0.3591485507246377" />
|
||||
<entry key="modulecultural/src/main/res/layout/activity_register_volunteer_single.xml" value="0.3591485507246377" />
|
||||
<entry key="modulemain/src/main/res/drawable/shape_main_bottom_bg.xml" value="0.2985" />
|
||||
<entry key="modulemain/src/main/res/layout/activity_choose_city.xml" value="0.2504528985507246" />
|
||||
<entry key="modulemain/src/main/res/layout/activity_main.xml" value="0.3591485507246377" />
|
||||
<entry key="modulemain/src/main/res/menu/bottom.xml" value="0.3651041666666667" />
|
||||
<entry key="modulemine/src/main/res/drawable/shp_rectangle_gray_df.xml" value="0.2985" />
|
||||
<entry key="modulemine/src/main/res/layout/activity_mine_info_detail.xml" value="0.2504528985507246" />
|
||||
<entry key="modulemine/src/main/res/layout/activity_mine_info_edit.xml" value="0.3591485507246377" />
|
||||
<entry key="modulemine/src/main/res/layout/activity_new_mine_info_edit.xml" value="0.23731884057971014" />
|
||||
<entry key="modulemine/src/main/res/layout/activity_new_mine_infor_detail.xml" value="0.3591485507246377" />
|
||||
<entry key="moduleplace/src/main/res/layout/activity_place_detail.xml" value="0.2504528985507246" />
|
||||
</map>
|
||||
</option>
|
||||
|
@ -3,13 +3,13 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file('/Users/adam/Documents/tengshi.jks')
|
||||
storeFile file('/Users/adam/Documents/work/tengshi.jks')
|
||||
storePassword 'aaa111!!!'
|
||||
keyAlias = 'tengshi'
|
||||
keyPassword 'aaa111!!!'
|
||||
}
|
||||
debug {
|
||||
storeFile file('/Users/adam/Documents/tengshi.jks')
|
||||
storeFile file('/Users/adam/Documents/work/tengshi.jks')
|
||||
storePassword 'aaa111!!!'
|
||||
keyAlias = 'tengshi'
|
||||
keyPassword 'aaa111!!!'
|
||||
|
@ -42,7 +42,7 @@ public class PathConfig {
|
||||
public static final String USER_TYPE_P = "e483f019-d971-49ac-b5fa-3314220da703";
|
||||
public static final String USER_TYPE_N = "bc405346-8714-4ded-89ac-9cc4d755f66a";
|
||||
public static final String USER_TYPE_X = "25affe67-134c-4a32-ba41-64b0cfedc782";
|
||||
// public static final String APP_VERSION_ID = "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4";
|
||||
// public static final String APP_VERSION_ID = "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4";
|
||||
public static final String APP_VERSION_ID = "10e53e1e-2c21-4b5d-b81f-b514abece994";//测试
|
||||
|
||||
public static final String NEWS_ID = "f497904b-7727-4832-891c-604c36ae4167";//文化动态ID
|
||||
@ -164,6 +164,8 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_CULTURAL_MINE_SETTING = "/modulemine/activity/setting";//设置
|
||||
public static final String PATH_MODULE_MINE_MINEINFO_EDIT = "/modulemine/activity/mineinfoedit";//个人信息编辑
|
||||
public static final String PATH_MODULE_MINE_MINEINFO_DETAIL = "/modulemine/activity/mineinfodetail";//个人信息详情
|
||||
public static final String PATH_MODULE_MINE_MINEINFO_EDIT_NEW = "/modulemine/activity/userInfoEdit";//个人详细信息编辑
|
||||
public static final String PATH_MODULE_MINE_MINEINFO_DETAIL_NEW = "/modulemine/activity/userInfoDetail";//个人详细信息
|
||||
|
||||
public static final String PATH_MODULE_MINE_CHANGE_PHONE = "/modulemine/activity/changephone";//修改手机号
|
||||
public static final String PATH_MODULE_MINE_CHANGE_PWD = "/modulemine/activity/changepwd";//修改密码
|
||||
@ -214,11 +216,12 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_CMUTILS_CONDITION = "/modulecmutils/activity/condition";//条件查询activ
|
||||
|
||||
//=====================字典ID==========================
|
||||
public static final String DID_WORK = "";//工作状态
|
||||
public static final String DID_PI = "";//
|
||||
public static final String DID_EDU = "";//学历
|
||||
public static final String DID_WORK = "3a019a6f-d1f7-4a45-8426-e2300f533bca";//工作状态
|
||||
public static final String DID_PI = "f9ff0a87-7ccf-4257-9471-f337e9c2b857";//政治面貌
|
||||
public static final String DID_EDU = "7cf06b2e-418e-4be8-b4f8-be49cef7d1f0";//学历
|
||||
public static final String DID_NATIVE = "";//籍贯
|
||||
public static final String DID_NATION = "";//民族
|
||||
public static final String DID_SEX = "90f09612-9deb-4229-8d73-d6a865056cde";//性别
|
||||
public static final String DID_NATION = "e64a01f7-dac9-40da-a2fe-50225fb287aa";//民族
|
||||
public static final String DID_ADDRESS = "";//地址
|
||||
public static final String DID_SERVICE_AREA = "761d8633-3c2f-4e92-b32d-fb50d3dc07b7";//服务区域
|
||||
public static final String DID_SERVICE_TYPE = "a223b308-014a-4e89-93fa-035a564e7fda";//服务类别
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.sucstepsoft.cm_utils.core.beans;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/8/15 - 19:04
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class ChangeUserInfoBean {
|
||||
|
||||
/**
|
||||
* avatar : string
|
||||
* email : string
|
||||
* name : string
|
||||
* phone : string
|
||||
*/
|
||||
|
||||
private String avatar;
|
||||
private String email;
|
||||
private String name;
|
||||
private String phone;
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
}
|
@ -0,0 +1,192 @@
|
||||
package com.sucstepsoft.cm_utils.core.beans;
|
||||
|
||||
public class SaveUserInfoBean {
|
||||
// @ApiModelProperty(name = "userRealName", value = "姓名")
|
||||
private String userRealName;
|
||||
// @ApiModelProperty(name = "userSex", value = "性别")
|
||||
private String userSex;
|
||||
// @ApiModelProperty(name = "userIdCard", value = "身份证")
|
||||
private String userIdCard;
|
||||
// @ApiModelProperty(name = "userBirth", value = "生日")
|
||||
// @CheckEmptyAnnotation(name = "生日", verifyType = "date")
|
||||
private String userBirth;
|
||||
// @ApiModelProperty(name = "userNation", value = "民族")
|
||||
private String userNation;
|
||||
// @ApiModelProperty(name = "userNative", value = "籍贯")
|
||||
private String userNative;
|
||||
// @ApiModelProperty(name = "userEducation", value = "学历")
|
||||
private String userEducation;
|
||||
// @ApiModelProperty(name = "userPoliticsStatus", value = "政治面貌")
|
||||
private String userPoliticsStatus;
|
||||
// @ApiModelProperty(name = "userEmploymentSituation", value = "就业状况")
|
||||
private String userEmploymentSituation;
|
||||
// @ApiModelProperty(name = "userQq", value = "qq号")
|
||||
private String userQq;
|
||||
// @ApiModelProperty(name = "userWechat", value = "微信号")
|
||||
private String userWechat;
|
||||
// @ApiModelProperty(name = "userWeibo", value = "微博号")
|
||||
private String userWeibo;
|
||||
// @ApiModelProperty(name = "userLiveAddress", value = "现住址")
|
||||
private String userLiveAddress;
|
||||
// @ApiModelProperty(name = "userAddress", value = "详细地址")
|
||||
private String userAddress;
|
||||
// @ApiModelProperty(name = "userZipCode", value = "邮编")
|
||||
private String userZipCode;
|
||||
// @ApiModelProperty(name = "userIntroduction", value = "人员简介")
|
||||
private String userIntroduction;
|
||||
private String name;
|
||||
private String email;
|
||||
private String phone;
|
||||
|
||||
public String getUserRealName() {
|
||||
return userRealName;
|
||||
}
|
||||
|
||||
public void setUserRealName(String userRealName) {
|
||||
this.userRealName = userRealName;
|
||||
}
|
||||
|
||||
public String getUserSex() {
|
||||
return userSex;
|
||||
}
|
||||
|
||||
public void setUserSex(String userSex) {
|
||||
this.userSex = userSex;
|
||||
}
|
||||
|
||||
public String getUserIdCard() {
|
||||
return userIdCard;
|
||||
}
|
||||
|
||||
public void setUserIdCard(String userIdCard) {
|
||||
this.userIdCard = userIdCard;
|
||||
}
|
||||
|
||||
public String getUserBirth() {
|
||||
return userBirth;
|
||||
}
|
||||
|
||||
public void setUserBirth(String userBirth) {
|
||||
this.userBirth = userBirth;
|
||||
}
|
||||
|
||||
public String getUserNation() {
|
||||
return userNation;
|
||||
}
|
||||
|
||||
public void setUserNation(String userNation) {
|
||||
this.userNation = userNation;
|
||||
}
|
||||
|
||||
public String getUserNative() {
|
||||
return userNative;
|
||||
}
|
||||
|
||||
public void setUserNative(String userNative) {
|
||||
this.userNative = userNative;
|
||||
}
|
||||
|
||||
public String getUserEducation() {
|
||||
return userEducation;
|
||||
}
|
||||
|
||||
public void setUserEducation(String userEducation) {
|
||||
this.userEducation = userEducation;
|
||||
}
|
||||
|
||||
public String getUserPoliticsStatus() {
|
||||
return userPoliticsStatus;
|
||||
}
|
||||
|
||||
public void setUserPoliticsStatus(String userPoliticsStatus) {
|
||||
this.userPoliticsStatus = userPoliticsStatus;
|
||||
}
|
||||
|
||||
public String getUserEmploymentSituation() {
|
||||
return userEmploymentSituation;
|
||||
}
|
||||
|
||||
public void setUserEmploymentSituation(String userEmploymentSituation) {
|
||||
this.userEmploymentSituation = userEmploymentSituation;
|
||||
}
|
||||
|
||||
public String getUserQq() {
|
||||
return userQq;
|
||||
}
|
||||
|
||||
public void setUserQq(String userQq) {
|
||||
this.userQq = userQq;
|
||||
}
|
||||
|
||||
public String getUserWechat() {
|
||||
return userWechat;
|
||||
}
|
||||
|
||||
public void setUserWechat(String userWechat) {
|
||||
this.userWechat = userWechat;
|
||||
}
|
||||
|
||||
public String getUserWeibo() {
|
||||
return userWeibo;
|
||||
}
|
||||
|
||||
public void setUserWeibo(String userWeibo) {
|
||||
this.userWeibo = userWeibo;
|
||||
}
|
||||
|
||||
public String getUserLiveAddress() {
|
||||
return userLiveAddress;
|
||||
}
|
||||
|
||||
public void setUserLiveAddress(String userLiveAddress) {
|
||||
this.userLiveAddress = userLiveAddress;
|
||||
}
|
||||
|
||||
public String getUserAddress() {
|
||||
return userAddress;
|
||||
}
|
||||
|
||||
public void setUserAddress(String userAddress) {
|
||||
this.userAddress = userAddress;
|
||||
}
|
||||
|
||||
public String getUserZipCode() {
|
||||
return userZipCode;
|
||||
}
|
||||
|
||||
public void setUserZipCode(String userZipCode) {
|
||||
this.userZipCode = userZipCode;
|
||||
}
|
||||
|
||||
public String getUserIntroduction() {
|
||||
return userIntroduction;
|
||||
}
|
||||
|
||||
public void setUserIntroduction(String userIntroduction) {
|
||||
this.userIntroduction = userIntroduction;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ import com.sucstepsoft.cm_utils.core.beans.UserInfoFieldBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.UserLoginBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.BaseResponseBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.BaseUserInfo;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.UserExpandInfoBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.VersionBean;
|
||||
|
||||
import java.util.List;
|
||||
@ -33,7 +34,6 @@ import retrofit2.http.PUT;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.PartMap;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.Url;
|
||||
|
||||
/**
|
||||
@ -220,8 +220,15 @@ public interface BaseApiService {
|
||||
* 更新用户基本信息
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@PUT("app/user/updateuserinfo")
|
||||
Observable<BaseSuccessBean> editUserInfo(@Body RequestBody body, @Header("token") String token);
|
||||
@PUT("app/base/userexpand/update-byuserid/{userId}")
|
||||
Observable<BaseSuccessBean> editUserInfo(@Path("userId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取用户拓展信息
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@GET("app/base/userexpand/get-byuserid/{userId}")
|
||||
Observable<UserExpandInfoBean> getUserExpandInfo(@Path("userId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取用户基本信息
|
||||
@ -240,7 +247,7 @@ public interface BaseApiService {
|
||||
* PUT /app/user/updatephoneusername/{phone}
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@PUT("app/user/updatephoneusername/{phone}")
|
||||
@PUT("app/user/update-phone-username/{phone}")
|
||||
Observable<BaseSuccessBean> doChangePhone(@Body RequestBody body, @Path("phone") String phone, @Header("token") String token);
|
||||
|
||||
/**
|
||||
@ -248,7 +255,7 @@ public interface BaseApiService {
|
||||
* PUT /app/user/updateuserpassword
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@PUT("app/user/updateuserpassword")
|
||||
@PUT("app/user/update-password")
|
||||
Observable<BaseSuccessBean> doChangePwd(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
@ -269,6 +276,15 @@ public interface BaseApiService {
|
||||
@GET("app/volunteer/isvolunteer")
|
||||
Observable<BaseSuccessBean> getUserIsVolunteer(@Header("token") String token);
|
||||
|
||||
/**
|
||||
* 修改个人信息
|
||||
*
|
||||
* @param userInfo
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@PUT("app/user/update-avatar")
|
||||
Observable<BaseSuccessBean> doChangeUserInfo(@Body RequestBody userInfo, @Header("token") String token);
|
||||
|
||||
@GET
|
||||
Call<ResponseBody> downloadApk(@Url String url);
|
||||
|
@ -0,0 +1,419 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.bean;
|
||||
|
||||
public class UserExpandInfoBean {
|
||||
|
||||
private String departmentIds;
|
||||
private String departmentNames;
|
||||
private String gmtCreate;
|
||||
private String groupIds;
|
||||
private String groupNames;
|
||||
private String lastLoginAddress;
|
||||
private String lastLoginTime;
|
||||
private int loginType;
|
||||
private String positionIds;
|
||||
private String positionNames;
|
||||
private String roleIds;
|
||||
private String roleNames;
|
||||
private String userAddress;
|
||||
private String userAvatar;
|
||||
private String userBirth;
|
||||
private String userEducation;
|
||||
private String userEducationName;
|
||||
private String userEmail;
|
||||
private String userEmploymentSituation;
|
||||
private String userEmploymentSituationName;
|
||||
private String userExpandId;
|
||||
private String userExpiredDate;
|
||||
private String userId;
|
||||
private String userIdCard;
|
||||
private String userIntroduction;
|
||||
private String userLatitude;
|
||||
private String userLiveAddress;
|
||||
private String userLongitude;
|
||||
private String userName;
|
||||
private String userNation;
|
||||
private String userNationName;
|
||||
private String userNative;
|
||||
private String userPhone;
|
||||
private String userPoliticsStatus;
|
||||
private String userPoliticsStatusName;
|
||||
private String userQq;
|
||||
private String userRealName;
|
||||
private String userSex;
|
||||
private String userSexName;
|
||||
private int userState;
|
||||
private int userType;
|
||||
private String userUKey;
|
||||
private String userUsername;
|
||||
private String userWechat;
|
||||
private String userWeibo;
|
||||
private String userZipCode;
|
||||
|
||||
public String getDepartmentIds() {
|
||||
return departmentIds;
|
||||
}
|
||||
|
||||
public void setDepartmentIds(String departmentIds) {
|
||||
this.departmentIds = departmentIds;
|
||||
}
|
||||
|
||||
public String getDepartmentNames() {
|
||||
return departmentNames;
|
||||
}
|
||||
|
||||
public void setDepartmentNames(String departmentNames) {
|
||||
this.departmentNames = departmentNames;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getGroupIds() {
|
||||
return groupIds;
|
||||
}
|
||||
|
||||
public void setGroupIds(String groupIds) {
|
||||
this.groupIds = groupIds;
|
||||
}
|
||||
|
||||
public String getGroupNames() {
|
||||
return groupNames;
|
||||
}
|
||||
|
||||
public void setGroupNames(String groupNames) {
|
||||
this.groupNames = groupNames;
|
||||
}
|
||||
|
||||
public String getLastLoginAddress() {
|
||||
return lastLoginAddress;
|
||||
}
|
||||
|
||||
public void setLastLoginAddress(String lastLoginAddress) {
|
||||
this.lastLoginAddress = lastLoginAddress;
|
||||
}
|
||||
|
||||
public String getLastLoginTime() {
|
||||
return lastLoginTime;
|
||||
}
|
||||
|
||||
public void setLastLoginTime(String lastLoginTime) {
|
||||
this.lastLoginTime = lastLoginTime;
|
||||
}
|
||||
|
||||
public int getLoginType() {
|
||||
return loginType;
|
||||
}
|
||||
|
||||
public void setLoginType(int loginType) {
|
||||
this.loginType = loginType;
|
||||
}
|
||||
|
||||
public String getPositionIds() {
|
||||
return positionIds;
|
||||
}
|
||||
|
||||
public void setPositionIds(String positionIds) {
|
||||
this.positionIds = positionIds;
|
||||
}
|
||||
|
||||
public String getPositionNames() {
|
||||
return positionNames;
|
||||
}
|
||||
|
||||
public void setPositionNames(String positionNames) {
|
||||
this.positionNames = positionNames;
|
||||
}
|
||||
|
||||
public String getRoleIds() {
|
||||
return roleIds;
|
||||
}
|
||||
|
||||
public void setRoleIds(String roleIds) {
|
||||
this.roleIds = roleIds;
|
||||
}
|
||||
|
||||
public String getRoleNames() {
|
||||
return roleNames;
|
||||
}
|
||||
|
||||
public void setRoleNames(String roleNames) {
|
||||
this.roleNames = roleNames;
|
||||
}
|
||||
|
||||
public String getUserAddress() {
|
||||
return userAddress;
|
||||
}
|
||||
|
||||
public void setUserAddress(String userAddress) {
|
||||
this.userAddress = userAddress;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public void setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
}
|
||||
|
||||
public String getUserBirth() {
|
||||
return userBirth;
|
||||
}
|
||||
|
||||
public void setUserBirth(String userBirth) {
|
||||
this.userBirth = userBirth;
|
||||
}
|
||||
|
||||
public String getUserEducation() {
|
||||
return userEducation;
|
||||
}
|
||||
|
||||
public void setUserEducation(String userEducation) {
|
||||
this.userEducation = userEducation;
|
||||
}
|
||||
|
||||
public String getUserEducationName() {
|
||||
return userEducationName;
|
||||
}
|
||||
|
||||
public void setUserEducationName(String userEducationName) {
|
||||
this.userEducationName = userEducationName;
|
||||
}
|
||||
|
||||
public String getUserEmail() {
|
||||
return userEmail;
|
||||
}
|
||||
|
||||
public void setUserEmail(String userEmail) {
|
||||
this.userEmail = userEmail;
|
||||
}
|
||||
|
||||
public String getUserEmploymentSituation() {
|
||||
return userEmploymentSituation;
|
||||
}
|
||||
|
||||
public void setUserEmploymentSituation(String userEmploymentSituation) {
|
||||
this.userEmploymentSituation = userEmploymentSituation;
|
||||
}
|
||||
|
||||
public String getUserEmploymentSituationName() {
|
||||
return userEmploymentSituationName;
|
||||
}
|
||||
|
||||
public void setUserEmploymentSituationName(String userEmploymentSituationName) {
|
||||
this.userEmploymentSituationName = userEmploymentSituationName;
|
||||
}
|
||||
|
||||
public String getUserExpandId() {
|
||||
return userExpandId;
|
||||
}
|
||||
|
||||
public void setUserExpandId(String userExpandId) {
|
||||
this.userExpandId = userExpandId;
|
||||
}
|
||||
|
||||
public String getUserExpiredDate() {
|
||||
return userExpiredDate;
|
||||
}
|
||||
|
||||
public void setUserExpiredDate(String userExpiredDate) {
|
||||
this.userExpiredDate = userExpiredDate;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserIdCard() {
|
||||
return userIdCard;
|
||||
}
|
||||
|
||||
public void setUserIdCard(String userIdCard) {
|
||||
this.userIdCard = userIdCard;
|
||||
}
|
||||
|
||||
public String getUserIntroduction() {
|
||||
return userIntroduction;
|
||||
}
|
||||
|
||||
public void setUserIntroduction(String userIntroduction) {
|
||||
this.userIntroduction = userIntroduction;
|
||||
}
|
||||
|
||||
public String getUserLatitude() {
|
||||
return userLatitude;
|
||||
}
|
||||
|
||||
public void setUserLatitude(String userLatitude) {
|
||||
this.userLatitude = userLatitude;
|
||||
}
|
||||
|
||||
public String getUserLiveAddress() {
|
||||
return userLiveAddress;
|
||||
}
|
||||
|
||||
public void setUserLiveAddress(String userLiveAddress) {
|
||||
this.userLiveAddress = userLiveAddress;
|
||||
}
|
||||
|
||||
public String getUserLongitude() {
|
||||
return userLongitude;
|
||||
}
|
||||
|
||||
public void setUserLongitude(String userLongitude) {
|
||||
this.userLongitude = userLongitude;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserNation() {
|
||||
return userNation;
|
||||
}
|
||||
|
||||
public void setUserNation(String userNation) {
|
||||
this.userNation = userNation;
|
||||
}
|
||||
|
||||
public String getUserNationName() {
|
||||
return userNationName;
|
||||
}
|
||||
|
||||
public void setUserNationName(String userNationName) {
|
||||
this.userNationName = userNationName;
|
||||
}
|
||||
|
||||
public String getUserNative() {
|
||||
return userNative;
|
||||
}
|
||||
|
||||
public void setUserNative(String userNative) {
|
||||
this.userNative = userNative;
|
||||
}
|
||||
|
||||
public String getUserPhone() {
|
||||
return userPhone;
|
||||
}
|
||||
|
||||
public void setUserPhone(String userPhone) {
|
||||
this.userPhone = userPhone;
|
||||
}
|
||||
|
||||
public String getUserPoliticsStatus() {
|
||||
return userPoliticsStatus;
|
||||
}
|
||||
|
||||
public void setUserPoliticsStatus(String userPoliticsStatus) {
|
||||
this.userPoliticsStatus = userPoliticsStatus;
|
||||
}
|
||||
|
||||
public String getUserPoliticsStatusName() {
|
||||
return userPoliticsStatusName;
|
||||
}
|
||||
|
||||
public void setUserPoliticsStatusName(String userPoliticsStatusName) {
|
||||
this.userPoliticsStatusName = userPoliticsStatusName;
|
||||
}
|
||||
|
||||
public String getUserQq() {
|
||||
return userQq;
|
||||
}
|
||||
|
||||
public void setUserQq(String userQq) {
|
||||
this.userQq = userQq;
|
||||
}
|
||||
|
||||
public String getUserRealName() {
|
||||
return userRealName;
|
||||
}
|
||||
|
||||
public void setUserRealName(String userRealName) {
|
||||
this.userRealName = userRealName;
|
||||
}
|
||||
|
||||
public String getUserSex() {
|
||||
return userSex;
|
||||
}
|
||||
|
||||
public void setUserSex(String userSex) {
|
||||
this.userSex = userSex;
|
||||
}
|
||||
|
||||
public String getUserSexName() {
|
||||
return userSexName;
|
||||
}
|
||||
|
||||
public void setUserSexName(String userSexName) {
|
||||
this.userSexName = userSexName;
|
||||
}
|
||||
|
||||
public int getUserState() {
|
||||
return userState;
|
||||
}
|
||||
|
||||
public void setUserState(int userState) {
|
||||
this.userState = userState;
|
||||
}
|
||||
|
||||
public int getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(int userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getUserUKey() {
|
||||
return userUKey;
|
||||
}
|
||||
|
||||
public void setUserUKey(String userUKey) {
|
||||
this.userUKey = userUKey;
|
||||
}
|
||||
|
||||
public String getUserUsername() {
|
||||
return userUsername;
|
||||
}
|
||||
|
||||
public void setUserUsername(String userUsername) {
|
||||
this.userUsername = userUsername;
|
||||
}
|
||||
|
||||
public String getUserWechat() {
|
||||
return userWechat;
|
||||
}
|
||||
|
||||
public void setUserWechat(String userWechat) {
|
||||
this.userWechat = userWechat;
|
||||
}
|
||||
|
||||
public String getUserWeibo() {
|
||||
return userWeibo;
|
||||
}
|
||||
|
||||
public void setUserWeibo(String userWeibo) {
|
||||
this.userWeibo = userWeibo;
|
||||
}
|
||||
|
||||
public String getUserZipCode() {
|
||||
return userZipCode;
|
||||
}
|
||||
|
||||
public void setUserZipCode(String userZipCode) {
|
||||
this.userZipCode = userZipCode;
|
||||
}
|
||||
}
|
@ -250,4 +250,78 @@
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="colorAccent">#ffE91E63</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="item_hor_content">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginLeft">10dp</item>
|
||||
<item name="android:layout_marginTop">2dp</item>
|
||||
<item name="android:layout_marginRight">10dp</item>
|
||||
<item name="android:layout_marginBottom">2dp</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:paddingLeft">5dp</item>
|
||||
<item name="android:paddingRight">5dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="item_ver_content">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginLeft">10dp</item>
|
||||
<item name="android:layout_marginTop">2dp</item>
|
||||
<item name="android:layout_marginRight">10dp</item>
|
||||
<item name="android:layout_marginBottom">2dp</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:paddingLeft">5dp</item>
|
||||
<item name="android:paddingRight">5dp</item>
|
||||
</style>
|
||||
<style name="item_sel_text">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">0.8</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:drawableRight">@drawable/ic_arrow_gray_down</item>
|
||||
<item name="android:drawablePadding">5dp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:gravity">right</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
<style name="item_content">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">0.8</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:drawablePadding">5dp</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:gravity">right</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="item_title">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:layout_weight">0.2</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:textSize">@dimen/text_14</item>
|
||||
</style>
|
||||
|
||||
<style name="item_edit">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:layout_weight">0.7</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:gravity">right|center_vertical</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
</resources>
|
@ -38,6 +38,7 @@ dependencies {
|
||||
implementation project(':cm_utils')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha03'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
@ -3,6 +3,16 @@
|
||||
package="com.tengshisoft.modulemine">
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name=".activity.NewMineInfoEditActivity"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.NewMineInfoDetailActivity"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.ChangePwdActivity"
|
||||
android:launchMode="singleTop"
|
||||
|
@ -144,16 +144,13 @@ public class ChangePhoneActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseSuccessBean) {
|
||||
UserLgUtils.setToken(baseSuccessBean.getData());
|
||||
ToastUtils.showShort("重新绑定成功");
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
doLogin(dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -164,6 +161,13 @@ public class ChangePhoneActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void doLogin(ProgressDialog dialog) {
|
||||
UserLgUtils.setToken("");
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("重新绑定成功");
|
||||
reStartApp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数
|
||||
*
|
||||
|
@ -145,7 +145,7 @@ public class MineInfoDetailActivity extends BaseActivity {
|
||||
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.editUserInfo(body, UserLgUtils.getToken())
|
||||
.editUserInfo(UserLgUtils.getUserId(),body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
|
@ -142,7 +142,7 @@ public class MineInfoEditActivity extends BaseActivity {
|
||||
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.editUserInfo(body, UserLgUtils.getToken())
|
||||
.editUserInfo(UserLgUtils.getUserId(), body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
|
@ -0,0 +1,151 @@
|
||||
package com.tengshisoft.modulemine.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.UserExpandInfoBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.modulemine.R;
|
||||
import com.tengshisoft.modulemine.R2;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_MINE_MINEINFO_DETAIL_NEW)
|
||||
public class NewMineInfoDetailActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_nickname)
|
||||
TextView mTvNickName;
|
||||
@BindView(R2.id.tv_email)
|
||||
TextView mTvEmail;
|
||||
@BindView(R2.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R2.id.tv_id_card)
|
||||
TextView mTvIdCard;
|
||||
@BindView(R2.id.tv_gender)
|
||||
TextView mTvGender;
|
||||
@BindView(R2.id.tv_nation)
|
||||
TextView mTvNation;
|
||||
@BindView(R2.id.tv_native)
|
||||
TextView mTvNative;
|
||||
@BindView(R2.id.tv_polit)
|
||||
TextView mTvPolit;
|
||||
@BindView(R2.id.tv_qq)
|
||||
TextView mTvQQ;
|
||||
@BindView(R2.id.tv_weixin)
|
||||
TextView mTvWeixin;
|
||||
@BindView(R2.id.tv_weibo)
|
||||
TextView mTvWeibo;
|
||||
@BindView(R2.id.tv_current_address)
|
||||
TextView mTvCurrentAddress;
|
||||
@BindView(R2.id.tv_post)
|
||||
TextView mTvPost;
|
||||
@BindView(R2.id.tv_address)
|
||||
TextView mTvAddress;
|
||||
@BindView(R2.id.tv_degree)
|
||||
TextView mTvDegree;
|
||||
@BindView(R2.id.tv_work)
|
||||
TextView mTvWork;
|
||||
@BindView(R2.id.tv_content)
|
||||
TextView mTvContent;
|
||||
@BindView(R2.id.tv_sex)
|
||||
TextView mTvSex;
|
||||
@BindView(R2.id.tv_phone)
|
||||
TextView mTvPhone;
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("个人信息");
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("修改");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MINE_MINEINFO_EDIT_NEW)
|
||||
.navigation(mActivity, 12));
|
||||
getUserInfo();
|
||||
}
|
||||
|
||||
private void getUserInfo() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getUserExpandInfo(UserLgUtils.getUserId(), UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<UserExpandInfoBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(UserExpandInfoBean userExpandInfoBean) {
|
||||
setDataToView(userExpandInfoBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 12) {
|
||||
if (resultCode == 13) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
getUserInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setDataToView(UserExpandInfoBean bean) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvNickName.setText(bean.getUserName());
|
||||
mTvEmail.setText(bean.getUserEmail());
|
||||
mTvPhone.setText(bean.getUserPhone());
|
||||
mTvName.setText(bean.getUserRealName());
|
||||
mTvSex.setText(bean.getUserSexName());
|
||||
mTvGender.setText(bean.getUserBirth());
|
||||
mTvIdCard.setText(bean.getUserIdCard());
|
||||
mTvNation.setText(bean.getUserNationName());
|
||||
mTvNative.setText(bean.getUserNative());
|
||||
mTvPolit.setText(bean.getUserPoliticsStatusName());
|
||||
mTvQQ.setText(bean.getUserQq());
|
||||
mTvWeixin.setText(bean.getUserWechat());
|
||||
mTvWeibo.setText(bean.getUserWeibo());
|
||||
mTvCurrentAddress.setText(bean.getUserLiveAddress());
|
||||
mTvPost.setText(bean.getUserZipCode());
|
||||
mTvAddress.setText(bean.getUserAddress());
|
||||
mTvDegree.setText(bean.getUserEducationName());
|
||||
mTvWork.setText(bean.getUserEmploymentSituationName());
|
||||
mTvContent.setText(bean.getUserIntroduction());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_new_mine_infor_detail;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,550 @@
|
||||
package com.tengshisoft.modulemine.activity;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseDictionaryBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.SaveUserInfoBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.UserExpandInfoBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.modulemine.R;
|
||||
import com.tengshisoft.modulemine.R2;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 新版个人详细信息编辑
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_MINE_MINEINFO_EDIT_NEW)
|
||||
public class NewMineInfoEditActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.et_nickname)
|
||||
EditText mEtNickName;
|
||||
@BindView(R2.id.et_email)
|
||||
EditText mEtEmail;
|
||||
@BindView(R2.id.et_name)
|
||||
EditText mEtName;
|
||||
@BindView(R2.id.et_id_card)
|
||||
EditText mEtIdCard;
|
||||
@BindView(R2.id.tv_gender)
|
||||
TextView mTvGender;
|
||||
@BindView(R2.id.tv_sex)
|
||||
TextView mTvSex;
|
||||
@BindView(R2.id.tv_nation)
|
||||
TextView mTvNation;
|
||||
@BindView(R2.id.et_native)
|
||||
EditText mEtNative;
|
||||
@BindView(R2.id.tv_polit)
|
||||
TextView mTvPolit;
|
||||
@BindView(R2.id.et_qq)
|
||||
EditText mEtQQ;
|
||||
@BindView(R2.id.et_weixin)
|
||||
EditText mEtWeixin;
|
||||
@BindView(R2.id.et_weibo)
|
||||
EditText mEtWeibo;
|
||||
@BindView(R2.id.et_current_address)
|
||||
EditText mEtCurrentAddress;
|
||||
@BindView(R2.id.et_post)
|
||||
EditText mEtPost;
|
||||
@BindView(R2.id.et_address)
|
||||
EditText mEtAddress;
|
||||
@BindView(R2.id.tv_degree)
|
||||
TextView mTvDegree;
|
||||
@BindView(R2.id.tv_work)
|
||||
TextView mTvWork;
|
||||
@BindView(R2.id.et_content)
|
||||
EditText mEtContent;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
TypeFaceTextView mBtnConfirm;
|
||||
@BindView(R2.id.et_phone)
|
||||
EditText mEtPhone;
|
||||
|
||||
private List<BaseDictionaryBean> mPiList;//政治面貌
|
||||
private List<BaseDictionaryBean> mNationList;//民族
|
||||
private List<BaseDictionaryBean> mSexList;//性别
|
||||
private List<BaseDictionaryBean> mNativeList;//籍贯
|
||||
private List<BaseDictionaryBean> mEduList;//学历
|
||||
private List<BaseDictionaryBean> mWorkList;//从业状况
|
||||
|
||||
private OptionsPickerView<BaseDictionaryBean> mPiPicker;//政治面貌
|
||||
private OptionsPickerView<BaseDictionaryBean> mNationPicker;//民族
|
||||
private OptionsPickerView<BaseDictionaryBean> mNativePicker;//籍贯
|
||||
private OptionsPickerView<BaseDictionaryBean> mEduPicker;//学历
|
||||
private OptionsPickerView<BaseDictionaryBean> mWorkPicker;//从业状况
|
||||
private OptionsPickerView<BaseDictionaryBean> mSexPicker;//性别
|
||||
|
||||
private TimePickerView mDatePicker;
|
||||
|
||||
private static final int TYPE_PI = 123;
|
||||
private static final int TYPE_NATION = 223;
|
||||
private static final int TYPE_NATIVE = 333;
|
||||
private static final int TYPE_EDU = 433;
|
||||
private static final int TYPE_WORK = 533;
|
||||
private static final int TYPE_SEX = 888;
|
||||
private BaseDictionaryBean mSelNationBean;
|
||||
private BaseDictionaryBean mSelPiBean;
|
||||
private BaseDictionaryBean mSelEduBean;
|
||||
private BaseDictionaryBean mSelWork;
|
||||
private BaseDictionaryBean mSelSex;
|
||||
private String mSelGender;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_new_mine_info_edit;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
super.initData();
|
||||
ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("个人信息更新");
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
mTvGender.setOnClickListener(v -> showDatePicker());
|
||||
mTvSex.setOnClickListener(v -> showSexPicker());
|
||||
mTvNation.setOnClickListener(v -> showNationPicker());
|
||||
mTvPolit.setOnClickListener(v -> showPiPicker());
|
||||
mTvDegree.setOnClickListener(v -> showEduPicker());
|
||||
mTvWork.setOnClickListener(v -> showWorkPicker());
|
||||
getUserInfo();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示日期选择-年月日
|
||||
*/
|
||||
private void showDatePicker() {
|
||||
hideSoftKeyboard();
|
||||
Calendar startDate = Calendar.getInstance();
|
||||
mDatePicker = new TimePickerBuilder(this, (date, v) -> {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String format1 = format.format(date);
|
||||
mTvGender.setText(format1);
|
||||
}).setDate(startDate)
|
||||
.setContentTextSize(18)
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setLabel("年", "月", "日", "时", "分", "秒")
|
||||
.setLineSpacingMultiplier(1.2f)
|
||||
.setTextXOffset(0, 0, 0, 40, 0, -40)
|
||||
.isCenterLabel(false)
|
||||
.build();
|
||||
mDatePicker.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 从业状况
|
||||
*/
|
||||
private void showWorkPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mWorkList != null && mWorkList.size() > 0) {
|
||||
mWorkPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelWork = mWorkList.get(options1);
|
||||
mTvWork.setText(mSelWork.getDataName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mWorkPicker.setPicker(mWorkList);
|
||||
mWorkPicker.show();
|
||||
} else {
|
||||
if (mWorkList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_WORK, TYPE_WORK);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private void showSexPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mSexList != null && mSexList.size() > 0) {
|
||||
mSexPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelSex = mSexList.get(options1);
|
||||
mTvSex.setText(mSelSex.getDataName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mSexPicker.setPicker(mSexList);
|
||||
mSexPicker.show();
|
||||
} else {
|
||||
if (mSexList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_SEX, TYPE_SEX);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private void showEduPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mEduList != null && mEduList.size() > 0) {
|
||||
mEduPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelEduBean = mEduList.get(options1);
|
||||
mTvDegree.setText(mSelEduBean.getDataName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mEduPicker.setPicker(mEduList);
|
||||
mEduPicker.show();
|
||||
} else {
|
||||
if (mEduList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_EDU, TYPE_EDU);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
private void showPiPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mPiList != null && mPiList.size() > 0) {
|
||||
mPiPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelPiBean = mPiList.get(options1);
|
||||
mTvPolit.setText(mSelPiBean.getDataName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mPiPicker.setPicker(mPiList);
|
||||
mPiPicker.show();
|
||||
} else {
|
||||
if (mPiList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_PI, TYPE_PI);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private void showNationPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mNationList != null && mNationList.size() > 0) {
|
||||
mNationPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelNationBean = mNationList.get(options1);
|
||||
mTvNation.setText(mSelNationBean.getDataName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mNationPicker.setPicker(mNationList);
|
||||
mNationPicker.show();
|
||||
} else {
|
||||
if (mNationList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_NATION, TYPE_NATION);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
private void showNativePicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mNativeList != null && mNativeList.size() > 0) {
|
||||
mNativePicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
|
||||
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mNativePicker.setPicker(mNativeList);
|
||||
mNativePicker.show();
|
||||
} else {
|
||||
if (mNativeList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_NATIVE, TYPE_NATIVE);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据Id获取字典List
|
||||
*
|
||||
* @param pId
|
||||
*/
|
||||
private void getDictionaryBeanList(String pId, int type) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取数据中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getDicList(pId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<BaseDictionaryBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<BaseDictionaryBean> beans) {
|
||||
dialog.dismiss();
|
||||
if (beans.size() > 0) {
|
||||
switch (type) {
|
||||
case TYPE_PI://政治面貌
|
||||
mPiList = beans;
|
||||
showPiPicker();
|
||||
break;
|
||||
case TYPE_EDU://学历
|
||||
mEduList = beans;
|
||||
showEduPicker();
|
||||
break;
|
||||
case TYPE_WORK://从业状况
|
||||
mWorkList = beans;
|
||||
showWorkPicker();
|
||||
break;
|
||||
case TYPE_NATIVE://籍贯
|
||||
mNativeList = beans;
|
||||
showNativePicker();
|
||||
break;
|
||||
case TYPE_NATION://民族
|
||||
mNationList = beans;
|
||||
showNationPicker();
|
||||
break;
|
||||
case TYPE_SEX:
|
||||
mSexList = beans;
|
||||
showSexPicker();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private RequestBody buildConfirmUserInfo() {
|
||||
SaveUserInfoBean bean = new SaveUserInfoBean();
|
||||
String nickName = mEtNickName.getText().toString().trim();
|
||||
bean.setName(nickName);
|
||||
String email = mEtEmail.getText().toString().trim();
|
||||
bean.setEmail(email);
|
||||
String phone = mEtPhone.getText().toString().trim();
|
||||
bean.setPhone(phone);
|
||||
String name = mEtName.getText().toString().trim();
|
||||
bean.setUserRealName(name);
|
||||
if (mSelSex != null) {
|
||||
bean.setUserSex(mSelSex.getDataId());
|
||||
}
|
||||
String idCard = mEtIdCard.getText().toString().trim();
|
||||
bean.setUserIdCard(idCard);
|
||||
String gender = mTvGender.getText().toString().trim();
|
||||
bean.setUserBirth(gender);
|
||||
if (mSelNationBean != null) {
|
||||
bean.setUserNation(mSelNationBean.getDataId());
|
||||
}
|
||||
String nativeStr = mEtNative.getText().toString().trim();
|
||||
bean.setUserNative(nativeStr);
|
||||
if (mSelPiBean != null) {
|
||||
bean.setUserPoliticsStatus(mSelPiBean.getDataId());
|
||||
}
|
||||
String qq = mEtQQ.getText().toString().trim();
|
||||
bean.setUserQq(qq);
|
||||
String weixin = mEtWeixin.getText().toString().trim();
|
||||
bean.setUserWechat(weixin);
|
||||
String weibo = mEtWeibo.getText().toString().trim();
|
||||
bean.setUserWeibo(weibo);
|
||||
String currentAddress = mEtCurrentAddress.getText().toString().trim();
|
||||
bean.setUserLiveAddress(currentAddress);
|
||||
String post = mEtPost.getText().toString().trim();
|
||||
bean.setUserZipCode(post);
|
||||
String address = mEtAddress.getText().toString().trim();
|
||||
bean.setUserAddress(address);
|
||||
if (mSelEduBean != null) {
|
||||
bean.setUserEducation(mSelEduBean.getDataId());
|
||||
}
|
||||
if (mSelWork != null) {
|
||||
bean.setUserEmploymentSituation(mSelWork.getDataId());
|
||||
}
|
||||
String content = mEtContent.getText().toString().trim();
|
||||
bean.setUserIntroduction(content);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return body;
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildConfirmUserInfo();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.editUserInfo(UserLgUtils.getUserId(), body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseSuccessBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("修改成功");
|
||||
setResult(13);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void getUserInfo() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getUserExpandInfo(UserLgUtils.getUserId(), UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<UserExpandInfoBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(UserExpandInfoBean userExpandInfoBean) {
|
||||
setDataToView(userExpandInfoBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void setDataToView(UserExpandInfoBean bean) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mEtNickName.setText(bean.getUserName());
|
||||
mEtEmail.setText(bean.getUserEmail());
|
||||
mEtPhone.setText(bean.getUserPhone());
|
||||
mEtName.setText(bean.getUserRealName());
|
||||
if (!TextUtils.isEmpty(bean.getUserSex())) {
|
||||
mSelSex = new BaseDictionaryBean();
|
||||
mSelSex.setDataId(bean.getUserSex());
|
||||
mSelSex.setDataName(bean.getUserSexName());
|
||||
}
|
||||
mTvSex.setText(bean.getUserSexName());
|
||||
mTvGender.setText(bean.getUserBirth());
|
||||
mEtIdCard.setText(bean.getUserIdCard());
|
||||
if (!TextUtils.isEmpty(bean.getUserNation())) {
|
||||
mSelNationBean = new BaseDictionaryBean();
|
||||
mSelNationBean.setDataId(bean.getUserNation());
|
||||
mSelNationBean.setDataName(bean.getUserNationName());
|
||||
}
|
||||
mTvNation.setText(bean.getUserNationName());
|
||||
mEtNative.setText(bean.getUserNative());
|
||||
if (!TextUtils.isEmpty(bean.getUserPoliticsStatus())) {
|
||||
mSelPiBean = new BaseDictionaryBean();
|
||||
mSelPiBean.setDataId(bean.getUserPoliticsStatus());
|
||||
mSelPiBean.setDataName(bean.getUserPoliticsStatusName());
|
||||
}
|
||||
mTvPolit.setText(bean.getUserPoliticsStatusName());
|
||||
mEtQQ.setText(bean.getUserQq());
|
||||
mEtWeixin.setText(bean.getUserWechat());
|
||||
mEtWeibo.setText(bean.getUserWeibo());
|
||||
mEtCurrentAddress.setText(bean.getUserLiveAddress());
|
||||
mEtPost.setText(bean.getUserZipCode());
|
||||
mEtAddress.setText(bean.getUserAddress());
|
||||
if (!TextUtils.isEmpty(bean.getUserEducation())) {
|
||||
mSelEduBean = new BaseDictionaryBean();
|
||||
mSelEduBean.setDataId(bean.getUserEducation());
|
||||
mSelEduBean.setDataName(bean.getUserEducationName());
|
||||
}
|
||||
mTvDegree.setText(bean.getUserEducationName());
|
||||
if (!TextUtils.isEmpty(bean.getUserEmploymentSituation())) {
|
||||
mSelWork = new BaseDictionaryBean();
|
||||
mSelWork.setDataId(bean.getUserEmploymentSituation());
|
||||
mSelWork.setDataName(bean.getUserEmploymentSituationName());
|
||||
}
|
||||
mTvWork.setText(bean.getUserEmploymentSituationName());
|
||||
mEtContent.setText(bean.getUserIntroduction());
|
||||
}
|
||||
|
||||
}
|
@ -6,6 +6,8 @@ import android.text.TextUtils;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
@ -25,11 +27,7 @@ import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.modulemine.R;
|
||||
import com.tengshisoft.modulemine.R2;
|
||||
import com.tengshisoft.mudulemain.cultural.activitys.base.MainActivity;
|
||||
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
@ -88,7 +86,7 @@ public class SettingActivity extends BaseActivity {
|
||||
.navigation(mActivity, 346);
|
||||
} else {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MINE_MINEINFO_DETAIL)
|
||||
.build(PathConfig.PATH_MODULE_MINE_MINEINFO_DETAIL_NEW)
|
||||
.navigation();
|
||||
}
|
||||
});
|
||||
|
@ -26,7 +26,7 @@ import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.constant.PermissionConstants;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseUserInfoUpdateBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.ChangeUserInfoBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.FuncBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
@ -36,6 +36,7 @@ import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFuncAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.PermissionUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
@ -298,7 +299,7 @@ public class MineMainFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseUserBean) {
|
||||
doUpdateAv(dialog, baseUserBean);
|
||||
doUpdateAv(baseUserBean.getData(), dialog, baseUserBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -326,15 +327,15 @@ public class MineMainFragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
private void doUpdateAv(ProgressDialog dialog, BaseSuccessBean baseUserBean) {
|
||||
BaseUserInfoUpdateBean bean = new BaseUserInfoUpdateBean();
|
||||
bean.setAvatar(baseUserBean.getData());
|
||||
private void doUpdateAv(String id, ProgressDialog dialog, BaseSuccessBean baseUserBean) {
|
||||
ChangeUserInfoBean bean = new ChangeUserInfoBean();
|
||||
bean.setAvatar(id);
|
||||
Gson gson = new Gson();
|
||||
String s = gson.toJson(bean);
|
||||
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), s);
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doUpdateUserAvatar(body, UserLgUtils.getToken())
|
||||
.doChangeUserInfo(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@ -344,18 +345,14 @@ public class MineMainFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseSuccessBean) {
|
||||
if (baseSuccessBean != null) {
|
||||
getUserInfo(dialog, baseSuccessBean.getData());
|
||||
} else {
|
||||
ToastUtils.showShort("修改失败,请稍后重试");
|
||||
}
|
||||
public void onNext(@androidx.annotation.NonNull BaseSuccessBean successBean) {
|
||||
getUserInfo(dialog, UserLgUtils.getToken());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
public void onError(@androidx.annotation.NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("修改失败,请稍后重试");
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
6
modulemine/src/main/res/drawable/shp_rectangle_gray_df.xml
Executable file
6
modulemine/src/main/res/drawable/shp_rectangle_gray_df.xml
Executable file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/gray_df" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
283
modulemine/src/main/res/layout/activity_new_mine_info_edit.xml
Normal file
283
modulemine/src/main/res/layout/activity_new_mine_info_edit.xml
Normal file
@ -0,0 +1,283 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.NewMineInfoEditActivity">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="昵称:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_nickname"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入昵称" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="邮箱:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_email"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入邮箱" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="联系电话:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入联系电话" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="姓名:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入姓名" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="性别:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sex"
|
||||
style="@style/item_sel_text"
|
||||
android:hint="请选择性别" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="生日:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gender"
|
||||
style="@style/item_sel_text"
|
||||
android:hint="请选择生日" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="身份证号码:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_id_card"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入身份证号码" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="民族:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nation"
|
||||
style="@style/item_sel_text"
|
||||
android:hint="请选择民族" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="籍贯:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_native"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入籍贯" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="政治面貌:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polit"
|
||||
style="@style/item_sel_text"
|
||||
android:hint="请选择政治面貌" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="QQ号:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_qq"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入QQ号" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="微信号:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_weixin"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入微信号" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="微博号:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_weibo"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入微博号" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="现住址:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_current_address"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入现住址" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="地区邮编:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_post"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入地区邮编" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="详细地址:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_address"
|
||||
style="@style/item_edit"
|
||||
android:hint="请输入详细地址" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学历:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_degree"
|
||||
style="@style/item_sel_text"
|
||||
android:hint="请选择学历" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="就业状况:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_work"
|
||||
style="@style/item_sel_text"
|
||||
android:hint="请选择就业状况" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_ver_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="个人简介"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray_df"
|
||||
android:gravity="left"
|
||||
android:hint="请输入简介"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/sel_btn_activity_sign_up_no_ra"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="立即修改"
|
||||
android:textColor="@color/col_verify_text"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
@ -0,0 +1,266 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.NewMineInfoEditActivity">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="昵称:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="邮箱:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_email"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="联系电话:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="姓名:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="性别:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sex"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="生日:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gender"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="身份证号码:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id_card"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="民族:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nation"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="籍贯:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_native"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="政治面貌:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polit"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="QQ号:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qq"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="微信号:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weixin"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="微博号:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weibo"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="现住址:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_address"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="地区邮编:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_post"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="详细地址:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学历:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_degree"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="就业状况:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_work"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_ver_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="工作内容"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray_df"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
@ -11,4 +11,5 @@
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user