公共课直播间页面改造:将直播纪要替换为课程列表
功能更新: - 创建了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:
167
src/components/PublicCourseList/index.css
Normal file
167
src/components/PublicCourseList/index.css
Normal file
@@ -0,0 +1,167 @@
|
||||
.public-course-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.course-list-header {
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e5e6eb;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.course-list-header h3 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #1d2129;
|
||||
}
|
||||
|
||||
.course-list-collapse {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.course-list-collapse .arco-collapse-item {
|
||||
margin-bottom: 8px;
|
||||
border: 1px solid #e5e6eb;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.course-list-collapse .arco-collapse-item-header {
|
||||
background: #f7f8fa;
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.unit-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.unit-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #1d2129;
|
||||
}
|
||||
|
||||
.unit-course-count {
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.course-timeline {
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.timeline-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #e5e6eb;
|
||||
}
|
||||
|
||||
.timeline-dot.completed {
|
||||
background: #00b42a;
|
||||
}
|
||||
|
||||
.timeline-dot.current {
|
||||
background: #ff7d00;
|
||||
box-shadow: 0 0 0 4px rgba(255, 125, 0, 0.2);
|
||||
}
|
||||
|
||||
.timeline-dot.upcoming {
|
||||
background: #165dff;
|
||||
}
|
||||
|
||||
.course-item {
|
||||
padding: 12px;
|
||||
background: #f7f8fa;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.course-item:hover {
|
||||
background: #e8f3ff;
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.course-item.selected {
|
||||
background: #e8f3ff;
|
||||
border-left: 3px solid #165dff;
|
||||
}
|
||||
|
||||
.course-item.completed {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.course-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.course-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #1d2129;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.course-meta {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
}
|
||||
|
||||
.course-status {
|
||||
padding: 2px 8px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.course-status.completed {
|
||||
background: #e8ffea;
|
||||
color: #00b42a;
|
||||
}
|
||||
|
||||
.course-status.current {
|
||||
background: #fff7e8;
|
||||
color: #ff7d00;
|
||||
}
|
||||
|
||||
.course-status.upcoming {
|
||||
background: #e8f3ff;
|
||||
color: #165dff;
|
||||
}
|
||||
|
||||
/* 自定义滚动条 */
|
||||
.course-list-collapse::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.course-list-collapse::-webkit-scrollbar-track {
|
||||
background: #f2f3f5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.course-list-collapse::-webkit-scrollbar-thumb {
|
||||
background: #c9cdd4;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.course-list-collapse::-webkit-scrollbar-thumb:hover {
|
||||
background: #86909c;
|
||||
}
|
||||
Reference in New Issue
Block a user