Browse Source

Merge branch '20241230_H5_tongji' into dev

# Conflicts:
#	student/src/main/java/com/cooleshow/student/ui/main/MusicHallFragment.java
Pq 1 month ago
parent
commit
6224d90532
46 changed files with 1335 additions and 170 deletions
  1. 5 0
      BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java
  2. 28 0
      BaseLibrary/src/main/java/com/cooleshow/base/utils/helper/WebStartHelper.java
  3. 1 0
      BaseLibrary/src/main/res/values/colors.xml
  4. 6 0
      chatModule/src/main/AndroidManifest.xml
  5. 11 2
      chatModule/src/main/java/com/cooleshow/chatmodule/api/IMApi.java
  6. 1 0
      chatModule/src/main/java/com/cooleshow/chatmodule/constants/Constants.java
  7. 1 0
      chatModule/src/main/java/com/cooleshow/chatmodule/constants/TCChatRouterPath.java
  8. 18 0
      chatModule/src/main/java/com/cooleshow/chatmodule/contract/GroupIntroduceContract.java
  9. 44 0
      chatModule/src/main/java/com/cooleshow/chatmodule/presenter/GroupIntroducePresenter.java
  10. 2 1
      chatModule/src/main/java/com/cooleshow/chatmodule/presenter/SetRemarksPresenter.java
  11. 20 0
      chatModule/src/main/java/com/cooleshow/chatmodule/ui/ChatGroupSettingActivity.java
  12. 144 0
      chatModule/src/main/java/com/cooleshow/chatmodule/ui/GroupIntroduceActivity.java
  13. 35 0
      chatModule/src/main/res/layout/tc_activity_chat_group_setting.xml
  14. 85 0
      chatModule/src/main/res/layout/tc_activity_group_introduce.xml
  15. 1 0
      chatModule/src/main/res/values/strings.xml
  16. 2 2
      student/src/main/java/com/cooleshow/student/constants/CourseTableContract.java
  17. 4 4
      student/src/main/java/com/cooleshow/student/presenter/main/CourseTablePresenter.java
  18. 62 56
      student/src/main/java/com/cooleshow/student/presenter/main/HomePresenter.java
  19. 2 2
      student/src/main/java/com/cooleshow/student/presenter/main/MusicHallPresenter.java
  20. 7 7
      student/src/main/java/com/cooleshow/student/ui/main/CourseTableFragment.kt
  21. 6 4
      student/src/main/java/com/cooleshow/student/ui/main/MusicHallFragment.java
  22. 12 5
      student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragmentV2.java
  23. 2 2
      student/src/main/res/layout/fg_music_hall_layout.xml
  24. 12 0
      teacher/src/main/java/com/cooleshow/teacher/adapter/HomeHotAlbumAdapter.java
  25. 2 2
      teacher/src/main/java/com/cooleshow/teacher/contract/CourseTableContract.java
  26. 4 4
      teacher/src/main/java/com/cooleshow/teacher/presenter/main/CourseTablePresenter.java
  27. 9 2
      teacher/src/main/java/com/cooleshow/teacher/presenter/main/HomePresenter.java
  28. 8 8
      teacher/src/main/java/com/cooleshow/teacher/ui/main/CourseTableFragment.kt
  29. 64 30
      teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragmentV2.java
  30. 476 0
      teacher/src/main/java/com/cooleshow/teacher/ui/web/ScHtmlFragment.java
  31. 1 0
      teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceUtils.java
  32. 61 0
      teacher/src/main/java/com/cooleshow/teacher/widgets/helper/ScHtmlJsInterfaceUtils.java
  33. BIN
      teacher/src/main/res/drawable-xhdpi/bg_home_hot_music_song.png
  34. BIN
      teacher/src/main/res/drawable-xhdpi/bg_home_last_new_music_song.png
  35. BIN
      teacher/src/main/res/drawable-xhdpi/bg_home_recommend_music_song.png
  36. BIN
      teacher/src/main/res/drawable-xhdpi/icon_home_hot_album_tag.png
  37. BIN
      teacher/src/main/res/drawable-xhdpi/icon_home_music_tag.png
  38. BIN
      teacher/src/main/res/drawable-xxhdpi/bg_home_hot_music_song.png
  39. BIN
      teacher/src/main/res/drawable-xxhdpi/bg_home_last_new_music_song.png
  40. BIN
      teacher/src/main/res/drawable-xxhdpi/bg_home_recommend_music_song.png
  41. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_hot_album_tag.png
  42. BIN
      teacher/src/main/res/drawable-xxhdpi/icon_home_music_tag.png
  43. 142 34
      teacher/src/main/res/layout/fg_new_home_v2_layout.xml
  44. 28 0
      teacher/src/main/res/layout/fg_sc_home_web.xml
  45. 1 0
      teacher/src/main/res/layout/layout_home_hot_album_item.xml
  46. 28 5
      usercenter/src/main/java/com/cooleshow/usercenter/helper/UserHelper.java

+ 5 - 0
BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java

@@ -199,6 +199,11 @@ public abstract class WebConstants {
 
     public static final String TEACHER_APPOINTMENT_COURSE_SETTING = getBaseUrlH5() + "/#/practiceSettingTimer";//老师端约课时间段配置
     public static final String STUDENT_FREE_CARD = getBaseUrlH5() + "/#/discount-card";//畅学卡
+    public static final String HOME_STATISTICS = getBaseUrlH5() + "/#/home-statistics";//老师端首页统计
+    public static final String HOME_RECOMMEND_MUSIC_SONG = getBaseUrlH5() + "/#/music-list?type=TOP";//老师端首页-推荐曲目
+    public static final String HOME_LAST_NEW_MUSIC_SONG = getBaseUrlH5() + "/#/music-list?type=NEW";//老师端首页-最新曲目
+    public static final String HOME_HOT_MUSIC_SONG = getBaseUrlH5() + "/#/music-list?type=HOT";//老师端首页-最热曲目
+    public static final String HOME_MORE_SONG = getBaseUrlH5() + "/#/music-list";//老师端首页-曲目更多
 
     public static String getAccompanyUA() {
         return WebConstants.WEB_UA_PARAMS + WebConstants.getCustomUAParams();

+ 28 - 0
BaseLibrary/src/main/java/com/cooleshow/base/utils/helper/WebStartHelper.java

@@ -329,4 +329,32 @@ public class WebStartHelper {
                 .withString(WebConstants.WEB_URL, WebConstants.TEACHER_GROUP_CREATE)
                 .navigation();
     }
+
+    public static void goRecommendMusicSong() {
+        ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(WebConstants.WEB_URL, WebConstants.HOME_RECOMMEND_MUSIC_SONG)
+                .navigation();
+    }
+
+    public static void goHotMusicSong() {
+        ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(WebConstants.WEB_URL, WebConstants.HOME_HOT_MUSIC_SONG)
+                .navigation();
+    }
+
+    public static void goLastNewMusicSong() {
+        ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(WebConstants.WEB_URL, WebConstants.HOME_LAST_NEW_MUSIC_SONG)
+                .navigation();
+    }
+
+    public static void goMoreMusicSong() {
+        ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(WebConstants.WEB_URL, WebConstants.HOME_MORE_SONG)
+                .navigation();
+    }
 }

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

@@ -234,4 +234,5 @@
     <color name="color_006eb0">#006EB0</color>
     <color name="color_cc005ba2">#cc005BA2</color>
     <color name="color_d9d9d9">#D9D9D9</color>
+    <color name="color_c1c1c1">#C1C1C1</color>
 </resources>

+ 6 - 0
chatModule/src/main/AndroidManifest.xml

@@ -92,6 +92,12 @@
             android:configChanges="orientation|screenSize|keyboardHidden|fontScale|smallestScreenSize|screenLayout|uiMode"
             android:screenOrientation="portrait" />
 
+        <activity
+            android:name=".ui.GroupIntroduceActivity"
+            android:windowSoftInputMode="adjustPan"
+            android:configChanges="orientation|screenSize|keyboardHidden|fontScale|smallestScreenSize|screenLayout|uiMode"
+            android:screenOrientation="portrait" />
+
         <provider
             android:name=".widget.CustomChatGroupTopRightIconExtension"
             android:authorities="${applicationId}.TUIGroup.ClassicUI.Init"

+ 11 - 2
chatModule/src/main/java/com/cooleshow/chatmodule/api/IMApi.java

@@ -186,8 +186,8 @@ public interface IMApi {
      * @param body
      * @return
      */
-    @POST(TEACHER_GROUP + "imGroup/update")
-    Observable<BaseResponse<Object>> updateGroupInfo(@Body RequestBody body);
+    @POST("{group_name}" + "imGroup/update")
+    Observable<BaseResponse<Object>> updateGroupInfo(@Body RequestBody body,@Path("group_name")String group_name);
 
     @POST("{group_name}" + "/imGroupMember/groupMute")
     Observable<BaseResponse<Object>> groupMemberMute(@Body RequestBody body,@Path("group_name")String group_name);
@@ -203,4 +203,13 @@ public interface IMApi {
      */
     @POST("{group_name}" + "/imUserFriend/getDetail/{imUserId}")
     Observable<BaseResponse<IMUserInfo>> queryFriendDetail(@Path("group_name")String group_name,@Path("imUserId") String imUserId);
+
+    /**
+     * 修改群信息
+     *
+     * @param body
+     * @return
+     */
+    @POST("{group_name}" + "/imGroup/updateIntroduce")
+    Observable<BaseResponse<Object>> updateGroupIntroduce(@Body RequestBody body,@Path("group_name")String group_name);
 }

+ 1 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/constants/Constants.java

@@ -5,5 +5,6 @@ package com.cooleshow.chatmodule.constants;
  */
 public class Constants {
     public static final String TARGET_ID_KEY = "targetId";
+    public static final String COMMON_EXTRA_KEY = "common_extra";
     public static final long MAX_MUTE_TIME = -1;
 }

+ 1 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/constants/TCChatRouterPath.java

@@ -17,4 +17,5 @@ public class TCChatRouterPath {
     public final static String CHAT_GROUP_JOIN_APPLY = "/tc/activity/JoinGroupApplyActivity";
     public final static String CHAT_SELECT_CONTACT = "/tc/activity/SelectContactActivity";
     public final static String CHAT_GROUP_NOTICE_DETAIL = "/tc/activity/NoticeDetailActivity";
+    public final static String CHAT_GROUP_INTRODUCE = "/tc/activity/GroupIntroduceActivity";
 }

+ 18 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/contract/GroupIntroduceContract.java

@@ -0,0 +1,18 @@
+package com.cooleshow.chatmodule.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+
+/**
+ * 创建日期:2022/6/11 19:39
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface GroupIntroduceContract {
+    interface View extends BaseView {
+        void updateGroupIntroduceSuccess();
+    }
+
+    interface Presenter {
+    }
+}

+ 44 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/presenter/GroupIntroducePresenter.java

@@ -0,0 +1,44 @@
+package com.cooleshow.chatmodule.presenter;
+
+import com.cooleshow.base.common.BaseConstant;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.chatmodule.api.IMApi;
+import com.cooleshow.chatmodule.contract.GroupIntroduceContract;
+import com.cooleshow.chatmodule.contract.NoticeEditContract;
+import com.cooleshow.usercenter.helper.UserHelper;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * 创建日期:2022/6/11 19:38
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class GroupIntroducePresenter extends BasePresenter<GroupIntroduceContract.View> implements GroupIntroduceContract.Presenter {
+    public void updateGroupIntroduce(String targetId, String content) {
+        if (getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.putOpt("id", targetId);
+            jsonObject.putOpt("introduce", content);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(IMApi.class).updateGroupIntroduce(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString()), BaseConstant.CLIENT_API_GROUP_NAME), new BaseObserver<Object>(getView()) {
+            @Override
+            protected void onSuccess(Object data) {
+                if (getView() != null) {
+                    getView().updateGroupIntroduceSuccess();
+                }
+            }
+        });
+
+    }
+
+}

+ 2 - 1
chatModule/src/main/java/com/cooleshow/chatmodule/presenter/SetRemarksPresenter.java

@@ -1,5 +1,6 @@
 package com.cooleshow.chatmodule.presenter;
 
+import com.cooleshow.base.common.BaseConstant;
 import com.cooleshow.base.presenter.BasePresenter;
 import com.cooleshow.base.rx.BaseObserver;
 import com.cooleshow.base.utils.RequestBodyUtil;
@@ -29,7 +30,7 @@ public class SetRemarksPresenter extends BasePresenter<SetRemarksContract.SetRem
         } catch (JSONException e) {
             e.printStackTrace();
         }
-        addSubscribe(create(IMApi.class).updateGroupInfo(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<Object>(getView()) {
+        addSubscribe(create(IMApi.class).updateGroupInfo(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString()), BaseConstant.CLIENT_API_GROUP_NAME), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
                 if (getView() != null) {

+ 20 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/ui/ChatGroupSettingActivity.java

@@ -26,6 +26,7 @@ import com.cooleshow.base.utils.JumpUtils;
 import com.cooleshow.base.utils.LOG;
 import com.cooleshow.base.utils.LogUtils;
 import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.base.widgets.dialog.CommonConfirmDialog;
 import com.cooleshow.base.widgets.dialog.CommonDialog;
@@ -91,6 +92,7 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
     GroupSettingMemberAdapter mAdapter;
     private GroupInfo mGroupInfo;
     private GroupRoleType currentUserGroupType = GroupRoleType.Member;
+    private String groupIntroduce;
 
     @Override
     public void onClick(View view) {
@@ -140,6 +142,19 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
                     .withString(Constants.TARGET_ID_KEY, targetId)
                     .navigation();
             return;
+        } else if (view.getId() == R.id.ll_group_introduce) {
+            //群简介
+            if (!BaseApplication.Companion.isTeacherClient()) {
+                //学生端 群简介为空不可点击进入
+                if (TextUtils.isEmpty(groupIntroduce)) {
+                    ToastUtil.getInstance().showShort(getString(R.string.there_no_group_introduce_tip));
+                    return;
+                }
+            }
+            ARouter.getInstance().build(TCChatRouterPath.CHAT_GROUP_INTRODUCE)
+                    .withString(Constants.TARGET_ID_KEY, targetId)
+                    .withString(Constants.COMMON_EXTRA_KEY, groupIntroduce)
+                    .navigation();
         }
 
     }
@@ -225,6 +240,7 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
         viewBinding.tvFeedback.setOnClickListener(this);
         viewBinding.btnConfirm.setOnClickListener(this);
         viewBinding.tvMuteMemberManager.setOnClickListener(this);
+        viewBinding.llGroupIntroduce.setOnClickListener(this);
 
         IMThemManager.getInstance().setCheckButtonDrawable(viewBinding.cbMessage);
         IMThemManager.getInstance().setMainButtonStyles(viewBinding.btnConfirm);
@@ -406,6 +422,10 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
             }
             tv_group_name.setText(data.getName());
             tv_group_name_remarks.setText(data.getName());
+            //群简介
+            String introduce = data.getIntroduce();
+            this.groupIntroduce = introduce;
+            viewBinding.tvGroupIntroduce.setText(TextUtils.isEmpty(introduce) ? getString(R.string.there_no_group_introduce_tip) : introduce);
 
             //群禁言状态
             if (!TextUtils.isEmpty(data.getConfigJson())) {

+ 144 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/ui/GroupIntroduceActivity.java

@@ -0,0 +1,144 @@
+package com.cooleshow.chatmodule.ui;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.cooleshow.base.common.BaseApplication;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.chatmodule.constants.Constants;
+import com.cooleshow.chatmodule.constants.TCChatRouterPath;
+import com.cooleshow.chatmodule.contract.GroupIntroduceContract;
+import com.cooleshow.chatmodule.databinding.TcActivityGroupIntroduceBinding;
+import com.cooleshow.chatmodule.presenter.GroupIntroducePresenter;
+
+import java.util.Locale;
+
+import androidx.annotation.Nullable;
+
+/**
+ * 创建日期:2022/6/11 19:25
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = TCChatRouterPath.CHAT_GROUP_INTRODUCE)
+public class GroupIntroduceActivity extends BaseMVPActivity<TcActivityGroupIntroduceBinding, GroupIntroducePresenter> implements GroupIntroduceContract.View {
+
+    EditText etNotice;
+    Button btnCommit;
+    private String targetId;
+    private String contentText;
+
+    private TextWatcher mContentWatcher = new TextWatcher() {
+        @Override
+        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+        }
+
+        @Override
+        public void afterTextChanged(Editable s) {
+            formatTextNum2();
+        }
+    };
+
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+    }
+
+    @Override
+    protected void initView() {
+        etNotice = viewBinding.etNotice;
+        btnCommit = viewBinding.btnCommit;
+
+        Intent intent = getIntent();
+        targetId = intent.getStringExtra(Constants.TARGET_ID_KEY);
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "群简介");
+        contentText = intent.getStringExtra(Constants.COMMON_EXTRA_KEY);
+        etNotice.setText(contentText);
+        initListener();
+        formatTextNum2();
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+        if(BaseApplication.Companion.isTeacherClient()){
+            viewBinding.tvContentTextNum.setVisibility(View.VISIBLE);
+            viewBinding.btnCommit.setVisibility(View.VISIBLE);
+            etNotice.setFocusable(true);
+            etNotice.setFocusableInTouchMode(true);
+        }else{
+            viewBinding.tvContentTextNum.setVisibility(View.GONE);
+            viewBinding.btnCommit.setVisibility(View.GONE);
+            etNotice.setFocusable(false);
+            etNotice.setFocusableInTouchMode(false);
+        }
+    }
+
+    private void initListener() {
+        viewBinding.etNotice.addTextChangedListener(mContentWatcher);
+        btnCommit.setOnClickListener(v -> {
+            String content = etNotice.getText().toString().trim();
+            if (TextUtils.isEmpty(content)) {
+                ToastUtil.getInstance().showShort("请输入群简介");
+                return;
+            }
+            presenter.updateGroupIntroduce(targetId, content);
+        });
+    }
+
+    @Override
+    protected TcActivityGroupIntroduceBinding getLayoutView() {
+        return TcActivityGroupIntroduceBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected GroupIntroducePresenter createPresenter() {
+        return new GroupIntroducePresenter();
+    }
+
+
+    private void formatTextNum2() {
+        String text = viewBinding.etNotice.getText().toString().trim();
+        int cLength = text.length();
+        viewBinding.tvContentTextNum.setText(String.format(Locale.getDefault(), "%d/200", cLength));
+    }
+
+    @Override
+    public void onDestroy() {
+        removeTextWatcher();
+        super.onDestroy();
+    }
+
+    private void removeTextWatcher() {
+        if (viewBinding != null) {
+            viewBinding.etNotice.removeTextChangedListener(mContentWatcher);
+        }
+    }
+
+    @Override
+    public void updateGroupIntroduceSuccess() {
+        if (!checkActivityExist()) {
+            return;
+        }
+        ToastUtil.getInstance().showShort("保存成功");
+        finish();
+    }
+}

+ 35 - 0
chatModule/src/main/res/layout/tc_activity_chat_group_setting.xml

@@ -184,6 +184,41 @@
             </LinearLayout>
 
             <LinearLayout
+                android:id="@+id/ll_group_introduce"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:layout_marginTop="@dimen/dp_1"
+                android:background="@color/white"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:gravity="center_vertical"
+                    android:paddingLeft="@dimen/dp_13"
+                    android:text="群简介"
+                    android:textColor="@color/color_333333"
+                    android:textSize="@dimen/sp_16" />
+
+                <TextView
+                    android:id="@+id/tv_group_introduce"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:background="@color/transparent"
+                    android:drawableEnd="@drawable/icon_arrow_right"
+                    android:drawablePadding="@dimen/dp_12"
+                    android:gravity="center_vertical|right"
+                    android:paddingLeft="@dimen/dp_65"
+                    android:paddingRight="@dimen/dp_15"
+                    android:singleLine="true"
+                    android:text=""
+                    tools:text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"
+                    android:textColor="@color/color_aaaaaa"
+                    android:textSize="@dimen/dp_16" />
+            </LinearLayout>
+
+            <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="50dp"
                 android:layout_marginTop="@dimen/dp_1"

+ 85 - 0
chatModule/src/main/res/layout/tc_activity_group_introduce.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_content"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginEnd="12dp"
+        android:background="@drawable/bg_white_10dp"
+        android:paddingStart="12dp"
+        android:paddingTop="15dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="15dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
+
+
+        <TextView
+            android:id="@+id/tv_content"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:drawableStart="@drawable/icon_group_des_tag"
+            android:drawablePadding="3dp"
+            android:text="群简介"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_16"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <EditText
+            android:id="@+id/et_notice"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_260"
+            android:layout_marginTop="9dp"
+            android:background="@color/white"
+            android:gravity="start|top"
+            android:hint="请输入群简介"
+            android:lineSpacingMultiplier="1.2"
+            android:maxLength="200"
+            android:textColorHint="@color/color_c1c1c1"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/dp_16"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_content" />
+
+        <TextView
+            android:id="@+id/tv_content_text_num"
+            android:layout_width="wrap_content"
+            android:layout_height="20dp"
+            android:gravity="center"
+            android:text="0/200"
+            android:textColor="@color/color_aaaaaa"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+    <Button
+        app:layout_constraintBottom_toBottomOf="parent"
+        android:id="@+id/btn_commit"
+        style="?android:attr/borderlessButtonStyle"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dp_44"
+        android:layout_marginStart="@dimen/dp_25"
+        android:layout_marginEnd="@dimen/dp_25"
+        android:layout_marginBottom="@dimen/dp_40"
+        android:background="@drawable/btn_primary_default_shape"
+        android:text="保存"
+        android:textColor="@color/white"
+        android:textSize="@dimen/dp_18" />
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 0
chatModule/src/main/res/values/strings.xml

@@ -5,4 +5,5 @@
     <string name="live_name_tip">%s在直播间等你哦~</string>
     <string name="teacher_tag_str">学院</string>
     <string name="group_admin_str">群主</string>
+    <string name="there_no_group_introduce_tip">暂无群简介</string>
 </resources>

+ 2 - 2
student/src/main/java/com/cooleshow/student/constants/CourseTableContract.java

@@ -18,7 +18,7 @@ public interface CourseTableContract {
     }
 
     interface Presenter {
-        void getCourseScheduleDateByMonth(String month);
-        void getCourseSchedulesWithDate(Date date);
+        void getCourseScheduleDateByMonth(String month,boolean isShowLoading);
+        void getCourseSchedulesWithDate(Date date,boolean isShowLoading);
     }
 }

+ 4 - 4
student/src/main/java/com/cooleshow/student/presenter/main/CourseTablePresenter.java

@@ -25,8 +25,8 @@ public class CourseTablePresenter extends BasePresenter<CourseTableContract.Cour
      * @param month
      */
     @Override
-    public void getCourseScheduleDateByMonth(String month) {
-        if (getView() != null) {
+    public void getCourseScheduleDateByMonth(String month, boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();
@@ -59,8 +59,8 @@ public class CourseTablePresenter extends BasePresenter<CourseTableContract.Cour
      * @param date
      */
     @Override
-    public void getCourseSchedulesWithDate(Date date) {
-        if (getView() != null) {
+    public void getCourseSchedulesWithDate(Date date, boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();

+ 62 - 56
student/src/main/java/com/cooleshow/student/presenter/main/HomePresenter.java

@@ -50,7 +50,13 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
  */
 public class HomePresenter extends BasePresenter<HomeContract.HomeView> implements HomeContract.Presenter {
     public void appHome() {
-        getView().showLoading();
+        appHome(false);
+    }
+
+    public void appHome(boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
+            getView().showLoading();
+        }
         JSONObject jsonObject = new JSONObject();
         try {
             jsonObject.putOpt("platform", "android");
@@ -234,32 +240,32 @@ public class HomePresenter extends BasePresenter<HomeContract.HomeView> implemen
         Observable<BaseResponse<HomeStyleBean>> observable = create(APIService.class).getStylePage(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString()));
         Observable<BaseResponse<ArrayList<TempLiveTeacherListBean>>> tempLiveObservable = create(APIService.class).getTempLiveList();
         tempLiveObservable.flatMap(new Function<BaseResponse<ArrayList<TempLiveTeacherListBean>>, ObservableSource<BaseResponse<HomeStyleBean>>>() {
-            @Override
-            public ObservableSource<BaseResponse<HomeStyleBean>> apply(BaseResponse<ArrayList<TempLiveTeacherListBean>> arrayListBaseResponse) throws Throwable {
-                return observable.map(new Function<BaseResponse<HomeStyleBean>, BaseResponse<HomeStyleBean>>() {
                     @Override
-                    public BaseResponse<HomeStyleBean> apply(BaseResponse<HomeStyleBean> homeStyleBeanBaseResponse) throws Throwable {
-                        if (arrayListBaseResponse != null && page == 1) {
-                            //只有第一页合并添加数据
-                            ArrayList<TempLiveTeacherListBean> data = arrayListBaseResponse.getData();
-                            if (homeStyleBeanBaseResponse != null && homeStyleBeanBaseResponse.getData() != null) {
-                                List<HomeStyleBean.RowsBean> rows = homeStyleBeanBaseResponse.getData().rows;
-                                if (rows == null) {
-                                    rows = new ArrayList<>();
-                                }
-                                if (data != null && data.size() > 0) {
-                                    for (int i = data.size() - 1; i >= 0; i--) {
-                                        TempLiveTeacherListBean tempLiveTeacherListBean = data.get(i);
-                                        HomeStyleBean.RowsBean rowsBean = new HomeStyleBean.RowsBean();
-                                        rowsBean.liveCoverImg = tempLiveTeacherListBean.liveCoverImg;
-                                        rowsBean.liveTitle = tempLiveTeacherListBean.liveTitle;
-                                        rowsBean.roomUid = tempLiveTeacherListBean.roomUid;
-                                        rowsBean.liveStatus = Constants.ON_LIVING_TAG;
-                                        rowsBean.avatar = tempLiveTeacherListBean.avatar;
-                                        rowsBean.username = tempLiveTeacherListBean.username;
-                                        rows.add(0, rowsBean);
-                                    }
-                                }
+                    public ObservableSource<BaseResponse<HomeStyleBean>> apply(BaseResponse<ArrayList<TempLiveTeacherListBean>> arrayListBaseResponse) throws Throwable {
+                        return observable.map(new Function<BaseResponse<HomeStyleBean>, BaseResponse<HomeStyleBean>>() {
+                            @Override
+                            public BaseResponse<HomeStyleBean> apply(BaseResponse<HomeStyleBean> homeStyleBeanBaseResponse) throws Throwable {
+                                if (arrayListBaseResponse != null && page == 1) {
+                                    //只有第一页合并添加数据
+                                    ArrayList<TempLiveTeacherListBean> data = arrayListBaseResponse.getData();
+                                    if (homeStyleBeanBaseResponse != null && homeStyleBeanBaseResponse.getData() != null) {
+                                        List<HomeStyleBean.RowsBean> rows = homeStyleBeanBaseResponse.getData().rows;
+                                        if (rows == null) {
+                                            rows = new ArrayList<>();
+                                        }
+                                        if (data != null && data.size() > 0) {
+                                            for (int i = data.size() - 1; i >= 0; i--) {
+                                                TempLiveTeacherListBean tempLiveTeacherListBean = data.get(i);
+                                                HomeStyleBean.RowsBean rowsBean = new HomeStyleBean.RowsBean();
+                                                rowsBean.liveCoverImg = tempLiveTeacherListBean.liveCoverImg;
+                                                rowsBean.liveTitle = tempLiveTeacherListBean.liveTitle;
+                                                rowsBean.roomUid = tempLiveTeacherListBean.roomUid;
+                                                rowsBean.liveStatus = Constants.ON_LIVING_TAG;
+                                                rowsBean.avatar = tempLiveTeacherListBean.avatar;
+                                                rowsBean.username = tempLiveTeacherListBean.username;
+                                                rows.add(0, rowsBean);
+                                            }
+                                        }
 //                                for (int i = 0; i < data.size(); i++) {
 //                                    TempLiveTeacherListBean tempLiveTeacherListBean = data.get(i);
 //                                    if (homeStyleBeanBaseResponse != null && homeStyleBeanBaseResponse.getData() != null && homeStyleBeanBaseResponse.getData().rows != null && homeStyleBeanBaseResponse.getData().rows.size() > 0) {
@@ -275,44 +281,44 @@ public class HomePresenter extends BasePresenter<HomeContract.HomeView> implemen
 //                                        }
 //                                    }
 //                                }
-                            } else {
-                                Log.i("pq", "直播列表为空");
+                                    } else {
+                                        Log.i("pq", "直播列表为空");
+                                    }
+                                }
+                                return homeStyleBeanBaseResponse;
                             }
-                        }
-                        return homeStyleBeanBaseResponse;
+                        });
                     }
-                });
-            }
-        }).subscribeOn(Schedulers.newThread())
+                }).subscribeOn(Schedulers.newThread())
                 .observeOn(AndroidSchedulers.mainThread())
                 .subscribe(new Observer<BaseResponse<HomeStyleBean>>() {
-                            @Override
-                            public void onSubscribe(@NonNull Disposable d) {
+                    @Override
+                    public void onSubscribe(@NonNull Disposable d) {
 
-                            }
+                    }
 
-                            @Override
-                            public void onNext(@NonNull BaseResponse<HomeStyleBean> homeStyleBeanBaseResponse) {
-                                if (getView() != null && homeStyleBeanBaseResponse != null) {
-                                    getView().getStylePageSuccess(page, homeStyleBeanBaseResponse.getData());
-                                }
-                            }
+                    @Override
+                    public void onNext(@NonNull BaseResponse<HomeStyleBean> homeStyleBeanBaseResponse) {
+                        if (getView() != null && homeStyleBeanBaseResponse != null) {
+                            getView().getStylePageSuccess(page, homeStyleBeanBaseResponse.getData());
+                        }
+                    }
 
-                            @Override
-                            public void onError(@NonNull Throwable e) {
-                                if (getView() != null) {
-                                    getView().onError(e);
-                                    getView().hideLoading();
-                                }
-                            }
+                    @Override
+                    public void onError(@NonNull Throwable e) {
+                        if (getView() != null) {
+                            getView().onError(e);
+                            getView().hideLoading();
+                        }
+                    }
 
-                            @Override
-                            public void onComplete() {
-                                if (getView() != null) {
-                                    getView().hideLoading();
-                                }
-                            }
-                        });
+                    @Override
+                    public void onComplete() {
+                        if (getView() != null) {
+                            getView().hideLoading();
+                        }
+                    }
+                });
         //        addSubscribe(create(APIService.class).getStylePage(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString())), new BaseObserver<HomeStyleBean>(getView()) {
 //            @Override
 //            protected void onSuccess(HomeStyleBean data) {

+ 2 - 2
student/src/main/java/com/cooleshow/student/presenter/main/MusicHallPresenter.java

@@ -79,8 +79,8 @@ public class MusicHallPresenter extends BasePresenter<HomeMusicHallContract.Home
     /**
      * 获取热门曲目
      */
-    public void getHotMusicSheetList() {
-        if (getView() != null) {
+    public void getHotMusicSheetList(boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();

+ 7 - 7
student/src/main/java/com/cooleshow/student/ui/main/CourseTableFragment.kt

@@ -186,7 +186,7 @@ class CourseTableFragment :
         })
 
         mViewBinding.refreshLayout.setOnRefreshListener(OnRefreshListener {
-            queryCurrentDataCourse()
+            queryCurrentDataCourse(false)
         })
         mViewBinding.refreshLayout.isEnabled = false
     }
@@ -230,20 +230,20 @@ class CourseTableFragment :
         calendarDate =
             TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"))
         setMontAndDay(year, month, day)
-        queryCurrentDataCourse()
+        queryCurrentDataCourse(true)
     }
 
     override fun onResume() {
         super.onResume()
-        queryCurrentDataCourse()
+        queryCurrentDataCourse(false)
     }
 
     /**
      * 查询当前选择日期的课程
      */
-    public fun queryCurrentDataCourse() {
-        presenter.getCourseScheduleDateByMonth(calendarDate)
-        presenter.getCourseSchedulesWithDate(currentSelectDate)
+    public fun queryCurrentDataCourse(isShowLoading:Boolean) {
+        presenter.getCourseScheduleDateByMonth(calendarDate,isShowLoading)
+        presenter.getCourseSchedulesWithDate(currentSelectDate,isShowLoading)
     }
 
     override fun onCalendarIntercept(calendar: com.haibin.calendarview.Calendar?): Boolean {
@@ -260,7 +260,7 @@ class CourseTableFragment :
     override fun onMonthChange(year: Int, month: Int) {
         setMontAndDay(year, month, day)
         presenter?.let {
-            presenter.getCourseScheduleDateByMonth(getMonth(year, month))
+            presenter.getCourseScheduleDateByMonth(getMonth(year, month),true)
         }
     }
 

+ 6 - 4
student/src/main/java/com/cooleshow/student/ui/main/MusicHallFragment.java

@@ -43,6 +43,7 @@ public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding,
     private HomeHotMusicSheetAdapter mRecommendAdapter;
     private HomeHotMusicSheetAdapter mLatestAdapter;
     private boolean isCloseRecommend =false;//是否关闭了推荐曲目模块,如果主动关闭,则本次启动不再显示
+    private boolean isShowLoading = true;
 
     @Override
     protected FgMusicHallLayoutBinding getLayoutView() {
@@ -133,7 +134,7 @@ public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding,
 
     private void refresh() {
         presenter.userAccountPage();
-        presenter.getHotMusicSheetList();
+        presenter.getHotMusicSheetList(isShowLoading);
     }
 
     @Override
@@ -161,7 +162,7 @@ public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding,
                 return;
             }
             //热门曲目更多
-            WebStartHelper.startHotMusicSheetList();
+            WebStartHelper.goHotMusicSong();
             return;
         }
         if (id == R.id.tv_recommend_track_more) {
@@ -172,7 +173,7 @@ public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding,
 
         if (id == R.id.tv_latest_track_more) {
             //推荐曲目 最新曲目更多
-            WebStartHelper.startHotMusicSheetList();
+            WebStartHelper.goLastNewMusicSong();
             return;
         }
     }
@@ -182,7 +183,7 @@ public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding,
         recommendMoreMenuDialog.setOnEventListener(new RecommendMoreMenuDialog.OnEventListener() {
             @Override
             public void onClickMore() {
-                WebStartHelper.startHotMusicSheetList();
+                WebStartHelper.goRecommendMusicSong();
             }
 
             @Override
@@ -215,6 +216,7 @@ public class MusicHallFragment extends BaseMVPFragment<FgMusicHallLayoutBinding,
         if (isDetached() || homeHotMusicSheetBean == null) {
             return;
         }
+        isShowLoading = false;
         //推荐曲目
         if(!isCloseRecommend){
             if (homeHotMusicSheetBean.topMusicSheet != null && homeHotMusicSheetBean.topMusicSheet.size() > 0) {

+ 12 - 5
student/src/main/java/com/cooleshow/student/ui/main/NewHomeFragmentV2.java

@@ -331,7 +331,7 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
         if (presenter != null) {
             //红点
             presenter.queryCountOfUnread();
-            presenter.appHome();
+            presenter.appHome(isNeedLoading());
             //获取课程信息
             presenter.queryLiveAndVideo();
             refreshBottomData();
@@ -346,6 +346,13 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
         }
     }
 
+    private boolean isNeedLoading() {
+        if (mMenuPagerAdapter != null) {
+            return mMenuPagerAdapter.getCount() == 0;
+        }
+        return false;
+    }
+
     private void refreshBottomData() {
         if (mHotNewsFragment != null) {
             mHotNewsFragment.refresh();
@@ -800,24 +807,24 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
      */
     private void gotoCourseDetail(HomeLiveAndVideoBean.RecentCoursesBean bean) {
         String courseType = bean.courseType;
-        if (TextUtils.equals(courseType,CourseType.LIVE.getId())) {
+        if (TextUtils.equals(courseType, CourseType.LIVE.getId())) {
             //直播课
             ARouter.getInstance()
                     .build(RouterPath.WebCenter.ACTIVITY_HTML)
                     .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, bean.courseGroupId, bean.courseId))
                     .navigation();
-        } else if (TextUtils.equals(courseType,CourseType.PRACTICE.getId())|| TextUtils.equals(courseType,CourseType.VIP.getId())) {
+        } else if (TextUtils.equals(courseType, CourseType.PRACTICE.getId()) || TextUtils.equals(courseType, CourseType.VIP.getId())) {
             //趣纠课 VIP课
             ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
                     .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
                     .withString(CourseConstants.COURSE_GROUP_ID, String.valueOf(bean.courseGroupId))
                     .navigation();
-        } else if (TextUtils.equals(courseType,CourseType.PIANO_ROOM_CLASS.getId())) {
+        } else if (TextUtils.equals(courseType, CourseType.PIANO_ROOM_CLASS.getId())) {
             //琴房课 跳转详情页
             ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
                     .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
                     .navigation();
-        }else if(TextUtils.equals(courseType,CourseType.GROUP.getId())){
+        } else if (TextUtils.equals(courseType, CourseType.GROUP.getId())) {
             //小组课
             ARouter.getInstance().build(RouterPath.CourseCenter.GROUP_COURSE_DETAIL)
                     .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))

+ 2 - 2
student/src/main/res/layout/fg_music_hall_layout.xml

@@ -261,7 +261,7 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="@dimen/dp_18"
                     android:visibility="gone"
-                    app:layout_constraintTop_toBottomOf="@+id/cl_recommend_track"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_hot_track"
                     tools:visibility="visible">
 
                     <View
@@ -325,7 +325,7 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="@dimen/dp_30"
                     android:visibility="gone"
-                    app:layout_constraintTop_toBottomOf="@+id/cl_latest_track"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_recommend_track"
                     tools:visibility="visible">
 
                     <View

+ 12 - 0
teacher/src/main/java/com/cooleshow/teacher/adapter/HomeHotAlbumAdapter.java

@@ -8,11 +8,14 @@ import android.widget.TextView;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
 import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.SizeUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.HomeHotAlbumListBean;
 
 import java.util.List;
 
+import androidx.constraintlayout.widget.ConstraintLayout;
+
 /**
  * 创建日期:2022/5/27 11:51
  *
@@ -43,5 +46,14 @@ public class HomeHotAlbumAdapter extends BaseQuickAdapter<HomeHotAlbumListBean.R
             tv_payment_type.setVisibility(View.GONE);
             tv_payment_type.setText("免费");
         }
+
+        ConstraintLayout cs_root = helper.getView(R.id.cs_root);
+        int pos = helper.getLayoutPosition();
+        if (pos == 0) {
+            //第一个
+            cs_root.setPadding(SizeUtils.dp2px(12), 0, 0, 0);
+        } else {
+            cs_root.setPadding(0, 0, 0, 0);
+        }
     }
 }

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

@@ -22,9 +22,9 @@ public interface CourseTableContract {
     }
 
     interface Presenter {
-        void getCourseScheduleDateByMonth(String month);
+        void getCourseScheduleDateByMonth(String month,boolean isShowLoading);
 
-        void getCourseSchedulesWithDate(Date date);
+        void getCourseSchedulesWithDate(Date date,boolean isShowLoading);
 
         void updateCourseTime(Date date, String courseId);
     }

+ 4 - 4
teacher/src/main/java/com/cooleshow/teacher/presenter/main/CourseTablePresenter.java

@@ -26,8 +26,8 @@ public class CourseTablePresenter extends BasePresenter<CourseTableContract.Cour
      * @param month
      */
     @Override
-    public void getCourseScheduleDateByMonth(String month) {
-        if (getView() != null) {
+    public void getCourseScheduleDateByMonth(String month, boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();
@@ -61,8 +61,8 @@ public class CourseTablePresenter extends BasePresenter<CourseTableContract.Cour
      * @param date
      */
     @Override
-    public void getCourseSchedulesWithDate(Date date) {
-        if (getView() != null) {
+    public void getCourseSchedulesWithDate(Date date, boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();

+ 9 - 2
teacher/src/main/java/com/cooleshow/teacher/presenter/main/HomePresenter.java

@@ -151,11 +151,18 @@ public class HomePresenter extends BasePresenter<HomeContract.HomeView> implemen
         });
     }
 
+    public void appHome() {
+        appHome(false);
+    }
+
     /**
      * 获取App首页入口信息
      */
-    public void appHome() {
-        getView().showLoading();
+    public void appHome(boolean isShowLoading) {
+        if (isShowLoading && getView() != null) {
+            getView().showLoading();
+        }
+
         JSONObject jsonObject = new JSONObject();
         try {
             jsonObject.putOpt("platform", "android");

+ 8 - 8
teacher/src/main/java/com/cooleshow/teacher/ui/main/CourseTableFragment.kt

@@ -147,7 +147,7 @@ class CourseTableFragment :
             gotoCourseDetail(position);
         }
         mViewBinding.refreshLayout.setOnRefreshListener {
-            queryCurrentDataCourse()
+            queryCurrentDataCourse(false)
         }
         mViewBinding.refreshLayout.isEnabled = false
     }
@@ -263,20 +263,20 @@ class CourseTableFragment :
         calendarDate =
             TimeUtils.date2String(currentSelectDate, TimeUtils.getSafeDateFormat("yyyy-MM"))
         setMontAndDay(year, month, day)
-        queryCurrentDataCourse()
+        queryCurrentDataCourse(true)
     }
 
     override fun onResume() {
         super.onResume()
-        queryCurrentDataCourse()
+        queryCurrentDataCourse(false)
     }
 
     /**
      * 查询当前选择日期的课程
      */
-    private fun queryCurrentDataCourse() {
-        presenter.getCourseScheduleDateByMonth(calendarDate)
-        presenter.getCourseSchedulesWithDate(currentSelectDate)
+    private fun queryCurrentDataCourse(isShowLoading: Boolean) {
+        presenter.getCourseScheduleDateByMonth(calendarDate,isShowLoading)
+        presenter.getCourseSchedulesWithDate(currentSelectDate,isShowLoading)
     }
 
     override fun onCalendarIntercept(calendar: com.haibin.calendarview.Calendar?): Boolean {
@@ -293,7 +293,7 @@ class CourseTableFragment :
     override fun onMonthChange(year: Int, month: Int) {
         setMontAndDay(year, month, day)
         presenter?.let {
-            presenter.getCourseScheduleDateByMonth(getMonth(year, month))
+            presenter.getCourseScheduleDateByMonth(getMonth(year, month),true)
         }
     }
 
@@ -345,7 +345,7 @@ class CourseTableFragment :
         if (isDetached) {
             return;
         }
-        queryCurrentDataCourse();
+        queryCurrentDataCourse(true);
     }
 
     /**

+ 64 - 30
teacher/src/main/java/com/cooleshow/teacher/ui/main/NewHomeFragmentV2.java

@@ -46,6 +46,7 @@ import com.cooleshow.teacher.contract.HomeContract;
 import com.cooleshow.teacher.databinding.FgNewHomeV2LayoutBinding;
 import com.cooleshow.teacher.helper.EventHelper;
 import com.cooleshow.teacher.presenter.main.HomePresenter;
+import com.cooleshow.teacher.ui.web.ScHtmlFragment;
 import com.cooleshow.teacher.widgets.HomeHotAlbumItemDecoration;
 import com.cooleshow.teacher.widgets.HomeHotMusicSheetItemDecoration;
 import com.cooleshow.teacher.widgets.dialog.BadgeDesDialog;
@@ -68,6 +69,7 @@ import java.util.List;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.LinearSnapHelper;
 import androidx.recyclerview.widget.PagerSnapHelper;
@@ -101,6 +103,7 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
     private String currentSubjectId = "";
     private int indicatorWidth = 0;//金刚位indicator宽度
     private int tenantAlbumStatus = 0;
+    private ScHtmlFragment mScHtmlFragment;
 
     @Override
     protected void initView(View rootView) {
@@ -166,6 +169,11 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
         };
         //banner自带图片轮播的适配器
         mViewBinding.banner.setAdapter(mBannerImageAdapter, true);
+
+        mScHtmlFragment = new ScHtmlFragment();
+        FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction();
+        fragmentTransaction.replace(R.id.fl_statistics_container, mScHtmlFragment).commitAllowingStateLoss();
+
         initListener();
     }
 
@@ -189,11 +197,19 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
         mViewBinding.tvRecommendTrackMore.setOnClickListener(this);
         mViewBinding.tvLatestTrackMore.setOnClickListener(this);
         mViewBinding.tvCurrentSubject.setOnClickListener(this);
+        mViewBinding.ivRecommendMusicSong.setOnClickListener(this);
+        mViewBinding.ivHotMusicSong.setOnClickListener(this);
+        mViewBinding.ivNewMusicSong.setOnClickListener(this);
+        mViewBinding.tvMusicSongMore.setOnClickListener(this);
+
         mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
             mViewBinding.refreshLayout.finishRefresh();
             presenter.queryCountOfUnread();
             presenter.queryLiveAndVideo();
             getUserInfo();
+            if (mScHtmlFragment != null) {
+                mScHtmlFragment.checkReload();
+            }
         });
 
         mViewBinding.banner.addBannerLifecycleObserver(this)//添加生命周期观察者
@@ -493,37 +509,37 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
             return;
         }
         //推荐曲目
-        if (homeHotMusicSheetBean.topMusicSheet != null && homeHotMusicSheetBean.topMusicSheet.size() > 0) {
-            mViewBinding.clRecommendTrack.setVisibility(View.VISIBLE);
-            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.topMusicSheet);
-            if (mRecommendAdapter != null) {
-                mRecommendAdapter.setNewInstance(itemBeans);
-            }
-        } else {
-            mViewBinding.clRecommendTrack.setVisibility(View.GONE);
-        }
+//        if (homeHotMusicSheetBean.topMusicSheet != null && homeHotMusicSheetBean.topMusicSheet.size() > 0) {
+//            mViewBinding.clRecommendTrack.setVisibility(View.VISIBLE);
+//            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.topMusicSheet);
+//            if (mRecommendAdapter != null) {
+//                mRecommendAdapter.setNewInstance(itemBeans);
+//            }
+//        } else {
+//            mViewBinding.clRecommendTrack.setVisibility(View.GONE);
+//        }
 
         //最新曲目
-        if (homeHotMusicSheetBean.newMusicSheet != null && homeHotMusicSheetBean.newMusicSheet.size() > 0) {
-            mViewBinding.clLatestTrack.setVisibility(View.VISIBLE);
-            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.newMusicSheet);
-            if (mLatestAdapter != null) {
-                mLatestAdapter.setNewInstance(itemBeans);
-            }
-        } else {
-            mViewBinding.clLatestTrack.setVisibility(View.GONE);
-        }
+//        if (homeHotMusicSheetBean.newMusicSheet != null && homeHotMusicSheetBean.newMusicSheet.size() > 0) {
+//            mViewBinding.clLatestTrack.setVisibility(View.VISIBLE);
+//            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.newMusicSheet);
+//            if (mLatestAdapter != null) {
+//                mLatestAdapter.setNewInstance(itemBeans);
+//            }
+//        } else {
+//            mViewBinding.clLatestTrack.setVisibility(View.GONE);
+//        }
 
         //最热曲目
-        if (homeHotMusicSheetBean.hotMusicSheet != null && homeHotMusicSheetBean.hotMusicSheet.size() > 0) {
-            mViewBinding.clHotTrack.setVisibility(View.VISIBLE);
-            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.hotMusicSheet);
-            if (mHomeHotMusicSheetAdapter != null) {
-                mHomeHotMusicSheetAdapter.setNewInstance(itemBeans);
-            }
-        } else {
-            mViewBinding.clHotTrack.setVisibility(View.GONE);
-        }
+//        if (homeHotMusicSheetBean.hotMusicSheet != null && homeHotMusicSheetBean.hotMusicSheet.size() > 0) {
+//            mViewBinding.clHotTrack.setVisibility(View.VISIBLE);
+//            ArrayList<HomeHotMusicSheetItemBean> itemBeans = formatMusicSheetData(homeHotMusicSheetBean.hotMusicSheet);
+//            if (mHomeHotMusicSheetAdapter != null) {
+//                mHomeHotMusicSheetAdapter.setNewInstance(itemBeans);
+//            }
+//        } else {
+//            mViewBinding.clHotTrack.setVisibility(View.GONE);
+//        }
     }
 
     private ArrayList<HomeHotMusicSheetItemBean> formatMusicSheetData(List<HomeHotMusicSheetBean.MusicSheetBean> rows) {
@@ -636,7 +652,8 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
 
         //机构模式下专辑配置 不等于0为已配置 显示相应入口
         tenantAlbumStatus = teacherUserInfo.getTenantAlbumStatus();
-        presenter.appHome();
+        boolean isShowLoading = menuAdapter.getCount() == 0;
+        presenter.appHome(isShowLoading);
     }
 
     private void handleVipStyle(TeacherUserInfo userInfo) {
@@ -761,6 +778,23 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
             selectSubject();
             return;
         }
+        if (id == R.id.iv_recommend_music_song) {
+            WebStartHelper.goRecommendMusicSong();
+            return;
+        }
+        if (id == R.id.iv_hot_music_song) {
+            WebStartHelper.goHotMusicSong();
+            return;
+        }
+        if (id == R.id.iv_new_music_song) {
+            WebStartHelper.goLastNewMusicSong();
+            return;
+        }
+
+        if (id == R.id.tv_music_song_more) {
+            WebStartHelper.goMoreMusicSong();
+            return;
+        }
     }
 
     private void showRecommendMenuDialog() {
@@ -825,7 +859,7 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
     private void refreshMusicData() {
         //热门专辑
         presenter.getHotAlbumList(currentSubjectId);
-        //热门曲目
-        presenter.getHotMusicSheetList(currentSubjectId);
+        //热门曲目 20241231-首页改版去掉接口请求
+        //presenter.getHotMusicSheetList(currentSubjectId);
     }
 }

+ 476 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/web/ScHtmlFragment.java

@@ -0,0 +1,476 @@
+package com.cooleshow.teacher.ui.web;
+
+import android.content.ActivityNotFoundException;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.Color;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.webkit.GeolocationPermissions;
+import android.webkit.ValueCallback;
+import android.webkit.WebChromeClient;
+import android.webkit.WebResourceError;
+import android.webkit.WebResourceRequest;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+import android.widget.FrameLayout;
+
+
+import com.cooleshow.base.BuildConfig;
+import com.cooleshow.base.common.WebConstants;
+import com.cooleshow.base.constanst.ErrorConstants;
+import com.cooleshow.base.constanst.ErrorType;
+import com.cooleshow.base.constanst.LoginStatusConstants;
+import com.cooleshow.base.event.LoginStatusEvent;
+import com.cooleshow.base.ui.fragment.BaseFragment;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.SizeUtils;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.helper.LogUploadManager;
+import com.cooleshow.base.widgets.HttpsServerCertWebViewClient;
+import com.cooleshow.teacher.databinding.FgScHomeWebBinding;
+import com.cooleshow.teacher.widgets.LollipopFixedWebView;
+import com.cooleshow.teacher.widgets.helper.JsInterfaceUtils;
+import com.cooleshow.teacher.widgets.helper.ScHtmlJsInterfaceUtils;
+import com.cooleshow.usercenter.helper.UserHelper;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+import org.greenrobot.eventbus.ThreadMode;
+import org.json.JSONObject;
+
+
+/**
+ * Author by pq, Date on 2024/12/30.
+ */
+public class ScHtmlFragment extends BaseFragment<FgScHomeWebBinding> implements ScHtmlJsInterfaceUtils.OnEventListener {
+
+    private WebView webView;
+    private boolean isNeedRefresh = false;
+    private boolean isLoadError = false;
+    private boolean isLoadCompleted = false;
+    private boolean isReceiveHeight = false;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        EventBus.getDefault().register(this);
+    }
+
+    @Override
+    protected FgScHomeWebBinding getLayoutView() {
+        return FgScHomeWebBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected void initView(View rootView) {
+        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) {
+            return;
+        }
+        webView.setBackgroundColor(Color.TRANSPARENT);
+        mViewBinding.viewParent.addView(webView, new FrameLayout.LayoutParams(
+                FrameLayout.LayoutParams.MATCH_PARENT,
+                FrameLayout.LayoutParams.MATCH_PARENT));
+        initWebView();
+        String webViewUrl = WebConstants.HOME_STATISTICS;
+        LOG.i("pq", "webViewUrl:" + webViewUrl);
+        webView.loadUrl(UserHelper.getSpliceTokenUrl(webViewUrl));
+    }
+
+    private void initWebView() {
+        //声明WebSettings子类
+        WebSettings webSettings = webView.getSettings();
+        webSettings.setUserAgentString(webSettings.getUserAgentString() + WebConstants.WEB_UA_PARAMS);
+        webSettings.setGeolocationDatabasePath(getContext().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。是下面那个的前提。
+        // 设置允许JS弹窗
+        webSettings.setJavaScriptCanOpenWindowsAutomatically(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);
+        ScHtmlJsInterfaceUtils jsInterfaceUtils = new ScHtmlJsInterfaceUtils(getActivity());
+        jsInterfaceUtils.setOnEventListener(this);
+        webView.setWebViewClient(new WebClient());
+        webView.setWebChromeClient(new MyWebChromeClient());
+        webView.addJavascriptInterface(jsInterfaceUtils, WebConstants.WEB_JS_INTERFACE);
+    }
+
+    @Override
+    protected void initData() {
+        mViewBinding.errorView.hideBack();
+        mViewBinding.errorView.setOnRefreshClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (webView != null) {
+                    reloadWeb();
+                    hideErrorView();
+                }
+            }
+        });
+    }
+
+    private void reloadWeb() {
+        if (webView != null) {
+            webView.reload();
+        }
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (isNeedRefresh) {
+            isNeedRefresh = false;
+            reloadWeb();
+        } else {
+            refresh();
+        }
+    }
+
+    private void showWebView() {
+        if (mViewBinding != null) {
+            mViewBinding.viewParent.setVisibility(View.VISIBLE);
+        }
+    }
+
+    private void hideErrorView() {
+        mViewBinding.flError.setVisibility(View.GONE);
+    }
+
+    private void showLoadErrorView() {
+        isLoadError = true;
+        mViewBinding.viewParent.setVisibility(View.GONE);
+        mViewBinding.flError.setVisibility(View.VISIBLE);
+    }
+
+    private void notifyWebViewOnResume() {
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("api", "webViewOnResume");
+            onSendMessage(jsonObject.toString());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void sendStickyTopMessage(int mode) {
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("api", "stickyTop");
+            JSONObject contentJson = new JSONObject();
+            contentJson.put("status", mode);
+            jsonObject.put("content", contentJson);
+            onSendMessage(jsonObject.toString());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void onSendMessage(String message) {
+        LOG.i("pq", "post message:" + message);
+        webView.evaluateJavascript("postMessage('" + message + "','*')", new ValueCallback<String>() {
+            @Override
+            public void onReceiveValue(String s) {
+            }
+        });
+    }
+
+    @Override
+    public void onAccompanySelecResult(String id, String name) {
+
+    }
+
+    @Override
+    public void chooseFile(JSONObject message) {
+
+    }
+
+    @Override
+    public void createRightNavToShareButton(String image, String url) {
+
+    }
+
+    @Override
+    public void shareAchievements(JSONObject message) {
+
+    }
+
+    @Override
+    public void backIconChange(JSONObject message) {
+
+    }
+
+    @Override
+    public void getNavHeight(JSONObject message) {
+
+    }
+
+    @Override
+    public void setBarStatus(JSONObject message) {
+
+    }
+
+
+    @Override
+    public void authToBack(JSONObject message) {
+
+    }
+
+    @Override
+    public void joinLiveRoom(String roomId, String teacherId) {
+
+    }
+
+    @Override
+    public void joinChatGroup(String type, String id) {
+
+    }
+
+    @Override
+    public void paymentOrder(String orderNo, String payChannel, String payInfo) {
+
+    }
+
+    @Override
+    public void savePicture(String base64, String uuid) {
+
+    }
+
+    @Override
+    public void shareTripartite(JSONObject jsonObject) {
+
+    }
+
+    @Override
+    public void videoCrop(JSONObject jsonObject) {
+
+    }
+
+    @Override
+    public void checkCoursewareCache(JSONObject jsonObject) {
+
+    }
+
+    @Override
+    public void downloadCourseware(String toString) {
+
+    }
+
+    @Override
+    public void cloudLoading(JSONObject jsonObject) {
+
+    }
+
+    @Override
+    public void onBackPress() {
+
+    }
+
+    @Override
+    public void downloadFile(String url, String fileName) {
+
+    }
+
+    @Override
+    public void setStatusBarTextColor(boolean statusBarTextColor) {
+
+    }
+
+    @Override
+    public void saveFile(JSONObject jsonObject) {
+
+    }
+
+    public void refresh() {
+        if (isLoadError) {
+            reloadWeb();
+        }
+        notifyWebViewOnResume();
+    }
+
+    @Override
+    public void onHomeStatisticsHeight(int height) {
+        if (isDetached()) {
+            return;
+        }
+        isReceiveHeight = true;
+        //为了规避H5页面的错误状态页比如404页面显示在了首页,所以这里在收到相应回调后更高布局样式
+        changeWebViewParentHeight(height);
+        showWebView();
+    }
+
+    private void changeWebViewParentHeight(int height) {
+        if (mViewBinding != null) {
+            FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) mViewBinding.viewParent.getLayoutParams();
+            layoutParams.height = SizeUtils.dp2px(height);
+            layoutParams.topMargin = SizeUtils.dp2px(12);
+            mViewBinding.viewParent.setLayoutParams(layoutParams);
+        }
+    }
+
+    public void checkReload() {
+        if (!isReceiveHeight) {
+            reloadWeb();
+        }
+    }
+
+    private class WebClient extends HttpsServerCertWebViewClient {
+        //页面开始载入时调用
+
+        @Override
+        public void onPageStarted(WebView view, String url, Bitmap favicon) {
+            super.onPageStarted(view, url, favicon);
+            isLoadError = false;
+            isLoadCompleted = false;
+        }
+
+        //页面载入结束时调用
+        @Override
+        public void onPageFinished(WebView view, String url) {
+            super.onPageFinished(view, url);
+            if (!isLoadError) {
+                isLoadCompleted = true;
+                LOG.i("onPageFinished:url" + url);
+//                showWebView();
+            }
+        }
+
+        //截取url请求,在当前视图加载,避免在跳转到自带浏览器
+        @Override
+        public boolean shouldOverrideUrlLoading(WebView view, String request) {
+            if (!(request.startsWith("http://") || request.startsWith("https://"))) {
+                try {
+                    Intent intent = new Intent();
+                    intent.setAction(Intent.ACTION_VIEW);
+                    intent.setData(Uri.parse(request));
+                    startActivity(intent);
+                } catch (ActivityNotFoundException e) {
+                    ToastUtil.getInstance().show(getContext().getApplicationContext(), "未安装该应用");
+                }
+                return true;
+            } else {
+                view.loadUrl(request);
+                return true;
+            }
+        }
+
+        //处理报错信息
+        @Override
+        public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
+            super.onReceivedError(view, request, error);
+            if (error != null) {
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+                    LOG.i("onReceivedError:" + error.getErrorCode());
+                    LOG.i("onReceivedError:" + error.getDescription());
+                    int errorCode = error.getErrorCode();
+                    if (errorCode == WebViewClient.ERROR_HOST_LOOKUP || errorCode == WebViewClient.ERROR_CONNECT || errorCode == WebViewClient.ERROR_PROXY_AUTHENTICATION) {
+                        if (isLoadCompleted) {
+                            //20240827同步加载完后的error不需要显示 错误页
+                            return;
+                        }
+                        showLoadErrorView();
+                    } else {
+                        if (error.getErrorCode() == WebViewClient.ERROR_UNKNOWN) {
+                            return;
+                        }
+                        String errorMsg = "url:" + request.getUrl().toString() + " " + error.getDescription();
+                        LogUploadManager.getInstance().uploadErrorLog(ErrorType.HTML_ERROR, ErrorConstants.getErrorMsg(error.getErrorCode(), errorMsg));
+                    }
+                }
+            }
+        }
+
+    }
+
+    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) {
+            LOG.e(newProgress + "");
+        }
+
+        @Override
+        public void onReceivedTitle(WebView view, String title) {
+            super.onReceivedTitle(view, title);
+        }
+
+        // Android > 5.0.1
+        public boolean onShowFileChooser(
+                WebView webView, ValueCallback<Uri[]> filePathCallback,
+                FileChooserParams fileChooserParams) {
+            return true;
+        }
+
+        private CustomViewCallback mCustomViewCallback;
+        //  横屏时,显示视频的view
+        private View mCustomView;
+
+
+    }
+
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void loadEventBus(LoginStatusEvent event) {
+        if (event != null && event.eventCode == LoginStatusConstants.LOGIN_OUT) {
+            isNeedRefresh = true;
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
+}

+ 1 - 0
teacher/src/main/java/com/cooleshow/teacher/widgets/helper/JsInterfaceUtils.java

@@ -429,6 +429,7 @@ public class JsInterfaceUtils extends Object {
                 }
 
             } catch (Exception e) {
+                e.printStackTrace();
             }
         });
 

+ 61 - 0
teacher/src/main/java/com/cooleshow/teacher/widgets/helper/ScHtmlJsInterfaceUtils.java

@@ -0,0 +1,61 @@
+package com.cooleshow.teacher.widgets.helper;
+
+import android.app.Activity;
+import android.text.TextUtils;
+import android.webkit.JavascriptInterface;
+
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.ThreadUtils;
+import com.cooleshow.chatmodule.utils.helper.ChatHelper;
+
+import org.json.JSONObject;
+
+/**
+ * Author by pq, Date on 2025/1/2.
+ */
+public class ScHtmlJsInterfaceUtils extends JsInterfaceUtils {
+    public static final String HOME_STATISTICS_HEIGHT_KEY = "homeStatisticsHeight";
+    private OnEventListener mEventListener;
+
+    public ScHtmlJsInterfaceUtils(Activity activity) {
+        super(activity);
+    }
+
+    @Override
+    @JavascriptInterface
+    public void postMessage(String message) {
+        super.postMessage(message);
+        ThreadUtils.runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    JSONObject jsonObject = new JSONObject(message);
+                    String api = jsonObject.getString("api");
+                    LOG.i("postMessage:" + jsonObject.toString());
+                    if (TextUtils.equals(api, HOME_STATISTICS_HEIGHT_KEY)) {
+                        JSONObject contentBean = jsonObject.getJSONObject("content");
+                        if (null != contentBean) {
+                            double height = contentBean.optDouble("height", 0);
+                            if (mEventListener != null) {
+                                mEventListener.onHomeStatisticsHeight((int) height);
+                            }
+                        }
+                        return;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+    }
+
+    public void setOnEventListener(OnEventListener listener) {
+        setOnItemClickListener(listener);
+        this.mEventListener = listener;
+    }
+
+    public interface OnEventListener extends onGetMethodsListener {
+        void onHomeStatisticsHeight(int height);
+    }
+
+}

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


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


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


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


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


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


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


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


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


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


+ 142 - 34
teacher/src/main/res/layout/fg_new_home_v2_layout.xml

@@ -87,32 +87,32 @@
             tools:visibility="visible" />
 
         <FrameLayout
-            android:paddingBottom="6dp"
-            tools:visibility="visible"
-            android:visibility="gone"
             android:id="@+id/fl_tenant_name"
             android:layout_width="0dp"
+            android:layout_height="wrap_content"
             android:layout_marginTop="11dp"
             android:layout_marginEnd="14dp"
-            android:layout_height="wrap_content"
+            android:paddingBottom="6dp"
+            android:visibility="gone"
             app:layout_constraintLeft_toLeftOf="parent"
             app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/tv_teacher_name">
+            app:layout_constraintTop_toBottomOf="@+id/tv_teacher_name"
+            tools:visibility="visible">
 
             <TextView
                 android:id="@+id/tv_tenant_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@drawable/shape_12ffa673_border_ffbf9a_4dp"
-                android:paddingStart="5dp"
-                android:paddingEnd="5dp"
                 android:layout_gravity="center_vertical"
+                android:background="@drawable/shape_12ffa673_border_ffbf9a_4dp"
+                android:ellipsize="end"
                 android:gravity="center_vertical"
                 android:includeFontPadding="false"
                 android:maxLines="1"
+                android:paddingStart="5dp"
                 android:paddingTop="1dp"
+                android:paddingEnd="5dp"
                 android:paddingBottom="1dp"
-                android:ellipsize="end"
                 android:textColor="@color/color_ff7b31"
                 android:textSize="@dimen/sp_12"
                 app:layout_constraintHorizontal_bias="0"
@@ -139,7 +139,7 @@
             <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:paddingBottom="20dp">
+                android:paddingBottom="12dp">
 
                 <View
                     android:id="@+id/top_view_bg"
@@ -151,16 +151,16 @@
 
 
                 <ImageView
-                    android:layout_marginStart="14dp"
                     android:id="@+id/iv_cert"
                     android:layout_width="wrap_content"
                     android:layout_height="30dp"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="7dp"
                     android:layout_marginEnd="25dp"
                     android:adjustViewBounds="true"
                     android:clickable="false"
-                    android:layout_marginTop="7dp"
-                    app:layout_constraintLeft_toLeftOf="parent"
                     android:src="@drawable/icon_home_un_certification"
+                    app:layout_constraintLeft_toLeftOf="parent"
                     app:layout_constraintTop_toTopOf="parent" />
 
                 <TextView
@@ -176,11 +176,11 @@
                     android:text="认证失败"
                     android:textColor="@color/color_fb5e32"
                     android:textSize="@dimen/sp_10"
-                    tools:visibility="visible"
                     android:visibility="gone"
                     app:layout_constraintCircle="@+id/iv_cert"
                     app:layout_constraintCircleAngle="80"
-                    app:layout_constraintCircleRadius="75dp" />
+                    app:layout_constraintCircleRadius="75dp"
+                    tools:visibility="visible" />
 
                 <View
                     android:id="@+id/view_cert_red_point"
@@ -199,15 +199,15 @@
                     android:text="声部:"
                     android:textColor="@color/color_333333"
                     android:textSize="@dimen/sp_14"
-                    app:layout_constraintRight_toLeftOf="@+id/tv_current_subject"
                     app:layout_constraintBottom_toBottomOf="@+id/iv_cert"
+                    app:layout_constraintRight_toLeftOf="@+id/tv_current_subject"
                     app:layout_constraintTop_toTopOf="@+id/iv_cert" />
 
                 <TextView
-                    android:layout_marginEnd="14dp"
                     android:id="@+id/tv_current_subject"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:layout_marginEnd="14dp"
                     android:drawableRight="@drawable/icon_arrow_down2"
                     android:drawablePadding="5dp"
                     android:gravity="center"
@@ -215,8 +215,8 @@
                     android:paddingBottom="5dp"
                     android:textColor="@color/color_666666"
                     android:textSize="@dimen/sp_14"
-                    app:layout_constraintRight_toRightOf="parent"
                     app:layout_constraintBottom_toBottomOf="@+id/tv_subject_title"
+                    app:layout_constraintRight_toRightOf="parent"
                     app:layout_constraintTop_toTopOf="@+id/tv_subject_title"
                     tools:text="中音萨克斯" />
 
@@ -273,11 +273,11 @@
 
 
                     <ImageView
-                        android:visibility="gone"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginEnd="11dp"
                         android:src="@drawable/icon_arrow_right_bg_tran"
+                        android:visibility="gone"
                         app:layout_constraintBottom_toBottomOf="parent"
                         app:layout_constraintRight_toRightOf="parent"
                         app:layout_constraintTop_toTopOf="parent" />
@@ -304,7 +304,6 @@
                     android:layout_width="match_parent"
                     android:layout_height="0dp"
                     android:layout_marginLeft="@dimen/dp_14"
-                    app:layout_constraintDimensionRatio="w,1:2.63"
                     android:layout_marginTop="@dimen/dp_10"
                     android:layout_marginRight="@dimen/dp_14"
                     android:descendantFocusability="blocksDescendants"
@@ -317,6 +316,7 @@
                     app:banner_indicator_selected_color="@color/white"
                     app:banner_indicator_selected_width="12dp"
                     app:banner_radius="10dp"
+                    app:layout_constraintDimensionRatio="w,1:2.63"
                     app:layout_constraintTop_toBottomOf="@+id/fl_course_enter" />
 
                 <androidx.cardview.widget.CardView
@@ -330,9 +330,9 @@
                     app:cardBackgroundColor="@color/color_fef9f4"
                     app:cardCornerRadius="10dp"
                     app:cardElevation="0dp"
-                    tools:visibility="visible"
                     app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/banner">
+                    app:layout_constraintTop_toBottomOf="@+id/banner"
+                    tools:visibility="visible">
 
                     <androidx.constraintlayout.widget.ConstraintLayout
                         android:layout_width="match_parent"
@@ -423,26 +423,48 @@
                     android:id="@+id/top_help_line"
                     android:layout_width="1px"
                     android:layout_height="1px"
-                    app:layout_goneMarginTop="20dp"
                     android:layout_marginTop="8dp"
                     app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/fl_top_menu" />
+                    app:layout_constraintTop_toBottomOf="@+id/fl_top_menu"
+                    app:layout_goneMarginTop="20dp" />
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_home_statistics"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingStart="14dp"
+                    android:paddingEnd="14dp"
+                    app:layout_constraintTop_toBottomOf="@+id/top_help_line"
+                    tools:visibility="visible">
+
+                    <FrameLayout
+                        android:id="@+id/fl_statistics_container"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+                </androidx.constraintlayout.widget.ConstraintLayout>
 
                 <androidx.constraintlayout.widget.ConstraintLayout
                     android:id="@+id/cl_hot_album"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/dp_20"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:layout_marginEnd="14dp"
+                    android:background="@drawable/shape_white_10dp"
+                    android:paddingTop="13dp"
+                    android:paddingBottom="12dp"
                     android:visibility="gone"
-                    tools:visibility="visible"
-                    app:layout_constraintTop_toBottomOf="@+id/top_help_line">
+                    app:layout_constraintTop_toBottomOf="@+id/cl_home_statistics"
+                    tools:visibility="visible">
 
-                    <View
+                    <ImageView
+                        android:layout_marginStart="12dp"
                         android:id="@+id/tv_hot_album_line"
-                        android:layout_width="4dp"
-                        android:layout_height="17dp"
-                        android:layout_marginStart="14dp"
-                        android:background="@drawable/shape_course_title_tag_bg"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:src="@drawable/icon_home_hot_album_tag"
                         app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
                         app:layout_constraintLeft_toLeftOf="parent"
                         app:layout_constraintTop_toTopOf="@+id/tv_hot_album" />
@@ -464,7 +486,6 @@
                         android:id="@+id/tv_hot_album_more"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginRight="@dimen/dp_14"
                         android:background="@drawable/shape_1a2dc7aa_10dp"
                         android:drawableEnd="@drawable/icon_arrow_right_green"
                         android:drawablePadding="5dp"
@@ -474,6 +495,7 @@
                         android:paddingEnd="5dp"
                         android:paddingBottom="2dp"
                         android:text="更多"
+                        android:layout_marginEnd="12dp"
                         android:textColor="@color/color_2dc7aa"
                         android:textSize="@dimen/sp_12"
                         app:layout_constraintBottom_toBottomOf="@+id/tv_hot_album"
@@ -486,12 +508,98 @@
                         android:layout_height="wrap_content"
                         android:layout_marginTop="12dp"
                         android:overScrollMode="never"
-                        android:paddingLeft="@dimen/dp_14"
                         android:scrollbars="none"
                         app:layout_constraintTop_toBottomOf="@+id/tv_hot_album" />
 
                 </androidx.constraintlayout.widget.ConstraintLayout>
 
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:id="@+id/cl_music"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="14dp"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:layout_marginEnd="14dp"
+                    android:background="@drawable/shape_white_10dp"
+                    android:paddingStart="12dp"
+                    android:paddingEnd="12dp"
+                    android:paddingTop="13dp"
+                    android:paddingBottom="12dp"
+                    android:visibility="visible"
+                    app:layout_constraintTop_toBottomOf="@+id/cl_hot_album"
+                    tools:visibility="visible">
+
+                    <TextView
+                        android:id="@+id/tv_home_music_song"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:drawableStart="@drawable/icon_home_music_tag"
+                        android:gravity="center"
+                        android:text="曲目"
+                        android:includeFontPadding="false"
+                        android:drawablePadding="6dp"
+                        android:textColor="@color/color_333333"
+                        android:textSize="@dimen/sp_17"
+                        android:textStyle="bold"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/tv_music_song_more"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:background="@drawable/shape_1a2dc7aa_10dp"
+                        android:drawableEnd="@drawable/icon_arrow_right_green"
+                        android:drawablePadding="5dp"
+                        android:gravity="center"
+                        android:paddingStart="7dp"
+                        android:paddingTop="2dp"
+                        android:paddingEnd="5dp"
+                        android:paddingBottom="2dp"
+                        android:text="更多"
+                        android:textColor="@color/color_2dc7aa"
+                        android:textSize="@dimen/sp_12"
+                        app:layout_constraintBottom_toBottomOf="@+id/tv_home_music_song"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/tv_home_music_song" />
+
+                    <ImageView
+                        android:id="@+id/iv_recommend_music_song"
+                        android:layout_width="0dp"
+                        app:layout_constraintHorizontal_weight="1"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="13dp"
+                        android:adjustViewBounds="true"
+                        app:layout_constraintRight_toLeftOf="@+id/iv_hot_music_song"
+                        android:src="@drawable/bg_home_recommend_music_song"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toBottomOf="@+id/tv_home_music_song" />
+
+                    <ImageView
+                        android:layout_marginEnd="10dp"
+                        android:layout_marginStart="10dp"
+                        android:id="@+id/iv_hot_music_song"
+                        android:layout_width="0dp"
+                        app:layout_constraintHorizontal_weight="1"
+                        android:layout_height="wrap_content"
+                        android:adjustViewBounds="true"
+                        android:src="@drawable/bg_home_hot_music_song"
+                        app:layout_constraintRight_toLeftOf="@+id/iv_new_music_song"
+                        app:layout_constraintLeft_toRightOf="@+id/iv_recommend_music_song"
+                        app:layout_constraintTop_toTopOf="@+id/iv_recommend_music_song" />
+
+                    <ImageView
+                        android:id="@+id/iv_new_music_song"
+                        android:layout_width="0dp"
+                        app:layout_constraintHorizontal_weight="1"
+                        android:layout_height="wrap_content"
+                        android:adjustViewBounds="true"
+                        android:src="@drawable/bg_home_last_new_music_song"
+                        app:layout_constraintLeft_toRightOf="@+id/iv_hot_music_song"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="@+id/iv_recommend_music_song" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
 
                 <androidx.constraintlayout.widget.ConstraintLayout
                     android:id="@+id/cl_recommend_track"

+ 28 - 0
teacher/src/main/res/layout/fg_sc_home_web.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <FrameLayout
+        android:id="@+id/view_parent"
+        android:layout_width="match_parent"
+        android:layout_height="0px"/>
+
+    <FrameLayout
+        android:paddingBottom="12dp"
+        android:paddingTop="12dp"
+        android:background="@color/white"
+        android:id="@+id/fl_error"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:visibility="gone">
+
+        <com.cooleshow.base.widgets.ErrorView
+            android:id="@+id/error_view"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center" />
+
+    </FrameLayout>
+</FrameLayout>

+ 1 - 0
teacher/src/main/res/layout/layout_home_hot_album_item.xml

@@ -3,6 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
+    android:id="@+id/cs_root"
     xmlns:tools="http://schemas.android.com/tools">
 
     <com.cooleshow.base.widgets.QMUIRadiusImageView

+ 28 - 5
usercenter/src/main/java/com/cooleshow/usercenter/helper/UserHelper.java

@@ -9,15 +9,18 @@ import com.cooleshow.base.data.net.CommonParamsHelper;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.DateUtil;
 import com.cooleshow.base.utils.LOG;
+import com.cooleshow.base.utils.LogUtils;
 import com.cooleshow.base.utils.SPUtils;
 import com.cooleshow.base.utils.Utils;
 import com.cooleshow.usercenter.R;
 import com.cooleshow.usercenter.bean.StudentUserInfo;
 import com.cooleshow.usercenter.bean.TeacherUserInfo;
-import com.cooleshow.usercenter.bean.UserInfo;
 import com.cooleshow.usercenter.bean.UserLoginInfo;
 import com.cooleshow.usercenter.constants.UserConstants;
 
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
 /**
  * Author by pq, Date nton 2022/4/22.
  */
@@ -147,9 +150,9 @@ public class UserHelper {
         //头像
         SPUtils.getInstance().put(USER_AVATAR, userInfo.heardUrl);
         //声部id
-        SPUtils.getInstance().put(SUBJECT_ID,userInfo.getSubjectId());
+        SPUtils.getInstance().put(SUBJECT_ID, userInfo.getSubjectId());
         //声部名称
-        SPUtils.getInstance().put(SUBJECT_NAME,userInfo.getSubjectName());
+        SPUtils.getInstance().put(SUBJECT_NAME, userInfo.getSubjectName());
         //机构id
         SPUtils.getInstance().put(TENANTID_KEY + "_" + getUserId(), userInfo.tenantId);
         //机构名称
@@ -227,6 +230,7 @@ public class UserHelper {
 
     /**
      * 是否是多角色账号
+     *
      * @return
      */
     public static boolean isMultiAccountUser() {
@@ -356,11 +360,11 @@ public class UserHelper {
         return isTenantAccount(tenantId);
     }
 
-    public static String getSubjectId(){
+    public static String getSubjectId() {
         return SPUtils.getInstance().getString(SUBJECT_ID);
     }
 
-    public static String getSubjectName(){
+    public static String getSubjectName() {
         return SPUtils.getInstance().getString(SUBJECT_NAME);
     }
 
@@ -383,4 +387,23 @@ public class UserHelper {
         updateHasShowGuideCompleted(CommonConfig.APP_MY_WORKS_GUIDE_TAG, false);
         CommonConfig.resetGuide();
     }
+
+    public static String getSpliceTokenUrl(String webViewUrl) {
+        String userToken = getUserToken();
+        if (!TextUtils.isEmpty(userToken)) {
+            try {
+                userToken = URLEncoder.encode(userToken, "UTF-8");
+            } catch (UnsupportedEncodingException e) {
+                e.printStackTrace();
+            }
+            boolean status = webViewUrl.contains("?");
+            if (status) {
+                webViewUrl = (webViewUrl + "&Authorization=" + userToken);
+            } else {
+                webViewUrl = (webViewUrl + "?Authorization=" + userToken);
+            }
+            LogUtils.i("pq", "webViewUrl:" + webViewUrl);
+        }
+        return webViewUrl;
+    }
 }