Commit 6a491b00 by zhangleyuan

feat:调整视频课的页面

parent 319beb76
...@@ -103,16 +103,48 @@ class AddVideoCourse extends React.Component { ...@@ -103,16 +103,48 @@ class AddVideoCourse extends React.Component {
}).then((res) => { }).then((res) => {
const { result = {} } = res || {}; const { result = {} } = res || {};
const { const {
coverId, // coverId,
coverUrl, // coverUrl,
videoType, // videoType,
videoDuration, // videoDuration,
videoName, // videoName,
scheduleMedia, // scheduleMedia,
courseName, courseName,
scheduleVideoId, // scheduleVideoId,
scheduleVideoUrl, // scheduleVideoUrl,
shelfState,
whetherVisitorsJoin,
courseMediaVOS
} = result; } = 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({ this.setState({
coverId, coverId,
coverUrl, coverUrl,
...@@ -123,6 +155,8 @@ class AddVideoCourse extends React.Component { ...@@ -123,6 +155,8 @@ class AddVideoCourse extends React.Component {
courseName, courseName,
scheduleVideoId, scheduleVideoId,
scheduleVideoUrl, 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