Selaa lähdekoodia

增加首页按钮点击

Pq 3 kuukautta sitten
vanhempi
commit
d4a9d0fa89

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

@@ -200,6 +200,10 @@ 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();

+ 10 - 3
BaseLibrary/src/main/java/com/cooleshow/base/utils/helper/WebStartHelper.java

@@ -333,21 +333,28 @@ public class WebStartHelper {
     public static void goRecommendMusicSong() {
         ARouter.getInstance()
                 .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                .withString(WebConstants.WEB_URL, WebConstants.TEACHER_GROUP_CREATE)
+                .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.TEACHER_GROUP_CREATE)
+                .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.TEACHER_GROUP_CREATE)
+                .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();
     }
 }

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

@@ -197,6 +197,11 @@ 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();
@@ -781,6 +786,11 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
             WebStartHelper.goLastNewMusicSong();
             return;
         }
+
+        if (id == R.id.tv_music_song_more) {
+            WebStartHelper.goMoreMusicSong();
+            return;
+        }
     }
 
     private void showRecommendMenuDialog() {

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

@@ -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"