Преглед изворни кода

修改我的曲谱 视频课 直播课 已取消或者已下架等状态跳转至编辑页面

Pq пре 2 година
родитељ
комит
1d57dbf4cb

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

@@ -97,6 +97,8 @@ public abstract class WebConstants {
     public static final String TEACHER_VIDEO_MODIFY = getBaseUrlH5() + "/#/videoCreate?groupId=4";
     //创建直播课
     public static final String TEACHER_LIVE_CREATE = getBaseUrlH5() + "/#/liveCreate";
+    //编辑直播课
+    public static final String TEACHER_LIVE_EDIT = getBaseUrlH5() + "/#/liveCreate?groupId=%s";
     //直播课详情
     public static final String TEACHER_LIVE_DETAIL = getBaseUrlH5() + "/#/liveDetail";
 

+ 12 - 4
teacher/src/main/java/com/cooleshow/teacher/ui/course/MineLiveCourseFragment.java

@@ -107,10 +107,18 @@ public class MineLiveCourseFragment extends BaseMVPFragment<FragmentMineLiveCour
         mViewBinding.tvOpen.setOnClickListener(this);
         mineLiveCourseAdapter.setOnItemClickListener((adapter, view, position) -> {
             MineLiveCourseListBean.RowsBean item = (MineLiveCourseListBean.RowsBean) adapter.getItem(position);
-            ARouter.getInstance()
-                    .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + item.courseGroupId)
-                    .navigation();
+            if (TextUtils.equals(type, "CANCEL") || TextUtils.equals(type, "OUT_SALE")) {
+                //已取消或者已下架 点击跳转编辑页面
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_EDIT, item.courseGroupId))
+                        .navigation();
+            } else {
+                ARouter.getInstance()
+                        .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + item.courseGroupId)
+                        .navigation();
+            }
         });
 
     }

+ 2 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/course/MineVideoCourseFragment.java

@@ -108,8 +108,8 @@ public class MineVideoCourseFragment extends BaseMVPFragment<FragmentMineVideoCo
         mViewBinding.tvOpen.setOnClickListener(this);
         mineVideoCourseAdapter.setOnItemClickListener((adapter, view, position) -> {
             VideoCourseListBean.RowsBean item = (VideoCourseListBean.RowsBean) adapter.getItem(position);
-            if (TextUtils.equals(auditStatus, "UNPASS")) {
-                //审核失败的跳转编辑页面
+            if (TextUtils.equals(auditStatus, "UNPASS") || TextUtils.equals(auditStatus,"OUT_SALE")) {
+                //审核失败 已下架的跳转编辑页面
                 ARouter.getInstance()
                         .build(RouterPath.WebCenter.ACTIVITY_HTML)
                         .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_VIDEO_EDIT, item.id))

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

@@ -143,10 +143,7 @@ public class MineScoreFragment extends BaseMVPFragment<FragmentMineScoreBinding,
         mineScoreAdapter.setOnItemClickListener((adapter, view, position) -> {
             List<MusicSheetListBean.RowsBean> data = mineScoreAdapter.getData();
             MusicSheetListBean.RowsBean rowsBean = data.get(position);
-            if (TextUtils.equals(rowsBean.auditStatus, MineScoreActivity.TYPE_OUT_SALE)) {
-                return;
-            }
-            if (TextUtils.equals(rowsBean.auditStatus, MineScoreActivity.TYPE_UNPASS)) {
+            if (TextUtils.equals(rowsBean.auditStatus, MineScoreActivity.TYPE_UNPASS)||TextUtils.equals(rowsBean.auditStatus, MineScoreActivity.TYPE_OUT_SALE)) {
                 ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
                         .withString(WebConstants.WEB_URL, String.format(WebConstants.EDIT_SCORE_PAGE, rowsBean.id))
                         .navigation();