|
@@ -11,6 +11,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
|
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
|
|
import com.cooleshow.base.common.WebConstants;
|
|
|
import com.cooleshow.base.constanst.CourseStatusType;
|
|
|
+import com.cooleshow.base.constanst.CourseType;
|
|
|
import com.cooleshow.base.constanst.EVipType;
|
|
|
import com.cooleshow.base.constanst.EventConstants;
|
|
|
import com.cooleshow.base.event.RefreshUserStatusEvent;
|
|
@@ -313,7 +314,7 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
|
|
|
boolean isIng = TextUtils.equals(mRecentCourses.status, CourseStatusType.ING.getId());
|
|
|
mViewBinding.tvEnterRoom.setText(getString(isIng ? R.string.enter_room_tip_str : R.string.will_start_tip_str));
|
|
|
mViewBinding.tvEnterRoom.setTextColor(getContext().getResources().getColor(isIng ? R.color.white : com.cooleshow.base.R.color.color_2dc7aa));
|
|
|
- mViewBinding.tvEnterRoom.setBackgroundResource(isIng ? com.cooleshow.base.R.drawable.shape_2dc7aa_13dp: com.cooleshow.base.R.drawable.shape_13dp_border_2dc7aa_1dp);
|
|
|
+ mViewBinding.tvEnterRoom.setBackgroundResource(isIng ? com.cooleshow.base.R.drawable.shape_2dc7aa_13dp : com.cooleshow.base.R.drawable.shape_13dp_border_2dc7aa_1dp);
|
|
|
mViewBinding.tvLiveTitle.setText(mRecentCourses.courseGroupName);
|
|
|
String currentTime = TimeUtils.date2String(new Date(System.currentTimeMillis()), "yyyy-MM-dd");
|
|
|
String startTime = TimeUtils.date2String(
|
|
@@ -345,7 +346,7 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (TextUtils.equals(bean.courseType, CourseConstants.LIVE_COURSE)) {
|
|
|
+ if (TextUtils.equals(bean.courseType, CourseType.LIVE.getId())) {
|
|
|
ARouter.getInstance()
|
|
|
.build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
.withString(
|
|
@@ -359,8 +360,8 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
|
|
|
.navigation();
|
|
|
return;
|
|
|
}
|
|
|
- if (TextUtils.equals(bean.courseType, CourseConstants.OTHER_COURSE) ||
|
|
|
- TextUtils.equals(bean.courseType, CourseConstants.VIP_COURSE)) {
|
|
|
+ if (TextUtils.equals(bean.courseType, CourseType.PRACTICE.getId()) ||
|
|
|
+ TextUtils.equals(bean.courseType, CourseType.VIP.getId())) {
|
|
|
//VIP课或者趣纠课
|
|
|
ARouter.getInstance().build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
|
.withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
|
|
@@ -370,13 +371,21 @@ public class NewHomeFragmentV2 extends BaseMVPFragment<FgNewHomeV2LayoutBinding,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (TextUtils.equals(bean.courseType, CourseConstants.PIANO_ROOM_COURSE)) {
|
|
|
+ if (TextUtils.equals(bean.courseType, CourseType.PIANO_ROOM_CLASS.getId())) {
|
|
|
//琴房课 跳转详情页
|
|
|
ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
|
|
|
.withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
|
|
|
.navigation();
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ if (TextUtils.equals(bean.courseType, CourseType.GROUP.getId())) {
|
|
|
+ //小组课
|
|
|
+ ARouter.getInstance().build(RouterPath.CourseCenter.GROUP_COURSE_DETAIL)
|
|
|
+ .withString(CourseConstants.COURSE_ID, String.valueOf(bean.courseId))
|
|
|
+ .navigation();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|