Browse Source

1.修改首页刷新
2.修改个人设置页面布局
3修改webview为以前方式
4.修改获取状态栏
5.登录后在首页检查声部,没有就去选择声部
6.调整首页布局

Ryan8057 2 years ago
parent
commit
56a9d82c1b
59 changed files with 1794 additions and 664 deletions
  1. 1 0
      BaseLibrary/src/main/java/com/cooleshow/base/router/RouterPath.kt
  2. 2 1
      BaseLibrary/src/main/java/com/cooleshow/base/widgets/VerifyEditText.java
  3. 15 1
      student/src/main/AndroidManifest.xml
  4. 21 1
      student/src/main/java/com/cooleshow/student/adapter/HomeMenuPagerAdapter.java
  5. 9 0
      student/src/main/java/com/cooleshow/student/api/APIService.java
  6. 3 1
      student/src/main/java/com/cooleshow/student/bean/StudentUserInfo.java
  7. 19 0
      student/src/main/java/com/cooleshow/student/contract/CheckTeachableContract.java
  8. 17 0
      student/src/main/java/com/cooleshow/student/contract/FeedBackContract.java
  9. 0 1
      student/src/main/java/com/cooleshow/student/contract/HomeContract.java
  10. 1 0
      student/src/main/java/com/cooleshow/student/contract/MessageBoxContract.java
  11. 2 2
      student/src/main/java/com/cooleshow/student/contract/PersonalSettingContract.java
  12. 1 10
      student/src/main/java/com/cooleshow/student/presenter/main/HomePresenter.java
  13. 3 1
      student/src/main/java/com/cooleshow/student/presenter/message/MessageBoxPresenter.java
  14. 46 0
      student/src/main/java/com/cooleshow/student/presenter/mine/CheckTeachablePresenter.java
  15. 47 0
      student/src/main/java/com/cooleshow/student/presenter/mine/FeedBackPresenter.java
  16. 10 6
      student/src/main/java/com/cooleshow/student/presenter/mine/PersonalSettingPresenter.java
  17. 21 53
      student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java
  18. 1 0
      student/src/main/java/com/cooleshow/student/ui/main/HomeMenuFragment.java
  19. 0 14
      student/src/main/java/com/cooleshow/student/ui/main/MainActivity.java
  20. 1 1
      student/src/main/java/com/cooleshow/student/ui/main/MineFragment.java
  21. 140 44
      student/src/main/java/com/cooleshow/student/ui/main/ShopMallFragment.java
  22. 10 0
      student/src/main/java/com/cooleshow/student/ui/message/MessageBoxActivity.java
  23. 77 0
      student/src/main/java/com/cooleshow/student/ui/mine/CheckTeachableActivity.java
  24. 83 0
      student/src/main/java/com/cooleshow/student/ui/mine/FeedBackActivity.java
  25. 25 9
      student/src/main/java/com/cooleshow/student/ui/mine/ModifyNickNameActivity.java
  26. 165 48
      student/src/main/java/com/cooleshow/student/ui/mine/PersonalSettingActivity.java
  27. 17 0
      student/src/main/java/com/cooleshow/student/ui/mine/SettingActivity.java
  28. 5 0
      student/src/main/java/com/cooleshow/student/ui/mine/TeachableInstrumentActivity.java
  29. 47 3
      student/src/main/java/com/cooleshow/student/ui/web/AgentWebActivity.java
  30. 1 1
      student/src/main/java/com/cooleshow/student/ui/web/WebActivity.java
  31. 8 0
      student/src/main/res/drawable/bg_white_10dp_border.xml
  32. 7 0
      student/src/main/res/layout/activity_check_teachable.xml
  33. 74 0
      student/src/main/res/layout/activity_feedback.xml
  34. 98 14
      student/src/main/res/layout/activity_personal_setting.xml
  35. 209 152
      student/src/main/res/layout/activity_setting.xml
  36. 2 1
      student/src/main/res/layout/dialog_home_dialog.xml
  37. 21 21
      student/src/main/res/layout/fragment_home_layout.xml
  38. 28 1
      student/src/main/res/layout/fragment_shopmal.xml
  39. 1 1
      student/src/main/res/values/styles.xml
  40. 3 0
      teacher/src/main/java/com/cooleshow/teacher/contract/MessageBoxContract.java
  41. 3 1
      teacher/src/main/java/com/cooleshow/teacher/presenter/message/MessageBoxPresenter.java
  42. 25 16
      teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt
  43. 9 1
      teacher/src/main/java/com/cooleshow/teacher/ui/main/MineFragment.java
  44. 138 39
      teacher/src/main/java/com/cooleshow/teacher/ui/main/ShopMallFragment.java
  45. 10 0
      teacher/src/main/java/com/cooleshow/teacher/ui/message/MessageBoxActivity.java
  46. 22 9
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyNickNameActivity.java
  47. 32 38
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/PersonalSettingActivity.java
  48. 17 0
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/SettingActivity.java
  49. 1 1
      teacher/src/main/java/com/cooleshow/teacher/ui/web/AgentWebActivity.java
  50. 1 0
      teacher/src/main/java/com/cooleshow/teacher/ui/web/WebActivity.java
  51. 0 13
      teacher/src/main/res/layout/activity_personal_setting.xml
  52. 210 152
      teacher/src/main/res/layout/activity_setting.xml
  53. 12 2
      teacher/src/main/res/layout/fragment_home_layout.xml
  54. 14 2
      teacher/src/main/res/layout/fragment_mine_layout.xml
  55. 28 1
      teacher/src/main/res/layout/fragment_shopmal.xml
  56. 1 0
      usercenter/src/main/AndroidManifest.xml
  57. 24 0
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeInputActivity.java
  58. 6 1
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeLoginActivity.java
  59. 0 1
      usercenter/src/main/res/layout/activity_verify_code_login.xml

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

@@ -104,6 +104,7 @@ object RouterPath {
             const val HOME_PAGE = "/teacher/ui/homepage/HomePageActivity"
             const val MINE_STYLE_PAGE = "/teacher/ui/minestyle/MineStyleActivity"
             const val MINE_TEACHABLE_INSTRUMENT = "/teacher/ui/minestyle/TeachableInstrumentActivity"
+            const val MINE_CHECK_TEACHABLE = "/ui/minestyle/CheckTeachableActivity"
             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"

+ 2 - 1
BaseLibrary/src/main/java/com/cooleshow/base/widgets/VerifyEditText.java

@@ -213,7 +213,8 @@ public class VerifyEditText extends LinearLayout {
     /**
      * 显示软键盘
      */
-    private void showSoftKeyBoard() {
+    public void showSoftKeyBoard() {
+        mEditText.requestFocus();
         InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
         imm.showSoftInput(mEditText, InputMethodManager.SHOW_FORCED);
     }

+ 15 - 1
student/src/main/AndroidManifest.xml

@@ -17,7 +17,7 @@
         <activity
             android:name=".ui.splash.SplashActivity"
             android:exported="true"
-            android:screenOrientation="portrait">
+            android:theme="@style/SplashTheme">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -144,6 +144,10 @@
             android:name=".ui.mine.EquipmentTestActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
+        <activity
+            android:name=".ui.mine.CheckTeachableActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait" />
 
         <activity
             android:name=".ui.live.LiveRoomActivity"
@@ -157,6 +161,16 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
+
+        <provider
+            android:name="androidx.core.content.FileProvider"
+            android:authorities="com.cooleshow.student.fileprovider"
+            android:exported="false"
+            android:grantUriPermissions="true">
+            <meta-data
+                android:name="android.support.FILE_PROVIDER_PATHS"
+                android:resource="@xml/file_paths" />
+        </provider>
     </application>
 
 </manifest>

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

@@ -1,8 +1,11 @@
 package com.cooleshow.student.adapter;
 
+import android.view.ViewGroup;
+
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentManager;
 import androidx.fragment.app.FragmentPagerAdapter;
+import androidx.fragment.app.FragmentStatePagerAdapter;
 
 import java.util.List;
 
@@ -12,14 +15,17 @@ import java.util.List;
  * @author Ryan
  * 类说明:
  */
-public class HomeMenuPagerAdapter extends FragmentPagerAdapter {
+public class HomeMenuPagerAdapter extends FragmentStatePagerAdapter {
 
 
     private List<Fragment> fragments;
+    public FragmentManager fm;
 
     public HomeMenuPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
         super(fm);
+        this.fm = fm;
         this.fragments = fragments;
+
     }
 
     @Override
@@ -32,4 +38,18 @@ public class HomeMenuPagerAdapter extends FragmentPagerAdapter {
         return fragments == null ? 0 : fragments.size();
     }
 
+    @Override
+    public Fragment instantiateItem(ViewGroup container, int position) {
+        Fragment fragment = (Fragment) super.instantiateItem(container,
+                position);
+        fm.beginTransaction().show(fragment).commit();
+        return fragment;
+    }
+
+    @Override
+    public void destroyItem(ViewGroup container, int position, Object object) {
+        // super.destroyItem(container, position, object);
+        Fragment fragment = fragments.get(position);
+        fm.beginTransaction().hide(fragment).commit();
+    }
 }

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

@@ -395,4 +395,13 @@ public interface APIService {
      */
     @GET("api-student/imGroup/queryFriendDetail")
     Observable<BaseResponse<FriendInfoBean>> queryFriendDetail(@Query("userId") String userId);
+
+    /**
+     * 意见反馈
+     *
+     * @param body
+     * @return
+     */
+    @POST(STUDENT_GROUP + "sysSuggestion/add")
+    Observable<BaseResponse<Object>> addSuggestion(@Body RequestBody body);
 }

+ 3 - 1
student/src/main/java/com/cooleshow/student/bean/StudentUserInfo.java

@@ -1,12 +1,14 @@
 package com.cooleshow.student.bean;
 
+import java.io.Serializable;
+
 /**
  * 创建日期:2022/5/26 13:51
  *
  * @author Ryan
  * 类说明:
  */
-public class StudentUserInfo {
+public class StudentUserInfo implements Serializable {
     /*
     	"birthdate": "",
 		"cloudStudySequenceDays": 0,

+ 19 - 0
student/src/main/java/com/cooleshow/student/contract/CheckTeachableContract.java

@@ -0,0 +1,19 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.student.bean.StudentUserInfo;
+
+/**
+ * 创建日期:2022/6/5 20:18
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface CheckTeachableContract {
+    interface CheckTeachableView extends BaseView {
+        void queryUserInfoSuccess(StudentUserInfo data);
+        void queryUserInfoError();
+    }
+    interface Presenter {
+    }
+}

+ 17 - 0
student/src/main/java/com/cooleshow/student/contract/FeedBackContract.java

@@ -0,0 +1,17 @@
+package com.cooleshow.student.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/5/18 16:26
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface FeedBackContract {
+    interface FeedBackView extends BaseView {
+        void addSuggestionSuccess(Object object);
+    }
+    interface Presenter {
+    }
+}

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

@@ -29,7 +29,6 @@ public interface HomeContract {
 
         void queryUserInfoSuccess(StudentUserInfo data);
 
-        void getSubjectFromIdSuccess(TeachableInstrumentBean o);
 
         void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data);
     }

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

@@ -21,6 +21,7 @@ public interface MessageBoxContract {
         void setCurrentReadSuccess(long id);
 
         void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data);
+        void batchSetReadSuccess();
     }
 
     interface Presenter {

+ 2 - 2
student/src/main/java/com/cooleshow/student/contract/PersonalSettingContract.java

@@ -1,6 +1,7 @@
 package com.cooleshow.student.contract;
 
 import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.student.bean.StudentUserInfo;
 import com.cooleshow.usercenter.bean.SetDetailBean;
 
 /**
@@ -11,12 +12,11 @@ import com.cooleshow.usercenter.bean.SetDetailBean;
  */
 public interface PersonalSettingContract {
     interface PersonalSettingView extends BaseView {
-        void getSetDetailSuccess(SetDetailBean setDetailBean);
         void submitSetDetailSuccess(SetDetailBean setDetailBean);
         void upLoadImageSuccess(String url);
         void upLoadImageFailure();
+        void queryUserInfoSuccess(StudentUserInfo data);
     }
     interface Presenter {
-        void getSetDetail();
     }
 }

+ 1 - 10
student/src/main/java/com/cooleshow/student/presenter/main/HomePresenter.java

@@ -160,16 +160,7 @@ public class HomePresenter extends BasePresenter<HomeContract.HomeView> implemen
         });
     }
 
-    public void getSubjectFromId(String subjectId) {
-        addSubscribe(create(APIService.class).getSubjectFromId(subjectId), new BaseObserver<TeachableInstrumentBean>(getView()) {
-            @Override
-            protected void onSuccess(TeachableInstrumentBean data) {
-                if (getView() != null) {
-                    getView().getSubjectFromIdSuccess(data);
-                }
-            }
-        });
-    }
+
 
 
     public void queryCountOfUnread() {

+ 3 - 1
student/src/main/java/com/cooleshow/student/presenter/message/MessageBoxPresenter.java

@@ -71,7 +71,9 @@ public class MessageBoxPresenter extends BasePresenter<MessageBoxContract.Messag
         addSubscribe(create(APIService.class).batchSetRead(), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
-
+                if (getView() != null) {
+                    getView().batchSetReadSuccess();
+                }
             }
 
             @Override

+ 46 - 0
student/src/main/java/com/cooleshow/student/presenter/mine/CheckTeachablePresenter.java

@@ -0,0 +1,46 @@
+package com.cooleshow.student.presenter.mine;
+
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.student.api.APIService;
+import com.cooleshow.student.bean.StudentUserInfo;
+import com.cooleshow.student.contract.CheckTeachableContract;
+
+/**
+ * 创建日期:2022/6/5 20:17
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class CheckTeachablePresenter extends BasePresenter<CheckTeachableContract.CheckTeachableView> implements CheckTeachableContract.Presenter {
+    public void queryUserInfo() {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        addSubscribe(create(APIService.class).queryUserInfo(), new BaseObserver<StudentUserInfo>(getView()) {
+            @Override
+            protected void onSuccess(StudentUserInfo data) {
+                if (getView() != null) {
+                    getView().queryUserInfoSuccess(data);
+                }
+            }
+
+            @Override
+            public void onComplete() {
+                super.onComplete();
+                if (getView() != null) {
+                    getView().hideLoading();
+                }
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().queryUserInfoError();
+                }
+            }
+        });
+    }
+
+}

+ 47 - 0
student/src/main/java/com/cooleshow/student/presenter/mine/FeedBackPresenter.java

@@ -0,0 +1,47 @@
+package com.cooleshow.student.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.student.api.APIService;
+import com.cooleshow.student.contract.FeedBackContract;
+
+/**
+ * 创建日期:2022/5/18 16:26
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class FeedBackPresenter extends BasePresenter<FeedBackContract.FeedBackView> implements FeedBackContract.Presenter {
+    public void addSuggestion(String jsonStr) {
+        getView().showLoading();
+        addSubscribe(create(APIService.class).addSuggestion(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object data) {
+                if (getView() != null) {
+                    getView().addSuggestionSuccess(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());
+                }
+            }
+        });
+    }
+
+}

+ 10 - 6
student/src/main/java/com/cooleshow/student/presenter/mine/PersonalSettingPresenter.java

@@ -8,6 +8,7 @@ import com.cooleshow.base.utils.RequestBodyUtil;
 import com.cooleshow.base.utils.helper.upload.UploadHelper;
 
 import com.cooleshow.student.api.APIService;
+import com.cooleshow.student.bean.StudentUserInfo;
 import com.cooleshow.student.contract.PersonalSettingContract;
 import com.cooleshow.usercenter.bean.SetDetailBean;
 
@@ -21,17 +22,17 @@ import java.io.File;
  */
 public class PersonalSettingPresenter extends BasePresenter<PersonalSettingContract.PersonalSettingView> implements PersonalSettingContract.Presenter {
 
-    @Override
-    public void getSetDetail() {
+
+
+    public void queryUserInfo() {
         getView().showLoading();
-        addSubscribe(create(APIService.class).getSetDetail(), new BaseObserver<SetDetailBean>(getView()) {
+        addSubscribe(create(APIService.class).queryUserInfo(), new BaseObserver<StudentUserInfo>(getView()) {
             @Override
-            protected void onSuccess(SetDetailBean data) {
+            protected void onSuccess(StudentUserInfo data) {
                 if (getView() != null) {
-                    getView().getSetDetailSuccess(data);
+                    getView().queryUserInfoSuccess(data);
                 }
             }
-
             @Override
             public void onComplete() {
                 super.onComplete();
@@ -39,6 +40,9 @@ public class PersonalSettingPresenter extends BasePresenter<PersonalSettingContr
             }
         });
     }
+
+
+
     public void submitSetDetail(String jsonStr){
         getView().showLoading();
         addSubscribe(create(APIService.class).submitSetDetail(RequestBodyUtil.convertToRequestBodyJson(jsonStr)), new BaseObserver<SetDetailBean>(getView()) {

+ 21 - 53
student/src/main/java/com/cooleshow/student/ui/main/HomeFragment.java

@@ -1,20 +1,14 @@
 package com.cooleshow.student.ui.main;
 
 import android.app.Activity;
-import android.app.Dialog;
-import android.content.Intent;
 import android.graphics.Point;
 import android.graphics.Rect;
-import android.net.Uri;
-import android.os.Bundle;
 import android.text.TextUtils;
-import android.util.Log;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 
 import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
 import androidx.core.widget.NestedScrollView;
 import androidx.fragment.app.Fragment;
 import androidx.recyclerview.widget.GridLayoutManager;
@@ -29,7 +23,6 @@ import com.cooleshow.base.common.BaseApplication;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
-import com.cooleshow.base.utils.FileUtils;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.helper.QMUIDisplayHelper;
 import com.cooleshow.student.R;
@@ -45,7 +38,6 @@ import com.cooleshow.student.bean.HomeLiveAndVideoBean;
 import com.cooleshow.student.bean.HomeStyleBean;
 import com.cooleshow.student.bean.HotAlbumBean;
 import com.cooleshow.student.bean.StudentUserInfo;
-import com.cooleshow.student.bean.TeachableInstrumentBean;
 import com.cooleshow.student.contract.HomeContract;
 import com.cooleshow.student.databinding.FragmentHomeLayoutBinding;
 import com.cooleshow.student.presenter.main.HomePresenter;
@@ -58,7 +50,6 @@ import com.youth.banner.adapter.BannerImageAdapter;
 import com.youth.banner.holder.BannerImageHolder;
 import com.youth.banner.listener.OnBannerListener;
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -119,14 +110,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
                         .withString(WebConstants.WEB_URL, WebConstants.STUDENT_TEACHER_ELEGANT)
                         .navigation();
                 break;
-            case R.id.tv_title:
-            case R.id.im_title:
-                Bundle bundle = new Bundle();
-                bundle.putSerializable("selectTeachableInstrument", (Serializable) teachableInstrumentBean);
-                ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
-                        .withBundle("bundle", bundle)
-                        .navigation(((MainActivity)getActivity()), MainActivity.SELECT_RESULT);
-                break;
+
 
         }
     }
@@ -135,6 +119,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
     public void onResume() {
         super.onResume();
         presenter.queryCountOfUnread();
+        presenter.queryUserInfo();
     }
 
     @Override
@@ -166,8 +151,6 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         mViewBinding.tvGoLive.setOnClickListener(this);
         mViewBinding.tvTeacherStyleMore.setOnClickListener(this);
         mViewBinding.imTeacherStyleMore.setOnClickListener(this);
-        mViewBinding.tvTitle.setOnClickListener(this);
-        mViewBinding.imTitle.setOnClickListener(this);
         mViewBinding.scrollLayout.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
             @Override
             public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
@@ -233,7 +216,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
         presenter.userAccountPage();
         presenter.queryLiveAndVideo();
         presenter.getStylePage();
-        presenter.queryUserInfo();
+
         mViewBinding.refreshLayout.setOnRefreshListener(new OnRefreshListener() {
             @Override
             public void onRefresh(@NonNull RefreshLayout refreshLayout) {
@@ -242,6 +225,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
                 presenter.userAccountPage();
                 presenter.queryLiveAndVideo();
                 presenter.getStylePage();
+                presenter.queryUserInfo();
             }
         });
 
@@ -322,35 +306,15 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
 
     @Override
     public void queryUserInfoSuccess(StudentUserInfo data) {
-        String subjectId = data.subjectId;
-        String firstSubjectId = "";
-        if (!TextUtils.isEmpty(subjectId)) {
-            if (subjectId.contains(",")) {
-                String[] split = subjectId.split(",");
-                firstSubjectId = split[0];
-            } else {
-                firstSubjectId = subjectId;
-            }
-            presenter.getSubjectFromId(firstSubjectId);
+        GlideUtils.INSTANCE.loadImage(getContext(), data.heardUrl, mViewBinding.ivAvatar, R.drawable.icon_student_default_head);
+        mViewBinding.tvName.setText(data.username);
 
-        } else {
-            mViewBinding.tvTitle.setText("请选择");
+        if (TextUtils.isEmpty(data.subjectName)) {
+            ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
+                    .navigation();
         }
     }
 
-    private TeachableInstrumentBean teachableInstrumentBean = null;
-
-    @Override
-    public void getSubjectFromIdSuccess(TeachableInstrumentBean data) {
-        setTeachableInstrumentBean(data);
-    }
-
-
-
-    public void setTeachableInstrumentBean(TeachableInstrumentBean data) {
-        mViewBinding.tvTitle.setText(data.name);
-        teachableInstrumentBean = data;
-    }
 
     private void initRecentLive(HomeLiveAndVideoBean.RecentCoursesBean recentCourses) {
         if (null == recentCourses) {
@@ -421,7 +385,6 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
             count++;
         }
 
-//        menuList.
         for (int i = 0; i < count; i++) {
             List<AppHomeBean.ItemBean> dataList = new ArrayList<>();
             for (int j = i * 5; j < menuList.size() && j < (i + 1) * 5; j++) {
@@ -429,13 +392,15 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
             }
             fragments.add(HomeMenuFragment.newInstance(dataList));
         }
+        mViewBinding.viewpagerMenu.removeAllViews();
         if (fragments.size() == 0) {
             mViewBinding.viewpagerMenu.setVisibility(View.GONE);
             return;
         }
+
         mViewBinding.viewpagerMenu.setVisibility(View.VISIBLE);
-        mViewBinding.viewpagerMenu.setAdapter(new HomeMenuPagerAdapter(getParentFragmentManager(), fragments));
-        initPoint();
+        HomeMenuPagerAdapter homeMenuPagerAdapter = new HomeMenuPagerAdapter(getParentFragmentManager(), fragments);
+        mViewBinding.viewpagerMenu.setAdapter(homeMenuPagerAdapter);
         mViewBinding.viewpagerMenu.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
             @Override
             public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
@@ -462,6 +427,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
 
             }
         });
+        initPoint();
 
     }
 
@@ -469,6 +435,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
      * 初始化指示器
      */
     private void initPoint() {
+        llIndicator.removeAllViews();
         for (int i = 0; i < fragments.size(); i++) {
             // 往llContainer添加一个小圆点
             ImageView iv = new ImageView(getContext());
@@ -547,16 +514,17 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
 
     @Override
     public void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data) {
-        if (null==data||data.size()==0){
+        if (null == data || data.size() == 0) {
+            mViewBinding.viewUnreadMessage.setVisibility(View.GONE);
             return;
         }
-        int totalCount=0;
+        int totalCount = 0;
         for (CountOfUnreadBean datum : data) {
-            totalCount+=datum.value;
+            totalCount += datum.value;
         }
-        if (totalCount>0){
+        if (totalCount > 0) {
             mViewBinding.viewUnreadMessage.setVisibility(View.VISIBLE);
-        }else {
+        } else {
             mViewBinding.viewUnreadMessage.setVisibility(View.GONE);
         }
     }

+ 1 - 0
student/src/main/java/com/cooleshow/student/ui/main/HomeMenuFragment.java

@@ -2,6 +2,7 @@ package com.cooleshow.student.ui.main;
 
 import android.os.Bundle;
 import android.text.TextUtils;
+import android.util.Log;
 import android.view.View;
 
 import androidx.annotation.NonNull;

+ 0 - 14
student/src/main/java/com/cooleshow/student/ui/main/MainActivity.java

@@ -40,7 +40,6 @@ import io.rong.imlib.RongIMClient;
  */
 @Route(path = RouterPath.APPCenter.PATH_HOME)
 public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPresenter> implements MainContract.MainView {
-    public static final int SELECT_RESULT = 1001;
     private ArrayList<Fragment> mFragments = new ArrayList<>();
     private HomeFragment mHomeFragment;
     private MineFragment mMineFragment;
@@ -170,7 +169,6 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
         }
         //存储userInfo信息
         UserHelper.saveUserInfo(userInfo);
-
     }
 
     @Override
@@ -183,16 +181,4 @@ public class MainActivity extends BaseMVPActivity<ActivityMainBinding, MainPrese
         return new MainPresenter();
     }
 
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (resultCode == RESULT_OK) {
-            if (requestCode == SELECT_RESULT) {
-                if (null!=mHomeFragment){
-                    TeachableInstrumentBean dataSerializableExtra = (TeachableInstrumentBean) data.getSerializableExtra("selectTeachableInstrument");
-                    mHomeFragment.setTeachableInstrumentBean(dataSerializableExtra);
-                }
-            }
-        }
-    }
 }

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

@@ -202,7 +202,7 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
         }
         GlideUtils.INSTANCE.loadImage(getContext(), data.heardUrl, mViewBinding.ivAvatar, R.drawable.icon_student_default_head);
         mViewBinding.tvNickname.setText(data.username);
-        mViewBinding.tvCardId.setText("学好;" + data.idCardNo);
+        mViewBinding.tvCardId.setText("学号:" + data.idCardNo);
         mViewBinding.tvValidity.setText(data.membershipDays + "");
         mViewBinding.tvFinishedClass.setText(data.finshClassHours + "");
         mViewBinding.tvResidueClass.setText(data.unfinshClassHours + "");

+ 140 - 44
student/src/main/java/com/cooleshow/student/ui/main/ShopMallFragment.java

@@ -1,16 +1,27 @@
 package com.cooleshow.student.ui.main;
 
+import android.os.Build;
 import android.view.View;
-import android.widget.LinearLayout;
-
+import android.webkit.GeolocationPermissions;
+import android.webkit.ValueCallback;
+import android.webkit.WebChromeClient;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.widget.FrameLayout;
+
+import com.cooleshow.base.BuildConfig;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
-import com.cooleshow.base.widgets.AgentWebClient;
+import com.cooleshow.base.utils.LogUtils;
+import com.cooleshow.base.widgets.LollipopFixedWebView;
+import com.cooleshow.base.widgets.WebClient;
 import com.cooleshow.student.contract.ShopMallContract;
 import com.cooleshow.student.databinding.FragmentShopmalBinding;
 import com.cooleshow.student.presenter.main.ShopMallPresenter;
+import com.cooleshow.student.widgets.helper.JsInterfaceHelper;
 import com.cooleshow.usercenter.helper.UserHelper;
-import com.just.agentweb.AgentWeb;
+
+import org.json.JSONObject;
 
 /**
  * 创建日期:2022/5/26 10:10
@@ -18,11 +29,12 @@ import com.just.agentweb.AgentWeb;
  * @author Ryan
  * 类说明:
  */
-public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, ShopMallPresenter> implements ShopMallContract.ShopMallView {
-
-    private AgentWeb mAgentWeb;
-    private LinearLayout container;
-    private AgentWebClient mWebClient;
+public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, ShopMallPresenter> implements ShopMallContract.ShopMallView, JsInterfaceHelper.OnJsMethodCallListener {
+    private WebView webView;
+    private String url;
+    private WebClient mWebClient;
+    private JsInterfaceHelper mInterfaceUtils;
+    private ValueCallback mUploadCallbackAboveL;
 
     @Override
     protected FragmentShopmalBinding getLayoutView() {
@@ -39,27 +51,36 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
     @Override
     protected void initView(View rootView) {
         view_status_bar = mViewBinding.viewStatusBar;
+        try {
+            if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
+                webView = new LollipopFixedWebView(getContext());
+            } else {
+                webView = new WebView(getContext());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (null == webView) {
 
-        container = mViewBinding.container;
-
-        String linkurl = WebConstants.TEACHER_SHOPMALL;
-        mWebClient = new AgentWebClient();
-        mWebClient = new AgentWebClient();
-        linkurl = loadUrl(linkurl);
-
-        mAgentWeb = AgentWeb.with(this)
-                .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
-                .useDefaultIndicator()
-//                .setWebChromeClient(mWebChromeClient)
-                .setWebViewClient(mWebClient)
-                .createAgentWeb()
-                .ready()
-                .go(linkurl);
-
-
+            return;
+        }
+        url = WebConstants.TEACHER_SHOPMALL;
+
+        mViewBinding.viewParent.addView(webView, new FrameLayout.LayoutParams(
+                FrameLayout.LayoutParams.MATCH_PARENT,
+                FrameLayout.LayoutParams.MATCH_PARENT));
+        initWebView();
+        mInterfaceUtils = new JsInterfaceHelper(getActivity());
+        mInterfaceUtils.setOnJsCallListener(this);
+        webView.addJavascriptInterface(mInterfaceUtils, WebConstants.WEB_JS_INTERFACE);
+        mWebClient = new WebClient();
+        webView.setWebViewClient(mWebClient);
+        webView.setWebChromeClient(new MyWebChromeClient());
+
+        loadUrl();
     }
 
-    private String loadUrl(String url) {
+    private void loadUrl() {
         String userToken = UserHelper.getUserToken();
         mWebClient.setAuthorization(userToken);
         boolean status = url.contains("?");
@@ -68,40 +89,115 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
         } else {
             url = (url + "?Authorization=" + userToken);
         }
-        return url;
+        webView.loadUrl(url);
     }
 
+    private void initWebView() {
+        //声明WebSettings子类
+        WebSettings webSettings = webView.getSettings();
+        webSettings.setUserAgentString(webSettings.getUserAgentString() + WebConstants.WEB_UA_PARAMS);
+        webSettings.setGeolocationDatabasePath(getActivity().getApplicationContext().getFilesDir().getPath());
+        webSettings.setGeolocationEnabled(true);
+        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
+        //如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
+        webSettings.setJavaScriptEnabled(true);
+        webSettings.setMediaPlaybackRequiresUserGesture(false);//false允许自动播放音视频
+        //是否启用缓存
+        webSettings.setAppCacheEnabled(true);
+
+        // 开启DOM缓存,默认状态下是不支持LocalStorage的
+        webSettings.setDomStorageEnabled(true);
+        // 开启数据库缓存
+        webSettings.setDatabaseEnabled(true);
+        // 地址跨域导致视频预览图片加载不出来 无法播放:
+        webSettings.setAllowUniversalAccessFromFileURLs(false);
+        webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
+
+        //设置自适应屏幕,两者合用
+        webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
+        webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小
+        //缩放操作
+        webSettings.setSupportZoom(false); //支持缩放,默认为true。是下面那个的前提。
+        //其他细节操作
+        webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); //关闭webview中缓存
+        webSettings.setAllowFileAccess(true); //设置可以访问文件
+        webSettings.setJavaScriptCanOpenWindowsAutomatically(true); //支持通过JS打开新窗口
+        webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
+        webSettings.setDefaultTextEncodingName("UTF-8");//设置编码格式
+
+        webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);  //富文本适配
+        webSettings.setAppCacheMaxSize(Long.MAX_VALUE);
+        webSettings.setAppCachePath(getContext().getDir("appcache", 0).getPath());
+        webSettings.setDatabasePath(getContext().getDir("databases", 0).getPath());
+        webSettings.setGeolocationDatabasePath(getContext().getDir("geolocation", 0)
+                .getPath());
+        webSettings.setPluginState(WebSettings.PluginState.ON_DEMAND);
+        if (BuildConfig.DEBUG) {
+            webView.setWebContentsDebuggingEnabled(true);
+        }
+        webSettings.setTextZoom(100);//设置字体默认的缩放比例,以避免手机系统的字体修改对页面字体及布局造成影响。
+        webView.setHorizontalScrollBarEnabled(false);
+        webView.setVerticalScrollBarEnabled(false);
+    }
 
     @Override
-    protected void initData() {
+    public void setBarStatus(JSONObject message) {
 
     }
 
-
-    public void clickBack() {
-        if (!mAgentWeb.back()) {
-            ((MainActivity) getActivity()).clickBackPressed();
-        }
+    @Override
+    public void backIconChange(JSONObject message) {
 
     }
 
-
     @Override
-    public void onResume() {
-        mAgentWeb.getWebLifeCycle().onResume();
-        super.onResume();
+    public void chooseFile(JSONObject message) {
+
     }
 
     @Override
-    public void onPause() {
-        mAgentWeb.getWebLifeCycle().onPause();
-        super.onPause();
+    public void getNavHeight(JSONObject message) {
+
+    }
+
+
+
+    private class MyWebChromeClient extends WebChromeClient {
+        public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
+            callback.invoke(origin, true, false);
+        }
+
+        @Override
+        public void onProgressChanged(WebView view, int newProgress) {
+            LogUtils.e(newProgress + "");
+            if (newProgress == 100 && null != mViewBinding.progressBar) {
+                mViewBinding.progressBar.setVisibility(View.GONE);//加载完网页进度条消失
+            } else {
+                if (null != mViewBinding.progressBar) {
+                    mViewBinding.progressBar.setVisibility(View.VISIBLE);//开始加载网页时显示进度条
+                    mViewBinding.progressBar.setProgress(newProgress);//设置进度值
+                }
+
+            }
+        }
+
+        @Override
+        public void onReceivedTitle(WebView view, String title) {
+            super.onReceivedTitle(view, title);
+        }
 
     }
 
     @Override
-    public void onDestroy() {
-        mAgentWeb.getWebLifeCycle().onDestroy();
-        super.onDestroy();
+    protected void initData() {
+
+    }
+
+    public void clickBack() {
+        if (webView.canGoBack()) {
+            webView.goBack();
+        } else {
+            ((MainActivity) getActivity()).clickBackPressed();
+        }
     }
 }

+ 10 - 0
student/src/main/java/com/cooleshow/student/ui/message/MessageBoxActivity.java

@@ -235,6 +235,9 @@ public class MessageBoxActivity extends BaseMVPActivity<ActivityMessageBoxBindin
     @Override
     public void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data) {
         if (null==data||data.size()==0){
+            viewBinding.tvAllUnread.setVisibility(View.GONE);
+            viewBinding.tvCourseUnread.setVisibility(View.GONE);
+            viewBinding.tvSystemUnread.setVisibility(View.GONE);
             return;
         }
         int totalCount=0;
@@ -267,4 +270,11 @@ public class MessageBoxActivity extends BaseMVPActivity<ActivityMessageBoxBindin
             viewBinding.tvSystemUnread.setVisibility(View.GONE);
         }
     }
+
+    @Override
+    public void batchSetReadSuccess() {
+        presenter.queryCountOfUnread();
+        currentPage = 1;
+        queryList(false);
+    }
 }

+ 77 - 0
student/src/main/java/com/cooleshow/student/ui/mine/CheckTeachableActivity.java

@@ -0,0 +1,77 @@
+package com.cooleshow.student.ui.mine;
+
+import android.content.Intent;
+import android.text.TextUtils;
+
+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.student.bean.StudentUserInfo;
+import com.cooleshow.student.contract.CheckTeachableContract;
+import com.cooleshow.student.databinding.ActivityCheckTeachableBinding;
+import com.cooleshow.student.presenter.mine.CheckTeachablePresenter;
+
+/**
+ * 创建日期:2022/6/5 20:16
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_CHECK_TEACHABLE)
+public class CheckTeachableActivity extends BaseMVPActivity<ActivityCheckTeachableBinding, CheckTeachablePresenter> implements CheckTeachableContract.CheckTeachableView {
+
+    @Override
+    protected void initView() {
+
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+        presenter.queryUserInfo();
+    }
+
+    @Override
+    protected ActivityCheckTeachableBinding getLayoutView() {
+        return ActivityCheckTeachableBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected CheckTeachablePresenter createPresenter() {
+        return new CheckTeachablePresenter();
+    }
+
+    @Override
+    public void queryUserInfoSuccess(StudentUserInfo data) {
+        //        data.subjectName
+        if (TextUtils.isEmpty(data.subjectName)) {
+            ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
+                    .navigation(this,1001);
+        } else {
+            goMain();
+        }
+
+    }
+
+    @Override
+    public void queryUserInfoError() {
+        goMain();
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode==RESULT_OK){
+            if (requestCode==1001){
+                goMain();
+            }
+        }
+    }
+    private void goMain(){
+        ARouter.getInstance().build(RouterPath.APPCenter.PATH_HOME).navigation();
+        finish();
+    }
+}

+ 83 - 0
student/src/main/java/com/cooleshow/student/ui/mine/FeedBackActivity.java

@@ -0,0 +1,83 @@
+package com.cooleshow.student.ui.mine;
+
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.View;
+
+import androidx.annotation.Nullable;
+
+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.student.R;
+import com.cooleshow.student.contract.FeedBackContract;
+import com.cooleshow.student.databinding.ActivityFeedbackBinding;
+import com.cooleshow.student.presenter.mine.FeedBackPresenter;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import io.rong.imkit.utils.StatusBarUtil;
+
+/**
+ * 创建日期:2022/5/18 16:25
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = RouterPath.MineCenter.MINE_FEEDBACK)
+public class FeedBackActivity extends BaseMVPActivity<ActivityFeedbackBinding, FeedBackPresenter> implements FeedBackContract.FeedBackView, View.OnClickListener {
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()){
+            case R.id.tv_submit:
+                String content = viewBinding.etContent.getText().toString().trim();
+                if (TextUtils.isEmpty(content)){
+                    ToastUtils.showShort("请输入您的反馈意见");
+                    break;
+                }
+                String mobileNo = viewBinding.etConnect.getText().toString().trim();
+                if (TextUtils.isEmpty(mobileNo)){
+                    ToastUtils.showShort("请输入您的邮箱或手机号");
+                    break;
+                }
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.putOpt("content", content);
+                    jsonObject.putOpt("mobileNo", mobileNo);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                presenter.addSuggestion(jsonObject.toString());
+                break;
+        }
+    }
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        StatusBarUtil.setStatusBarDarkTheme(this, true);
+    }
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "意见反馈");
+        viewBinding.tvSubmit.setOnClickListener(this);
+    }
+
+    @Override
+    protected ActivityFeedbackBinding getLayoutView() {
+        return ActivityFeedbackBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected FeedBackPresenter createPresenter() {
+        return new FeedBackPresenter();
+    }
+
+    @Override
+    public void addSuggestionSuccess(Object object) {
+        ToastUtils.showShort("提交成功");
+        finish();
+    }
+}

+ 25 - 9
student/src/main/java/com/cooleshow/student/ui/mine/ModifyNickNameActivity.java

@@ -2,6 +2,7 @@ package com.cooleshow.student.ui.mine;
 
 import android.content.Intent;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.View;
 
 import androidx.annotation.Nullable;
@@ -11,12 +12,19 @@ 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.student.R;
+import com.cooleshow.student.bean.StudentUserInfo;
 import com.cooleshow.student.contract.ModifyNickNameContract;
 import com.cooleshow.student.databinding.ActivityModifyNicknameBinding;
 import com.cooleshow.student.presenter.mine.ModifyNickNamePresenter;
 import com.cooleshow.usercenter.bean.SetDetailBean;
 import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import com.ksyun.ks3.model.acl.CannedAccessControlList;
+
+import org.json.JSONException;
+import org.json.JSONObject;
 
 import io.rong.imkit.utils.StatusBarUtil;
 
@@ -28,17 +36,24 @@ import io.rong.imkit.utils.StatusBarUtil;
  */
 @Route(path = RouterPath.MineCenter.MINE_MODIFY_NICKNAME)
 public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNicknameBinding, ModifyNickNamePresenter> implements ModifyNickNameContract.ModifyNickNameView, View.OnClickListener {
-    @Autowired(name = "bundle")
-    Bundle myBundle;
-    private SetDetailBean mySetDetailBean;
+
 
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.tv_right_text:
-                Gson gson = new Gson();
-                mySetDetailBean.username= viewBinding.etNickname.getText().toString().trim();
-                presenter.submitSetDetail(gson.toJson(mySetDetailBean));
+                String userName = viewBinding.etNickname.getText().toString().trim();
+                if (TextUtils.isEmpty(userName)){
+                    ToastUtils.showShort("请输入昵称!");
+                    break;
+                }
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.put("username", userName);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                presenter.submitSetDetail(jsonObject.toString());
                 break;
             case R.id.im_close:
                 viewBinding.etNickname.setText("");
@@ -59,9 +74,10 @@ public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNickna
         viewBinding.toolbarInclude.tvRightText.setVisibility(View.VISIBLE);
         viewBinding.toolbarInclude.tvRightText.setText("保存");
         viewBinding.toolbarInclude.tvRightText.setOnClickListener(this);
-        if (null != myBundle) {
-            mySetDetailBean = (SetDetailBean) myBundle.getSerializable("teacherInfoBean");
-            viewBinding.etNickname.setText(mySetDetailBean.username);
+
+        String userName = getIntent().getStringExtra("userName");
+        if (!TextUtils.isEmpty(userName)){
+            viewBinding.etNickname.setText(userName);
         }
         viewBinding.imClose.setOnClickListener(this);
     }

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

@@ -16,6 +16,9 @@ import androidx.core.content.FileProvider;
 
 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.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.ActivityUtils;
@@ -24,17 +27,28 @@ import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.PopupUtil;
 import com.cooleshow.base.utils.ToastUtil;
 
+import com.cooleshow.base.utils.ToastUtils;
 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;
+import com.cooleshow.student.ui.main.MainActivity;
 import com.cooleshow.usercenter.bean.SetDetailBean;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.google.gson.Gson;
 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.Calendar;
+import java.util.Date;
 
 import io.rong.imkit.utils.StatusBarUtil;
 
@@ -46,7 +60,7 @@ import io.rong.imkit.utils.StatusBarUtil;
  */
 @Route(path = RouterPath.MineCenter.MINE_PERSONAL_SETTING)
 public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSettingBinding, PersonalSettingPresenter> implements PersonalSettingContract.PersonalSettingView, View.OnClickListener {
-    private SetDetailBean mySetDetailBean;
+    private StudentUserInfo mySetDetailBean;
     private final int MODIFY_NICKNAME = 1001;
     private final int MODIFY_PHONE = 1002;
     private final int PERSONAL_CERTIFICATION = 1003;
@@ -68,10 +82,8 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
                 break;
             case R.id.cl_name:
                 if (null != mySetDetailBean) {
-                    Bundle bundle = new Bundle();
-                    bundle.putSerializable("teacherInfoBean", mySetDetailBean);
                     ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_NICKNAME)
-                            .withBundle("bundle", bundle)
+                            .withString("userName", mySetDetailBean.username)
                             .navigation(this, MODIFY_NICKNAME);
                 }
 
@@ -92,41 +104,115 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
                 ARouter.getInstance().build(RouterPath.MineCenter.MINE_PERSONAL_CERTIFICATION)
                         .navigation(this, PERSONAL_CERTIFICATION);
                 break;
-            case R.id.tv_login_out:
-                UserHelper.saveUserToken("");
-                ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
-                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK)
-                        .navigation();
+            case R.id.cl_birthday:
+                selectBirthday();
                 break;
+            case R.id.cl_score:
+                if (null != mySetDetailBean) {
+                    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();
+                }
+                break;
+
         }
     }
 
+    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 -> {
-                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));
+
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.put("gender", 1);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+                popupWindow.dismiss();
+                presenter.submitSetDetail(jsonObject.toString());
             });
             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));
+                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());
 
@@ -199,7 +285,7 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
             Uri imageUri;
             if (Build.VERSION.SDK_INT >= 24) {
                 imageUri = FileProvider.getUriForFile(this,
-                        "com.cooleshow.teacher.fileprovider", outputImage);
+                        "com.cooleshow.student.fileprovider", outputImage);
             } else {
                 imageUri = Uri.fromFile(outputImage);
             }
@@ -249,13 +335,20 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
         viewBinding.clPhone.setOnClickListener(this);
         viewBinding.clModifyPsd.setOnClickListener(this);
         viewBinding.clCertification.setOnClickListener(this);
-        viewBinding.tvLoginOut.setOnClickListener(this);
+        viewBinding.clBirthday.setOnClickListener(this);
+        viewBinding.clScore.setOnClickListener(this);
     }
 
     @Override
     public void initData() {
         super.initData();
-        presenter.getSetDetail();
+
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        presenter.queryUserInfo();
     }
 
     @Override
@@ -269,19 +362,36 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
     }
 
     @Override
-    public void getSetDetailSuccess(SetDetailBean setDetailBean) {
-        mySetDetailBean = setDetailBean;
-        GlideUtils.INSTANCE.loadImage(this, setDetailBean.avatar, viewBinding.imHeader, R.drawable.icon_student_default_head);
-        viewBinding.tvNickname.setText(setDetailBean.username);
-        if (setDetailBean.gender == 0) {
+    public void queryUserInfoSuccess(StudentUserInfo data) {
+        mySetDetailBean = data;
+        GlideUtils.INSTANCE.loadImage(this, data.heardUrl, viewBinding.imHeader, R.drawable.icon_student_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(setDetailBean.phone);
-        if (setDetailBean.real) {
+        viewBinding.tvPhone.setText(data.phone);
+        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 {
@@ -290,10 +400,11 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
         }
     }
 
+
     @Override
     public void submitSetDetailSuccess(SetDetailBean setDetailBean) {
-        mySetDetailBean.gender = setDetailBean.gender;
-        mySetDetailBean.avatar = setDetailBean.avatar;
+        mySetDetailBean.gender = setDetailBean.gender + "";
+        mySetDetailBean.heardUrl = setDetailBean.avatar;
         if (setDetailBean.gender == 0) {
             //女
             viewBinding.tvSex.setText("女");
@@ -301,6 +412,13 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
             //男
             viewBinding.tvSex.setText("男");
         }
+        if (setDetailBean.birthdate.contains(" ")) {
+            String[] s = setDetailBean.birthdate.split(" ");
+            viewBinding.tvBirthday.setText(s[0]);
+        } else {
+            viewBinding.tvBirthday.setText(setDetailBean.birthdate);
+        }
+        ToastUtils.showShort("修改成功");
         GlideUtils.INSTANCE.loadImage(this, setDetailBean.avatar, viewBinding.imHeader, R.drawable.icon_student_default_head);
 
 
@@ -309,15 +427,13 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
     @Override
     public void upLoadImageSuccess(String url) {
         hideLoading();
-        SetDetailBean requestBean = new SetDetailBean();
-        requestBean.gender = 1;
-        requestBean.real = mySetDetailBean.real;
-        requestBean.phone = mySetDetailBean.phone;
-        requestBean.birthdate = mySetDetailBean.birthdate;
-        requestBean.avatar = url;
-        requestBean.username = mySetDetailBean.username;
-        Gson gson = new Gson();
-        presenter.submitSetDetail(gson.toJson(requestBean));
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("avatar", url);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        presenter.submitSetDetail(jsonObject.toString());
     }
 
     @Override
@@ -325,6 +441,7 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
         hideLoading();
     }
 
+
     @Override
     protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
         super.onActivityResult(requestCode, resultCode, data);

+ 17 - 0
student/src/main/java/com/cooleshow/student/ui/mine/SettingActivity.java

@@ -1,5 +1,6 @@
 package com.cooleshow.student.ui.mine;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
 
@@ -15,6 +16,8 @@ import com.cooleshow.student.R;
 import com.cooleshow.student.contract.SettingContract;
 import com.cooleshow.student.databinding.ActivitySettingBinding;
 import com.cooleshow.student.presenter.mine.SettingPresenter;
+import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.helper.UserHelper;
 
 import io.rong.imkit.utils.StatusBarUtil;
 
@@ -55,6 +58,17 @@ public class SettingActivity extends BaseMVPActivity<ActivitySettingBinding, Set
                 ARouter.getInstance().build(RouterPath.MineCenter.MINE_ABOUT)
                         .navigation();
                 break;
+            case R.id.tv_login_out:
+                UserHelper.saveUserToken("");
+                ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
+                        .withString(UserConstants.PHONE_NUM_KEY, UserHelper.getUserPhone())
+                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK)
+                        .navigation();
+                break;
+            case R.id.cl_feedback:
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_FEEDBACK)
+                        .navigation();
+                break;
         }
     }
 
@@ -73,6 +87,9 @@ public class SettingActivity extends BaseMVPActivity<ActivitySettingBinding, Set
         viewBinding.imSelect.setOnClickListener(this);
         viewBinding.clPrivate.setOnClickListener(this);
         viewBinding.clAbout.setOnClickListener(this);
+        viewBinding.tvLoginOut.setOnClickListener(this);
+        viewBinding.clFeedback.setOnClickListener(this);
+
         is_detection = SPUtils.getInstance().getBoolean("IS_DETECTION");
         if (is_detection) {
             viewBinding.imSelect.setImageResource(R.drawable.icon_switch_off);

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

@@ -13,6 +13,7 @@ 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.student.R;
 import com.cooleshow.student.adapter.TeachableInstrumentAdapter;
 import com.cooleshow.student.bean.TeachableInstrumentBean;
@@ -54,6 +55,10 @@ public class TeachableInstrumentActivity extends BaseMVPActivity<ActivityTeachab
                         }
                     }
                 }
+                if (selectTeachableInstrument.size()==0){
+                    ToastUtils.showShort("请选择乐器");
+                    break;
+                }
                 presenter.setSubject(selectTeachableInstrument.get(0).id+"");
 
                 break;

+ 47 - 3
student/src/main/java/com/cooleshow/student/ui/web/AgentWebActivity.java

@@ -2,6 +2,7 @@ package com.cooleshow.student.ui.web;
 
 import static com.cooleshow.base.common.WebConstants.WEB_URL;
 
+import android.content.Intent;
 import android.view.KeyEvent;
 import android.view.View;
 import android.webkit.WebView;
@@ -9,27 +10,32 @@ import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.widgets.AgentWebClient;
 import com.cooleshow.student.databinding.ActivityAgentWebBinding;
 import com.cooleshow.student.presenter.web.AgentWebPresenter;
+import com.cooleshow.student.widgets.helper.JsInterfaceHelper;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.just.agentweb.AgentWeb;
 import com.just.agentweb.WebChromeClient;
 
+import org.json.JSONObject;
+
 /**
  * 创建日期:2022/6/5 13:32
  *
  * @author Ryan
  * 类说明:
  */
-@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
-public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, AgentWebPresenter> {
+public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, AgentWebPresenter> implements JsInterfaceHelper.OnJsMethodCallListener {
+    private static final int REQUEST_CODE_FILE_CHOOSER = 500;
     private AgentWeb mAgentWeb;
     private LinearLayout container;
     private TextView tv_title;
     private AgentWebClient mWebClient;
+    private JsInterfaceHelper mInterfaceUtils;
 
     @Override
     protected void initView() {
@@ -44,18 +50,24 @@ public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, A
         });
         String linkurl = getIntent().getStringExtra(WEB_URL);
         mWebClient = new AgentWebClient();
-        linkurl=loadUrl(linkurl);
+        linkurl = loadUrl(linkurl);
+        mInterfaceUtils = new JsInterfaceHelper(this);
+        mInterfaceUtils.setOnJsCallListener(this);
         mAgentWeb = AgentWeb.with(this)
                 .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
                 .useDefaultIndicator()
                 .setWebChromeClient(mWebChromeClient)
                 .setWebViewClient(mWebClient)
+//                .setWebChromeClient(new MyWebChromeClient())
                 .createAgentWeb()
                 .ready()
                 .go(linkurl);
 
+        mAgentWeb.getJsInterfaceHolder().addJavaObject(WebConstants.WEB_JS_INTERFACE, mInterfaceUtils);
     }
 
+
+
     private String loadUrl(String url) {
         String userToken = UserHelper.getUserToken();
         mWebClient.setAuthorization(userToken);
@@ -119,4 +131,36 @@ public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, A
     protected AgentWebPresenter createPresenter() {
         return new AgentWebPresenter();
     }
+
+    @Override
+    public void setBarStatus(JSONObject message) {
+
+    }
+
+    @Override
+    public void backIconChange(JSONObject message) {
+
+    }
+
+    @Override
+    public void chooseFile(JSONObject message) {
+        JSONObject content = (JSONObject) message.opt("content");
+        String type = (String) content.opt("image/*");
+        String[] types = new String[]{type};
+        showFileChooser();
+    }
+
+    private void showFileChooser() {
+        Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+        intent.setType("*/*");
+        intent.addCategory(Intent.CATEGORY_OPENABLE);
+        intent.putExtra(Intent.EXTRA_TITLE, "File Chooser");
+        intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
+        startActivityForResult(intent, REQUEST_CODE_FILE_CHOOSER);
+    }
+
+    @Override
+    public void getNavHeight(JSONObject message) {
+
+    }
 }

+ 1 - 1
student/src/main/java/com/cooleshow/student/ui/web/WebActivity.java

@@ -55,7 +55,7 @@ import java.util.List;
 /**
  * Author by pq, Date on 2022/4/24.
  */
-
+@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
 public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements JsInterfaceHelper.OnJsMethodCallListener, View.OnClickListener {
     private static final int REQUEST_CODE_FILE_CHOOSER = 500;
     private WebView webView;

+ 8 - 0
student/src/main/res/drawable/bg_white_10dp_border.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="@color/white" />
+    <corners
+        android:radius="10dp" />
+    <stroke android:width="1dp" android:color="@color/color_e5e5e5"/>
+</shape>

+ 7 - 0
student/src/main/res/layout/activity_check_teachable.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 74 - 0
student/src/main/res/layout/activity_feedback.xml

@@ -0,0 +1,74 @@
+<?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" />
+
+
+    <EditText
+        android:id="@+id/et_content"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_239"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="15dp"
+        android:layout_marginRight="16dp"
+        android:background="@drawable/bg_white_10dp_border"
+        android:gravity="left"
+        android:hint="请输入您的反馈意见"
+        android:inputType="text"
+        android:paddingLeft="12dp"
+        android:paddingTop="14dp"
+        android:paddingRight="12dp"
+        android:paddingBottom="14dp"
+        android:textColor="@color/black_333"
+        android:textColorHint="@color/color_999999"
+        android:textSize="@dimen/sp_16" />
+    <EditText
+        android:id="@+id/et_connect"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_48"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginRight="16dp"
+        android:background="@drawable/bg_white_10dp_border"
+        android:gravity="left"
+        android:hint="您的邮箱或手机号"
+        android:inputType="textEmailAddress"
+        android:paddingLeft="12dp"
+        android:paddingTop="14dp"
+        android:paddingRight="12dp"
+        android:paddingBottom="14dp"
+        android:textColor="@color/black_333"
+        android:textColorHint="@color/color_999999"
+        android:textSize="@dimen/sp_16" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="17dp"
+        android:textSize="@dimen/sp_14"
+        android:textColor="@color/gray_777"
+        android:lineSpacingExtra="4dp"
+        android:layout_marginRight="17dp"
+        android:text="或通过以下方式联系我们:\n微信公众号:DYME-2002\n邮箱:dyme2002@dayaedu.com"
+        android:layout_marginTop="14dp"/>
+    <TextView
+        android:id="@+id/tv_submit"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_gravity="bottom"
+        android:layout_marginLeft="28dp"
+        android:layout_marginTop="53dp"
+        android:layout_marginRight="28dp"
+        android:background="@drawable/shape_course_status_ing"
+        android:gravity="center"
+        android:text="提交"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14" />
+</LinearLayout>

+ 98 - 14
student/src/main/res/layout/activity_personal_setting.xml

@@ -213,8 +213,9 @@
                 app:layout_constraintLeft_toLeftOf="parent" />
         </androidx.constraintlayout.widget.ConstraintLayout>
 
+
         <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_modify_psd"
+            android:id="@+id/cl_birthday"
             android:layout_width="match_parent"
             android:layout_height="@dimen/dp_55"
             app:layout_constraintLeft_toLeftOf="parent"
@@ -224,6 +225,102 @@
                 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_next_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_next_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"
@@ -301,17 +398,4 @@
     </androidx.constraintlayout.widget.ConstraintLayout>
 
 
-    <TextView
-        android:id="@+id/tv_login_out"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_50"
-        android:layout_alignParentBottom="true"
-        android:layout_marginLeft="14dp"
-        android:layout_marginRight="14dp"
-        android:layout_marginBottom="46dp"
-        android:background="@drawable/bg_white_10dp"
-        android:gravity="center"
-        android:text="退出登录"
-        android:textColor="@color/color_1a1a1a"
-        android:textSize="@dimen/sp_17" />
 </RelativeLayout>

+ 209 - 152
student/src/main/res/layout/activity_setting.xml

@@ -1,177 +1,234 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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">
+    android:background="@color/color_f6f8f9">
 
-    <include
-        android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
 
-    <androidx.constraintlayout.widget.ConstraintLayout
+    <LinearLayout
         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">
+        android:orientation="vertical">
 
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_address"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent">
-
-            <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_next_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>
+        <include
+            android:id="@+id/toolbar_include"
+            layout="@layout/common_toolbar_layout" />
 
         <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_detection"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_address">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="12dp"
-                android:text="进入课堂时进行网络&amp;设备检测"
-                android:textColor="@color/color_1a1a1a"
-                android:textSize="@dimen/sp_16"
-                app:layout_constraintBottom_toBottomOf="parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="14dp"
+            android:layout_marginTop="15dp"
+            android:layout_marginEnd="14dp"
+            android:background="@drawable/bg_white_10dp">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cl_address"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
                 app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-
-            <ImageView
-                android:id="@+id/im_select"
-                android:layout_width="@dimen/dp_47"
-                android:layout_height="@dimen/dp_44"
-                android:layout_marginRight="14dp"
-                android:paddingTop="10dp"
-                android:paddingBottom="10dp"
-                android:src="@drawable/icon_switch_off"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-            <View
+                app:layout_constraintTop_toTopOf="parent">
+
+                <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_next_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_detection"
                 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>
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_address">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="12dp"
+                    android:text="进入课堂时进行网络&amp;设备检测"
+                    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:id="@+id/im_select"
+                    android:layout_width="@dimen/dp_47"
+                    android:layout_height="@dimen/dp_44"
+                    android:layout_marginRight="14dp"
+                    android:paddingTop="10dp"
+                    android:paddingBottom="10dp"
+                    android:src="@drawable/icon_switch_off"
+                    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_private"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_detection">
+
+                <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_next_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_feedback"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_private">
+
+                <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_next_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_about"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_feedback">
 
+                <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" />
 
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_private"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_detection">
-
-            <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_next_right"
+                    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_next_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="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_about"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_private">
-
-            <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"
+                android:layout_height="10dp"
                 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_next_right"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-
+                app:layout_constraintTop_toBottomOf="@+id/cl_about" />
         </androidx.constraintlayout.widget.ConstraintLayout>
+    </LinearLayout>
 
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="10dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_about" />
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-</LinearLayout>
+    <TextView
+        android:id="@+id/tv_login_out"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_50"
+        android:layout_alignParentBottom="true"
+        android:layout_marginLeft="14dp"
+        android:layout_marginRight="14dp"
+        android:layout_marginBottom="46dp"
+        android:background="@drawable/bg_white_10dp"
+        android:gravity="center"
+        android:text="退出登录"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_17" />
+</RelativeLayout>

+ 2 - 1
student/src/main/res/layout/dialog_home_dialog.xml

@@ -13,10 +13,11 @@
         android:layout_height="wrap_content"
         android:layout_centerInParent="true">
 
-        <ImageView
+        <com.cooleshow.base.widgets.QMUIRadiusImageView
             android:id="@+id/im_pic"
             android:layout_width="match_parent"
             android:layout_height="320dp"
+            app:qmui_corner_radius="@dimen/dp_20"
             app:layout_constraintLeft_toLeftOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
 

+ 21 - 21
student/src/main/res/layout/fragment_home_layout.xml

@@ -9,30 +9,31 @@
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_85">
+        android:background="@color/white"
+        android:layout_height="@dimen/dp_80">
+
+        <de.hdodenhof.circleimageview.CircleImageView
+            android:id="@+id/iv_avatar"
+            android:layout_width="@dimen/dp_32"
+            android:layout_height="@dimen/dp_32"
+            android:layout_marginLeft="@dimen/dp_20"
+            android:layout_marginBottom="@dimen/dp_5"
+            android:src="@drawable/icon_student_default_head"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent" />
 
         <TextView
-            android:id="@+id/tv_title"
+            android:id="@+id/tv_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_20"
+            android:layout_marginLeft="@dimen/dp_10"
             android:layout_marginBottom="@dimen/dp_9"
             android:text="--"
             android:textColor="@color/color_333333"
             android:textSize="@dimen/sp_18"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent" />
-
-        <ImageView
-            android:id="@+id/im_title"
-            android:layout_width="@dimen/dp_18"
-            android:layout_height="@dimen/dp_18"
-            android:layout_marginLeft="@dimen/dp_8"
-            android:background="@drawable/icon_black_down"
-            app:layout_constraintBottom_toBottomOf="@+id/tv_title"
-            app:layout_constraintLeft_toRightOf="@+id/tv_title"
-            app:layout_constraintTop_toTopOf="@+id/tv_title" />
-
+            app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+            app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+            app:layout_constraintTop_toTopOf="@+id/iv_avatar" />
 
         <ImageView
             android:id="@+id/im_message"
@@ -41,9 +42,9 @@
             android:layout_marginRight="@dimen/dp_17"
             android:padding="@dimen/dp_5"
             android:src="@drawable/icon_top_message"
-            app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+            app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
             app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/tv_title" />
+            app:layout_constraintTop_toTopOf="@+id/iv_avatar" />
 
         <View
             android:id="@+id/view_unread_message"
@@ -68,8 +69,8 @@
             android:layout_height="wrap_content" />
 
         <androidx.core.widget.NestedScrollView
-            android:layout_width="match_parent"
             android:id="@+id/scroll_layout"
+            android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:scrollbars="none">
 
@@ -463,8 +464,7 @@
                     android:layout_height="@dimen/dp_100"
                     android:focusable="true"
 
-                    android:focusableInTouchMode="true"
-                     />
+                    android:focusableInTouchMode="true" />
             </LinearLayout>
         </androidx.core.widget.NestedScrollView>
     </com.scwang.smart.refresh.layout.SmartRefreshLayout>

+ 28 - 1
student/src/main/res/layout/fragment_shopmal.xml

@@ -1,7 +1,7 @@
 <?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:id="@+id/container"
+    android:id="@+id/rl_activity_html"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
@@ -11,8 +11,35 @@
         android:layout_height="20dp"
         app:layout_constrainedHeight="true"
         android:background="@color/color_59e5d5"
+        app:layout_constraintHeight_default="wrap"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
+    <LinearLayout
+        android:id="@+id/ll_activity_html"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <View
+            android:id="@+id/view_statusbar"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:background="@color/white"
+            android:visibility="gone" />
 
+        <ProgressBar
+            android:id="@+id/progressBar"
+            style="?android:attr/progressBarStyleHorizontal"
+            android:layout_width="match_parent"
+            android:layout_height="2dip"
+            android:progressDrawable="@drawable/pg_stu" />
+    </LinearLayout>
+
+    <FrameLayout
+        android:id="@+id/view_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/ll_activity_html"
+        android:scrollbars="none" />
 </LinearLayout>

+ 1 - 1
student/src/main/res/values/styles.xml

@@ -8,7 +8,7 @@
     </style>
 
     <style name="SplashTheme" parent="AppTheme">
-        <item name="android:windowBackground">@drawable/bg_splash</item>
+      <!--  <item name="android:windowBackground">@drawable/bg_splash</item>-->
         <item name="android:statusBarColor">@color/colorPrimary</item>
     </style>
 

+ 3 - 0
teacher/src/main/java/com/cooleshow/teacher/contract/MessageBoxContract.java

@@ -21,6 +21,9 @@ public interface MessageBoxContract {
         void setCurrentReadSuccess(long id);
 
         void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data);
+
+        void batchSetReadSuccess();
+
     }
 
     interface Presenter {

+ 3 - 1
teacher/src/main/java/com/cooleshow/teacher/presenter/message/MessageBoxPresenter.java

@@ -70,7 +70,9 @@ public class MessageBoxPresenter extends BasePresenter<MessageBoxContract.Messag
         addSubscribe(create(APIService.class).batchSetRead(), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
-
+                if (getView() != null) {
+                    getView().batchSetReadSuccess();
+                }
             }
 
             @Override

+ 25 - 16
teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt

@@ -44,7 +44,6 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         mViewBinding.ivChat.setOnClickListener(this)
         mViewBinding.tvNoticeContent.setOnClickListener(this)
         mViewBinding.imNoticeList.setOnClickListener(this)
-        presenter.helpCenterContentList()
     }
 
     override fun createPresenter(): HomePresenter {
@@ -65,7 +64,15 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         mViewBinding.tvNickname.text =
             UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId);
         //星级
-        mViewBinding.ratingBar.rating = teacherUserInfo.starGrade.toFloat()
+        if (teacherUserInfo.starGrade.toFloat()>0){
+            mViewBinding.ratingBar.visibility=View.VISIBLE
+            mViewBinding.tvNoScore.visibility=View.GONE
+            mViewBinding.ratingBar.rating = teacherUserInfo.starGrade.toFloat()
+        }else{
+            mViewBinding.ratingBar.visibility=View.GONE
+            mViewBinding.tvNoScore.visibility=View.VISIBLE
+        }
+
 
         //粉丝数
         mViewBinding.tvFansNum.text = teacherUserInfo.fansNum;
@@ -78,34 +85,34 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
             TeacherInfoConstants.ENTRY_STATUS_DOING -> {
                 //入驻审核中
                 mViewBinding.ivCertificationStatus.setImageResource(R.drawable.icon_home_entry_doing)
-                mViewBinding.ivCertificationStatus.setVisible(true)
-                mViewBinding.ivUnCertificationTip.setVisible(false)
-                mViewBinding.ivTeacherEntryTag.setVisible(false)
-                mViewBinding.groupTeacherExtra.setVisible(false)
+                mViewBinding.ivCertificationStatus.visibility=View.VISIBLE
+                mViewBinding.ivUnCertificationTip.visibility=View.GONE
+                mViewBinding.ivTeacherEntryTag.visibility=View.GONE
+                mViewBinding.groupTeacherExtra.visibility=View.GONE
             }
             TeacherInfoConstants.ENTRY_STATUS_PASS -> {
                 //入驻审核通过
-                mViewBinding.ivCertificationStatus.setVisible(false)
-                mViewBinding.ivUnCertificationTip.setVisible(false)
-                mViewBinding.groupTeacherExtra.setVisible(true)
-                mViewBinding.ivTeacherEntryTag.setVisible(true)
+                mViewBinding.ivCertificationStatus.visibility=View.GONE
+                mViewBinding.ivUnCertificationTip.visibility=View.GONE
+                mViewBinding.groupTeacherExtra.visibility=View.VISIBLE
+                mViewBinding.ivTeacherEntryTag.visibility=View.VISIBLE
             }
             else -> {
                 //未通过或者未申请
                 mViewBinding.ivCertificationStatus.setImageResource(R.drawable.icon_home_un_certification)
-                mViewBinding.groupTeacherExtra.setVisible(false)
-                mViewBinding.ivCertificationStatus.setVisible(true)
-                mViewBinding.ivUnCertificationTip.setVisible(true)
-                mViewBinding.ivTeacherEntryTag.setVisible(false)
+                mViewBinding.groupTeacherExtra.visibility=View.GONE
+                mViewBinding.ivCertificationStatus.visibility=View.VISIBLE
+                mViewBinding.ivUnCertificationTip.visibility=View.VISIBLE
+                mViewBinding.ivTeacherEntryTag.visibility=View.GONE
             }
         }
 
         when (teacherUserInfo.musicianAuthStatus) {
             TeacherInfoConstants.MUSICIAN_STATUS_PASS -> {
-                mViewBinding.ivTeacherMusicPersonTag.setVisible(true)
+                mViewBinding.ivTeacherMusicPersonTag.visibility=View.VISIBLE
             }
             else -> {
-                mViewBinding.ivTeacherMusicPersonTag.setVisible(false)
+                mViewBinding.ivTeacherMusicPersonTag.visibility=View.VISIBLE
             }
         }
     }
@@ -177,6 +184,7 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         super.onResume()
         presenter.getHomeCount();
         presenter.queryCountOfUnread()
+        presenter.helpCenterContentList()
     }
 
     override fun getHomeCountSuccess(data: HomeCountBean?) {
@@ -203,6 +211,7 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
 
     override fun queryCountOfUnreadSuccess(data: MutableList<CountOfUnreadBean>?) {
         if (null == data || data.size == 0) {
+            mViewBinding.viewUnreadMessage.setVisibility(View.GONE)
             return
         }
         var totalCount = 0

+ 9 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/main/MineFragment.java

@@ -75,7 +75,15 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
         //昵称
         mViewBinding.tvNickname.setText(UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId));
         //星级
-        mViewBinding.ratingBar.setRating(teacherUserInfo.starGrade);
+        if (teacherUserInfo.starGrade>0){
+            mViewBinding.ratingBar.setVisibility(View.VISIBLE);
+            mViewBinding.ratingBar.setRating(teacherUserInfo.starGrade);
+            mViewBinding.tvNoScore.setVisibility(View.GONE);
+        }else{
+            mViewBinding.ratingBar.setVisibility(View.GONE);
+            mViewBinding.tvNoScore.setVisibility(View.VISIBLE);
+        }
+
         //粉丝数
         mViewBinding.tvFansNum.setText(teacherUserInfo.fansNum);
         //已上课时数

+ 138 - 39
teacher/src/main/java/com/cooleshow/teacher/ui/main/ShopMallFragment.java

@@ -1,27 +1,44 @@
 package com.cooleshow.teacher.ui.main;
 
+import android.os.Build;
 import android.view.View;
+import android.webkit.GeolocationPermissions;
+import android.webkit.ValueCallback;
+import android.webkit.WebChromeClient;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.widget.FrameLayout;
 import android.widget.LinearLayout;
 
+import com.cooleshow.base.BuildConfig;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
+import com.cooleshow.base.utils.LogUtils;
 import com.cooleshow.base.widgets.AgentWebClient;
+import com.cooleshow.base.widgets.LollipopFixedWebView;
+import com.cooleshow.base.widgets.WebClient;
+import com.cooleshow.teacher.contract.ShopMallContract;
 import com.cooleshow.teacher.databinding.FragmentShopmalBinding;
 import com.cooleshow.teacher.presenter.main.ShopMallPresenter;
+import com.cooleshow.teacher.widgets.helper.JsInterfaceHelper;
 import com.cooleshow.usercenter.helper.UserHelper;
 import com.just.agentweb.AgentWeb;
 
+import org.json.JSONObject;
+
 /**
  * 创建日期:2022/5/23 15:59
  *
  * @author Ryan
  * 类说明:
  */
-public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, ShopMallPresenter> {
+public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, ShopMallPresenter> implements ShopMallContract.ShopMallView, JsInterfaceHelper.OnJsMethodCallListener {
+    private WebView webView;
+    private String url;
+    private WebClient mWebClient;
+    private JsInterfaceHelper mInterfaceUtils;
+    private ValueCallback mUploadCallbackAboveL;
 
-    private AgentWeb mAgentWeb;
-    private LinearLayout container;
-    private AgentWebClient mWebClient;
     @Override
     protected FragmentShopmalBinding getLayoutView() {
         return FragmentShopmalBinding.inflate(getLayoutInflater());
@@ -37,27 +54,36 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
     @Override
     protected void initView(View rootView) {
         view_status_bar = mViewBinding.viewStatusBar;
+        try {
+            if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
+                webView = new LollipopFixedWebView(getContext());
+            } else {
+                webView = new WebView(getContext());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (null == webView) {
 
-        container = mViewBinding.container;
-
-        String linkurl = WebConstants.TEACHER_SHOPMALL;
-        mWebClient = new AgentWebClient();
-        mWebClient = new AgentWebClient();
-        linkurl=loadUrl(linkurl);
-
-        mAgentWeb = AgentWeb.with(this)
-                .setAgentWebParent((LinearLayout) container, new LinearLayout.LayoutParams(-1, -1))
-                .useDefaultIndicator()
-//                .setWebChromeClient(mWebChromeClient)
-                .setWebViewClient(mWebClient)
-                .createAgentWeb()
-                .ready()
-                .go(linkurl);
-
-
+            return;
+        }
+        url = WebConstants.TEACHER_SHOPMALL;
+
+        mViewBinding.viewParent.addView(webView, new FrameLayout.LayoutParams(
+                FrameLayout.LayoutParams.MATCH_PARENT,
+                FrameLayout.LayoutParams.MATCH_PARENT));
+        initWebView();
+        mInterfaceUtils = new JsInterfaceHelper(getActivity());
+        mInterfaceUtils.setOnJsCallListener(this);
+        webView.addJavascriptInterface(mInterfaceUtils, WebConstants.WEB_JS_INTERFACE);
+        mWebClient = new WebClient();
+        webView.setWebViewClient(mWebClient);
+        webView.setWebChromeClient(new MyWebChromeClient());
+
+        loadUrl();
     }
 
-    private String loadUrl(String url) {
+    private void loadUrl() {
         String userToken = UserHelper.getUserToken();
         mWebClient.setAuthorization(userToken);
         boolean status = url.contains("?");
@@ -66,42 +92,115 @@ public class ShopMallFragment extends BaseMVPFragment<FragmentShopmalBinding, Sh
         } else {
             url = (url + "?Authorization=" + userToken);
         }
-        return url;
+        webView.loadUrl(url);
     }
 
+    private void initWebView() {
+        //声明WebSettings子类
+        WebSettings webSettings = webView.getSettings();
+        webSettings.setUserAgentString(webSettings.getUserAgentString() + WebConstants.WEB_UA_PARAMS);
+        webSettings.setGeolocationDatabasePath(getActivity().getApplicationContext().getFilesDir().getPath());
+        webSettings.setGeolocationEnabled(true);
+        webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
+        //如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
+        webSettings.setJavaScriptEnabled(true);
+        webSettings.setMediaPlaybackRequiresUserGesture(false);//false允许自动播放音视频
+        //是否启用缓存
+        webSettings.setAppCacheEnabled(true);
+
+        // 开启DOM缓存,默认状态下是不支持LocalStorage的
+        webSettings.setDomStorageEnabled(true);
+        // 开启数据库缓存
+        webSettings.setDatabaseEnabled(true);
+        // 地址跨域导致视频预览图片加载不出来 无法播放:
+        webSettings.setAllowUniversalAccessFromFileURLs(false);
+        webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
+
+        //设置自适应屏幕,两者合用
+        webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
+        webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小
+        //缩放操作
+        webSettings.setSupportZoom(false); //支持缩放,默认为true。是下面那个的前提。
+        //其他细节操作
+        webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); //关闭webview中缓存
+        webSettings.setAllowFileAccess(true); //设置可以访问文件
+        webSettings.setJavaScriptCanOpenWindowsAutomatically(true); //支持通过JS打开新窗口
+        webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
+        webSettings.setDefaultTextEncodingName("UTF-8");//设置编码格式
+
+        webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);  //富文本适配
+        webSettings.setAppCacheMaxSize(Long.MAX_VALUE);
+        webSettings.setAppCachePath(getContext().getDir("appcache", 0).getPath());
+        webSettings.setDatabasePath(getContext().getDir("databases", 0).getPath());
+        webSettings.setGeolocationDatabasePath(getContext().getDir("geolocation", 0)
+                .getPath());
+        webSettings.setPluginState(WebSettings.PluginState.ON_DEMAND);
+        if (BuildConfig.DEBUG) {
+            webView.setWebContentsDebuggingEnabled(true);
+        }
+        webSettings.setTextZoom(100);//设置字体默认的缩放比例,以避免手机系统的字体修改对页面字体及布局造成影响。
+        webView.setHorizontalScrollBarEnabled(false);
+        webView.setVerticalScrollBarEnabled(false);
+    }
 
+    @Override
+    public void setBarStatus(JSONObject message) {
+
+    }
 
+    @Override
+    public void backIconChange(JSONObject message) {
 
+    }
 
     @Override
-    protected void initData() {
+    public void chooseFile(JSONObject message) {
 
     }
 
+    @Override
+    public void getNavHeight(JSONObject message) {
 
-    public void clickBack() {
-        if (!mAgentWeb.back()) {
-            ((MainActivity) getActivity()).clickBackPressed();
+    }
+
+
+
+    private class MyWebChromeClient extends WebChromeClient {
+        public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
+            callback.invoke(origin, true, false);
         }
 
-    }
+        @Override
+        public void onProgressChanged(WebView view, int newProgress) {
+            LogUtils.e(newProgress + "");
+            if (newProgress == 100 && null != mViewBinding.progressBar) {
+                mViewBinding.progressBar.setVisibility(View.GONE);//加载完网页进度条消失
+            } else {
+                if (null != mViewBinding.progressBar) {
+                    mViewBinding.progressBar.setVisibility(View.VISIBLE);//开始加载网页时显示进度条
+                    mViewBinding.progressBar.setProgress(newProgress);//设置进度值
+                }
+
+            }
+        }
+
+        @Override
+        public void onReceivedTitle(WebView view, String title) {
+            super.onReceivedTitle(view, title);
+        }
 
-    @Override
-    public void onResume() {
-        mAgentWeb.getWebLifeCycle().onResume();
-        super.onResume();
     }
 
     @Override
-    public void onPause() {
-        mAgentWeb.getWebLifeCycle().onPause();
-        super.onPause();
+    protected void initData() {
 
     }
 
-    @Override
-    public void onDestroy() {
-        mAgentWeb.getWebLifeCycle().onDestroy();
-        super.onDestroy();
+    public void clickBack() {
+        if (webView.canGoBack()) {
+            webView.goBack();
+        } else {
+            ((MainActivity) getActivity()).clickBackPressed();
+        }
     }
 }

+ 10 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/message/MessageBoxActivity.java

@@ -236,6 +236,9 @@ public class MessageBoxActivity extends BaseMVPActivity<ActivityMessageBoxBindin
     @Override
     public void queryCountOfUnreadSuccess(List<CountOfUnreadBean> data) {
         if (null==data||data.size()==0){
+            viewBinding.tvAllUnread.setVisibility(View.GONE);
+            viewBinding.tvCourseUnread.setVisibility(View.GONE);
+            viewBinding.tvSystemUnread.setVisibility(View.GONE);
             return;
         }
         int totalCount=0;
@@ -268,4 +271,11 @@ public class MessageBoxActivity extends BaseMVPActivity<ActivityMessageBoxBindin
             viewBinding.tvSystemUnread.setVisibility(View.GONE);
         }
     }
+
+    @Override
+    public void batchSetReadSuccess() {
+        presenter.queryCountOfUnread();
+        currentPage = 1;
+        queryList(false);
+    }
 }

+ 22 - 9
teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyNickNameActivity.java

@@ -2,6 +2,7 @@ package com.cooleshow.teacher.ui.mine;
 
 import android.content.Intent;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.View;
 
 import androidx.annotation.Nullable;
@@ -11,6 +12,7 @@ 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.ModifyNickNameContract;
 import com.cooleshow.teacher.databinding.ActivityModifyNicknameBinding;
@@ -18,6 +20,9 @@ import com.cooleshow.teacher.presenter.mine.ModifyNickNamePresenter;
 import com.cooleshow.usercenter.bean.SetDetailBean;
 import com.google.gson.Gson;
 
+import org.json.JSONException;
+import org.json.JSONObject;
+
 import io.rong.imkit.utils.StatusBarUtil;
 
 /**
@@ -28,17 +33,25 @@ import io.rong.imkit.utils.StatusBarUtil;
  */
 @Route(path = RouterPath.MineCenter.MINE_MODIFY_NICKNAME)
 public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNicknameBinding, ModifyNickNamePresenter> implements ModifyNickNameContract.ModifyNickNameView, View.OnClickListener {
-    @Autowired(name = "bundle")
-    Bundle myBundle;
-    private SetDetailBean mySetDetailBean;
 
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.tv_right_text:
-                Gson gson = new Gson();
-                mySetDetailBean.username= viewBinding.etNickname.getText().toString().trim();
-                presenter.submitSetDetail(gson.toJson(mySetDetailBean));
+                String userName = viewBinding.etNickname.getText().toString().trim();
+                if (TextUtils.isEmpty(userName)){
+                    ToastUtils.showShort("请输入昵称!");
+                    break;
+                }
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.put("username", userName);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+
+                presenter.submitSetDetail(jsonObject.toString());
                 break;
             case R.id.im_close:
                 viewBinding.etNickname.setText("");
@@ -59,9 +72,9 @@ public class ModifyNickNameActivity extends BaseMVPActivity<ActivityModifyNickna
         viewBinding.toolbarInclude.tvRightText.setVisibility(View.VISIBLE);
         viewBinding.toolbarInclude.tvRightText.setText("保存");
         viewBinding.toolbarInclude.tvRightText.setOnClickListener(this);
-        if (null != myBundle) {
-            mySetDetailBean = (SetDetailBean) myBundle.getSerializable("teacherInfoBean");
-            viewBinding.etNickname.setText(mySetDetailBean.username);
+        String userName = getIntent().getStringExtra("userName");
+        if (!TextUtils.isEmpty(userName)){
+            viewBinding.etNickname.setText(userName);
         }
         viewBinding.imClose.setOnClickListener(this);
     }

+ 32 - 38
teacher/src/main/java/com/cooleshow/teacher/ui/mine/PersonalSettingActivity.java

@@ -29,6 +29,7 @@ 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.ToastUtils;
 import com.cooleshow.base.utils.UriUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.contract.PersonalSettingContract;
@@ -41,6 +42,9 @@ import com.google.gson.Gson;
 import com.luck.picture.lib.tools.MediaUtils;
 import com.tbruyelle.rxpermissions3.RxPermissions;
 
+import org.json.JSONException;
+import org.json.JSONObject;
+
 import java.io.File;
 import java.io.IOException;
 import java.text.SimpleDateFormat;
@@ -79,13 +83,10 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
                 break;
             case R.id.cl_name:
                 if (null != mySetDetailBean) {
-                    Bundle bundle = new Bundle();
-                    bundle.putSerializable("teacherInfoBean", mySetDetailBean);
                     ARouter.getInstance().build(RouterPath.MineCenter.MINE_MODIFY_NICKNAME)
-                            .withBundle("bundle", bundle)
+                            .withString("userName", mySetDetailBean.username)
                             .navigation(this, MODIFY_NICKNAME);
                 }
-
                 break;
             case R.id.cl_sex:
                 modifySex();
@@ -103,12 +104,7 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
                 ARouter.getInstance().build(RouterPath.MineCenter.MINE_PERSONAL_CERTIFICATION)
                         .navigation(this, PERSONAL_CERTIFICATION);
                 break;
-            case R.id.tv_login_out:
-                UserHelper.saveUserToken("");
-                ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
-                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK)
-                        .navigation();
-                break;
+
         }
     }
 
@@ -118,26 +114,26 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
             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));
+                JSONObject jsonObject = new JSONObject();
+                try {
+                    jsonObject.put("gender", 1);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+                popupWindow.dismiss();
+                presenter.submitSetDetail(jsonObject.toString());
             });
             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));
+                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());
 
@@ -260,7 +256,6 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
         viewBinding.clPhone.setOnClickListener(this);
         viewBinding.clModifyPsd.setOnClickListener(this);
         viewBinding.clCertification.setOnClickListener(this);
-        viewBinding.tvLoginOut.setOnClickListener(this);
     }
 
     @Override
@@ -312,6 +307,7 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
             //男
             viewBinding.tvSex.setText("男");
         }
+        ToastUtils.showShort("修改成功");
         GlideUtils.INSTANCE.loadImage(this, setDetailBean.avatar, viewBinding.imHeader, R.drawable.icon_teacher_default_head);
 
 
@@ -320,15 +316,13 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
     @Override
     public void upLoadImageSuccess(String url) {
         hideLoading();
-        SetDetailBean requestBean = new SetDetailBean();
-        requestBean.gender = 1;
-        requestBean.real = mySetDetailBean.real;
-        requestBean.phone = mySetDetailBean.phone;
-        requestBean.birthdate = mySetDetailBean.birthdate;
-        requestBean.avatar = url;
-        requestBean.username = mySetDetailBean.username;
-        Gson gson = new Gson();
-        presenter.submitSetDetail(gson.toJson(requestBean));
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("avatar", url);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        presenter.submitSetDetail(jsonObject.toString());
     }
 
     @Override

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

@@ -1,5 +1,6 @@
 package com.cooleshow.teacher.ui.mine;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
 
@@ -15,6 +16,8 @@ import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.contract.SettingContract;
 import com.cooleshow.teacher.databinding.ActivitySettingBinding;
 import com.cooleshow.teacher.presenter.mine.SettingPresenter;
+import com.cooleshow.usercenter.UserConstants;
+import com.cooleshow.usercenter.helper.UserHelper;
 
 import io.rong.imkit.utils.StatusBarUtil;
 
@@ -55,6 +58,17 @@ public class SettingActivity extends BaseMVPActivity<ActivitySettingBinding, Set
                 ARouter.getInstance().build(RouterPath.MineCenter.MINE_ABOUT)
                         .navigation();
                 break;
+            case R.id.tv_login_out:
+                UserHelper.saveUserToken("");
+                ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
+                        .withString(UserConstants.PHONE_NUM_KEY, UserHelper.getUserPhone())
+                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK)
+                        .navigation();
+                break;
+            case R.id.cl_feedback:
+                ARouter.getInstance().build(RouterPath.MineCenter.MINE_FEEDBACK)
+                        .navigation();
+                break;
         }
     }
 
@@ -73,6 +87,9 @@ public class SettingActivity extends BaseMVPActivity<ActivitySettingBinding, Set
         viewBinding.imSelect.setOnClickListener(this);
         viewBinding.clPrivate.setOnClickListener(this);
         viewBinding.clAbout.setOnClickListener(this);
+        viewBinding.tvLoginOut.setOnClickListener(this);
+        viewBinding.clFeedback.setOnClickListener(this);
+
         is_detection = SPUtils.getInstance().getBoolean("IS_DETECTION");
         if (is_detection) {
             viewBinding.imSelect.setImageResource(R.drawable.icon_switch_off);

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/web/AgentWebActivity.java

@@ -24,7 +24,7 @@ import com.just.agentweb.WebChromeClient;
  * @author Ryan
  * 类说明:
  */
-@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
+
 public class AgentWebActivity extends BaseMVPActivity<ActivityAgentWebBinding, AgentWebPresenter> {
     private AgentWeb mAgentWeb;
     private LinearLayout container;

+ 1 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/web/WebActivity.java

@@ -59,6 +59,7 @@ import static com.cooleshow.base.common.WebConstants.WEB_URL;
 /**
  * Author by pq, Date on 2022/4/24.
  */
+@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
 public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements JsInterfaceHelper.OnJsMethodCallListener, View.OnClickListener {
     private static final int REQUEST_CODE_FILE_CHOOSER = 500;
     private WebView webView;

+ 0 - 13
teacher/src/main/res/layout/activity_personal_setting.xml

@@ -301,17 +301,4 @@
     </androidx.constraintlayout.widget.ConstraintLayout>
 
 
-    <TextView
-        android:id="@+id/tv_login_out"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_50"
-        android:layout_alignParentBottom="true"
-        android:layout_marginLeft="14dp"
-        android:layout_marginRight="14dp"
-        android:layout_marginBottom="46dp"
-        android:background="@drawable/bg_white_10dp"
-        android:gravity="center"
-        android:text="退出登录"
-        android:textColor="@color/color_1a1a1a"
-        android:textSize="@dimen/sp_17" />
 </RelativeLayout>

+ 210 - 152
teacher/src/main/res/layout/activity_setting.xml

@@ -1,177 +1,235 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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">
+    android:background="@color/color_f6f8f9">
 
-    <include
-        android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
 
-    <androidx.constraintlayout.widget.ConstraintLayout
+    <LinearLayout
         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">
+        android:orientation="vertical">
 
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_address"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent">
-
-            <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_go_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>
+        <include
+            android:id="@+id/toolbar_include"
+            layout="@layout/common_toolbar_layout" />
 
         <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_detection"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_address">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="12dp"
-                android:text="进入课堂时进行网络&amp;设备检测"
-                android:textColor="@color/color_1a1a1a"
-                android:textSize="@dimen/sp_16"
-                app:layout_constraintBottom_toBottomOf="parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="14dp"
+            android:layout_marginTop="15dp"
+            android:layout_marginEnd="14dp"
+            android:background="@drawable/bg_white_10dp">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cl_address"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
                 app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-
-            <ImageView
-                android:id="@+id/im_select"
-                android:layout_width="@dimen/dp_47"
-                android:layout_height="@dimen/dp_44"
-                android:layout_marginRight="14dp"
-                android:paddingTop="10dp"
-                android:paddingBottom="10dp"
-                android:src="@drawable/icon_switch_off"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-            <View
+                app:layout_constraintTop_toTopOf="parent">
+
+                <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_go_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_detection"
                 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>
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_address">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="12dp"
+                    android:text="进入课堂时进行网络&amp;设备检测"
+                    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:id="@+id/im_select"
+                    android:layout_width="@dimen/dp_47"
+                    android:layout_height="@dimen/dp_44"
+                    android:layout_marginRight="14dp"
+                    android:paddingTop="10dp"
+                    android:paddingBottom="10dp"
+                    android:src="@drawable/icon_switch_off"
+                    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_private"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_detection">
+
+                <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_go_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_feedback"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_private">
+
+                <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_go_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_about"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_50"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/cl_feedback">
 
+                <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" />
 
-        <androidx.constraintlayout.widget.ConstraintLayout
-            android:id="@+id/cl_private"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_detection">
-
-            <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_go_right"
+                    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_go_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="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_about"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_private">
-
-            <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"
+                android:layout_height="10dp"
                 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_go_right"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-
+                app:layout_constraintTop_toBottomOf="@+id/cl_about" />
         </androidx.constraintlayout.widget.ConstraintLayout>
+    </LinearLayout>
 
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="10dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/cl_about" />
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-</LinearLayout>
+    <TextView
+        android:id="@+id/tv_login_out"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_50"
+        android:layout_alignParentBottom="true"
+        android:layout_marginLeft="14dp"
+        android:layout_marginRight="14dp"
+        android:layout_marginBottom="46dp"
+        android:background="@drawable/bg_white_10dp"
+        android:gravity="center"
+        android:text="退出登录"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_17" />
+</RelativeLayout>

+ 12 - 2
teacher/src/main/res/layout/fragment_home_layout.xml

@@ -9,7 +9,6 @@
         android:id="@+id/iv_header_bg"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="28dp"
         android:adjustViewBounds="true"
         android:scaleType="fitXY"
         android:src="@drawable/bg_login_header"
@@ -121,12 +120,23 @@
         android:layout_width="wrap_content"
         android:layout_height="19dp"
         android:numStars="5"
-        android:rating="3"
+        android:rating="0"
         android:stepSize="1"
         app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
         app:layout_constraintLeft_toLeftOf="@+id/tv_nickname"
         app:layout_constraintTop_toBottomOf="@+id/tv_nickname" />
 
+    <TextView
+        android:id="@+id/tv_no_score"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="@dimen/sp_13"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_nickname"
+        app:layout_constraintTop_toBottomOf="@+id/tv_nickname"
+        android:text="暂无评分"/>
+
     <ImageView
         android:id="@+id/iv_certification_status"
         android:layout_width="wrap_content"

+ 14 - 2
teacher/src/main/res/layout/fragment_mine_layout.xml

@@ -5,6 +5,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:overScrollMode="never"
+    android:background="@color/color_f6f8f9"
     android:scrollbars="none">
 
     <androidx.constraintlayout.widget.ConstraintLayout
@@ -93,13 +94,24 @@
             android:layout_width="wrap_content"
             android:layout_height="19dp"
             android:numStars="5"
-            android:rating="3"
+            android:rating="0"
             android:stepSize="1"
             android:isIndicator="true"
             app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
             app:layout_constraintLeft_toLeftOf="@+id/tv_nickname"
             app:layout_constraintTop_toBottomOf="@+id/tv_nickname" />
 
+        <TextView
+            android:id="@+id/tv_no_score"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/sp_13"
+            android:visibility="gone"
+            app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_nickname"
+            app:layout_constraintTop_toBottomOf="@+id/tv_nickname"
+            android:text="暂无评分"/>
+
         <ImageView
             android:id="@+id/iv_certification_status"
             android:layout_width="wrap_content"
@@ -536,7 +548,7 @@
                 android:drawableLeft="@drawable/icon_mine_feedback"
                 android:text="意见反馈"
                 android:textSize="@dimen/sp_14"
-                android:visibility="visible"
+                android:visibility="gone"
                 app:layout_constraintLeft_toLeftOf="@+id/tv_help"
                 app:layout_constraintTop_toBottomOf="@+id/tv_help" />
         </androidx.constraintlayout.widget.ConstraintLayout>

+ 28 - 1
teacher/src/main/res/layout/fragment_shopmal.xml

@@ -1,7 +1,7 @@
 <?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:id="@+id/container"
+    android:id="@+id/rl_activity_html"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
@@ -11,8 +11,35 @@
         android:layout_height="20dp"
         app:layout_constrainedHeight="true"
         android:background="@color/color_59e5d5"
+        app:layout_constraintHeight_default="wrap"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
+    <LinearLayout
+        android:id="@+id/ll_activity_html"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <View
+            android:id="@+id/view_statusbar"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:background="@color/white"
+            android:visibility="gone" />
 
+        <ProgressBar
+            android:id="@+id/progressBar"
+            style="?android:attr/progressBarStyleHorizontal"
+            android:layout_width="match_parent"
+            android:layout_height="2dip"
+            android:progressDrawable="@drawable/pg_stu" />
+    </LinearLayout>
+
+    <FrameLayout
+        android:id="@+id/view_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/ll_activity_html"
+        android:scrollbars="none" />
 </LinearLayout>

+ 1 - 0
usercenter/src/main/AndroidManifest.xml

@@ -20,6 +20,7 @@
         <activity
             android:name=".ui.activity.VerifyCodeInputActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
+            android:windowSoftInputMode="adjustPan"
             android:screenOrientation="portrait" />
 
         <activity android:name=".ui.activity.BindPasswordActivity"

+ 24 - 0
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeInputActivity.java

@@ -1,11 +1,14 @@
 package com.cooleshow.usercenter.ui.activity;
 
+import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.text.SpannableString;
 import android.text.TextUtils;
 import android.view.View;
+import android.view.WindowManager;
+import android.view.inputmethod.InputMethodManager;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
 import com.alibaba.android.arouter.launcher.ARouter;
@@ -27,6 +30,9 @@ import com.cooleshow.usercenter.presenter.contract.VerifyLoginContract;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
+import java.util.Timer;
+import java.util.TimerTask;
+
 /**
  * Author by pq, Date on 2022/4/19.
  */
@@ -55,8 +61,12 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
+        getWindow().setSoftInputMode(
+                WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
+        );
         super.onCreate(savedInstanceState);
         QMUIStatusBarHelper.setStatusBarLightMode(this);
+
     }
 
     @NonNull
@@ -86,6 +96,20 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
         });
     }
 
+    @Override
+    protected void onResume() {
+        super.onResume();
+        viewBinding.editCode.setFocusable(true);
+        viewBinding.editCode.setFocusableInTouchMode(true);
+        viewBinding.editCode.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                viewBinding.editCode.showSoftKeyBoard();
+            }
+        },200);
+
+    }
+
     private void login(String content) {
         KeyboardUtils.hideSoftInput(this);
         if (!TextUtils.isEmpty(mPhoneNum) && !TextUtils.isEmpty(content)) {

+ 6 - 1
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeLoginActivity.java

@@ -51,6 +51,10 @@ public class VerifyCodeLoginActivity extends BaseMVPActivity<ActivityVerifyCodeL
     protected void initView() {
         viewBinding.tvSendVerifyCode.setOnClickListener(this);
         viewBinding.tvLoginByCode.setOnClickListener(this);
+        String phoneNum = getIntent().getStringExtra(UserConstants.PHONE_NUM_KEY);
+        if (!TextUtils.isEmpty(phoneNum)) {
+            viewBinding.etPhoneNum.setText(phoneNum);
+        }
         setPrivacyText();
     }
 
@@ -76,7 +80,7 @@ public class VerifyCodeLoginActivity extends BaseMVPActivity<ActivityVerifyCodeL
         }
 
         if (v.getId() == R.id.tv_send_verify_code) {
-            if (!viewBinding.cbPrivacy.isChecked()){
+            if (!viewBinding.cbPrivacy.isChecked()) {
                 ToastUtils.showShort("请勾选用户协议");
                 return;
             }
@@ -128,6 +132,7 @@ public class VerifyCodeLoginActivity extends BaseMVPActivity<ActivityVerifyCodeL
                     public void onClick(View view) {
                         startWebActivity(WebConstants.PRIVACY_AGREEMENT);
                     }
+
                     public void updateDrawState(@NonNull TextPaint ds) {
                         super.updateDrawState(ds);
                         ds.setColor(getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));

+ 0 - 1
usercenter/src/main/res/layout/activity_verify_code_login.xml

@@ -44,7 +44,6 @@
 
 
     <EditText
-        android:text="13627281518"
         android:id="@+id/et_phone_num"
         android:layout_width="match_parent"
         android:layout_height="@dimen/common_line_height"