Browse Source

修改曲目跳转曲目详情页

Pq 2 years ago
parent
commit
c010e221fe

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

@@ -152,5 +152,7 @@ public abstract class WebConstants {
     //领奖地址
     public static final String AWARD_URL = getBaseUrlH5() + "/#/awardActivity";
 
+    //曲目详情页
+    public static final String MUSIC_SHEET_DETAIL = getBaseUrlH5() + "/#/music-detail?id=";
 
 }

+ 2 - 7
BaseLibrary/src/main/java/com/cooleshow/base/ui/activity/userInfo/StudentUserInfoDetailActivity.java

@@ -22,6 +22,7 @@ import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.GlideUtils;
 import com.cooleshow.base.utils.UiUtils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.base.widgets.EmptyViewLayout;
 
 import java.util.List;
@@ -72,13 +73,7 @@ public class StudentUserInfoDetailActivity extends BaseMVPActivity<ActivityUserI
                     return;
                 }
                 RecentPracticeBean.RowsBean data = mAdapter.getData().get(position);
-                ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
-                        .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, data.id))
-                        .withBoolean("isHideTitle", true)
-                        .withBoolean("statusBarTextColor", true)
-                        .withBoolean("isOpenLight", true)
-                        .withInt("orientation", 0)
-                        .navigation();
+                WebStartHelper.startMusicSheetDetail(String.valueOf(data.id));
             }
         });
     }

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

@@ -202,4 +202,15 @@ public class WebStartHelper {
                 .withString(WebConstants.WEB_URL, WebConstants.STUDENT_TEACHER_HOME + teacherId)
                 .navigation();
     }
+
+    /**
+     * 打开老师个人主页
+     * @param
+     */
+    public static void startMusicSheetDetail(String musicId){
+        ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(WebConstants.WEB_URL, WebConstants.MUSIC_SHEET_DETAIL + musicId)
+                .navigation();
+    }
 }

+ 2 - 7
student/src/main/java/com/cooleshow/student/widgets/HomeHotMusicSheetItemView.java

@@ -18,6 +18,7 @@ import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.MusicSheetUtils;
 import com.cooleshow.base.utils.SizeUtils;
 import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.student.R;
 import com.cooleshow.student.bean.HomeHotMusicSheetBean;
 
@@ -72,13 +73,7 @@ public class HomeHotMusicSheetItemView extends FrameLayout {
                     if (UiUtils.isFastClick()) {
                         return;
                     }
-                    ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
-                            .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, mBean.id))
-                            .withBoolean("isHideTitle", true)
-                            .withBoolean("statusBarTextColor", true)
-                            .withBoolean("isOpenLight", true)
-                            .withInt("orientation", 0)
-                            .navigation();
+                    WebStartHelper.startMusicSheetDetail(String.valueOf(mBean.id));
                 }
             }
         });

+ 1 - 7
teacher/src/main/java/com/cooleshow/teacher/ui/homepage/SheetMusicPageFragment.java

@@ -85,13 +85,7 @@ public class SheetMusicPageFragment extends BaseMVPFragment<FragmentSheetMusicPa
             public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
                 HomePageSheetMusicListBean.RowsBean rowsBean = mAdapter.getData().get(position);
                 if (rowsBean != null) {
-                    ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
-                            .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, rowsBean.id))
-                            .withBoolean("isHideTitle", true)
-                            .withBoolean("statusBarTextColor", true)
-                            .withBoolean("isOpenLight", true)
-                            .withInt("orientation", 0)
-                            .navigation();
+                    WebStartHelper.startMusicSheetDetail(String.valueOf(rowsBean.id));
                 }
             }
         });

+ 1 - 7
teacher/src/main/java/com/cooleshow/teacher/ui/score/MineScoreFragment.java

@@ -150,13 +150,7 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
                         .navigation();
                 return;
             }
-            ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
-                    .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, rowsBean.id))
-                    .withBoolean("isHideTitle", true)
-                    .withBoolean("statusBarTextColor", true)
-                    .withBoolean("isOpenLight", true)
-                    .withInt("orientation", 0)
-                    .navigation();
+            WebStartHelper.startMusicSheetDetail(String.valueOf(rowsBean.id));
         });
 
         mineScoreAdapter.setOnItemChildClickListener(new OnItemChildClickListener() {

+ 2 - 7
teacher/src/main/java/com/cooleshow/teacher/widgets/HomeHotMusicSheetItemView.java

@@ -18,6 +18,7 @@ import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.MusicSheetUtils;
 import com.cooleshow.base.utils.SizeUtils;
 import com.cooleshow.base.utils.UiUtils;
+import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.bean.HomeHotMusicSheetBean;
 
@@ -69,13 +70,7 @@ public class HomeHotMusicSheetItemView extends FrameLayout {
                     if (UiUtils.isFastClick()) {
                         return;
                     }
-                    ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
-                            .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, mBean.id))
-                            .withBoolean("isHideTitle", true)
-                            .withBoolean("statusBarTextColor", true)
-                            .withBoolean("isOpenLight", true)
-                            .withInt("orientation", 0)
-                            .navigation();
+                    WebStartHelper.startMusicSheetDetail(String.valueOf(mBean.id));
                 }
             }
         });