feat: 作业页面单元分类导航和样式优化

- 为复合能力课和垂直能力课添加单元分组结构
- 实现单元导航栏和课程筛选功能
- 优化导航栏样式,采用胶囊式设计
- 调整页面布局和间距,提升视觉体验
- 修复营销能力课日历事件显示问题
- 修复1v1规划时间为14:00-16:00
- 修复作业页面iframe返回后滚动失效问题

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
KQL
2025-09-08 03:53:49 +08:00
parent 27f2339c9e
commit d1f6f2ee0d
29 changed files with 16359 additions and 187 deletions

View File

@@ -117,10 +117,25 @@
/* 刘杰导师头像特殊调整 */
.teacher-avatar.teacher-liujie {
img {
width: 400%; /* 大幅放大 */
height: 400%;
width: 200%; /* 大幅放大 */
height: 200%;
object-position: center 30%; /* 调整位置 */
top: -100%; /* 继续大幅上移 */
top: -50%; /* 继续大幅上移 */
}
}
/* 李奇导师头像特殊调整 - 居中显示 */
.teacher-avatar.teacher-liqi {
overflow: hidden !important;
img {
width: 140% !important;
height: 140% !important;
object-fit: cover !important;
object-position: center 35% !important;
position: absolute !important;
top: 55% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
}
}

View File

@@ -2,7 +2,7 @@ import { Avatar, Tooltip } from "@arco-design/web-react";
import Locked from "@/components/Locked";
import "./index.css";
export default ({ className = "", isLock = false, selectedCourse, teacherData, unitPosters }) => {
export default ({ className = "", isLock = false, selectedCourse, teacherData, unitPosters, isPublicCourse = false }) => {
const handleClickBtn = (item) => {
console.log(item);
};
@@ -101,7 +101,7 @@ export default ({ className = "", isLock = false, selectedCourse, teacherData, u
/* 选中课程时显示模糊的海报图和锁定状态 */
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
<img
src={unitPosters?.[unitName] || unitPosters?.["岗位体系认知"]}
src={unitPosters?.[unitName] || unitPosters?.["终生学习系统课"]}
alt={unitName}
style={{
width: '100%',
@@ -167,7 +167,7 @@ export default ({ className = "", isLock = false, selectedCourse, teacherData, u
<div className="courses-video-player-audience-info">
<div className="avatar-wrapper">
<Avatar
className={`teacher-avatar ${needsAdjustment ? 'avatar-adjust' : ''} ${currentTeacher?.name === '刘杰' ? 'teacher-liujie' : ''} ${currentTeacher?.name === '孙应战' ? 'teacher-sunyingzhan' : ''} ${isLock ? 'teacher-strategy' : ''}`}
className={`teacher-avatar ${needsAdjustment ? 'avatar-adjust' : ''} ${currentTeacher?.name === '刘杰' ? 'teacher-liujie' : ''} ${currentTeacher?.name === '李奇' ? 'teacher-liqi' : ''} ${currentTeacher?.name === '孙应战' ? 'teacher-sunyingzhan' : ''} ${isLock ? 'teacher-strategy' : ''}`}
style={{ backgroundColor: getAvatarBackground(currentTeacher?.name) }}
>
<img
@@ -182,7 +182,12 @@ export default ({ className = "", isLock = false, selectedCourse, teacherData, u
<div className="living-data">
<div className="living-data-item">
<span>开始</span>
<span>{formatDateTime(displayCourse?.date || courseDate)} - 14:00</span>
<span>{formatDateTime(displayCourse?.date || courseDate)} - {
isLock ? '14:00' : // 定制求职策略页面14:00
isPublicCourse && (displayCourse?.unitName === '营销能力课' || unitName === '营销能力课') ? '20:00' : // 营销能力课20:00
isPublicCourse ? '15:00' : // 其他公共课15:00
'20:00' // 课程直播间20:00
}</span>
</div>
<div className="living-data-item">
<span>时长</span>
@@ -190,11 +195,13 @@ export default ({ className = "", isLock = false, selectedCourse, teacherData, u
</div>
<div className="living-data-item">
<span>观看</span>
<span>{isLock ? '1人' : `${
<span>{
isLock ? '1人' : // 定制求职策略页面1人
isPublicCourse ? `${1900 + Math.floor(Math.random() * 101)}` : // 公共课1900-2000人
selectedCourse?.courseType === 'vertical'
? 50 + Math.floor(Math.random() * 11) // 垂直课50-60人
: 180 + Math.floor(Math.random() * 21) // 复合课180-200人
}`}</span>
? `${50 + Math.floor(Math.random() * 11)}` // 垂直课50-60人
: `${180 + Math.floor(Math.random() * 21)}` // 复合课180-200人
}</span>
</div>
</div>
</div>

View File

@@ -64,6 +64,24 @@
font-size: 12px;
color: #86909c;
}
.graduate-badge {
display: inline-block;
padding: 3px 10px;
background: transparent;
color: #667eea;
font-size: 12px;
font-weight: 600;
border-radius: 14px;
margin-top: 4px;
border: 2px solid #667eea;
letter-spacing: 0.5px;
transition: all 0.3s ease;
}
.graduate-badge:hover {
background: rgba(102, 126, 234, 0.08);
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}
}
}
.visitor-count {

View File

@@ -41,7 +41,7 @@ const Sidebar = ({ isCollapsed, setIsCollapsed }) => {
{isCollapsed && (
<div className="user-info">
<span className="user-name">{studentInfo?.realName}</span>
<span className="user-id">学号{studentInfo?.id}</span>
<span className="graduate-badge">毕业生</span>
</div>
)}
</div>