Ver Fonte

写设置页面

Ryan8057 há 3 anos atrás
pai
commit
b60e558e4b
53 ficheiros alterados com 2225 adições e 65 exclusões
  1. 1 1
      BaseLibrary/src/main/java/com/cooleshow/base/common/BaseConstant.java
  2. 5 0
      BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt
  3. 0 4
      BaseLibrary/src/main/res/layout/common_toolbar_layout.xml
  4. 2 0
      BaseLibrary/src/main/res/values/colors.xml
  5. 29 1
      teacher/src/main/AndroidManifest.xml
  6. 44 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/AddressListAdapter.java
  7. 76 0
      teacher/src/main/java/com/cooleshow/teacher/api/APIService.java
  8. 32 0
      teacher/src/main/java/com/cooleshow/teacher/bean/AddressBean.java
  9. 3 1
      teacher/src/main/java/com/cooleshow/teacher/bean/TeacherUserInfo.java
  10. 20 0
      teacher/src/main/java/com/cooleshow/teacher/contract/AddressListContract.java
  11. 18 0
      teacher/src/main/java/com/cooleshow/teacher/contract/CheckModifyPhoneNumContract.java
  12. 2 1
      teacher/src/main/java/com/cooleshow/teacher/contract/ModifyNickNameContract.java
  13. 19 0
      teacher/src/main/java/com/cooleshow/teacher/contract/ModifyPasswordContract.java
  14. 18 0
      teacher/src/main/java/com/cooleshow/teacher/contract/ModifyPhoneNumContract.java
  15. 18 0
      teacher/src/main/java/com/cooleshow/teacher/contract/PersonalCertificationContract.java
  16. 6 3
      teacher/src/main/java/com/cooleshow/teacher/contract/PersonalSettingContract.java
  17. 47 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/AddressListPresenter.java
  18. 46 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/CheckModifyPhoneNumPresenter.java
  19. 11 4
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/ModifyNickNamePresenter.java
  20. 73 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/ModifyPasswordPresenter.java
  21. 44 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/ModifyPhoneNumPresenter.java
  22. 47 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/PersonalCertificationPresenter.java
  23. 60 4
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/PersonalSettingPresenter.java
  24. 20 6
      teacher/src/main/java/com/cooleshow/teacher/presenter/minestyle/MineStylePagePresenter.java
  25. 6 0
      teacher/src/main/java/com/cooleshow/teacher/presenter/minestyle/TeachableInstrumentPresenter.java
  26. 76 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/AddressListActivity.java
  27. 82 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/CheckModifyPhoneNumActivity.java
  28. 10 8
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyNickNameActivity.java
  29. 186 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPasswordActivity.java
  30. 165 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPhoneNumActivity.java
  31. 73 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/PersonalCertificationActivity.java
  32. 242 22
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/PersonalSettingActivity.java
  33. 3 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/SettingActivity.java
  34. 0 2
      teacher/src/main/java/com/cooleshow/teacher/ui/minestyle/MineStylePageActivity.java
  35. BIN
      teacher/src/main/res/drawable-xhdpi/icon_go_down.png
  36. BIN
      teacher/src/main/res/drawable-xhdpi/icon_modify_address.png
  37. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_go_down.png
  38. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_modify_address.png
  39. 36 0
      teacher/src/main/res/layout/activity_address_list.xml
  40. 79 0
      teacher/src/main/res/layout/activity_check_modify_phonenum.xml
  41. 2 2
      teacher/src/main/res/layout/activity_mine_course_layout.xml
  42. 1 1
      teacher/src/main/res/layout/activity_mine_style_page.xml
  43. 1 1
      teacher/src/main/res/layout/activity_modify_nickname.xml
  44. 100 0
      teacher/src/main/res/layout/activity_modify_password.xml
  45. 90 0
      teacher/src/main/res/layout/activity_modify_phonenum.xml
  46. 151 0
      teacher/src/main/res/layout/activity_personal_certification.xml
  47. 1 1
      teacher/src/main/res/layout/activity_personal_setting.xml
  48. 1 1
      teacher/src/main/res/layout/activity_setting.xml
  49. 2 2
      teacher/src/main/res/layout/activity_teachable_instrument.xml
  50. 66 0
      teacher/src/main/res/layout/layout_address_item.xml
  51. 93 0
      teacher/src/main/res/layout/pop_modify_header.xml
  52. 92 0
      teacher/src/main/res/layout/pop_modify_sex.xml
  53. 26 0
      usercenter/src/main/java/com/cooleshow/usercenter/bean/SetDetailBean.java

+ 1 - 1
BaseLibrary/src/main/java/com/cooleshow/base/common/BaseConstant.java

@@ -10,7 +10,7 @@ public class BaseConstant {
     public final static String TEACHER_GROUP = "api-teacher/";
     public final static String STUDENT_GROUP = "api-student/";
     public final static String AUTH_GROUP = "api-auth/";
-
+    public final static String MALL_ADMIN_SERVER = "api-mall-admin/";
 
 
     public final static String TABLE_PREFS = "Kotlin_mall";

+ 5 - 0
BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt

@@ -63,6 +63,11 @@ object RouterPath {
             const val MINE_PERSONAL_SETTING = "/teacher/ui/mine/PersonalSettingActivity"
             const val MINE_SETTING = "/teacher/ui/mine/SettingActivity"
             const val MINE_MODIFY_NICKNAME = "/teacher/ui/mine/ModifyNickNameActivity"
+            const val MINE_CHECK_MODIFY_PHONENUM = "/teacher/ui/mine/CheckModifyPhoneNumActivity"
+            const val MINE_MODIFY_PHONENUM = "/teacher/ui/mine/ModifyPhoneNumActivity"
+            const val MINE_MODIFY_PASSWORD = "/teacher/ui/mine/ModifyPasswordActivity"
+            const val MINE_PERSONAL_CERTIFICATION = "/teacher/ui/mine/PersonalCertificationActivity"
+            const val MINE_ADDRESS_LIST = "/teacher/ui/mine/AddressListActivity"
         }
     }
 }

+ 0 - 4
BaseLibrary/src/main/res/layout/common_toolbar_layout.xml

@@ -66,7 +66,6 @@
         android:textSize="15sp"
         android:visibility="gone"
         tools:text="右侧标题"
-        tools:textColor="@color/black"
         tools:visibility="gone" />
 
     <RelativeLayout
@@ -83,15 +82,12 @@
             android:layout_height="wrap_content"
             android:layout_gravity="right|center_vertical"
             android:layout_marginTop="4dp"
-
             android:scaleType="centerCrop"
             android:text=""
             android:textColor="@color/white"
             android:textSize="16sp"
             android:visibility="gone"
-
             tools:text="右侧标题"
-            tools:textColor="@color/black"
             tools:visibility="visible" />
     </RelativeLayout>
 </androidx.appcompat.widget.Toolbar>

+ 2 - 0
BaseLibrary/src/main/res/values/colors.xml

@@ -64,4 +64,6 @@
     <color name="color_f6f8f9">#F6F8F9</color>
     <color name="color_ff9e5a">#FF9E5A</color>
     <color name="color_e9fff8">#E9FFF8</color>
+    <color name="color_01c0b5">#01C1B5</color>
+    <color name="color_f5f5f5">#F5F5F5</color>
 </resources>

+ 29 - 1
teacher/src/main/AndroidManifest.xml

@@ -74,11 +74,39 @@
             android:name=".ui.mine.SettingActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
-
         <activity
             android:name=".ui.mine.ModifyNickNameActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.mine.CheckModifyPhoneNumActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.mine.ModifyPhoneNumActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.mine.ModifyPasswordActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.mine.PersonalCertificationActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.mine.AddressListActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
+        <provider
+            android:name="androidx.core.content.FileProvider"
+            android:authorities="com.cooleshow.teacher.fileprovider"
+            android:exported="false"
+            android:grantUriPermissions="true">
+            <meta-data
+                android:name="android.support.FILE_PROVIDER_PATHS"
+                android:resource="@xml/file_paths" />
+        </provider>
     </application>
 
 </manifest>

+ 44 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/AddressListAdapter.java

@@ -0,0 +1,44 @@
+package com.cooleshow.teacher.adapter;
+
+import android.view.View;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.bean.AddressBean;
+
+import java.util.List;
+
+/**
+ * 创建日期:2022/5/17 15:32
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AddressListAdapter  extends BaseQuickAdapter<AddressBean, BaseViewHolder> {
+
+    public AddressListAdapter(List<AddressBean> data) {
+        super(R.layout.layout_address_item, data);
+    }
+
+
+    @Override
+    protected void convert(BaseViewHolder helper, AddressBean item) {
+        TextView tv_name=helper.getView(R.id.tv_name);
+        TextView tv_phone=helper.getView(R.id.tv_phone);
+        TextView tv_address=helper.getView(R.id.tv_address);
+        View view_line=helper.getView(R.id.view_line);
+        tv_name.setText(item.name);
+        String cPhone = item.phone.substring(0, 3) + "****" + item.phone.substring(7, item.phone.length());
+        tv_phone.setText(cPhone);
+        String addressDetail=item.province+item.city+item.region+item.detailAddress;
+        tv_address.setText(addressDetail);
+        if (getData().size()-1==getItemPosition(item)){
+            view_line.setVisibility(View.GONE);
+        }else {
+            view_line.setVisibility(View.VISIBLE);
+        }
+
+    }
+}

+ 76 - 0
teacher/src/main/java/com/cooleshow/teacher/api/APIService.java

@@ -1,6 +1,7 @@
 package com.cooleshow.teacher.api;
 
 import com.cooleshow.base.data.net.BaseResponse;
+import com.cooleshow.teacher.bean.AddressBean;
 import com.cooleshow.teacher.bean.CourseCommentListBean;
 import com.cooleshow.teacher.bean.CourseTableDataBean;
 import com.cooleshow.teacher.bean.HomePageSheetMusicListBean;
@@ -13,6 +14,7 @@ import com.cooleshow.teacher.bean.TeachableInstrumentBean;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 import com.cooleshow.teacher.bean.TeacherUserInfo;
 import com.cooleshow.teacher.bean.VideoCourseListBean;
+import com.cooleshow.usercenter.bean.SetDetailBean;
 import com.cooleshow.usercenter.bean.UserInfo;
 
 import java.util.List;
@@ -24,8 +26,10 @@ import retrofit2.http.Body;
 import retrofit2.http.GET;
 import retrofit2.http.POST;
 import retrofit2.http.Path;
+import retrofit2.http.Query;
 
 import static com.cooleshow.base.common.BaseConstant.AUTH_GROUP;
+import static com.cooleshow.base.common.BaseConstant.MALL_ADMIN_SERVER;
 import static com.cooleshow.base.common.BaseConstant.TEACHER_GROUP;
 
 /**
@@ -105,6 +109,7 @@ public interface APIService {
      */
     @POST(TEACHER_GROUP + "homework/review")
     Observable<BaseResponse<Object>> submitSparringCourseHomeworkComment(@Body RequestBody body);
+
     /**
      * 查询直播课
      *
@@ -181,6 +186,7 @@ public interface APIService {
 
     /**
      * 乐器列表查询
+     *
      * @return
      */
     @GET(TEACHER_GROUP + "subject/subjectSelect")
@@ -188,9 +194,79 @@ public interface APIService {
 
     /**
      * 我的-个人风采保存
+     *
      * @param body
      * @return
      */
     @POST(TEACHER_GROUP + "teacher/saveTeacherStyle")
     Observable<BaseResponse<TeacherSelfStyleInfoBean>> saveTeacherStyle(@Body RequestBody body);
+
+    /**
+     * 获取设置详情
+     *
+     * @return
+     */
+    @GET(AUTH_GROUP + "user/getSetDetail")
+    Observable<BaseResponse<SetDetailBean>> getSetDetail();
+
+    /**
+     * 修改设置信息
+     *
+     * @param body
+     * @return
+     */
+    @POST(AUTH_GROUP + "user/submitSetDetail")
+    Observable<BaseResponse<SetDetailBean>> submitSetDetail(@Body RequestBody body);
+
+    /**
+     * 校验用户手机号和密码
+     * @param phone
+     * @param password
+     * @return
+     */
+    @GET(AUTH_GROUP + "user/checkUser")
+    Observable<BaseResponse<Object>> checkUser(@Query("phone") String phone,@Query("password") String password);
+
+    /**
+     * 修改手机号
+     * @param authCode
+     * @param newPhone
+     * @param oldPhone
+     * @return
+     */
+    @GET(AUTH_GROUP + "user/updatePhone")
+    Observable<BaseResponse<Object>> updatePhone(@Query("authCode") String authCode,@Query("newPhone") String newPhone,@Query("oldPhone") String oldPhone);
+
+    /**
+     * 手机验证码修改密码
+     * @param body
+     * @return
+     */
+    @POST(AUTH_GROUP + "user/updatePassword")
+    Observable<BaseResponse<Object>> updatePassword(@Body RequestBody body);
+
+    /**
+     * 发送登录短信验证码
+     * @param body
+     *  mobile 手机号
+     *  type:类型(PASSWD:修改密码,LOGIN:登录,REGISTER:注册)
+     * @return
+     */
+    @POST(TEACHER_GROUP + "code/sendSmsCode")
+    Observable<BaseResponse<Object>> sendSmsCode(@Body RequestBody body);
+
+    /**
+     * 实名认证
+     * @param body
+     * @return
+     */
+    @POST(AUTH_GROUP + "user/realNameAuth")
+    Observable<BaseResponse<Object>> realNameAuth(@Body RequestBody body);
+
+    /**
+     * 获取所有收货地址
+     * @return
+     */
+    @GET(MALL_ADMIN_SERVER + "companyAddress/list")
+    Observable<BaseResponse<List<AddressBean>>> companyAddressList();
 }

+ 32 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/AddressBean.java

@@ -0,0 +1,32 @@
+package com.cooleshow.teacher.bean;
+
+/**
+ * 创建日期:2022/5/17 15:29
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AddressBean {
+    /**
+     * 	"addressName": "",
+     * 			"city": "",
+     * 			"detailAddress": "",
+     * 			"id": 0,
+     * 			"name": "",
+     * 			"phone": "",
+     * 			"province": "",
+     * 			"receiveStatus": 0,
+     * 			"region": "",
+     * 			"sendStatus": 0
+     */
+    public String addressName;
+    public String detailAddress;
+    public int id;
+    public String name;
+    public String phone;
+    public String province;
+    public String city;
+    public String region;
+    public int receiveStatus; //是否默认收货地址:0->否;1->是
+    public int sendStatus;//默认发货地址:0->否;1->是
+}

+ 3 - 1
teacher/src/main/java/com/cooleshow/teacher/bean/TeacherUserInfo.java

@@ -1,9 +1,11 @@
 package com.cooleshow.teacher.bean;
 
+import java.io.Serializable;
+
 /**
  * Author by pq, Date on 2022/4/26.
  */
-public class TeacherUserInfo {
+public class TeacherUserInfo implements Serializable {
 
     /**
      * username : 张三

+ 20 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/AddressListContract.java

@@ -0,0 +1,20 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.teacher.bean.AddressBean;
+
+import java.util.List;
+
+/**
+ * 创建日期:2022/5/17 15:23
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface AddressListContract {
+    interface AddressListView extends BaseView {
+        void companyAddressListSuccess(List<AddressBean> data);
+    }
+    interface Presenter {
+    }
+}

+ 18 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/CheckModifyPhoneNumContract.java

@@ -0,0 +1,18 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/5/17 10:15
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface CheckModifyPhoneNumContract {
+    interface CheckModifyPhoneNumView extends BaseView {
+        void checkUserSuccess(Object object);
+    }
+
+    interface Presenter {
+    }
+}

+ 2 - 1
teacher/src/main/java/com/cooleshow/teacher/contract/ModifyNickNameContract.java

@@ -2,6 +2,7 @@ package com.cooleshow.teacher.contract;
 
 import com.cooleshow.base.presenter.view.BaseView;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
+import com.cooleshow.usercenter.bean.SetDetailBean;
 
 /**
  * 创建日期:2022/5/16 17:50
@@ -11,7 +12,7 @@ import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
  */
 public interface ModifyNickNameContract {
     interface ModifyNickNameView extends BaseView {
-        void saveTeacherStyleSuccess(TeacherSelfStyleInfoBean styleInfoBean);
+        void submitSetDetailSuccess(SetDetailBean setDetailBean);
     }
 
     interface Presenter {

+ 19 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/ModifyPasswordContract.java

@@ -0,0 +1,19 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/5/17 13:36
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface ModifyPasswordContract {
+    interface ModifyPasswordView extends BaseView {
+        void updatePasswordSuccess(Object object);
+        void sendSmsCodeSuccess(Object object);
+    }
+
+    interface Presenter {
+    }
+}

+ 18 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/ModifyPhoneNumContract.java

@@ -0,0 +1,18 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/5/17 10:57
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface ModifyPhoneNumContract {
+    interface ModifyPhoneNumView extends BaseView {
+        void updatePhoneSuccess(Object object);
+    }
+
+    interface Presenter {
+    }
+}

+ 18 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/PersonalCertificationContract.java

@@ -0,0 +1,18 @@
+package com.cooleshow.teacher.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/5/17 14:23
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface PersonalCertificationContract {
+    interface PersonalCertificationView extends BaseView {
+        void realNameAuthSuccess(Object object);
+    }
+
+    interface Presenter {
+    }
+}

+ 6 - 3
teacher/src/main/java/com/cooleshow/teacher/contract/PersonalSettingContract.java

@@ -1,7 +1,7 @@
 package com.cooleshow.teacher.contract;
 
 import com.cooleshow.base.presenter.view.BaseView;
-import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
+import com.cooleshow.usercenter.bean.SetDetailBean;
 
 /**
  * 创建日期:2022/5/16 16:12
@@ -11,9 +11,12 @@ import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
  */
 public interface PersonalSettingContract {
     interface PersonalSettingView extends BaseView {
-        void getSelfStyleSuccess(TeacherSelfStyleInfoBean styleInfoBean);
+        void getSetDetailSuccess(SetDetailBean setDetailBean);
+        void submitSetDetailSuccess(SetDetailBean setDetailBean);
+        void upLoadImageSuccess(String url);
+        void upLoadImageFailure();
     }
     interface Presenter {
-        void getTeacherSelfStyle();
+        void getSetDetail();
     }
 }

+ 47 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/AddressListPresenter.java

@@ -0,0 +1,47 @@
+package com.cooleshow.teacher.presenter.mine;
+
+import com.cooleshow.base.data.net.ApiException;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.base.utils.helper.ErrorParse;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.bean.AddressBean;
+import com.cooleshow.teacher.contract.AddressListContract;
+
+import java.util.List;
+
+/**
+ * 创建日期:2022/5/17 15:23
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class AddressListPresenter extends BasePresenter<AddressListContract.AddressListView> implements AddressListContract.Presenter {
+    public void companyAddressList() {
+        getView().showLoading();
+        addSubscribe(create(APIService.class).companyAddressList(), new BaseObserver<List<AddressBean>>(getView()) {
+            @Override
+            protected void onSuccess(List<AddressBean> data) {
+                if (getView() != null) {
+                    getView().companyAddressListSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (e instanceof ApiException) {
+                    ErrorParse.getInstance().parseError(e);
+                    ApiException apiException = (ApiException) e;
+                    ToastUtils.showShort(apiException.getErrmsg());
+                }
+            }
+        });
+    }
+}

+ 46 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/CheckModifyPhoneNumPresenter.java

@@ -0,0 +1,46 @@
+package com.cooleshow.teacher.presenter.mine;
+
+import com.cooleshow.base.data.net.ApiException;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.base.utils.helper.ErrorParse;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.contract.CheckModifyPhoneNumContract;
+
+/**
+ * 创建日期:2022/5/17 10:15
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class CheckModifyPhoneNumPresenter extends BasePresenter<CheckModifyPhoneNumContract.CheckModifyPhoneNumView> implements CheckModifyPhoneNumContract.Presenter {
+
+    public void checkUser(String phone, String password) {
+        getView().showLoading();
+        addSubscribe(create(APIService.class).checkUser(phone, password), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object data) {
+                if (getView() != null) {
+                    getView().checkUserSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (e instanceof ApiException) {
+                    ErrorParse.getInstance().parseError(e);
+                    ApiException apiException = (ApiException) e;
+                    ToastUtils.showShort(apiException.getErrmsg());
+                }
+            }
+        });
+    }
+}

+ 11 - 4
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/ModifyNickNamePresenter.java

@@ -6,6 +6,7 @@ import com.cooleshow.base.utils.RequestBodyUtil;
 import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 import com.cooleshow.teacher.contract.ModifyNickNameContract;
+import com.cooleshow.usercenter.bean.SetDetailBean;
 
 /**
  * 创建日期:2022/5/16 17:49
@@ -15,16 +16,22 @@ import com.cooleshow.teacher.contract.ModifyNickNameContract;
  */
 public class ModifyNickNamePresenter extends BasePresenter<ModifyNickNameContract.ModifyNickNameView> implements ModifyNickNameContract.Presenter {
 
-    public void saveTeacherStyle(String jsonStr){
-        addSubscribe(create(APIService.class).saveTeacherStyle(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<TeacherSelfStyleInfoBean>(getView()) {
+    public void submitSetDetail(String jsonStr){
+        getView().showLoading();
+        addSubscribe(create(APIService.class).submitSetDetail(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<SetDetailBean>(getView()) {
             @Override
-            protected void onSuccess(TeacherSelfStyleInfoBean data) {
+            protected void onSuccess(SetDetailBean data) {
                 if (getView() != null) {
-                    getView().saveTeacherStyleSuccess(data);
+                    getView().submitSetDetailSuccess(data);
                 }
             }
 
             @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+            @Override
             public void onError(Throwable e) {
                 super.onError(e);
 

+ 73 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/ModifyPasswordPresenter.java

@@ -0,0 +1,73 @@
+package com.cooleshow.teacher.presenter.mine;
+
+import com.cooleshow.base.data.net.ApiException;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.base.utils.helper.ErrorParse;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.contract.ModifyPasswordContract;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+
+/**
+ * 创建日期:2022/5/17 13:36
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class ModifyPasswordPresenter extends BasePresenter<ModifyPasswordContract.ModifyPasswordView> implements ModifyPasswordContract.Presenter {
+    public void updatePassword(String jsonStr) {
+        getView().showLoading();
+        addSubscribe(create(APIService.class).updatePassword(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<SetDetailBean>(getView()) {
+            @Override
+            protected void onSuccess(SetDetailBean data) {
+                if (getView() != null) {
+                    getView().updatePasswordSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (e instanceof ApiException) {
+                    ErrorParse.getInstance().parseError(e);
+                    ApiException apiException = (ApiException) e;
+                    ToastUtils.showShort(apiException.getErrmsg());
+                }
+            }
+        });
+
+    }
+    public void sendSmsCode(String jsonStr){
+        getView().showLoading();
+        addSubscribe(create(APIService.class).sendSmsCode(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<SetDetailBean>(getView()) {
+            @Override
+            protected void onSuccess(SetDetailBean data) {
+                if (getView() != null) {
+                    getView().sendSmsCodeSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (e instanceof ApiException) {
+                    ErrorParse.getInstance().parseError(e);
+                    ApiException apiException = (ApiException) e;
+                    ToastUtils.showShort(apiException.getErrmsg());
+                }
+            }
+        });
+    }
+}

+ 44 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/ModifyPhoneNumPresenter.java

@@ -0,0 +1,44 @@
+package com.cooleshow.teacher.presenter.mine;
+
+import com.cooleshow.base.data.net.ApiException;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.base.utils.helper.ErrorParse;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.contract.ModifyPhoneNumContract;
+
+/**
+ * 创建日期:2022/5/17 10:56
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class ModifyPhoneNumPresenter extends BasePresenter<ModifyPhoneNumContract.ModifyPhoneNumView> implements ModifyPhoneNumContract.Presenter {
+    public void updatePhone(String authCode,String newPhone, String oldPhone) {
+        getView().showLoading();
+        addSubscribe(create(APIService.class).updatePhone(authCode, newPhone,oldPhone), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object data) {
+                if (getView() != null) {
+                    getView().updatePhoneSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (e instanceof ApiException) {
+                    ErrorParse.getInstance().parseError(e);
+                    ApiException apiException = (ApiException) e;
+                    ToastUtils.showShort(apiException.getErrmsg());
+                }
+            }
+        });
+    }
+}

+ 47 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/PersonalCertificationPresenter.java

@@ -0,0 +1,47 @@
+package com.cooleshow.teacher.presenter.mine;
+
+import com.cooleshow.base.data.net.ApiException;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.base.utils.helper.ErrorParse;
+import com.cooleshow.teacher.api.APIService;
+import com.cooleshow.teacher.contract.PersonalCertificationContract;
+
+/**
+ * 创建日期:2022/5/17 14:23
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class PersonalCertificationPresenter extends BasePresenter<PersonalCertificationContract.PersonalCertificationView> implements PersonalCertificationContract.Presenter {
+    public void realNameAuth(String jsonStr){
+        getView().showLoading();
+        addSubscribe(create(APIService.class).realNameAuth(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object data) {
+                if (getView() != null) {
+                    getView().realNameAuthSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (e instanceof ApiException) {
+                    ErrorParse.getInstance().parseError(e);
+                    ApiException apiException = (ApiException) e;
+                    ToastUtils.showShort(apiException.getErrmsg());
+                }
+            }
+        });
+    }
+
+}

+ 60 - 4
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/PersonalSettingPresenter.java

@@ -1,10 +1,17 @@
 package com.cooleshow.teacher.presenter.mine;
 
+import android.app.Activity;
+
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.base.utils.helper.upload.UploadHelper;
 import com.cooleshow.teacher.api.APIService;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 import com.cooleshow.teacher.contract.PersonalSettingContract;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+
+import java.io.File;
 
 /**
  * 创建日期:2022/5/16 16:10
@@ -15,12 +22,61 @@ import com.cooleshow.teacher.contract.PersonalSettingContract;
 public class PersonalSettingPresenter extends BasePresenter<PersonalSettingContract.PersonalSettingView> implements PersonalSettingContract.Presenter {
 
     @Override
-    public void getTeacherSelfStyle() {
-        addSubscribe(create(APIService.class).getTeacherSelfStyle(), new BaseObserver<TeacherSelfStyleInfoBean>(getView()) {
+    public void getSetDetail() {
+        getView().showLoading();
+        addSubscribe(create(APIService.class).getSetDetail(), new BaseObserver<SetDetailBean>(getView()) {
+            @Override
+            protected void onSuccess(SetDetailBean data) {
+                if (getView() != null) {
+                    getView().getSetDetailSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+        });
+    }
+    public void submitSetDetail(String jsonStr){
+        getView().showLoading();
+        addSubscribe(create(APIService.class).submitSetDetail(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<SetDetailBean>(getView()) {
+            @Override
+            protected void onSuccess(SetDetailBean data) {
+                if (getView() != null) {
+                    getView().submitSetDetailSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+
+            }
+        });
+    }
+
+    public void upLoadImage(Activity activity, String filePath) {
+        UploadHelper uploadHelper = new UploadHelper(activity);
+        uploadHelper.uploadFile(new File(filePath));
+        uploadHelper.setUpLoadCallBack(new UploadHelper.UpLoadCallBack() {
+            @Override
+            public void onSuccess(String url) {
+                if (getView() != null) {
+                    getView().upLoadImageSuccess(url);
+                }
+            }
+
             @Override
-            protected void onSuccess(TeacherSelfStyleInfoBean data) {
+            public void onFailure() {
                 if (getView() != null) {
-                    getView().getSelfStyleSuccess(data);
+                    getView().upLoadImageFailure();
                 }
             }
         });

+ 20 - 6
teacher/src/main/java/com/cooleshow/teacher/presenter/minestyle/MineStylePagePresenter.java

@@ -34,6 +34,7 @@ public class MineStylePagePresenter extends BasePresenter<MineStylePageContract.
 
     @Override
     public void getTeacherSelfStyle() {
+        getView().showLoading();
         addSubscribe(create(APIService.class).getTeacherSelfStyle(), new BaseObserver<TeacherSelfStyleInfoBean>(getView()) {
             @Override
             protected void onSuccess(TeacherSelfStyleInfoBean data) {
@@ -41,9 +42,17 @@ public class MineStylePagePresenter extends BasePresenter<MineStylePageContract.
                     getView().getSelfStyleSuccess(data);
                 }
             }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
         });
     }
-    public void saveTeacherStyle(String jsonStr){
+
+    public void saveTeacherStyle(String jsonStr) {
+        getView().showLoading();
         addSubscribe(create(APIService.class).saveTeacherStyle(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<TeacherSelfStyleInfoBean>(getView()) {
             @Override
             protected void onSuccess(TeacherSelfStyleInfoBean data) {
@@ -53,6 +62,12 @@ public class MineStylePagePresenter extends BasePresenter<MineStylePageContract.
             }
 
             @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
+
+            @Override
             public void onError(Throwable e) {
                 super.onError(e);
 
@@ -60,17 +75,16 @@ public class MineStylePagePresenter extends BasePresenter<MineStylePageContract.
         });
     }
 
-    public void upLoadVideo(Activity activity,String filePath){
-
+    public void upLoadVideo(Activity activity, String filePath) {
         UploadHelper uploadHelper = new UploadHelper(activity);
         uploadHelper.uploadFile(new File(filePath));
         uploadHelper.setUpLoadCallBack(new UploadHelper.UpLoadCallBack() {
             @Override
             public void onSuccess(String url) {
                 if (getView() != null) {
-                    TeacherSelfStyleInfoBean.StyleVideoBean styleVideoBean=new TeacherSelfStyleInfoBean.StyleVideoBean();
-                    styleVideoBean.videoUrl=url;
-                    styleVideoBean.type=0;
+                    TeacherSelfStyleInfoBean.StyleVideoBean styleVideoBean = new TeacherSelfStyleInfoBean.StyleVideoBean();
+                    styleVideoBean.videoUrl = url;
+                    styleVideoBean.type = 0;
                     getView().upLoadVideoSuccess(styleVideoBean);
                 }
             }

+ 6 - 0
teacher/src/main/java/com/cooleshow/teacher/presenter/minestyle/TeachableInstrumentPresenter.java

@@ -19,6 +19,7 @@ public class TeachableInstrumentPresenter extends BasePresenter<TeachableInstrum
 
     @Override
     public void subjectSelect() {
+        getView().showLoading();
         addSubscribe(create(APIService.class).subjectSelect(), new BaseObserver<List<TeachableInstrumentBean>>(getView()) {
             @Override
             protected void onSuccess(List<TeachableInstrumentBean> data) {
@@ -26,6 +27,11 @@ public class TeachableInstrumentPresenter extends BasePresenter<TeachableInstrum
                     getView().subjectSelectSuccess(data);
                 }
             }
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                getView().hideLoading();
+            }
 
         });
     }

+ 76 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/AddressListActivity.java

@@ -0,0 +1,76 @@
+package com.cooleshow.teacher.ui.mine;
+
+import android.util.Log;
+import android.view.View;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.adapter.AddressListAdapter;
+import com.cooleshow.teacher.bean.AddressBean;
+import com.cooleshow.teacher.contract.AddressListContract;
+import com.cooleshow.teacher.databinding.ActivityAddressListBinding;
+import com.cooleshow.teacher.presenter.mine.AddressListPresenter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 创建日期:2022/5/17 15:16
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_ADDRESS_LIST)
+public class AddressListActivity extends BaseMVPActivity<ActivityAddressListBinding, AddressListPresenter> implements AddressListContract.AddressListView, View.OnClickListener {
+
+    private AddressListAdapter addressListAdapter;
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()) {
+            case R.id.tv_add:
+                break;
+        }
+    }
+
+    private List<AddressBean> dataList = new ArrayList<>();
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "地址列表");
+        viewBinding.tvAdd.setOnClickListener(this);
+        RecyclerView rvAddress = viewBinding.rvAddress;
+        LinearLayoutManager manager = new LinearLayoutManager(this);
+        rvAddress.setLayoutManager(manager);
+        addressListAdapter = new AddressListAdapter(dataList);
+        rvAddress.setAdapter(addressListAdapter);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        presenter.companyAddressList();
+    }
+
+    @Override
+    protected ActivityAddressListBinding getLayoutView() {
+        return ActivityAddressListBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected AddressListPresenter createPresenter() {
+        return new AddressListPresenter();
+    }
+
+    @Override
+    public void companyAddressListSuccess(List<AddressBean> data) {
+        Log.e("asdfs", "companyAddressListSuccess: "+data.size() );
+        dataList.clear();
+        dataList.addAll(data);
+        addressListAdapter.notifyDataSetChanged();
+    }
+}

+ 82 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/CheckModifyPhoneNumActivity.java

@@ -0,0 +1,82 @@
+package com.cooleshow.teacher.ui.mine;
+
+import android.content.Intent;
+import android.text.TextUtils;
+import android.view.View;
+
+import androidx.annotation.Nullable;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.contract.CheckModifyPhoneNumContract;
+import com.cooleshow.teacher.databinding.ActivityCheckModifyPhonenumBinding;
+import com.cooleshow.teacher.databinding.ActivityModifyNicknameBinding;
+import com.cooleshow.teacher.presenter.mine.CheckModifyPhoneNumPresenter;
+
+/**
+ * 创建日期:2022/5/17 10:02
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_CHECK_MODIFY_PHONENUM)
+public class CheckModifyPhoneNumActivity extends BaseMVPActivity<ActivityCheckModifyPhonenumBinding, CheckModifyPhoneNumPresenter> implements CheckModifyPhoneNumContract.CheckModifyPhoneNumView, View.OnClickListener {
+    private final int MODIFY_PHONE = 1011;
+
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()) {
+            case R.id.tv_confirm:
+                String phoneNum = viewBinding.etPhoneNum.getText().toString().trim();
+                if (TextUtils.isEmpty(phoneNum)) {
+                    ToastUtils.showShort("请输入手机号");
+                    break;
+                }
+                String password = viewBinding.etPassword.getText().toString().trim();
+                if (TextUtils.isEmpty(password)) {
+                    ToastUtils.showShort("请输入密码");
+                    break;
+                }
+                presenter.checkUser(phoneNum, password);
+                break;
+        }
+    }
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "修改手机号");
+        viewBinding.tvConfirm.setOnClickListener(this);
+    }
+
+    @Override
+    protected ActivityCheckModifyPhonenumBinding getLayoutView() {
+        return ActivityCheckModifyPhonenumBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected CheckModifyPhoneNumPresenter createPresenter() {
+        return new CheckModifyPhoneNumPresenter();
+    }
+
+    @Override
+    public void checkUserSuccess(Object object) {
+        ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_PHONENUM)
+                .withString("oldPhone",viewBinding.etPhoneNum.getText().toString().trim())
+                .navigation(this, MODIFY_PHONE);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode==RESULT_OK){
+            if (requestCode==MODIFY_PHONE){
+                setResult(RESULT_OK,data);
+                finish();
+            }
+        }
+    }
+}

+ 10 - 8
teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyNickNameActivity.java

@@ -13,9 +13,11 @@ import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.TeachableInstrumentBean;
 import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
+import com.cooleshow.teacher.bean.TeacherUserInfo;
 import com.cooleshow.teacher.contract.ModifyNickNameContract;
 import com.cooleshow.teacher.databinding.ActivityModifyNicknameBinding;
 import com.cooleshow.teacher.presenter.mine.ModifyNickNamePresenter;
+import com.cooleshow.usercenter.bean.SetDetailBean;
 import com.google.gson.Gson;
 
 import java.util.ArrayList;
@@ -31,15 +33,15 @@ import java.util.List;
 public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNicknameBinding, ModifyNickNamePresenter> implements ModifyNickNameContract.ModifyNickNameView, View.OnClickListener {
     @Autowired(name = "bundle")
     Bundle myBundle;
-    private TeacherSelfStyleInfoBean teacherInfoBean;
+    private SetDetailBean mySetDetailBean;
 
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.tv_right_text:
                 Gson gson = new Gson();
-                teacherInfoBean.username= viewBinding.etNickname.getText().toString().trim();
-                presenter.saveTeacherStyle(gson.toJson(teacherInfoBean));
+                mySetDetailBean.username= viewBinding.etNickname.getText().toString().trim();
+                presenter.submitSetDetail(gson.toJson(mySetDetailBean));
                 break;
             case R.id.im_close:
                 viewBinding.etNickname.setText("");
@@ -57,8 +59,8 @@ public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNickna
         viewBinding.toolbarInclude.tvRightText.setText("保存");
         viewBinding.toolbarInclude.tvRightText.setOnClickListener(this);
         if (null != myBundle) {
-            teacherInfoBean = (TeacherSelfStyleInfoBean) myBundle.getSerializable("teacherInfoBean");
-            viewBinding.etNickname.setText(teacherInfoBean.username);
+            mySetDetailBean = (SetDetailBean) myBundle.getSerializable("teacherInfoBean");
+            viewBinding.etNickname.setText(mySetDetailBean.username);
         }
         viewBinding.imClose.setOnClickListener(this);
     }
@@ -74,10 +76,10 @@ public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNickna
     }
 
     @Override
-    public void saveTeacherStyleSuccess(TeacherSelfStyleInfoBean styleInfoBean) {
+    public void submitSetDetailSuccess(SetDetailBean setDetailBean) {
         Intent intent=new Intent();
-        intent.putExtra("userName",styleInfoBean.username);
-        setResult(RESULT_OK);
+        intent.putExtra("userName",setDetailBean.username);
+        setResult(RESULT_OK,intent);
         finish();
     }
 }

+ 186 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPasswordActivity.java

@@ -0,0 +1,186 @@
+package com.cooleshow.teacher.ui.mine;
+
+import android.annotation.SuppressLint;
+import android.os.Handler;
+import android.os.Message;
+import android.text.TextUtils;
+import android.view.View;
+
+import com.alibaba.android.arouter.facade.annotation.Autowired;
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.contract.ModifyPasswordContract;
+import com.cooleshow.teacher.databinding.ActivityModifyPasswordBinding;
+import com.cooleshow.teacher.presenter.mine.ModifyPasswordPresenter;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * 创建日期:2022/5/17 13:33
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_MODIFY_PASSWORD)
+public class ModifyPasswordActivity extends BaseMVPActivity<ActivityModifyPasswordBinding, ModifyPasswordPresenter> implements ModifyPasswordContract.ModifyPasswordView, View.OnClickListener {
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()){
+            case R.id.tv_confirm:
+                String password = viewBinding.etPassword.getText().toString().trim();
+                if (TextUtils.isEmpty(password)||password.length()<6||password.length()>20){
+                    ToastUtils.showShort("请输入6-20位密码");
+                    break;
+                }
+                String authCode = viewBinding.etAuthCode.getText().toString().trim();
+                if (TextUtils.isEmpty(authCode)){
+                    ToastUtils.showShort("请输入验证码");
+                    break;
+                }
+                JSONObject jsonObjectC = new JSONObject();
+                try {
+                    jsonObjectC.putOpt("mobile", phoneNum);
+                    jsonObjectC.putOpt("authCode", authCode);
+                    jsonObjectC.putOpt("newPassword", password);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                presenter.updatePassword(jsonObjectC.toString());
+                break;
+            case R.id.tv_get_auth_code:
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.putOpt("mobile", phoneNum);
+                    jsonObject.putOpt("type", "PASSWD");
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                presenter.sendSmsCode(jsonObject.toString());
+                break;
+        }
+    }
+    @Autowired(name = "phoneNum")
+    String phoneNum;
+
+    @Override
+    protected void initView() {
+        ARouter.getInstance().inject(this);
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "修改密码");
+        viewBinding.tvConfirm.setOnClickListener(this);
+        viewBinding.tvGetAuthCode.setOnClickListener(this);
+        String cPhone = phoneNum.substring(0, 3) + "****" + phoneNum.substring(7, phoneNum.length());
+        viewBinding.tvPhone.setText(cPhone);
+    }
+
+    @Override
+    protected ActivityModifyPasswordBinding getLayoutView() {
+        return ActivityModifyPasswordBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected ModifyPasswordPresenter createPresenter() {
+        return new ModifyPasswordPresenter();
+    }
+
+    @Override
+    public void updatePasswordSuccess(Object object) {
+        finish();
+    }
+
+    @Override
+    public void sendSmsCodeSuccess(Object object) {
+        getCodeSuccess();
+    }
+
+
+    public void getCodeSuccess() {
+        ToastUtils.showShort("验证码发送成功,请注意查收!");
+        startTimer();
+    }
+
+    /**
+     * 执行完成
+     */
+    public static final int EXECUTE_FINISH = 0X11000;
+    /**
+     * 执行中
+     */
+    public static final int EXECUTE_LOADING = 0X4000;
+    private int mTimerId = 60;
+
+    private TimerTask timerTask;
+
+    private Timer timer;
+
+    /**
+     * 开始倒计时
+     */
+    private void startTimer() {
+
+        if (timerTask == null) {
+            timerTask = new TimerTask() {
+                @Override
+                public void run() {
+                    Message msg = new Message();
+                    msg.what = EXECUTE_LOADING;
+                    msg.arg1 = --mTimerId;
+                    handler.sendMessage(msg);
+                }
+            };
+            timer = new Timer();
+            timer.schedule(timerTask, 100, 1000);
+        }
+    }
+
+    /**
+     * 结束计时
+     */
+    private void closeTimer() {
+        if (timer != null) {
+            timer.cancel();
+            timer = null;
+        }
+        if (timerTask != null) {
+            timerTask = null;
+        }
+        mTimerId = 60;
+        handler.sendEmptyMessage(EXECUTE_FINISH);
+    }
+
+    @SuppressLint("HandlerLeak")
+    private Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case EXECUTE_LOADING:
+                    viewBinding.tvGetAuthCode.setText(msg.arg1 + "s");
+                    viewBinding.tvGetAuthCode.setClickable(false);
+                    if (msg.arg1 == 0) {
+                        closeTimer();
+                        viewBinding.tvGetAuthCode.setClickable(true);
+                    }
+                    break;
+                case EXECUTE_FINISH:
+                    viewBinding.tvGetAuthCode.setClickable(true);
+                    viewBinding.tvGetAuthCode.setText("获取验证码");
+                    break;
+            }
+            super.handleMessage(msg);
+        }
+    };
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        handler.removeCallbacksAndMessages(EXECUTE_LOADING);
+    }
+}

+ 165 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPhoneNumActivity.java

@@ -0,0 +1,165 @@
+package com.cooleshow.teacher.ui.mine;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.View;
+
+import com.alibaba.android.arouter.facade.annotation.Autowired;
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.contract.ModifyPhoneNumContract;
+import com.cooleshow.teacher.databinding.ActivityModifyPhonenumBinding;
+import com.cooleshow.teacher.presenter.mine.ModifyPhoneNumPresenter;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * 创建日期:2022/5/17 10:49
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_MODIFY_PHONENUM)
+public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonenumBinding, ModifyPhoneNumPresenter> implements ModifyPhoneNumContract.ModifyPhoneNumView, View.OnClickListener {
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()){
+            case R.id.tv_get_auth_code:
+                getCodeSuccess();
+                break;
+            case R.id.tv_save:
+                String phoneNum = viewBinding.etPhoneNum.getText().toString().trim();
+                if (TextUtils.isEmpty(phoneNum)){
+                    ToastUtils.showShort("请输入手机号");
+                    break;
+                }
+                String authCode = viewBinding.etAuthCode.getText().toString().trim();
+                if (TextUtils.isEmpty(authCode)){
+                    ToastUtils.showShort("请输入验证码");
+                    break;
+                }
+                presenter.updatePhone(oldPhone,phoneNum,authCode);
+                break;
+        }
+    }
+    @Autowired(name = "oldPhone")
+    String oldPhone;
+    @Override
+    protected void initView() {
+        ARouter.getInstance().inject(this);
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "新手机号绑定");
+        viewBinding.tvGetAuthCode.setOnClickListener(this);
+        viewBinding.tvSave.setOnClickListener(this);
+    }
+
+    @Override
+    protected ActivityModifyPhonenumBinding getLayoutView() {
+        return ActivityModifyPhonenumBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected ModifyPhoneNumPresenter createPresenter() {
+        return new ModifyPhoneNumPresenter();
+    }
+
+    @Override
+    public void updatePhoneSuccess(Object object) {
+        Intent intent=new Intent();
+        intent.putExtra("newPhoneNum",viewBinding.etPhoneNum.getText().toString().trim());
+        setResult(RESULT_OK,intent);
+        finish();
+    }
+
+    public void getCodeSuccess() {
+        ToastUtils.showShort("验证码发送成功,请注意查收!");
+        startTimer();
+    }
+
+    /**
+     * 执行完成
+     */
+    public static final int EXECUTE_FINISH = 0X11000;
+    /**
+     * 执行中
+     */
+    public static final int EXECUTE_LOADING = 0X4000;
+    private int mTimerId = 60;
+
+    private TimerTask timerTask;
+
+    private Timer timer;
+
+    /**
+     * 开始倒计时
+     */
+    private void startTimer() {
+
+        if (timerTask == null) {
+            timerTask = new TimerTask() {
+                @Override
+                public void run() {
+                    Message msg = new Message();
+                    msg.what = EXECUTE_LOADING;
+                    msg.arg1 = --mTimerId;
+                    handler.sendMessage(msg);
+                }
+            };
+            timer = new Timer();
+            timer.schedule(timerTask, 100, 1000);
+        }
+    }
+
+    /**
+     * 结束计时
+     */
+    private void closeTimer() {
+        if (timer != null) {
+            timer.cancel();
+            timer = null;
+        }
+        if (timerTask != null) {
+            timerTask = null;
+        }
+        mTimerId = 60;
+        handler.sendEmptyMessage(EXECUTE_FINISH);
+    }
+
+    @SuppressLint("HandlerLeak")
+    private Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case EXECUTE_LOADING:
+                    viewBinding.tvGetAuthCode.setText(msg.arg1 + "s");
+                    viewBinding.tvGetAuthCode.setClickable(false);
+                    if (msg.arg1 == 0) {
+                        closeTimer();
+                        viewBinding.tvGetAuthCode.setClickable(true);
+                    }
+                    break;
+                case EXECUTE_FINISH:
+                    viewBinding.tvGetAuthCode.setClickable(true);
+                    viewBinding.tvGetAuthCode.setText("获取验证码");
+                    break;
+            }
+            super.handleMessage(msg);
+        }
+    };
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        handler.removeCallbacksAndMessages(EXECUTE_LOADING);
+    }
+}

+ 73 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/PersonalCertificationActivity.java

@@ -0,0 +1,73 @@
+package com.cooleshow.teacher.ui.mine;
+
+import android.text.TextUtils;
+import android.view.View;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtils;
+import com.cooleshow.teacher.R;
+import com.cooleshow.teacher.contract.PersonalCertificationContract;
+import com.cooleshow.teacher.databinding.ActivityPersonalCertificationBinding;
+import com.cooleshow.teacher.presenter.mine.PersonalCertificationPresenter;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * 创建日期:2022/5/17 14:17
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_PERSONAL_CERTIFICATION)
+public class PersonalCertificationActivity extends BaseMVPActivity<ActivityPersonalCertificationBinding, PersonalCertificationPresenter> implements PersonalCertificationContract.PersonalCertificationView, View.OnClickListener {
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()){
+            case R.id.tv_confirm:
+                String name = viewBinding.etName.getText().toString().trim();
+                if (TextUtils.isEmpty(name)){
+                    ToastUtils.showShort("请输入真实姓名");
+                    break;
+                }
+                String certificateNum = viewBinding.etCertificateNum.getText().toString().trim();
+                if (TextUtils.isEmpty(certificateNum)){
+                    ToastUtils.showShort("请输入身份证号");
+                    break;
+                }
+                JSONObject jsonObjectC = new JSONObject();
+                try {
+                    jsonObjectC.putOpt("realName", name);
+                    jsonObjectC.putOpt("idCardNo", certificateNum);
+                    jsonObjectC.putOpt("save", false);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                presenter.realNameAuth(jsonObjectC.toString());
+                break;
+        }
+    }
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "实名认证");
+        viewBinding.tvConfirm.setOnClickListener(this);
+    }
+
+    @Override
+    protected ActivityPersonalCertificationBinding getLayoutView() {
+        return ActivityPersonalCertificationBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected PersonalCertificationPresenter createPresenter() {
+        return new PersonalCertificationPresenter();
+    }
+
+    @Override
+    public void realNameAuthSuccess(Object object) {
+        finish();
+    }
+}

+ 242 - 22
teacher/src/main/java/com/cooleshow/teacher/ui/mine/PersonalSettingActivity.java

@@ -1,25 +1,50 @@
 package com.cooleshow.teacher.ui.mine;
 
+import android.Manifest;
+import android.app.Activity;
 import android.content.Intent;
+import android.graphics.Bitmap;
+import android.net.Uri;
+import android.os.Build;
 import android.os.Bundle;
+import android.os.Environment;
+import android.provider.MediaStore;
+import android.text.TextUtils;
+import android.util.Log;
 import android.view.View;
+import android.widget.PopupWindow;
+import android.widget.TextView;
 
 import androidx.annotation.Nullable;
-import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.core.content.FileProvider;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ActivityUtils;
+import com.cooleshow.base.utils.FileUtils;
 import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.IntentUtils;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.UriUtils;
 import com.cooleshow.teacher.R;
-import com.cooleshow.teacher.bean.TeacherSelfStyleInfoBean;
 import com.cooleshow.teacher.contract.PersonalSettingContract;
 import com.cooleshow.teacher.databinding.ActivityPersonalSettingBinding;
 import com.cooleshow.teacher.presenter.mine.PersonalSettingPresenter;
+import com.cooleshow.teacher.ui.minestyle.MineStylePageActivity;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+import com.google.gson.Gson;
+import com.luck.picture.lib.tools.MediaUtils;
+import com.tbruyelle.rxpermissions3.RxPermissions;
 
-import java.io.Serializable;
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
 
 /**
  * 创建日期:2022/5/16 16:07
@@ -29,38 +54,188 @@ import java.io.Serializable;
  */
 @Route(path = RouterPath.MineCenter.MINE_PERSONAL_SETTING)
 public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSettingBinding, PersonalSettingPresenter> implements PersonalSettingContract.PersonalSettingView, View.OnClickListener {
-    private TeacherSelfStyleInfoBean teacherInfoBean;
+    private SetDetailBean mySetDetailBean;
     private final int MODIFY_NICKNAME = 1001;
+    private final int MODIFY_PHONE = 1002;
+    private final int PERSONAL_CERTIFICATION = 1003;
+    private final int REQUEST_CODE_CAMERA = 0x44;
+    public final int REQUEST_CODE_LOCAL = 0x19;
+
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.cl_header:
+                selectHeader();
                 break;
             case R.id.cl_name:
-                if (null != teacherInfoBean) {
+                if (null != mySetDetailBean) {
                     Bundle bundle = new Bundle();
-                    bundle.putSerializable("teacherInfoBean",teacherInfoBean);
+                    bundle.putSerializable("teacherInfoBean", mySetDetailBean);
                     ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_NICKNAME)
                             .withBundle("bundle", bundle)
-                            .navigation(this,MODIFY_NICKNAME);
+                            .navigation(this, MODIFY_NICKNAME);
                 }
 
                 break;
             case R.id.cl_sex:
+                modifySex();
                 break;
             case R.id.cl_phone:
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_CHECK_MODIFY_PHONENUM)
+                        .navigation(this, MODIFY_PHONE);
                 break;
             case R.id.cl_modify_psd:
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_PASSWORD)
+                        .withString("phoneNum", mySetDetailBean.phone)
+                        .navigation();
                 break;
             case R.id.cl_certification:
-                //老师认证
-                ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
-                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_CERT)
-                        .navigation();
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_PERSONAL_CERTIFICATION)
+                        .navigation(this, PERSONAL_CERTIFICATION);
                 break;
         }
     }
 
+    private void modifySex() {
+        PopupUtil.showInBottom(this, R.layout.pop_modify_sex, (view, popupWindow) -> {
+            TextView tv_boy = view.findViewById(R.id.tv_boy);
+            TextView tv_girl = view.findViewById(R.id.tv_girl);
+            TextView tv_cancel = view.findViewById(R.id.tv_cancel);
+            tv_boy.setOnClickListener(view13 -> {
+                SetDetailBean requestBean = new SetDetailBean();
+                requestBean.gender = 1;
+                requestBean.real = mySetDetailBean.real;
+                requestBean.phone = mySetDetailBean.phone;
+                requestBean.birthdate = mySetDetailBean.birthdate;
+                requestBean.avatar = mySetDetailBean.avatar;
+                requestBean.username = mySetDetailBean.username;
+                Gson gson = new Gson();
+                presenter.submitSetDetail(gson.toJson(requestBean));
+            });
+            tv_girl.setOnClickListener(view12 -> {
+                SetDetailBean requestBean = new SetDetailBean();
+                requestBean.gender = 0;
+                requestBean.real = mySetDetailBean.real;
+                requestBean.phone = mySetDetailBean.phone;
+                requestBean.birthdate = mySetDetailBean.birthdate;
+                requestBean.avatar = mySetDetailBean.avatar;
+                requestBean.username = mySetDetailBean.username;
+                Gson gson = new Gson();
+                presenter.submitSetDetail(gson.toJson(requestBean));
+            });
+            tv_cancel.setOnClickListener(view1 -> popupWindow.dismiss());
+
+        });
+
+    }
+
+    private void selectHeader() {
+        PopupUtil.showInBottom(this, R.layout.pop_modify_header, (view, popupWindow) -> {
+            TextView tv_camera = view.findViewById(R.id.tv_camera);
+            TextView tv_album = view.findViewById(R.id.tv_album);
+            TextView tv_cancel = view.findViewById(R.id.tv_cancel);
+            tv_camera.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    toCamera();
+                    popupWindow.dismiss();
+                }
+            });
+            tv_album.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    toAlbum();
+                    popupWindow.dismiss();
+                }
+            });
+            tv_cancel.setOnClickListener(view1 -> popupWindow.dismiss());
+        });
+    }
+
+    private void toCamera() {
+        new RxPermissions(this)
+                .request(Manifest.permission.CAMERA,
+                        Manifest.permission.READ_EXTERNAL_STORAGE,
+                        Manifest.permission.WRITE_EXTERNAL_STORAGE)
+                .subscribe(granted -> {
+                    if (granted) {
+                      /*  Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
+                        File file = new File(imagePath);
+                        Uri imageUri = Uri.fromFile(file);
+                        intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
+                        Log.e("asdfasdfasdfadfs", "111111" );
+                        ActivityUtils.startActivityForResult(this, intent, REQUEST_CODE_CAMERA);*/
+                        imagePath = Environment.getExternalStorageDirectory().getPath() + "/DCIM/Camera/" + System.currentTimeMillis()+".jpg";
+                        requestCamera(imagePath);
+                    } else {
+                        ToastUtil.getInstance().show(this, "请选择存储和相机权限!");
+                    }
+                });
+    }
+
+    private void requestCamera(String filePath) {
+        File outputImage = new File(filePath);
+                /*
+                创建一个File文件对象,用于存放摄像头拍下的图片,我们把这个图片命名为output_image.jpg
+                并把它存放在应用关联缓存目录下,调用getExternalCacheDir()可以得到这个目录,为什么要
+                用关联缓存目录呢?由于android6.0开始,读写sd卡列为了危险权限,使用的时候必须要有权限,
+                应用关联目录则可以跳过这一步
+                 */
+        try//判断图片是否存在,存在则删除在创建,不存在则直接创建
+        {
+            if (!outputImage.getParentFile().exists()) {
+                outputImage.getParentFile().mkdirs();
+            }
+            if (outputImage.exists()) {
+                outputImage.delete();
+            }
+
+            outputImage.createNewFile();
+            Uri imageUri;
+            if (Build.VERSION.SDK_INT >= 24) {
+                imageUri = FileProvider.getUriForFile(this,
+                        "com.cooleshow.teacher.fileprovider", outputImage);
+            } else {
+                imageUri = Uri.fromFile(outputImage);
+            }
+            //使用隐示的Intent,系统会找到与它对应的活动,即调用摄像头,并把它存储
+            Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
+            intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
+            ActivityUtils.startActivityForResult(this, intent, REQUEST_CODE_CAMERA);
+            //调用会返回结果的开启方式,返回成功的话,则把它显示出来
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    private String imagePath = null;//当前图片的路径
+
+
+
+    private void toAlbum() {
+        new RxPermissions(this)
+                .request(Manifest.permission.CAMERA,
+                        Manifest.permission.READ_EXTERNAL_STORAGE,
+                        Manifest.permission.WRITE_EXTERNAL_STORAGE)
+                .subscribe(granted -> {
+                    if (granted) {
+                        Intent intent;
+                        if (Build.VERSION.SDK_INT < 19) {
+                            intent = new Intent(Intent.ACTION_GET_CONTENT);
+                            intent.setType("image/*");
+                        } else {
+                            intent = new Intent(Intent.ACTION_PICK,
+                                    android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
+                        }
+                        ActivityUtils.startActivityForResult(this, intent, REQUEST_CODE_LOCAL);
+                    } else {
+                        ToastUtil.getInstance().show(this, "请选择存储和相机权限!");
+                    }
+                });
+    }
+
+
     @Override
     protected void initView() {
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "设置");
@@ -75,7 +250,7 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
     @Override
     public void initData() {
         super.initData();
-        presenter.getTeacherSelfStyle();
+        presenter.getSetDetail();
     }
 
     @Override
@@ -89,35 +264,80 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
     }
 
     @Override
-    public void getSelfStyleSuccess(TeacherSelfStyleInfoBean styleInfoBean) {
-        teacherInfoBean = styleInfoBean;
-        GlideUtils.INSTANCE.loadImage(this, styleInfoBean.avatar, viewBinding.imHeader, R.drawable.icon_teacher_default_head);
-        viewBinding.tvNickname.setText(styleInfoBean.username);
-        if (styleInfoBean.gender.equals("0")) {
+    public void getSetDetailSuccess(SetDetailBean setDetailBean) {
+        mySetDetailBean = setDetailBean;
+        GlideUtils.INSTANCE.loadImage(this, setDetailBean.avatar, viewBinding.imHeader, R.drawable.icon_teacher_default_head);
+        viewBinding.tvNickname.setText(setDetailBean.username);
+        if (setDetailBean.gender == 0) {
             //女
             viewBinding.tvSex.setText("女");
         } else {
             //男
             viewBinding.tvSex.setText("男");
         }
-        viewBinding.tvPhone.setText(styleInfoBean.phone);
-        if (styleInfoBean.isReal.equals("0")) {
+        viewBinding.tvPhone.setText(setDetailBean.phone);
+        if (setDetailBean.real) {
+            //是
+            viewBinding.tvCertificationStatus.setText("已认证");
+        } else {
             //否
             viewBinding.tvCertificationStatus.setText("未认证");
+        }
+    }
+
+    @Override
+    public void submitSetDetailSuccess(SetDetailBean setDetailBean) {
+        mySetDetailBean.gender = setDetailBean.gender;
+        if (setDetailBean.gender == 0) {
+            //女
+            viewBinding.tvSex.setText("女");
         } else {
-            //是
-            viewBinding.tvCertificationStatus.setText("已认证");
+            //
+            viewBinding.tvSex.setText("男");
         }
     }
 
     @Override
+    public void upLoadImageSuccess(String url) {
+        hideLoading();
+        Log.e("aksjhkasndfs", "upLoadImageSuccess: " + url);
+    }
+
+    @Override
+    public void upLoadImageFailure() {
+        hideLoading();
+    }
+
+    @Override
     protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
         if (resultCode == RESULT_OK) {
             if (requestCode == MODIFY_NICKNAME) {
                 String userName = data.getStringExtra("userName");
-                teacherInfoBean.username=userName;
+                mySetDetailBean.username = userName;
                 viewBinding.tvNickname.setText(userName);
+            } else if (requestCode == MODIFY_PHONE) {
+                String newPhoneNum = data.getStringExtra("newPhoneNum");
+                mySetDetailBean.phone = newPhoneNum;
+                viewBinding.tvPhone.setText(newPhoneNum);
+            } else if (requestCode == PERSONAL_CERTIFICATION) {
+                viewBinding.tvCertificationStatus.setText("已认证");
+            } else if (requestCode == REQUEST_CODE_CAMERA) {
+                if (!TextUtils.isEmpty(imagePath)) {
+                    showLoading();
+                    presenter.upLoadImage(PersonalSettingActivity.this, imagePath);
+
+                }
+
+            } else if (requestCode == REQUEST_CODE_LOCAL) {
+                if (data != null) {
+                    Uri selectedImage = data.getData();
+                    if (selectedImage != null) {
+                        String v_path = FileUtils.getFilePathForN(selectedImage, PersonalSettingActivity.this);
+                        showLoading();
+                        presenter.upLoadImage(PersonalSettingActivity.this, v_path);
+                    }
+                }
             }
         }
     }

+ 3 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/mine/SettingActivity.java

@@ -3,6 +3,7 @@ package com.cooleshow.teacher.ui.mine;
 import android.view.View;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.teacher.R;
@@ -23,6 +24,8 @@ public class SettingActivity extends BaseMVPActivity<ActivitySettingBinding, Set
     public void onClick(View view) {
         switch (view.getId()){
             case R.id.cl_address:
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_ADDRESS_LIST)
+                        .navigation();
                 break;
             case R.id.cl_detection:
                 break;

+ 0 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/minestyle/MineStylePageActivity.java

@@ -301,10 +301,8 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
                         Manifest.permission.WRITE_EXTERNAL_STORAGE)
                 .subscribe(granted -> {
                     if (granted) {
-                        // All requested permissions are granted
                         chooseVideo();
                     } else {
-                        // At least one permission is denied
                         ToastUtil.getInstance().show(this, "请选择存储和相机权限!");
                     }
                 });

BIN
teacher/src/main/res/drawable-xhdpi/icon_go_down.png


BIN
teacher/src/main/res/drawable-xhdpi/icon_modify_address.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_go_down.png


BIN
teacher/src/main/res/drawable-xxhdpi/icon_modify_address.png


+ 36 - 0
teacher/src/main/res/layout/activity_address_list.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/color_f6f8f9"
+    android:orientation="vertical">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/rv_address"
+        android:layout_below="@+id/toolbar_include"
+        android:layout_width="match_parent"
+        android:layout_marginTop="15dp"
+        android:layout_marginBottom="80dp"
+        android:layout_height="wrap_content"/>
+
+    <TextView
+        android:id="@+id/tv_add"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_alignParentBottom="true"
+        android:layout_marginLeft="28dp"
+        android:layout_marginTop="27dp"
+        android:layout_marginRight="28dp"
+        android:layout_marginBottom="48dp"
+        android:background="@drawable/shape_course_status_ing"
+        android:gravity="center"
+        android:text="添加新地址"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14" />
+</RelativeLayout>

+ 79 - 0
teacher/src/main/res/layout/activity_check_modify_phonenum.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/color_f6f8f9"
+    android:orientation="vertical"
+    tools:ignore="MissingDefaultResource">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:background="@color/white">
+
+        <EditText
+            android:id="@+id/et_phone_num"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_48"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:hint="请输当前手机号"
+            android:inputType="phone"
+            android:paddingLeft="14dp"
+            android:paddingRight="14dp"
+            android:textColor="@color/color_1a1a1a"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_marginLeft="12dp"
+            android:background="@color/divide_color_f0f0f0"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/et_phone_num" />
+
+        <EditText
+            android:id="@+id/et_password"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_48"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:hint="请输入密码"
+            android:inputType="textPassword"
+            android:paddingLeft="14dp"
+            android:paddingRight="14dp"
+            android:textColor="@color/color_1a1a1a"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line" />
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+    <TextView
+        android:id="@+id/tv_confirm"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginLeft="28dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginRight="28dp"
+        android:layout_marginBottom="48dp"
+        android:background="@drawable/shape_course_status_ing"
+        android:gravity="center"
+        android:text="确定"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14" />
+
+</LinearLayout>

+ 2 - 2
teacher/src/main/res/layout/activity_mine_course_layout.xml

@@ -5,7 +5,7 @@
     android:layout_height="match_parent">
 
     <include
-        android:id="@+id/toolbarInclude"
+        android:id="@+id/toolbar_include"
         layout="@layout/common_toolbar_layout" />
 
     <RadioGroup
@@ -14,7 +14,7 @@
         android:layout_height="@dimen/dp_40"
         android:gravity="center_vertical"
         android:orientation="horizontal"
-        app:layout_constraintTop_toBottomOf="@+id/toolbarInclude">
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
 
         <RadioButton
             android:id="@+id/rb_sparring"

+ 1 - 1
teacher/src/main/res/layout/activity_mine_style_page.xml

@@ -7,7 +7,7 @@
     android:orientation="vertical">
 
     <include
-        android:id="@+id/toolbarInclude"
+        android:id="@+id/toolbar_include"
         layout="@layout/common_toolbar_layout" />
 
     <ScrollView

+ 1 - 1
teacher/src/main/res/layout/activity_modify_nickname.xml

@@ -7,7 +7,7 @@
     android:orientation="vertical">
 
     <include
-        android:id="@+id/toolbarInclude"
+        android:id="@+id/toolbar_include"
         layout="@layout/common_toolbar_layout" />
 
     <androidx.constraintlayout.widget.ConstraintLayout

+ 100 - 0
teacher/src/main/res/layout/activity_modify_password.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/color_f6f8f9"
+    android:orientation="vertical"
+    tools:ignore="MissingDefaultResource">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <TextView
+        android:id="@+id/tv_phone"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="20sp"
+        android:text="--"
+        android:layout_marginLeft="12dp"
+        android:layout_marginTop="15dp"
+        android:textColor="@color/black"/>
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:background="@color/white">
+
+        <EditText
+            android:id="@+id/et_password"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_48"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:hint="请输入6-20位密码"
+            android:inputType="textPassword"
+            android:paddingLeft="14dp"
+            android:paddingRight="14dp"
+            android:textColor="@color/color_1a1a1a"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_marginLeft="12dp"
+            android:background="@color/divide_color_f0f0f0"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/et_password" />
+
+        <EditText
+            android:id="@+id/et_auth_code"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_48"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:hint="请输入验证码"
+            android:inputType="number"
+            android:paddingLeft="14dp"
+            android:paddingRight="14dp"
+            android:textColor="@color/color_1a1a1a"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line" />
+
+        <TextView
+            android:id="@+id/tv_get_auth_code"
+            android:layout_width="wrap_content"
+            android:layout_height="@dimen/dp_48"
+            android:layout_marginRight="12dp"
+            android:gravity="center"
+            android:text="获取验证码"
+            android:textSize="@dimen/sp_14"
+            android:textColor="@color/color_01c0b5"
+            app:layout_constraintTop_toBottomOf="@+id/view_line"
+            app:layout_constraintRight_toRightOf="parent"/>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+    <TextView
+        android:id="@+id/tv_confirm"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginLeft="28dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginRight="28dp"
+        android:layout_marginBottom="48dp"
+        android:background="@drawable/shape_course_status_ing"
+        android:gravity="center"
+        android:text="确定"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14" />
+
+</LinearLayout>

+ 90 - 0
teacher/src/main/res/layout/activity_modify_phonenum.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/color_f6f8f9"
+    android:orientation="vertical"
+    tools:ignore="MissingDefaultResource">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:background="@color/white">
+
+        <EditText
+            android:id="@+id/et_phone_num"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_48"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:hint="请输手机号"
+            android:inputType="phone"
+            android:paddingLeft="14dp"
+            android:paddingRight="14dp"
+            android:textColor="@color/color_1a1a1a"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_marginLeft="12dp"
+            android:background="@color/divide_color_f0f0f0"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/et_phone_num" />
+
+        <EditText
+            android:id="@+id/et_auth_code"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_48"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:hint="请输入验证码"
+            android:inputType="textPassword"
+            android:paddingLeft="14dp"
+            android:paddingRight="14dp"
+            android:textColor="@color/color_1a1a1a"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line" />
+
+        <TextView
+            android:id="@+id/tv_get_auth_code"
+            android:layout_width="wrap_content"
+            android:layout_height="@dimen/dp_48"
+            android:layout_marginRight="12dp"
+            android:gravity="center"
+            android:text="获取验证码"
+            android:textSize="@dimen/sp_14"
+            android:textColor="@color/color_01c0b5"
+            app:layout_constraintTop_toBottomOf="@+id/view_line"
+            app:layout_constraintRight_toRightOf="parent"/>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+    <TextView
+        android:id="@+id/tv_save"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginLeft="28dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginRight="28dp"
+        android:layout_marginBottom="48dp"
+        android:background="@drawable/shape_course_status_ing"
+        android:gravity="center"
+        android:text="确定"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14" />
+
+</LinearLayout>

+ 151 - 0
teacher/src/main/res/layout/activity_personal_certification.xml

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/color_f6f8f9"
+    android:orientation="vertical">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="14dp"
+        android:layout_marginTop="15dp"
+        android:layout_marginEnd="14dp">
+
+        <TextView
+            android:id="@+id/tv_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="27dp"
+            android:text="姓名"
+            android:textColor="@color/black"
+            android:textSize="@dimen/sp_18"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <EditText
+            android:id="@+id/et_name"
+            android:layout_width="match_parent"
+            android:layout_height="45dp"
+            android:background="@null"
+            android:hint="请输入真实姓名"
+            android:paddingLeft="27dp"
+            android:paddingRight="28dp"
+            android:inputType="text"
+            android:textColor="@color/black_333"
+            android:textColorHint="@color/color_ffc1c1c1"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_name" />
+
+        <View
+            android:id="@+id/view_line1"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginLeft="34dp"
+            android:layout_marginRight="35dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/et_name" />
+
+        <TextView
+            android:id="@+id/tv_certificate_type"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="27dp"
+            android:layout_marginTop="16dp"
+            android:text="证件类型"
+            android:textColor="@color/black"
+            android:textSize="@dimen/sp_18"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line1" />
+
+        <TextView
+            android:id="@+id/tv_select_certificate_type"
+            android:layout_width="wrap_content"
+            android:layout_height="45dp"
+            android:layout_marginLeft="27dp"
+            android:gravity="center"
+            android:text="请选择"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_certificate_type" />
+
+        <ImageView
+            android:layout_width="@dimen/dp_12"
+            android:layout_height="@dimen/dp_7"
+            android:layout_marginLeft="5dp"
+            android:background="@drawable/icon_go_down"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_select_certificate_type"
+            app:layout_constraintLeft_toRightOf="@+id/tv_select_certificate_type"
+            app:layout_constraintTop_toTopOf="@+id/tv_select_certificate_type" />
+
+        <View
+            android:id="@+id/view_line2"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginLeft="34dp"
+            android:layout_marginRight="35dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_select_certificate_type" />
+
+
+        <TextView
+            android:id="@+id/tv_certificate_num"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="27dp"
+            android:layout_marginTop="16dp"
+            android:text="证件号码"
+            android:textColor="@color/black"
+            android:textSize="@dimen/sp_18"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/view_line2" />
+
+        <EditText
+            android:id="@+id/et_certificate_num"
+            android:layout_width="match_parent"
+            android:layout_height="45dp"
+            android:background="@null"
+            android:hint="请输入身份证号"
+            android:paddingLeft="27dp"
+            android:paddingRight="28dp"
+            android:textColor="@color/black_333"
+            android:inputType="number"
+            android:textColorHint="@color/color_ffc1c1c1"
+            android:textSize="@dimen/sp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_certificate_num" />
+
+        <View
+            android:id="@+id/view_line3"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginLeft="34dp"
+            android:layout_marginRight="35dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/et_certificate_num" />
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+    <TextView
+        android:id="@+id/tv_confirm"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginLeft="28dp"
+        android:layout_marginTop="27dp"
+        android:layout_marginRight="28dp"
+        android:layout_marginBottom="48dp"
+        android:background="@drawable/shape_course_status_ing"
+        android:gravity="center"
+        android:text="确定"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14" />
+</LinearLayout>

+ 1 - 1
teacher/src/main/res/layout/activity_personal_setting.xml

@@ -7,7 +7,7 @@
     android:orientation="vertical">
 
     <include
-        android:id="@+id/toolbarInclude"
+        android:id="@+id/toolbar_include"
         layout="@layout/common_toolbar_layout"/>
 
     <androidx.constraintlayout.widget.ConstraintLayout

+ 1 - 1
teacher/src/main/res/layout/activity_setting.xml

@@ -7,7 +7,7 @@
     android:orientation="vertical">
 
     <include
-        android:id="@+id/toolbarInclude"
+        android:id="@+id/toolbar_include"
         layout="@layout/common_toolbar_layout" />
 
     <androidx.constraintlayout.widget.ConstraintLayout

+ 2 - 2
teacher/src/main/res/layout/activity_teachable_instrument.xml

@@ -7,7 +7,7 @@
     android:orientation="vertical">
 
     <include
-        android:id="@+id/toolbarInclude"
+        android:id="@+id/toolbar_include"
         layout="@layout/common_toolbar_layout" />
 
     <TextView
@@ -16,7 +16,7 @@
         android:layout_height="36dp"
         android:layout_marginLeft="14dp"
         android:layout_marginTop="15dp"
-        android:layout_below="@+id/toolbarInclude"
+        android:layout_below="@+id/toolbar_include"
         android:layout_marginRight="14dp"
         android:background="@drawable/bg_white_10dp"
         android:gravity="center_vertical"

+ 66 - 0
teacher/src/main/res/layout/layout_address_item.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tool="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingTop="10dp">
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="14dp"
+        android:text="--"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_18"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tool:text="李姗姗" />
+
+    <TextView
+        android:id="@+id/tv_phone"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="17dp"
+        android:text="--"
+        android:textColor="@color/color_666666"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_name"
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
+        tool:text="132****3455" />
+
+    <TextView
+        android:id="@+id/tv_address"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="14dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginRight="30dp"
+        android:textColor="@color/color_666666"
+        android:textSize="@dimen/sp_16"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tv_name"
+        tool:text="湖北省武汉市汉街总部" />
+
+    <ImageView
+        android:id="@+id/im_address"
+        android:layout_width="@dimen/dp_38"
+        android:layout_height="@dimen/dp_39"
+        android:padding="@dimen/dp_10"
+        android:src="@drawable/icon_modify_address"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_address"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_name" />
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginLeft="14dp"
+        android:layout_marginRight="14dp"
+        android:layout_marginTop="10dp"
+        app:layout_constraintTop_toBottomOf="@+id/tv_address"
+        android:background="@color/divide_color_f0f0f0"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 93 - 0
teacher/src/main/res/layout/pop_modify_header.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_content"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/bg_white_10dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
+
+            <TextView
+                android:id="@+id/tv_title"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="选择图片"
+                android:textColor="@color/color_999999"
+                android:textSize="@dimen/sp_16"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <View
+                android:id="@+id/view_line1"
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/color_f5f5f5"
+                app:layout_constraintTop_toBottomOf="@+id/tv_title" />
+
+            <TextView
+                android:id="@+id/tv_camera"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="拍照"
+                android:textColor="@color/color_2dc7aa"
+                android:textSize="@dimen/sp_18"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/view_line1" />
+
+            <View
+                android:id="@+id/view_line2"
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/color_f5f5f5"
+                app:layout_constraintTop_toBottomOf="@+id/tv_camera" />
+
+            <TextView
+                android:id="@+id/tv_album"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="相册"
+                android:textColor="@color/color_2dc7aa"
+                android:textSize="@dimen/sp_18"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/view_line2" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="16dp"
+            android:background="@drawable/bg_white_10dp"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/cl_content">
+
+            <TextView
+                android:id="@+id/tv_cancel"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="取消"
+                android:textColor="@color/black_444"
+                android:textSize="@dimen/sp_18"
+                android:textStyle="bold"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</RelativeLayout>

+ 92 - 0
teacher/src/main/res/layout/pop_modify_sex.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/cl_content"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/bg_white_10dp"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
+
+            <TextView
+                android:id="@+id/tv_title"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="性别修改"
+                android:textColor="@color/color_999999"
+                android:textSize="@dimen/sp_16"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <View
+                android:id="@+id/view_line1"
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/color_f5f5f5"
+                app:layout_constraintTop_toBottomOf="@+id/tv_title" />
+
+            <TextView
+                android:id="@+id/tv_boy"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="男"
+                android:textColor="@color/color_2dc7aa"
+                android:textSize="@dimen/sp_18"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/view_line1" />
+
+            <View
+                android:id="@+id/view_line2"
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/color_f5f5f5"
+                app:layout_constraintTop_toBottomOf="@+id/tv_boy" />
+
+            <TextView
+                android:id="@+id/tv_girl"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="女"
+                android:textColor="@color/color_2dc7aa"
+                android:textSize="@dimen/sp_18"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/view_line2" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="16dp"
+            android:background="@drawable/bg_white_10dp"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/cl_content">
+
+            <TextView
+                android:id="@+id/tv_cancel"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_52"
+                android:gravity="center"
+                android:text="取消"
+                android:textColor="@color/black_444"
+                android:textSize="@dimen/sp_18"
+                android:textStyle="bold"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</RelativeLayout>

+ 26 - 0
usercenter/src/main/java/com/cooleshow/usercenter/bean/SetDetailBean.java

@@ -0,0 +1,26 @@
+package com.cooleshow.usercenter.bean;
+
+import java.io.Serializable;
+
+/**
+ * 创建日期:2022/5/17 9:43
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class SetDetailBean implements Serializable {
+    /**
+     * "avatar": "",
+     * "birthdate": "",
+     * "gender": 0,
+     * "phone": "",
+     * "real": true,
+     * "username": ""
+     */
+    public String avatar;
+    public String birthdate;
+    public int gender;
+    public String phone;
+    public boolean real;
+    public String username;
+}