Commit 6a491b00 by zhangleyuan

feat:调整视频课的页面

parent 319beb76
......@@ -103,16 +103,48 @@ class AddVideoCourse extends React.Component {
}).then((res) => {
const { result = {} } = res || {};
const {
coverId,
coverUrl,
videoType,
videoDuration,
videoName,
scheduleMedia,
// coverId,
// coverUrl,
// videoType,
// videoDuration,
// videoName,
// scheduleMedia,
courseName,
scheduleVideoId,
scheduleVideoUrl,
// scheduleVideoId,
// scheduleVideoUrl,
shelfState,
whetherVisitorsJoin,
courseMediaVOS
} = result;
let coverId;
let coverUrl;
let videoType;
let videoDuration;
let videoName;
let scheduleMedia = [];
let scheduleVideoId;
let scheduleVideoUrl;
courseMediaVOS.map((item) => {
switch (item.contentType){
case "COVER":
coverId = item.mediaContent;
coverUrl = item.mediaUrl;
break;
case "SCHEDULE":
videoDuration = item.videoDuration;
videoName = item.mediaName;
scheduleVideoId = item.mediaContent;
scheduleVideoUrl = item.mediaUrl;
videoType = item.mediaType;
break;
case "INTRO":
scheduleMedia = [...scheduleMedia,item]
break;
default:
break;
}
return item;
})
this.setState({
coverId,
coverUrl,
......@@ -123,6 +155,8 @@ class AddVideoCourse extends React.Component {
courseName,
scheduleVideoId,
scheduleVideoUrl,
shelfState,
whetherVisitorsJoin
});
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment