Kaynağa Gözat

增加机构版设置相关页面

Pq 1 yıl önce
ebeveyn
işleme
e8beb7d027
21 değiştirilmiş dosya ile 1348 ekleme ve 10 silme
  1. 1 1
      BaseLibrary/src/main/java/com/cooleshow/base/bean/TeachableInstrumentBean.java
  2. 1 0
      BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt
  3. 5 0
      institution/src/main/AndroidManifest.xml
  4. 11 0
      institution/src/main/java/com/cooleshow/institution/stu/api/APIService.java
  5. 22 0
      institution/src/main/java/com/cooleshow/institution/stu/contract/PersonalSettingContract.java
  6. 89 0
      institution/src/main/java/com/cooleshow/institution/stu/presenter/PersonalSettingPresenter.java
  7. 33 1
      institution/src/main/java/com/cooleshow/institution/stu/ui/main/MineFragment.java
  8. 556 0
      institution/src/main/java/com/cooleshow/institution/stu/ui/setting/PersonalSettingActivity.java
  9. 5 0
      institution/src/main/res/drawable/shape_fe2451_39dp.xml
  10. 432 0
      institution/src/main/res/layout/jg_activity_personal_setting.xml
  11. 93 0
      institution/src/main/res/layout/pop_modify_header.xml
  12. 92 0
      institution/src/main/res/layout/pop_modify_sex.xml
  13. 1 1
      student/src/main/java/com/cooleshow/student/adapter/TeachableInstrumentAdapter.java
  14. 1 1
      student/src/main/java/com/cooleshow/student/adapter/TeachableInstrumentItemAdapter.java
  15. 1 1
      student/src/main/java/com/cooleshow/student/api/APIService.java
  16. 0 1
      student/src/main/java/com/cooleshow/student/contract/HomeContract.java
  17. 1 1
      student/src/main/java/com/cooleshow/student/contract/TeachableInstrumentContract.java
  18. 1 1
      student/src/main/java/com/cooleshow/student/presenter/mine/TeachableInstrumentPresenter.java
  19. 1 1
      student/src/main/java/com/cooleshow/student/ui/mine/PersonalSettingActivity.java
  20. 1 1
      student/src/main/java/com/cooleshow/student/ui/mine/TeachableInstrumentActivity.java
  21. 1 0
      student/src/main/res/layout/activity_teachable_instrument.xml

+ 1 - 1
student/src/main/java/com/cooleshow/student/bean/TeachableInstrumentBean.java → BaseLibrary/src/main/java/com/cooleshow/base/bean/TeachableInstrumentBean.java

@@ -1,4 +1,4 @@
-package com.cooleshow.student.bean;
+package com.cooleshow.base.bean;
 
 import java.io.Serializable;
 import java.util.List;

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

@@ -16,6 +16,7 @@ object RouterPath {
     class JGCenter {
         companion object {
             const val PATH_HOME = "/institution/home"
+            const val MINE_PERSONAL_SETTING = "/institution/mine/SettingActivity"
 
         }
     }

+ 5 - 0
institution/src/main/AndroidManifest.xml

@@ -9,5 +9,10 @@
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustPan">
         </activity>
+
+        <activity
+            android:name=".ui.setting.PersonalSettingActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
     </application>
 </manifest>

+ 11 - 0
institution/src/main/java/com/cooleshow/institution/stu/api/APIService.java

@@ -4,12 +4,14 @@ import com.cooleshow.base.data.net.BaseResponse;
 import com.cooleshow.institution.stu.bean.AppHomeBean;
 import com.cooleshow.institution.stu.bean.HomeHotMusicSheetBean;
 import com.cooleshow.institution.stu.bean.HotAlbumBean;
+import com.cooleshow.usercenter.bean.SetDetailBean;
 
 import io.reactivex.rxjava3.core.Observable;
 import okhttp3.RequestBody;
 import retrofit2.http.Body;
 import retrofit2.http.POST;
 
+import static com.cooleshow.base.common.BaseConstant.AUTH_GROUP;
 import static com.cooleshow.base.common.BaseConstant.CMS_SERVER;
 import static com.cooleshow.base.common.BaseConstant.STUDENT_GROUP;
 
@@ -41,4 +43,13 @@ public interface APIService {
      */
     @POST(CMS_SERVER + "news/app/home")
     Observable<BaseResponse<AppHomeBean>> appHome(@Body RequestBody body);
+
+    /**
+     * 修改设置信息
+     *
+     * @param body
+     * @return
+     */
+    @POST(AUTH_GROUP + "user/submitSetDetail")
+    Observable<BaseResponse<SetDetailBean>> submitSetDetail(@Body RequestBody body);
 }

+ 22 - 0
institution/src/main/java/com/cooleshow/institution/stu/contract/PersonalSettingContract.java

@@ -0,0 +1,22 @@
+package com.cooleshow.institution.stu.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+import com.cooleshow.usercenter.bean.StudentUserInfo;
+
+/**
+ * 创建日期:2022/5/16 16:12
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface PersonalSettingContract {
+    interface PersonalSettingView extends BaseView {
+        void submitSetDetailSuccess(SetDetailBean setDetailBean);
+        void upLoadImageSuccess(String url);
+        void upLoadImageFailure();
+        void queryUserInfoSuccess(StudentUserInfo data);
+    }
+    interface Presenter {
+    }
+}

+ 89 - 0
institution/src/main/java/com/cooleshow/institution/stu/presenter/PersonalSettingPresenter.java

@@ -0,0 +1,89 @@
+package com.cooleshow.institution.stu.presenter;
+
+import android.app.Activity;
+
+import com.cooleshow.base.constanst.UploadConstants;
+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.institution.stu.api.APIService;
+import com.cooleshow.institution.stu.contract.PersonalSettingContract;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+import com.cooleshow.usercenter.bean.StudentUserInfo;
+import com.cooleshow.usercenter.data.api.UserApi;
+
+import java.io.File;
+
+/**
+ * 创建日期:2022/5/16 16:10
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class PersonalSettingPresenter extends BasePresenter<PersonalSettingContract.PersonalSettingView> implements PersonalSettingContract.Presenter {
+
+
+
+    public void queryUserInfo() {
+        getView().showLoading();
+        addSubscribe(create(UserApi.class).queryUserInfo(), new BaseObserver<StudentUserInfo>(getView()) {
+            @Override
+            protected void onSuccess(StudentUserInfo data) {
+                if (getView() != null) {
+                    getView().queryUserInfoSuccess(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, UploadConstants.UPLOAD_TYPE_OTHER);
+        uploadHelper.uploadFile(new File(filePath));
+        uploadHelper.setUpLoadCallBack(new UploadHelper.UpLoadCallBack() {
+            @Override
+            public void onSuccess(String url) {
+                if (getView() != null) {
+                    getView().upLoadImageSuccess(url);
+                }
+            }
+
+            @Override
+            public void onFailure() {
+                if (getView() != null) {
+                    getView().upLoadImageFailure();
+                }
+            }
+        });
+    }
+}

+ 33 - 1
institution/src/main/java/com/cooleshow/institution/stu/ui/main/MineFragment.java

@@ -3,10 +3,13 @@ package com.cooleshow.institution.stu.ui.main;
 import android.text.TextUtils;
 import android.view.View;
 
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.DateUtil;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.TimeUtils;
+import com.cooleshow.base.utils.UiUtils;
 import com.cooleshow.base.utils.Utils;
 import com.cooleshow.institution.stu.R;
 import com.cooleshow.institution.stu.databinding.FgMineLayoutBinding;
@@ -16,7 +19,7 @@ import com.cooleshow.usercenter.bean.StudentUserInfo;
 /**
  * Author by pq, Date on 2023/9/13.
  */
-public class MineFragment extends BaseMVPFragment<FgMineLayoutBinding, MinePresenter> {
+public class MineFragment extends BaseMVPFragment<FgMineLayoutBinding, MinePresenter> implements View.OnClickListener {
     @Override
     protected void initView(View rootView) {
         Utils.setHeadView(mViewBinding.viewStatusBar, getContext(), 0);
@@ -24,7 +27,23 @@ public class MineFragment extends BaseMVPFragment<FgMineLayoutBinding, MinePrese
 
     @Override
     protected void initData() {
+        initListener();
+    }
 
+    private void initListener() {
+        mViewBinding.ivSetting.setOnClickListener(this);
+        mViewBinding.viewClassNum.setOnClickListener(this);
+        mViewBinding.viewStudentNum.setOnClickListener(this);
+        mViewBinding.tvMineTrackList.setOnClickListener(this);
+        mViewBinding.tvPracticeInfo.setOnClickListener(this);
+        mViewBinding.tvOrderInfo.setOnClickListener(this);
+        mViewBinding.tvRankBoard.setOnClickListener(this);
+        mViewBinding.tvActivationCode.setOnClickListener(this);
+        mViewBinding.tvHelpCenter.setOnClickListener(this);
+        mViewBinding.tvFeedBack.setOnClickListener(this);
+        mViewBinding.tvUserProtocol.setOnClickListener(this);
+        mViewBinding.tvPrivacyPolicy.setOnClickListener(this);
+        mViewBinding.tvAboutUs.setOnClickListener(this);
     }
 
     @Override
@@ -60,4 +79,17 @@ public class MineFragment extends BaseMVPFragment<FgMineLayoutBinding, MinePrese
         mViewBinding.tvVipStatus.setText(vipTip);
 
     }
+
+    @Override
+    public void onClick(View view) {
+        int id = view.getId();
+        if (id == R.id.iv_setting) {
+            if (UiUtils.isFastClick()) {
+                return;
+            }
+            //个人中心
+            ARouter.getInstance().build(RouterPath.JGCenter.MINE_PERSONAL_SETTING)
+                    .navigation();
+        }
+    }
 }

+ 556 - 0
institution/src/main/java/com/cooleshow/institution/stu/ui/setting/PersonalSettingActivity.java

@@ -0,0 +1,556 @@
+package com.cooleshow.institution.stu.ui.setting;
+
+import android.Manifest;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.provider.MediaStore;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.TextView;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.bigkoo.pickerview.builder.TimePickerBuilder;
+import com.bigkoo.pickerview.listener.CustomListener;
+import com.bigkoo.pickerview.view.TimePickerView;
+import com.cooleshow.base.bean.TeachableInstrumentBean;
+import com.cooleshow.base.constanst.EventConstants;
+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.MyFileUtils;
+import com.cooleshow.base.utils.PopupUtil;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.helper.GlideEngine;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.institution.stu.R;
+import com.cooleshow.institution.stu.contract.PersonalSettingContract;
+import com.cooleshow.institution.stu.databinding.JgActivityPersonalSettingBinding;
+import com.cooleshow.institution.stu.presenter.PersonalSettingPresenter;
+import com.cooleshow.usercenter.bean.SetDetailBean;
+import com.cooleshow.usercenter.bean.StudentUserInfo;
+import com.cooleshow.usercenter.constants.UserConstants;
+import com.cooleshow.usercenter.helper.UserHelper;
+import com.luck.picture.lib.PictureSelector;
+import com.luck.picture.lib.compress.CompressionPredicate;
+import com.luck.picture.lib.compress.Luban;
+import com.luck.picture.lib.compress.OnCompressListener;
+import com.luck.picture.lib.config.PictureConfig;
+import com.luck.picture.lib.config.PictureMimeType;
+import com.luck.picture.lib.entity.LocalMedia;
+import com.tbruyelle.rxpermissions3.RxPermissions;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import androidx.annotation.Nullable;
+import androidx.core.content.FileProvider;
+
+/**
+ * 创建日期:2022/5/16 16:07
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.JGCenter.MINE_PERSONAL_SETTING)
+public class PersonalSettingActivity extends BaseMVPActivity<JgActivityPersonalSettingBinding, PersonalSettingPresenter> implements PersonalSettingContract.PersonalSettingView, View.OnClickListener {
+    private StudentUserInfo 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;
+
+    private String imagePath = null;//当前图片的路径
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+    }
+
+    @Override
+    public void onClick(View view) {
+        int id = view.getId();
+        if (id == R.id.cl_header) {
+            selectHeader();
+        } else if (id == R.id.cl_name) {
+            if (null != mySetDetailBean) {
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_NICKNAME)
+                        .withString("userName", mySetDetailBean.username)
+                        .navigation(this, MODIFY_NICKNAME);
+            }
+        } else if (id == R.id.cl_sex) {
+            modifySex();
+        } else if (id == R.id.cl_phone) {
+            ARouter.getInstance().build(RouterPath.MineCenter.MINE_CHECK_MODIFY_PHONENUM)
+                    .navigation(this, MODIFY_PHONE);
+        } else if (id == R.id.cl_modify_psd) {
+            ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_PASSWORD)
+                    .withString("phoneNum", UserHelper.getUserPhone())
+                    .navigation();
+        } else if (id == R.id.cl_certification) {
+            if (viewBinding.tvCertificationStatus.getText().equals("未认证")) {
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_PERSONAL_CERTIFICATION)
+                        .navigation(this, PERSONAL_CERTIFICATION);
+            }
+        } else if (id == R.id.cl_birthday) {
+            selectBirthday();
+        } else if (id == R.id.cl_score) {
+            if (null != mySetDetailBean) {
+                try {
+                    Bundle bundle = new Bundle();
+                    TeachableInstrumentBean teachableInstrumentBean = new TeachableInstrumentBean();
+                    teachableInstrumentBean.id = Long.parseLong(mySetDetailBean.subjectId);
+                    teachableInstrumentBean.name = mySetDetailBean.subjectName;
+                    bundle.putSerializable("selectTeachableInstrument", (Serializable) teachableInstrumentBean);
+                    ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
+                            .withBundle("bundle", bundle)
+                            .navigation();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+
+        if (id == R.id.tv_logout) {
+            //事件埋点->退出登录
+            UserHelper.saveUserToken("");
+            ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
+                    .withString(UserConstants.PHONE_NUM_KEY, UserHelper.getUserPhone())
+                    .navigation();
+            return;
+        }
+    }
+
+    private TimePickerView pvTime;
+
+    private void selectBirthday() {
+        Calendar selectedDate = Calendar.getInstance();
+        Calendar startDate = Calendar.getInstance();
+        Calendar endDate = Calendar.getInstance();
+        //正确设置方式 原因:注意事项有说明
+        //            startDate.set(2019, 0, 1);
+        //            endDate.set(2050, 11, 31);
+        pvTime = new TimePickerBuilder(this, (date, v) -> {//选中事件回调
+
+            String birthdate = getTime(date);
+            JSONObject jsonObject = new JSONObject();
+            try {
+                jsonObject.put("birthdate", birthdate);
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+            presenter.submitSetDetail(jsonObject.toString());
+        }).setRangDate(startDate, endDate)
+                .setDate(endDate)
+                .setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, new CustomListener() {
+                    @Override
+                    public void customLayout(View v) {
+                        //自定义布局中的控件初始化及事件处理
+                        final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+                        TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+                        tvSubmit.setOnClickListener(new View.OnClickListener() {
+                            @Override
+                            public void onClick(View v) {
+                                pvTime.returnData();
+                                pvTime.dismiss();
+                            }
+                        });
+                        ivCancel.setOnClickListener(new View.OnClickListener() {
+                            @Override
+                            public void onClick(View v) {
+                                pvTime.dismiss();
+                            }
+                        });
+
+                    }
+                })
+                .setLineSpacingMultiplier(2.5f)
+                .setType(new boolean[]{true, true, true, false, false, false})// 默认全部显示
+                .isCyclic(true)//是否循环滚动
+                .setOutSideCancelable(true)//点击屏幕,点在控件外部范围时,是否取消显示
+                .setTextColorCenter(getResources().getColor(com.cooleshow.base.R.color.color_1a1a1a))//设置选中项的颜色
+                //                    .setDate(selectedDate)// 如果不设置的话,默认是系统时间*/
+                .setRangDate(null, endDate)//起始终止年月日设定
+                .isDialog(false)//是否显示为对话框样式
+                .setLabel("年", "月", "日", "", "", "")
+                .build();
+        pvTime.show();
+
+    }
+
+    private String getTime(Date date) {//可根据需要自行截取数据显示
+        //        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        return format.format(date);
+    }
+
+    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 -> {
+
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.put("gender", 1);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+                popupWindow.dismiss();
+                presenter.submitSetDetail(jsonObject.toString());
+            });
+            tv_girl.setOnClickListener(view12 -> {
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.put("gender", 0);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+                popupWindow.dismiss();
+                presenter.submitSetDetail(jsonObject.toString());
+            });
+            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) {
+                        goCamera();
+                    } 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.student.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 void toAlbum() {
+        new RxPermissions(this)
+                .request(Manifest.permission.CAMERA,
+                        Manifest.permission.READ_EXTERNAL_STORAGE,
+                        Manifest.permission.WRITE_EXTERNAL_STORAGE)
+                .subscribe(granted -> {
+                    if (granted) {
+                        goAlbum();
+                    } else {
+                        ToastUtil.getInstance().show(this, "请选择存储和相机权限!");
+                    }
+                });
+    }
+
+    private void goCamera() {
+        PictureSelector.create(this)
+                .openCamera(PictureMimeType.ofImage())
+                .loadImageEngine(GlideEngine.createGlideEngine())
+                .theme(com.cooleshow.base.R.style.picture_daya_style)// 主题样式设置 具体参考 values/styles   用法:R .style.picture.white.style
+                .selectionMode(PictureConfig.SINGLE)// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
+                .enableCrop(true)// 是否裁剪 true or false
+                .cutOutQuality(100)
+                .showCropGrid(false)// 是否显示裁剪矩形网格 圆形裁剪时建议设为false    true or false
+                .compress(true)// 是否压缩 true or false
+                .circleDimmedLayer(true)// 是否圆形裁剪 true or false
+                .forResult(REQUEST_CODE_LOCAL);
+    }
+
+    private void goAlbum() {
+        PictureSelector.create(this)
+                .openGallery(PictureMimeType.ofImage())//全部.PictureMimeType.ofAll()、图片.ofImage()、视频.ofVideo()、音频.ofAudio()
+                .loadImageEngine(GlideEngine.createGlideEngine())
+                .theme(com.cooleshow.base.R.style.picture_daya_style)// 主题样式设置 具体参考 values/styles   用法:R .style.picture.white.style
+                .selectionMode(PictureConfig.SINGLE)// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
+                .enableCrop(true)// 是否裁剪 true or false
+                .cutOutQuality(100)
+                .showCropGrid(false)// 是否显示裁剪矩形网格 圆形裁剪时建议设为false    true or false
+                .compress(true)// 是否压缩 true or false
+                .circleDimmedLayer(true)// 是否圆形裁剪 true or false
+                .forResult(REQUEST_CODE_LOCAL);
+    }
+
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "设置");
+        viewBinding.clHeader.setOnClickListener(this);
+        viewBinding.clName.setOnClickListener(this);
+        viewBinding.clSex.setOnClickListener(this);
+        viewBinding.clPhone.setOnClickListener(this);
+        viewBinding.clModifyPsd.setOnClickListener(this);
+        viewBinding.clCertification.setOnClickListener(this);
+        viewBinding.clBirthday.setOnClickListener(this);
+        viewBinding.clScore.setOnClickListener(this);
+        viewBinding.tvLogout.setOnClickListener(this);
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        presenter.queryUserInfo();
+    }
+
+    @Override
+    protected JgActivityPersonalSettingBinding getLayoutView() {
+        return JgActivityPersonalSettingBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected PersonalSettingPresenter createPresenter() {
+        return new PersonalSettingPresenter();
+    }
+
+    @Override
+    public void queryUserInfoSuccess(StudentUserInfo data) {
+        mySetDetailBean = data;
+        GlideUtils.INSTANCE.loadImage(this, data.heardUrl, viewBinding.imHeader, com.cooleshow.base.R.drawable.icon_default_head);
+        viewBinding.tvNickname.setText(data.username);
+        if (!TextUtils.isEmpty(data.gender) && data.gender.equals("0")) {
+            //女
+            viewBinding.tvSex.setText("女");
+        } else {
+            //男
+            viewBinding.tvSex.setText("男");
+        }
+        viewBinding.tvPhone.setText(UserHelper.getUserPhone());
+        if (!TextUtils.isEmpty(data.birthdate)) {
+            if (data.birthdate.contains(" ")) {
+                String[] s = data.birthdate.split(" ");
+                viewBinding.tvBirthday.setText(s[0]);
+            } else {
+                viewBinding.tvBirthday.setText(data.birthdate);
+            }
+        } else {
+            viewBinding.tvBirthday.setText("");
+        }
+
+
+        if (!TextUtils.isEmpty(data.subjectName)) {
+            viewBinding.tvScore.setText(data.subjectName);
+        } else {
+            viewBinding.tvScore.setText("");
+        }
+        if (!TextUtils.isEmpty(data.isReal) && data.isReal.equals("1")) {
+            //是
+            viewBinding.tvCertificationStatus.setText("已认证");
+        } else {
+            //否
+            viewBinding.tvCertificationStatus.setText("未认证");
+        }
+    }
+
+
+    @Override
+    public void submitSetDetailSuccess(SetDetailBean setDetailBean) {
+        mySetDetailBean.gender = setDetailBean.gender + "";
+        mySetDetailBean.heardUrl = setDetailBean.avatar;
+        if (setDetailBean.gender == 0) {
+            //女
+            viewBinding.tvSex.setText("女");
+        } else {
+            //男
+            viewBinding.tvSex.setText("男");
+        }
+        //15510601008
+        if (!TextUtils.isEmpty(setDetailBean.birthdate)) {
+            if (setDetailBean.birthdate.contains(" ")) {
+                String[] s = setDetailBean.birthdate.split(" ");
+                viewBinding.tvBirthday.setText(s[0]);
+            } else {
+                viewBinding.tvBirthday.setText(setDetailBean.birthdate);
+            }
+            mySetDetailBean.birthdate = setDetailBean.birthdate;
+        } else {
+            viewBinding.tvBirthday.setText("");
+        }
+        ToastUtil.getInstance().showShort("修改成功");
+        GlideUtils.INSTANCE.loadImage(this, setDetailBean.avatar, viewBinding.imHeader, com.cooleshow.base.R.drawable.icon_default_head);
+    }
+
+    @Override
+    public void upLoadImageSuccess(String url) {
+        hideLoading();
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("avatar", url);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        presenter.submitSetDetail(jsonObject.toString());
+    }
+
+    @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");
+                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) {
+                boolean isImg = MyFileUtils.isImg(imagePath);
+                if (isImg) {
+                    compressImg(imagePath);
+                } else {
+                    ToastUtil.getInstance().showShort("请选择图片类型文件");
+                }
+            } else if (requestCode == REQUEST_CODE_LOCAL) {
+                if (data != null) {
+                    // 图片、视频、音频选择结果回调
+                    List<LocalMedia> selectList = PictureSelector.obtainMultipleResult(data);
+                    String v_path = null;
+                    if (selectList != null && selectList.size() > 0) {
+                        v_path = selectList.get(0).getCompressPath();
+                    }
+                    if (!TextUtils.isEmpty(v_path)) {
+                        boolean isImg = MyFileUtils.isImg(v_path);
+                        if (isImg) {
+                            compressImg(v_path);
+                        } else {
+                            ToastUtil.getInstance().showShort("请选择图片类型文件");
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    private void compressImg(String filePath) {
+        LocalMedia localMedia = new LocalMedia();
+        localMedia.setPath(filePath);
+        ArrayList<LocalMedia> list = new ArrayList<>();
+        list.add(localMedia);
+        Luban.with(this)
+                .loadMediaData(list)
+                .ignoreBy(100)
+                .setTargetDir(FileUtils.getCompressPath())
+                .filter(new CompressionPredicate() {
+                    @Override
+                    public boolean apply(String path) {
+                        return !(TextUtils.isEmpty(path) || path.toLowerCase().endsWith(".gif"));
+                    }
+                })
+                .setCompressListener(new OnCompressListener() {
+                    @Override
+                    public void onStart() {
+                        // TODO 压缩开始前调用,可以在方法内启动 loading UI
+                        showLoading();
+                    }
+
+                    @Override
+                    public void onSuccess(List<LocalMedia> list) {
+                        hideLoading();
+                        // TODO 压缩成功后调用,返回压缩后的图片文件
+                        for (int i = 0; i < list.size(); i++) {
+                            LocalMedia localMedia = list.get(i);
+                            String compressPath = localMedia.getCompressPath();
+                            presenter.upLoadImage(PersonalSettingActivity.this, compressPath);
+                        }
+                    }
+
+                    @Override
+                    public void onError(Throwable e) {
+                        e.printStackTrace();
+                        hideLoading();
+                        ToastUtil.getInstance().showShort("上传失败,请重新选择");
+                    }
+                }).launch();
+    }
+}

+ 5 - 0
institution/src/main/res/drawable/shape_fe2451_39dp.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#fe2451"/>
+    <corners android:radius="39dp"/>
+</shape>

+ 432 - 0
institution/src/main/res/layout/jg_activity_personal_setting.xml

@@ -0,0 +1,432 @@
+<?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" />
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cs_info"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="14dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginEnd="14dp"
+                android:background="@drawable/bg_white_10dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_header"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_80"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent">
+
+                    <de.hdodenhof.circleimageview.CircleImageView
+                        android:id="@+id/im_header"
+                        android:layout_width="@dimen/dp_54"
+                        android:layout_height="@dimen/dp_54"
+                        android:layout_marginLeft="12dp"
+                        android:layout_marginTop="8dp"
+                        android:src="@drawable/icon_default_head"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="修改头像"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="@+id/im_header"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/im_header" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="@+id/im_header"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/im_header" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_header">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="昵称"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_nickname"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="--"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_sex"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_name">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="性别"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_sex"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="--"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_phone"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_sex">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="手机号"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_phone"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="--"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_birthday"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_phone">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="出生日期"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_birthday"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="--"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_score"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_birthday">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="声部"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_score"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="--"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_modify_psd"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_score">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="修改密码"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginLeft="11dp"
+                        android:layout_marginRight="9dp"
+                        android:background="@color/color_f2f2f2"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_certification"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_55"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_modify_psd">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="12dp"
+                        android:text="实名认证"
+                        android:textColor="@color/color_1a1a1a"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_certification_status"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="28dp"
+                        android:text="--"
+                        android:textColor="@color/color_999999"
+                        android:textSize="@dimen/sp_16"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <ImageView
+                        android:layout_width="@dimen/dp_6"
+                        android:layout_height="@dimen/dp_11"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/icon_arrow_right"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="10dp"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_certification" />
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <TextView
+                android:id="@+id/tv_logout"
+                android:layout_width="0dp"
+                android:layout_height="44dp"
+                android:layout_alignParentBottom="true"
+                android:layout_marginStart="25dp"
+                android:layout_marginTop="100dp"
+                android:layout_marginEnd="25dp"
+                android:background="@drawable/shape_fe2451_39dp"
+                android:gravity="center"
+                android:text="退出登录"
+                android:textColor="@color/white"
+                android:textSize="@dimen/sp_18"
+                android:textStyle="bold"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cs_info" />
+        </androidx.constraintlayout.widget.ConstraintLayout>
+    </ScrollView>
+</LinearLayout>

+ 93 - 0
institution/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
institution/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>

+ 1 - 1
student/src/main/java/com/cooleshow/student/adapter/TeachableInstrumentAdapter.java

@@ -8,8 +8,8 @@ import androidx.recyclerview.widget.RecyclerView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.bean.TeachableInstrumentBean;
 import com.cooleshow.student.R;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 
 import java.util.List;
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/adapter/TeachableInstrumentItemAdapter.java

@@ -6,10 +6,10 @@ import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.bean.TeachableInstrumentBean;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.student.R;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 
 import java.util.List;
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/api/APIService.java

@@ -7,6 +7,7 @@ import static com.cooleshow.base.common.BaseConstant.STUDENT_GROUP;
 import static com.cooleshow.base.common.BaseConstant.TEACHER_GROUP;
 
 import com.cooleshow.base.bean.QueryParamsConfigBean;
+import com.cooleshow.base.bean.TeachableInstrumentBean;
 import com.cooleshow.base.data.net.BaseResponse;
 import com.cooleshow.student.bean.AddressBean;
 import com.cooleshow.student.bean.AppHomeBean;
@@ -35,7 +36,6 @@ import com.cooleshow.student.bean.SparringCourseCommentBean;
 import com.cooleshow.student.bean.SparringCourseHomeworkBean;
 import com.cooleshow.student.bean.StudentUserInfo;
 import com.cooleshow.student.bean.SystemMessageBean;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 import com.cooleshow.student.bean.TempLiveTeacherListBean;
 import com.cooleshow.student.bean.VideoCourseListBean;
 import com.cooleshow.usercenter.bean.SetDetailBean;

+ 0 - 1
student/src/main/java/com/cooleshow/student/contract/HomeContract.java

@@ -12,7 +12,6 @@ import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HotAlbumBean;
 import com.cooleshow.student.bean.RecommendTalentListBean;
 import com.cooleshow.student.bean.StudentUserInfo;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 
 import java.util.ArrayList;
 import java.util.List;

+ 1 - 1
student/src/main/java/com/cooleshow/student/contract/TeachableInstrumentContract.java

@@ -1,7 +1,7 @@
 package com.cooleshow.student.contract;
 
+import com.cooleshow.base.bean.TeachableInstrumentBean;
 import com.cooleshow.base.presenter.view.BaseView;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 
 import java.util.List;
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/presenter/mine/TeachableInstrumentPresenter.java

@@ -1,9 +1,9 @@
 package com.cooleshow.student.presenter.mine;
 
+import com.cooleshow.base.bean.TeachableInstrumentBean;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
 import com.cooleshow.student.api.APIService;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 import com.cooleshow.student.contract.TeachableInstrumentContract;
 
 

+ 1 - 1
student/src/main/java/com/cooleshow/student/ui/mine/PersonalSettingActivity.java

@@ -20,6 +20,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
 import com.bigkoo.pickerview.builder.TimePickerBuilder;
 import com.bigkoo.pickerview.listener.CustomListener;
 import com.bigkoo.pickerview.view.TimePickerView;
+import com.cooleshow.base.bean.TeachableInstrumentBean;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.MyFileUtils;
 import com.cooleshow.usercenter.helper.UserHelper;
@@ -32,7 +33,6 @@ import com.cooleshow.base.utils.ToastUtil;
 
 import com.cooleshow.student.R;
 import com.cooleshow.student.bean.StudentUserInfo;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 import com.cooleshow.student.contract.PersonalSettingContract;
 import com.cooleshow.student.databinding.ActivityPersonalSettingBinding;
 import com.cooleshow.student.presenter.mine.PersonalSettingPresenter;

+ 1 - 1
student/src/main/java/com/cooleshow/student/ui/mine/TeachableInstrumentActivity.java

@@ -11,13 +11,13 @@ import androidx.recyclerview.widget.RecyclerView;
 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.bean.TeachableInstrumentBean;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.ToastUtil;
 import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.student.R;
 import com.cooleshow.student.adapter.TeachableInstrumentAdapter;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 import com.cooleshow.student.contract.TeachableInstrumentContract;
 import com.cooleshow.student.databinding.ActivityTeachableInstrumentBinding;
 import com.cooleshow.student.presenter.mine.TeachableInstrumentPresenter;

+ 1 - 0
student/src/main/res/layout/activity_teachable_instrument.xml

@@ -34,6 +34,7 @@
             android:layout_marginLeft="14dp"
             android:layout_marginTop="15dp"
             android:layout_marginRight="14dp"
+            android:paddingStart="10dp"
             android:background="@drawable/bg_white_10dp"
             android:gravity="center_vertical"
             android:text="最多可选择1个乐器"