Commit 5f819711 by yuananting

Merge branch 'feature/wufan/20210715/combine-chapter' of…

Merge branch 'feature/wufan/20210715/combine-chapter' of ssh://xmgit.ixm5.cn:10022/xiaomai-cloud-class/xiaomai-cloud-class-web into feature/wufan/20210715/combine-chapter
parents 29d3db8f c5adf063
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-16 15:52:42 * @LastEditTime: 2021-07-18 11:54:53
* @Description: 线上课新增/编辑页 * @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -45,7 +45,14 @@ const defaultScheduleMedia = [ ...@@ -45,7 +45,14 @@ const defaultScheduleMedia = [
] ]
const whetherVisitorsJoin = 'NO' const whetherVisitorsJoin = 'NO'
let cutFlag = false let cutFlag = false;
const SUPPORT_WORD_PDF = [
"application/msword",
"application/wps-writer",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/pdf",
"application/wps-office.pdf"
];
class AddVideoCourse extends React.Component { class AddVideoCourse extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -317,9 +324,10 @@ class AddVideoCourse extends React.Component { ...@@ -317,9 +324,10 @@ class AddVideoCourse extends React.Component {
return; return;
} }
selectedFileList.map((file,index) => { selectedFileList.map((file,index) => {
console.log('')
const { ossUrl, resourceId, folderName, folderFormat, folderSize } = file; const { ossUrl, resourceId, folderName, folderFormat, folderSize } = file;
const _mediaName =folderName.replace(`.${_.last(folderName.split('.')).toLowerCase()}`,'') const _mediaName =folderName.replace(`.${_.last(folderName.split('.')).toLowerCase()}`,'')
console.log('folderFormat',folderFormat);
if(folderFormat === 'MP4' || folderFormat === 'video/mp4'){ if(folderFormat === 'MP4' || folderFormat === 'video/mp4'){
const videoDom = document.createElement('video') const videoDom = document.createElement('video')
videoDom.src = ossUrl videoDom.src = ossUrl
...@@ -338,7 +346,7 @@ class AddVideoCourse extends React.Component { ...@@ -338,7 +346,7 @@ class AddVideoCourse extends React.Component {
courseChapterList: _courseChapterList courseChapterList: _courseChapterList
}) })
} }
}else if( folderFormat==="WORD" || folderFormat==="PDF"){ }else if( folderFormat==="WORD" || folderFormat==="PDF" || SUPPORT_WORD_PDF.indexOf(folderFormat)>-1){
const suffix = _.last(folderName.split('.')).toUpperCase(); const suffix = _.last(folderName.split('.')).toUpperCase();
_courseChapterList.push({ _courseChapterList.push({
mediaContent: resourceId, mediaContent: resourceId,
......
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