Selaa lähdekoodia

增加直播课入口

Pq 3 vuotta sitten
vanhempi
commit
39476a36ff

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

@@ -73,7 +73,7 @@ import java.util.TreeMap;
  * 类说明:
  */
 public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter> implements HomeContract.HomeView, View.OnClickListener {
-    private boolean isShowFlashPage =false;
+    private boolean isShowFlashPage = false;
     private String mCurrentShowNoticeId;
 
     @Override
@@ -390,7 +390,7 @@ public class HomeFragment extends BaseMVPFragment<FragmentHomeLayoutBinding, Hom
             case LIVE_COURSE:
                 ARouter.getInstance()
                         .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                        .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + bean.courseGroupId + "&classId=" + bean.courseId)
+                        .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, bean.courseGroupId, bean.courseId))
                         .navigation();
                 break;
             case OTHER_COURSE:

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/course/LiveCourseFragment.java

@@ -149,7 +149,7 @@ public class LiveCourseFragment extends BaseMVPFragment<FragmentLiveCourseLayout
             LiveCourseListBean.RowsBean item = (LiveCourseListBean.RowsBean) adapter.getItem(position);
             ARouter.getInstance()
                     .build(RouterPath.WebCenter.ACTIVITY_HTML)
-                    .withString(WebConstants.WEB_URL, WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + item.courseGroupId+ "&classId=" + item.courseId)
+                    .withString(WebConstants.WEB_URL, String.format(WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE, item.courseGroupId, item.courseId))
                     .navigation();
         });
         buildDefaultCourseStatusFilterList();

+ 6 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt

@@ -80,7 +80,7 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         mViewBinding.tvNickname.text =
             UserHelper.getTeacherName(teacherUserInfo.username, teacherUserInfo.userId);
         //星级
-        if (teacherUserInfo.starGrade.toFloat() > 0 ) {
+        if (teacherUserInfo.starGrade.toFloat() > 0) {
             mViewBinding.ratingBar.visibility = View.VISIBLE
             mViewBinding.tvNoScore.visibility = View.GONE
             mViewBinding.ratingBar.rating = teacherUserInfo.starGrade.toFloat()
@@ -372,7 +372,11 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
                 .build(RouterPath.WebCenter.ACTIVITY_HTML)
                 .withString(
                     WebConstants.WEB_URL,
-                    WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + bean.courseGroupId + "&classId=" + bean.courseId
+                    String.format(
+                        WebConstants.TEACHER_LIVE_DETAIL_NORMAL_COURSE,
+                        bean.courseGroupId,
+                        bean.courseId
+                    )
                 )
                 .navigation()
             CourseConstants.OTHER_COURSE ->                 //陪练课