|
@@ -106,7 +106,7 @@ class CourseTableFragment :
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- adapter.setOnItemChildClickListener(OnItemChildClickListener { adapter, view, position ->
|
|
|
+ adapter.setOnItemChildClickListener { adapter, view, position ->
|
|
|
var data: CourseTableDataBean.StudentListBean =
|
|
|
adapter.data[position] as CourseTableDataBean.StudentListBean;
|
|
|
if (view.id == R.id.tv_course_status_bt) {
|
|
@@ -114,50 +114,56 @@ class CourseTableFragment :
|
|
|
if (TextUtils.equals(data.status, CourseTableListAdapter.NOT_START)) {
|
|
|
var targetDate: Date = TimeUtils.getDate(data.startTime)
|
|
|
showCourseTimeSelectView(targetDate, data.courseId);
|
|
|
+ } else {
|
|
|
+ gotoCourseDetail(position);
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
|
|
|
- adapter.setOnItemClickListener(OnItemClickListener() { adapter, view, position ->
|
|
|
- var data: CourseTableDataBean.StudentListBean =
|
|
|
- adapter.data[position] as CourseTableDataBean.StudentListBean;
|
|
|
- if (TextUtils.equals(CourseTableListAdapter.OTHER_COURSE, data?.courseType)) {
|
|
|
- //陪练课 跳转详情页
|
|
|
- ARouter.getInstance()
|
|
|
- .build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
|
- .withString(SparringCourseDetailActivity.COURSE_ID, data.courseId)
|
|
|
- .withString(
|
|
|
- SparringCourseDetailActivity.COURSE_GROUP_ID,
|
|
|
- data.courseGoupId
|
|
|
- )
|
|
|
- .withString(SparringCourseDetailActivity.STUDENT_ID, data.userId)
|
|
|
- .navigation()
|
|
|
- } else if (TextUtils.equals(
|
|
|
- CourseTableListAdapter.PIANO_ROOM_COURSE,
|
|
|
- data?.courseType
|
|
|
- )
|
|
|
- ) {
|
|
|
- //琴房课 跳转详情页
|
|
|
- ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
|
|
|
- .withString("course_id", data.courseId)
|
|
|
- .navigation()
|
|
|
- } else {
|
|
|
- //直播课
|
|
|
- ARouter.getInstance()
|
|
|
- .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
- .withString(
|
|
|
- WebConstants.WEB_URL,
|
|
|
- WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + data.courseGoupId
|
|
|
- )
|
|
|
- .navigation()
|
|
|
- }
|
|
|
- })
|
|
|
+ adapter.setOnItemClickListener { adapter, view, position ->
|
|
|
+ gotoCourseDetail(position);
|
|
|
+ }
|
|
|
mViewBinding.refreshLayout.setOnRefreshListener {
|
|
|
queryCurrentDataCourse()
|
|
|
}
|
|
|
mViewBinding.refreshLayout.isEnabled = false
|
|
|
}
|
|
|
|
|
|
+ private fun gotoCourseDetail(position: Int) {
|
|
|
+ var data: CourseTableDataBean.StudentListBean =
|
|
|
+ adapter.data[position] as CourseTableDataBean.StudentListBean;
|
|
|
+ if (TextUtils.equals(CourseTableListAdapter.OTHER_COURSE, data?.courseType)) {
|
|
|
+ //陪练课 跳转详情页
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.CourseCenter.SPARRING_COURSE_DETAIL)
|
|
|
+ .withString(SparringCourseDetailActivity.COURSE_ID, data.courseId)
|
|
|
+ .withString(
|
|
|
+ SparringCourseDetailActivity.COURSE_GROUP_ID,
|
|
|
+ data.courseGoupId
|
|
|
+ )
|
|
|
+ .withString(SparringCourseDetailActivity.STUDENT_ID, data.userId)
|
|
|
+ .navigation()
|
|
|
+ } else if (TextUtils.equals(
|
|
|
+ CourseTableListAdapter.PIANO_ROOM_COURSE,
|
|
|
+ data?.courseType
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ //琴房课 跳转详情页
|
|
|
+ ARouter.getInstance().build(RouterPath.CourseCenter.PIANO_ROOM_COURSE_DETAIL)
|
|
|
+ .withString("course_id", data.courseId)
|
|
|
+ .navigation()
|
|
|
+ } else {
|
|
|
+ //直播课
|
|
|
+ ARouter.getInstance()
|
|
|
+ .build(RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
+ .withString(
|
|
|
+ WebConstants.WEB_URL,
|
|
|
+ WebConstants.TEACHER_LIVE_DETAIL + "?groupId=" + data.courseGoupId
|
|
|
+ )
|
|
|
+ .navigation()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
override fun initData() {
|
|
|
lazyLoad()
|
|
|
}
|