测试bug修改

master
wangxi 3 years ago
parent 7694c0d153
commit dca8b1f14a

@ -17,14 +17,13 @@ import VideoJS from '../components/VideoJS';
const { Paragraph } = Typography;
const CardList = () => {
const params = useParams();
const ids = params.msg.split(',');//chapter_id,course_id,subject_id
const [currentLearning, SetCurrentLearning] = useState();
const [courseId, SetCourseId] = useState();
const [courseId, SetCourseId] = useState(ids[1]);
let time=0;
const videoRef = useRef<HTMLVideoElement>(null);
const params = useParams();
const ids = params.msg.split(',');//chapter_id,course_id,subject_id
console.log('courseIdcourseIdcourseIdcourseId',courseId)
/** 获取课节 */
@ -139,7 +138,8 @@ const CardList = () => {
<Col span={6} style={{paddingRight:24}}>
<Menu
mode="inline"
selectedKeys={[ids[1].toString()]}
// selectedKeys={[ids[1].toString()]}
selectedKeys={[courseId.toString()]}
defaultOpenKeys={['sub1']}
style={{ height: '100%', width:'100%' }}
>
@ -196,13 +196,13 @@ const CardList = () => {
</Col>
</Row>
<a onClick={()=>{
const data = videoRef?.current?.currentTime();
<a onClick={()=>{
const data = videoRef?.current?.currentTime();
console.log('getData', data)
}}>videoRef get</a>
}}>videoRef get</a>
<a onClick={()=>{
const data = videoRef?.current?.currentTime(300);
<a onClick={()=>{
const data = videoRef?.current?.currentTime(300);
console.log('setData', data)
}}>videoRef set</a>

@ -260,26 +260,49 @@ const Workplace: FC = () => {
position: 'top-center',
}}
point={{ size: 5 }}
tooltip={{
customContent: (title: any, items: any): any => {
console.log('title',title);
console.log('items',items);
return(
<div style={{ padding: '12px 14px', fontSize: '12px', width: '180px', height: '68px',lineHeight:'20px' }}>
<div>{title}</div>
<div>{items[0]?items[0].data.learning_minutes:''}</div>
</div>
)
}
}}
/>
</div>
</Card>
<Card
bodyStyle={{ padding: 15 }}
bordered={false}
className={styles.studyCard}
title="当前学习"
loading={activitiesLoading}
// cover={<img alt="example" src={lastLearningList?.course_attachment_json?.img} />}
cover={<Image preview={false} width={200} height={150} src={`/dsideal_yy/html/${lastLearningList?.subject_attachment_json?.url}`} fallback="../fallback.svg" />}
{
JSON.stringify(lastLearningList)!=='{}'?
<Card
bodyStyle={{ padding: 15 }}
bordered={false}
className={styles.studyCard}
title="当前学习"
loading={activitiesLoading}
// cover={<img alt="example" src={lastLearningList?.course_attachment_json?.img} />}
cover={<Image preview={false} width={200} height={150} src={`/dsideal_yy/html/${lastLearningList?.subject_attachment_json?.url}`} fallback="../fallback.svg" />}
>
<Descriptions title={lastLearningList?.course_name} layout='horizontal' column={1} >
<Descriptions.Item label="主将人">{lastLearningList?.lecture_teacher}</Descriptions.Item>
<Descriptions.Item label="章节">{lastLearningList?.chapter_name}</Descriptions.Item>
<Descriptions.Item label="主题">{lastLearningList?.subject_name}</Descriptions.Item>
<Descriptions.Item label="时长">{lastLearningList?.total_course_minutes}</Descriptions.Item>
</Descriptions>
<Progress percent={lastLearningList?.learning_progress} />
<Descriptions title={lastLearningList?.course_name} layout='horizontal' column={1} >
<Descriptions.Item label="主将人">{lastLearningList?.lecture_teacher}</Descriptions.Item>
<Descriptions.Item label="章节">{lastLearningList?.chapter_name}</Descriptions.Item>
<Descriptions.Item label="主题">{lastLearningList?.subject_name}</Descriptions.Item>
<Descriptions.Item label="时长">{lastLearningList?.total_course_minutes}</Descriptions.Item>
</Descriptions>
<Progress percent={lastLearningList?.learning_progress} />
</Card>
: <Card
bodyStyle={{ padding: 15 }}
bordered={false}
className={styles.studyCard}
title="当前学习"
><div style={{minHeight:'5rem',textAlign:'right',paddingTop:'1rem',fontSize:'15px'}}></div></Card>
}
</Col>
<Col xl={14} lg={14} md={14} sm={14} xs={14}>
<Card

Loading…
Cancel
Save