Commit a4f5d121 by yuananting

fix:解决合并代码的冲突

parents da9c44e2 b998aab6
......@@ -33,6 +33,7 @@
}
}
.operate{
display:inline-block;
margin-top:24px;
.btn {
padding:5px 12px;
......
......@@ -44,6 +44,10 @@ const FileVerifyMap = {
type: "word",
maxSize: 100
},
"application/wps-writer": {
type: "word",
maxSize: 100,
},
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
type: "word",
maxSize: 100
......@@ -133,13 +137,13 @@ const FileTypeIcon = {
PPTX: "https://image.xiaomaiketang.com/xm/847pFAdYGW.png",
PDF: "https://image.xiaomaiketang.com/xm/rrEJMNkhTG.png",
MP3: "https://image.xiaomaiketang.com/xm/ykjnSWDyQ6.png",
MP4: "https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png",
MP4: "https://image.xiaomaiketang.com/xm/yK3ASiS8ch.png",
JPG: "https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png",
JPEG: "https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png",
PNG: "https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png",
GIF: "https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png",
BMP: "https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png",
VIDEO: "https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png"
VIDEO: 'https://image.xiaomaiketang.com/xm/yK3ASiS8ch.png'
};
const UploadIcon = "https://image.xiaomaiketang.com/xm/4DXNrZWWsd.png";
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-12-01 17:21:21
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-22 14:56:34
* @LastEditTime: 2021-07-09 15:33:33
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -62,6 +62,9 @@ export function saveYoZoFileVersionId(params: object) {
export function yoZoUpload(ossUrl:String,appId:String,uploadSign:String){
return axios.post(`https://dmc.yozocloud.cn/api/file/http?fileUrl=${ossUrl}&appId=${appId}&sign=${uploadSign}`)
}
export function saveFileVersionIdByCourseChapter(params: object) {
return Service.Hades('public/hades/saveFileVersionIdByCourseChapter', params);
}
export const getOssClient = (
data: object,
instId: string,
......
......@@ -2,12 +2,12 @@
* @Author: wufan
* @Date: 2020-12-01 17:20:49
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-22 14:57:01
* @LastEditTime: 2021-07-09 15:33:59
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import { getUserStore, getUserPermission ,logout,getStoreUser,sendBizAuthCode,editUserPhone,checkBizAuthCode,sendNewPhoneAuthCode,sendLoginAuthCode,login,getLastedVersion, getEnterpriseUser,getWXWorkLoginNoCheck,getLesseeVersionMsg,getYoZoSign,saveYoZoFileVersionId,yoZoUpload} from '@/data-source/base/request-apis';
import { getUserStore, getUserPermission ,logout,getStoreUser,sendBizAuthCode,editUserPhone,checkBizAuthCode,sendNewPhoneAuthCode,sendLoginAuthCode,login,getLastedVersion, getEnterpriseUser,getWXWorkLoginNoCheck,getLesseeVersionMsg,getYoZoSign,saveYoZoFileVersionId,yoZoUpload,saveFileVersionIdByCourseChapter} from '@/data-source/base/request-apis';
export default class StoreService {
// 获取员工列表
......@@ -73,4 +73,7 @@ export default class StoreService {
static yoZoUpload(ossUrl:String,appId:String,uploadSign:String){
return yoZoUpload(ossUrl,appId,uploadSign);
}
static saveFileVersionIdByCourseChapter(params: any){
return saveFileVersionIdByCourseChapter(params);
}
}
\ No newline at end of file
/*
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-04 17:16:30
* @LastEditors: yuananting
* @LastEditTime: 2021-07-15 11:48:58
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -77,6 +77,10 @@ const FILR_VERIFY_MAP = {
type: "word",
maxSize: 100
},
"application/wps-writer": {
type: "word",
maxSize: 100,
},
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
type: "word",
maxSize: 100
......
......@@ -149,7 +149,7 @@ class AddLiveBasic extends React.Component {
<span className={`default-btn ${isDefaultCover ? 'disabled' : ''}`} onClick={this.handleResetCoverUrl}>
使用默认图
</span>
<div className='tips'>建议尺寸1280*720px,图片支持jpg、jpeg、png格式</div>
<div className='tips'>建议尺寸1280*720px或16:9。封面图最大5M,支持jpg、jpeg和png</div>
</div>
<div className='img-content'>
{isDefaultCover && <span className='tag'>默认图</span>}
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-07-23 14:54:16
* @LastEditors: yuananting
* @LastEditTime: 2021-07-12 11:39:35
* @LastEditTime: 2021-07-15 14:02:37
* @Description: 大班直播课预览弹窗
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -166,12 +166,7 @@ class PreviewCourseModal extends React.Component {
<div className='container__header'>
<Choose>
<When condition={type === 'videoCourse'}>
<video
controls
src={courseChapterList.length && courseChapterList[0].mediaUrl || scheduleVideoUrl }
poster={coverUrl ? coverUrl : `https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png`}
className='course-url'
/>
<img src={coverUrl ? coverUrl : `https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png`} className='course-cover' alt='' />
</When>
<Otherwise>
<img src={coverUrl} className='course-cover' alt='' />
......
......@@ -116,7 +116,7 @@ class ShareLiveModal extends React.Component {
}
break;
case 'videoClass': // 视频课
coverImgSrc = coverUrl || 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png';
coverImgSrc = coverUrl || 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png';
break;
case 'graphicsClass': // 图文课
coverImgSrc = coverUrl || 'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png';
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditTime: 2021-07-15 13:57:59
* @LastEditTime: 2021-07-15 14:02:45
* @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -758,7 +758,7 @@ class AddOfflineCourse extends React.Component {
<span className={`default-btn ${isDefaultCover ? 'disabled' : ''}`} onClick={this.handleResetCoverUrl}>
使用默认图
</span>
<div className='tips'>建议尺寸1280*720px,图片支持jpg、jpeg、png格式</div>
<div className='tips'>建议尺寸1280*720px或16:9。封面图最大5M,支持jpg、jpeg和png</div>
</div>
<div className='img-content'>
{isDefaultCover && <span className='tag'>默认图</span>}
......
......@@ -2,13 +2,13 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditTime: 2021-07-15 14:00:19
* @LastEditTime: 2021-07-15 14:10:09
* @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import React from 'react'
import { Button, Input, message, Modal, Cascader, Tooltip, Form, Popconfirm } from 'antd'
import { Button, Input, message, Modal, Cascader, Tooltip, Form, Popconfirm,Menu,Dropdown} from 'antd'
import { FileTypeIcon, FileVerifyMap } from '@/common/constants/academic/lessonEnum'
import ShowTips from '@/components/ShowTips'
import Breadcrumbs from '@/components/Breadcrumbs'
......@@ -85,9 +85,10 @@ class AddVideoCourse extends React.Component {
introduce: '',
courseChapterList:[
], // 课节列表
videoType: "MP4",
// videoType: "MP4",
mediaNameAlias: '', // 任一视频重命名的名称(气泡框)
popConfirmVisible: false
selectTypeList:['MP4'],
accept:'video/mp4'
}
}
......@@ -137,8 +138,8 @@ class AddVideoCourse extends React.Component {
const { courseName, shelfState, whetherVisitorsJoin, courseMediaVOS, categoryOneName, categoryTwoName, categoryId, courseChapterVOList =[] } = result
let coverId
let coverUrl
let videoDuration
let videoName
// let videoDuration
// let videoName
let scheduleMedia = []
let scheduleVideoUrl
let hasIntro
......@@ -176,8 +177,8 @@ class AddVideoCourse extends React.Component {
loadintroduce: !hasIntro,
coverId,
coverUrl,
videoName,
videoDuration,
// videoName,
// videoDuration,
scheduleMedia,
courseName,
scheduleVideoUrl,
......@@ -203,10 +204,8 @@ class AddVideoCourse extends React.Component {
}
handleGoBack = () => {
const { coverId, videoName, videoDuration, courseName, scheduleMedia, courseChapterList, categoryId, shelfState, whetherVisitorsJoin } = this.state
const { coverId,courseName, scheduleMedia, courseChapterList, categoryId, shelfState, whetherVisitorsJoin } = this.state
if (
videoName ||
videoDuration ||
!courseChapterList.length ||
!_.isEqual(scheduleMedia, defaultScheduleMedia) ||
categoryId ||
......@@ -275,13 +274,11 @@ class AddVideoCourse extends React.Component {
// 显示预览弹窗
handleShowPreviewModal = () => {
const { coverUrl, scheduleVideoUrl, courseName, scheduleMedia, videoDuration, introduce, courseChapterList, categoryName } = this.state
const { coverUrl, scheduleVideoUrl, courseName, scheduleMedia,introduce, courseChapterList, categoryName } = this.state
const courseBasinInfo = {
coverUrl,
scheduleVideoUrl,
courseName,
videoDuration
}
const courseIntroInfo = {
liveCourseMediaRequests: scheduleMedia,
......@@ -320,8 +317,10 @@ class AddVideoCourse extends React.Component {
return;
}
selectedFileList.map((file,index) => {
console.log('')
const { ossUrl, resourceId, folderName, folderFormat, folderSize } = file;
console.log('folderFormat',folderFormat);
if(folderFormat === 'MP4'){
const videoDom = document.createElement('video')
videoDom.src = ossUrl
videoDom.onloadedmetadata = () => {
......@@ -335,14 +334,32 @@ class AddVideoCourse extends React.Component {
mediaUrl: ossUrl,
sort: _courseChapterList.length
})
this.setState({
size: folderSize,
videoName: folderName,
videoType: folderFormat,
courseChapterList: _courseChapterList
})
}
}else{
let _mediaName = folderName;
if(folderFormat === 'PDF'){
_mediaName = folderName.replace('.pdf','')
}else{
_mediaName = folderName.replace('.doc','') && folderName.replace('.docx','')
}
const suffix = _.last(folderName.split('.')).toUpperCase();
_courseChapterList.push({
mediaContent: resourceId,
contentType: 'SCHEDULE',
mediaType: suffix,
mediaName: _mediaName,
resourceId,
mediaUrl: ossUrl,
sort: _courseChapterList.length
})
this.setState({
courseChapterList: _courseChapterList
})
}
})
}
......@@ -396,8 +413,8 @@ class AddVideoCourse extends React.Component {
id,
coverId,
pageType,
videoName,
videoDuration,
// videoName,
// videoDuration,
courseName,
scheduleMedia,
categoryId,
......@@ -409,8 +426,8 @@ class AddVideoCourse extends React.Component {
} = this.state
const commonParams = {
videoName,
videoDuration,
// videoName,
videoDuration:0, //后端的必要参数,不能传空
scheduleMedia: scheduleMedia.filter((item) => !!item.mediaContent),
categoryId,
courseName,
......@@ -463,7 +480,7 @@ class AddVideoCourse extends React.Component {
return false
}
if (!courseChapterList.length) {
message.warning('请上传视频')
message.warning('请上传课节')
resolve(false)
return false
}
......@@ -535,7 +552,6 @@ class AddVideoCourse extends React.Component {
chapterNameValidateStatus: '',
        chapterNameHelpMsg: '',
mediaNameAlias: '',
popConfirmVisible: false
})
});
......@@ -629,7 +645,40 @@ class AddVideoCourse extends React.Component {
courseChapterList: _courseChapterList
})
}
renderTypemenu =()=>{
return <Menu>
<Menu.Item>
<span onClick={()=>{this.selectFileType("VIDEO")}}>
视频文件
</span>
</Menu.Item>
<Menu.Item>
<span onClick={()=>{this.selectFileType("WORD_PDF")}}>
资料文件
</span>
</Menu.Item>
</Menu>
}
selectFileType = (type) =>{
const { courseChapterList } = this.state;
if(courseChapterList.length >= 20) {
message.warning(`最多只能上传20个文件`);
return;
}
if(type==="VIDEO"){
this.setState({
showSelectFileModal: true,
selectTypeList:['MP4'],
accept:'video/mp4'
})
}else{
this.setState({
showSelectFileModal: true,
selectTypeList:['DOC','DOCX','PDF'],
accept:'.doc,.docx,.pdf'
})
}
}
render() {
const {
pageType,
......@@ -638,7 +687,7 @@ class AddVideoCourse extends React.Component {
scheduleMedia,
showSelectFileModal,
diskList,
videoType,
// videoType,
shelfState,
categoryName,
courseCatalogList,
......@@ -652,11 +701,10 @@ class AddVideoCourse extends React.Component {
id,
courseChapterList,
imageFile,
popConfirmVisible
selectTypeList,
accept
} = this.state
const courseWareIcon = FileVerifyMap[videoType] ? FileTypeIcon[FileVerifyMap[videoType].type] : FileTypeIcon[videoType]
const defaultCover = 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png';
const defaultCover = 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png';
const isDefaultCover = coverUrl === defaultCover || coverUrl == null;
return (
......@@ -684,11 +732,11 @@ class AddVideoCourse extends React.Component {
<div className='upload-video mt16'>
<div className='content flex'>
<span className='label required'>视频上传</span>
<span className='label required'>上传课节</span>
</div>
<div className='sub-content'>
<div className="btn-wrap">
<Button
{/* <Button
onClick={() => {
if(courseChapterList.length >= 20) {
message.warning(`最多只能上传20个文件`);
......@@ -697,10 +745,20 @@ class AddVideoCourse extends React.Component {
this.setState({
showSelectFileModal: true
})
}}>添加视频</Button>
}}>添加视频</Button> */}
<div className='select-file'>
<Dropdown overlay={this.renderTypemenu()}>
<Button>选择文件</Button>
</Dropdown>
</div>
<div className='course-ware--empty'>从资料云盘中选择视频</div>
</div>
<div className='tips'>视频数量限制20个,每个视频文件大小不超过2G</div>
<div className='tips'>
课节数量限制20个,文件规格说明
<Tooltip title="视频支持mp4格式,大小不超过2G;文件支持PDF、docx、doc格式,大小不超过100M">
<i className='icon iconfont' style={{ cursor: 'pointer', color: '#bfbfbf', fontSize: '14px'}}> &#xe61d;</i>
</Tooltip>
</div>
</div>
</div>
......@@ -712,7 +770,7 @@ class AddVideoCourse extends React.Component {
_.map(courseChapterList,(item,index) => {
return <div className='course-ware' key={index}>
<div className="course-ware__index">{index < 9 ? `0${index + 1 } ` : `${index + 1 } `}</div>
<img className='course-ware__img' src={courseWareIcon} alt='' />
<img className='course-ware__img' src={FileTypeIcon[item.mediaType]} alt='' />
<div className='course-ware__name'>{item.mediaName && item.mediaName.length > 24 ? <Tooltip title={item.mediaName}>{item.mediaName}</Tooltip>:item.mediaName}</div>
<div className="course-chapter__opt" id={item.resourceId}>
<div className={`up ${Number(index) === 0 ? 'disabled':''}`} onClick={()=> this.handleChangeIndex(true,item.sort,item.resourceId)}>上移</div>
......@@ -757,7 +815,7 @@ class AddVideoCourse extends React.Component {
</If>
<div className='cover-url flex mt16'>
<div className='label'>课程封面</div>
<div className='label'>封面图</div>
<div className='cover-url__wrap'>
<div className='opt-btns'>
<div>
......@@ -784,7 +842,7 @@ class AddVideoCourse extends React.Component {
isDefaultCover && <span className="tag">默认图</span>
}
{/* 如果视频和封面都没有上传的话, 那么就显示缺省, 如果上传了视频, 那么封面图就默认显示视频的第一帧, 如果上传了封面图, 那么就显示上传的封面图 */}
<img src={coverUrl || `https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png`} alt='' />
<img src={coverUrl || `https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png`} alt='' />
</div>
</div>
</div>
......@@ -852,13 +910,14 @@ class AddVideoCourse extends React.Component {
<SelectPrepareFileModal
multiple={true}
operateType='select'
selectTypeList={['MP4']}
accept='video/mp4'
selectTypeList={selectTypeList}
accept={accept}
queryTypeEnum={'ONLINE'}
confirm={{
title: '文件过大,无法上传',
content: '为保障学员的观看体验,上传的视频大小不能超过2G'
content: '上传的视频大小不能超过2G,文件大小不能超过100M'
}}
tooltip={'格式支持mp4,大小不超过2G'}
tooltip={''}
isOpen={showSelectFileModal}
diskList={diskList}
addVideo={true}
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-04-28 18:05:30
* @LastEditors: yuananting
* @LastEditTime: 2021-07-09 16:21:13
* @LastEditTime: 2021-07-15 14:04:21
* @Description: 线上课课程课节详情
*/
......@@ -12,12 +12,15 @@ import { withRouter } from "react-router-dom";
import CourseService from '@/domains/course-domain/CourseService'
import underscore from 'underscore';
import ScanFileModal from '@/modules/resource-disk/modal/ScanFileModal.jsx';
import { FileTypeIcon } from '@/common/constants/academic/lessonEnum'
import BaseService from "@/domains/basic-domain/baseService";
import {YZ_APPId,YZ_PREVIEW_URL} from '@/domains/basic-domain/constants';
import PreviewFileModal from '@/bu-components/PreviewFileModal';
import './VideoCourseDetail.less';
declare var getParameterByName: any;
declare var window: any;
const FileTypeIconMap:any = FileTypeIcon
function VideoCourseDetail(){
const courseId = window.getParameterByName("courseId"); // 课程ID
const [coverUrl,setCoverUrl] = useState("");
......@@ -27,7 +30,11 @@ function VideoCourseDetail(){
const [courseName,setCourseName] = useState("");
const [categoryName,setCategoryName] = useState("");
const [scanFileModal,setScanFileModal] = useState<any>(null);
const [showPreviewModal,setShowPreviewModal] = useState(false); //是否显示loading
// const [previewing,setPreviewing] = useState(false); //是否正在预览
const [previewStatus,setPreviewStatus] = useState('UPLOAD'); //预览文件的生成状态
const [url,setUrl] = useState('');
let previewing = false;
useEffect(()=>{
handleFetchScheudleDetail(courseId);
},[courseId])
......@@ -73,9 +80,9 @@ function VideoCourseDetail(){
setCourseChapterList(courseChapterVOList);
})
}
function handleScanFileModal(fileType: string = "MP4", fileObj: Object){
async function handleScanFileModal(fileType: string = "MP4", fileObj:any){
const {fileVersionId,name,mediaUrl,id} = fileObj;
if(fileType === "VIDEO"){
const scanFileModal = (
<ScanFileModal
fileType={fileType}
......@@ -86,6 +93,65 @@ function VideoCourseDetail(){
/>
);
setScanFileModal(scanFileModal)
}else{
if(!fileVersionId){
setShowPreviewModal(true);
previewing = true;
setPreviewStatus('UPLOAD');
const uploadParams ={
fileUrl:mediaUrl,
yoZoTypeEnum:'UPLOAD'
}
const uploadSign:any = await BaseService.getYoZoSign(uploadParams);
BaseService.yoZoUpload(mediaUrl,YZ_APPId,uploadSign).then(async function (response){
const saveParams ={
fileVersionId:response.data.data.fileVersionId,
courseChapterId:id
}
BaseService.saveFileVersionIdByCourseChapter(saveParams);
if(previewing){
const previewParams ={
fileVersionId:response.data.data.fileVersionId,
yoZoTypeEnum:'VIEW',
htmlTitle:name
}
const previewSign = await BaseService.getYoZoSign(previewParams);
const url = `${YZ_PREVIEW_URL}?fileVersionId=${response.data.data.fileVersionId}&appId=${YZ_APPId}&sign=${previewSign}&htmlTitle=${name}`
setPreviewStatus('UPLOAD_SUCCESS');
setUrl(url)
}
})
}else{
const previewParams ={
fileVersionId,
yoZoTypeEnum:'VIEW',
htmlTitle:name
}
const previewSign = await BaseService.getYoZoSign(previewParams);
const url = `${YZ_PREVIEW_URL}?fileVersionId=${fileVersionId}&appId=${YZ_APPId}&sign=${previewSign}&htmlTitle=${name}`
const a = document.createElement('a');
document.body.appendChild(a);
a.setAttribute('href', url);
a.setAttribute('target', '_blank');
a.click();
document.body.removeChild(a)
}
}
}
// function previewingSet(){
// return new Promise(async (resolve) => {
// setShowPreviewModal(true);
// setPreviewing(true);
// setPreviewStatus('UPLOAD');
// resolve(true);
// })
// }
function cancelPreview(){
setShowPreviewModal(false);
// setPreviewing(false);
previewing = false;
setPreviewStatus('UPLOAD');
}
......@@ -101,7 +167,7 @@ function VideoCourseDetail(){
<div className="course-detail">
<div className='course-detail__img'>
{/* 如果视频和封面都没有上传的话, 那么就显示缺省, 如果上传了视频, 那么封面图就默认显示视频的第一帧, 如果上传了封面图, 那么就显示上传的封面图 */}
<img src={coverUrl || `https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png`} alt='' />
<img src={coverUrl || `https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png`} alt='' />
</div>
<div className="course-detail__info">
<div className="info__title">{courseName}</div>
......@@ -116,9 +182,9 @@ function VideoCourseDetail(){
<If condition={courseChapterList.length > 0}>
{
underscore.map(courseChapterList,(item: any,index: number) => {
return <div className='course-ware' onClick={()=>{handleScanFileModal("MP4",item)}} key={index}>
return <div className='course-ware' onClick={()=>{handleScanFileModal(item.mediaType,item)}} key={index}>
<div className="course-ware__index">{index < 9 ? `0${index + 1 } ` : index + 1}</div>
<img className='course-ware__img' src='https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png' alt='' />
<img className='course-ware__img' src={FileTypeIconMap[item.mediaType]} alt='' />
<div className='course-ware__name'>{item.name}</div>
</div>
})
......@@ -127,6 +193,9 @@ function VideoCourseDetail(){
</div>
</div>
</div>
{ showPreviewModal &&
<PreviewFileModal onCancel={()=>cancelPreview()} previewStatus={previewStatus} url={url}/>
}
{scanFileModal}
</div>
}
......
......@@ -12,7 +12,9 @@ function ChapterList(props){
<div className='course-ware__index'>{index < 9 ? `0${index + 1 } ` : `${index + 1 } `}</div>
<div className="course-ware__detail">
<div className='course-ware__detail__name'>{item.mediaName}</div>
{ item.mediaType === 'VIDEO' &&
<div className='course-ware__detail__duration'>{window.formatDuration(item.videoDuration)}</div>
}
</div>
</div>
})
......
......@@ -2,6 +2,7 @@ import User from "@/common/js/user";
import CourseService from "@/domains/course-domain/CourseService";
import React from "react";
import { Modal } from "antd";
import { FileTypeIcon } from '@/common/constants/academic/lessonEnum'
import "./LearningDetailModal.less";
class LearningDetailModal extends React.Component {
......@@ -58,11 +59,7 @@ class LearningDetailModal extends React.Component {
<div className="course-ware__index">{`${
index < 9 ? `0${index + 1}` : index + 1
} `}</div>
<img
className="course-ware__img"
src="https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png"
alt=""
/>
<img className='course-ware__img' src={FileTypeIcon[item.mediaType]} alt='' />
<div className="course-ware__name">{item.courseChapterName && item.courseChapterName.replace('.MP4','')}</div>
</div>
......
......@@ -68,7 +68,7 @@ class VideoCourseList extends React.Component {
<img
className='course-cover'
src={
coverUrl || 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'
coverUrl || 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png'
}
alt='封面图'
/>
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: zangsuyun
* @Date: 2021-03-12 14:49:40
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-11 16:44:59
* @LastEditors: yuananting
* @LastEditTime: 2021-07-15 14:07:42
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
......
......@@ -421,7 +421,7 @@ class AddCourse extends React.Component {
coverUrl ||
(videoCourseDivision === 'internal'
? `${mediaCourseUrl}?x-oss-process=video/snapshot,t_0,m_fast`
: 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png')
: 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png')
}
alt=''
/>
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-07-05 10:50:30
* @LastEditors: yuananting
* @LastEditTime: 2021-07-06 15:16:47
* @LastEditTime: 2021-07-14 14:32:55
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
......@@ -13,6 +13,7 @@ import PlanService from '@/domains/plan-domain/planService';
import User from '@/common/js/user';
import './UserLearnDetailModal.less';
import _ from 'underscore';
import { FileTypeIcon } from '@/common/constants/academic/lessonEnum'
const defaultCover = 'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png';
const CourseType = {
LIVE: {
......@@ -193,10 +194,10 @@ class UserLearnDetailModal extends React.Component {
return (
<div className='chapter-record'>
<span>
{chapterIndex + 1}.{index + 1}&nbsp;
{index < 9 ? `0${index + 1} ` : index + 1}
</span>
<img className='chapter-img' src='https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png' />
<span>{record.name}</span>
<img className='chapter-img' src={FileTypeIcon[record.mediaType]} />
<span className='chapter-name'>{record.name}</span>
</div>
);
},
......
......@@ -65,6 +65,12 @@
height: 18px;
margin: 0 10px;
}
.chapter-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 400px;
}
}
.record-name {
display: flex;
......
......@@ -397,7 +397,7 @@ class SelectOperatorModal extends React.Component {
const { coverUrl } = record;
return (
<div className='course-info'>
<img className='course-cover' src={coverUrl || 'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'} alt='' />
<img className='course-cover' src={coverUrl || 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png'} alt='' />
<div className='course-name'>{record.courseName}</div>
</div>
);
......
......@@ -101,7 +101,7 @@ class SelectPrepareFileModal extends React.Component {
// 获取文件列表
handleFetchFolderList = (params = {}, loadMore = false) => {
// 根据当前根节点获取文件列表
const { selectTypeList } = this.props;
const { selectTypeList,queryTypeEnum} = this.props;
const { query, folderList, currentRootDisk } = this.state;
const _params = {
...query,
......@@ -114,6 +114,9 @@ class SelectPrepareFileModal extends React.Component {
if (selectTypeList) {
_params.folderFileType = selectTypeList
}
if(queryTypeEnum){
_params.queryTypeEnum = queryTypeEnum
}
Service.Hades(FOLDERLIST_URL_MAP[currentRootDisk.disk], _params).then((res) => {
const { result = {} } = res;
......
......@@ -34,7 +34,7 @@ class ScanFileModal extends React.Component {
style={{ width: 632, objectFit: "cover" }}
/>
)}
{fileType === "MP4" && (
{fileType === "VIDEO" && (
<div>
<Player
src={item.mediaUrl || item.ossAddress || item.ossUrl}
......
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