公共课直播间页面改造:将直播纪要替换为课程列表
功能更新: - 创建了PublicCourseList组件,与课程直播间保持一致的课程列表样式 - 实现了公共课程数据结构,包含三个单元:AI课、企业高管公开课、营销能力课 - 添加了generatePublicCourseLiveList函数,自动将课程分类到对应单元 - 基于关键词智能分类课程(AI/AIGC、企业/管理、营销/运营等) - 垂直方向课程保留在原未分类单元中,不显示在公共课列表 UI优化: - 课程列表支持折叠展开,显示单元完成进度 - 时间轴样式显示课程进度状态 - 支持课程选择联动视频播放器 - 响应式布局,与课程直播间保持一致的交互体验 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
.public-courses-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.public-courses-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
import { useState } from "react";
|
||||
import CoursesVideoPlayer from "@/components/CoursesVideoPlayer";
|
||||
import LiveSummary from "@/components/LiveSummary";
|
||||
import PublicCourseList from "@/components/PublicCourseList";
|
||||
import { mockData } from "@/data/mockData";
|
||||
import "./index.css";
|
||||
|
||||
const PublicCourses = () => {
|
||||
const [selectedCourse, setSelectedCourse] = useState(null);
|
||||
|
||||
const handleCourseClick = (course) => {
|
||||
setSelectedCourse(course);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="public-courses-page">
|
||||
<CoursesVideoPlayer teacherData={mockData.teacherData} />
|
||||
<LiveSummary />
|
||||
<div className="public-courses-content">
|
||||
<CoursesVideoPlayer
|
||||
selectedCourse={selectedCourse}
|
||||
teacherData={mockData.teacherData}
|
||||
unitPosters={mockData.unitPosters}
|
||||
/>
|
||||
<PublicCourseList onCourseClick={handleCourseClick} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user