|
@@ -61,25 +61,6 @@ export class PageLessonComponent {
|
|
|
|
|
|
groupedCourseList: any[] = [];
|
|
|
|
|
|
- // 在获取课程数据后,将课程按照每4个为一组进行分组
|
|
|
- // groupCoursesByCategory() {
|
|
|
- // const coursesPerCategory = 4;
|
|
|
- // const totalCourses = this.courseList.length;
|
|
|
- // const totalCategories = Math.ceil(totalCourses / coursesPerCategory);
|
|
|
-
|
|
|
- // for (let i = 0; i < totalCategories; i++) {
|
|
|
- // const startIndex = i * coursesPerCategory;
|
|
|
- // const endIndex = startIndex + coursesPerCategory;
|
|
|
- // const categoryCourses = this.courseList.slice(startIndex, endIndex);
|
|
|
- // this.groupedCourseList.push(categoryCourses);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ngOnInit() {
|
|
|
- // this.groupCoursesByCategory();
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
goLessonDetail(lesson: any) {
|
|
|
this.router.navigate(["/lesson/lesson/detail"], { queryParams: lesson })
|
|
|
}
|