Commit 49922cb2 by zhangleyuan

Merge branch 'feature/zhangleyuan/20210304/video-size' into gray

parents 1c804dcd 25647536
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2020-12-15 19:58:31 * @Date: 2020-12-15 19:58:31
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-27 19:54:58 * @LastEditTime: 2021-02-23 18:18:05
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
--> -->
...@@ -22,4 +22,9 @@ ...@@ -22,4 +22,9 @@
`2021-01-27` `2021-01-27`
+ 播种计划一期第二阶段初上线 + 播种计划一期第二阶段初上线
\ No newline at end of file
`2021-02-23`
+ 按照UI规范修改样式
\ No newline at end of file
...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component { ...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component {
<div className="tips"> <div className="tips">
<span className="icon iconfont">&#xe6f2;</span> <span className="icon iconfont">&#xe6f2;</span>
<span className="tips__text"> <span className="tips__text">
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(500M以内) 支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(2G以内)
</span> </span>
</div> </div>
</Modal> </Modal>
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* @Last Modified by: 吴文洁 * @Last Modified by: 吴文洁
* @Last Modified time: 2020-07-16 11:32:50 * @Last Modified time: 2020-07-16 11:32:50
*/ */
const DEFAULT_SIZE_UNIT = 1024 * 1024; // 将B转换成M const DEFAULT_SIZE_UNIT = 1000 * 1000; // 将B转换成M
const GIGABYTE_SIZE_UNIT = 1024 * 1024 * 1024; // 转换为G const GIGABYTE_SIZE_UNIT = 1000 * 1000 * 1000; // 转换为G
const SupportFileType = [ const SupportFileType = [
"application/msword", "application/msword",
...@@ -106,11 +106,11 @@ const FileVerifyMap = { ...@@ -106,11 +106,11 @@ const FileVerifyMap = {
}, },
"audio/mp4": { "audio/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
}, },
"video/mp4": { "video/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
} }
}; };
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-07-23 17:11:49 * @Date: 2020-07-23 17:11:49
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-18 17:54:36 * @LastEditTime: 2021-03-04 17:16:01
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
const DEFAULT_SIZE_UNIT = 1024 * 1024; // 将B转换成M const DEFAULT_SIZE_UNIT = 1000 * 1000; // 将B转换成M
const SupportFileType = [ const SupportFileType = [
"application/msword", "application/msword",
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-20 09:21:40 * @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-31 10:39:16 * @LastEditTime: 2021-03-04 17:16:30
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
const DEFAULT_SIZE_UNIT: number = 1024 * 1024; // 将B转换成M const DEFAULT_SIZE_UNIT: number = 1000 * 1000; // 将B转换成M
const SUFFIX_MAP: { const SUFFIX_MAP: {
[key: string]: string [key: string]: string
...@@ -139,11 +139,11 @@ const FILR_VERIFY_MAP = { ...@@ -139,11 +139,11 @@ const FILR_VERIFY_MAP = {
}, },
"audio/mp4": { "audio/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
}, },
"video/mp4": { "video/mp4": {
type: "MP4", type: "MP4",
maxSize: 500 maxSize: 2000
} }
}; };
......
...@@ -244,7 +244,7 @@ class AddLiveIntro extends React.Component { ...@@ -244,7 +244,7 @@ class AddLiveIntro extends React.Component {
}}>上传图片/视频</Button> }}>上传图片/视频</Button>
<div className="tips"> <div className="tips">
<div>建议尺寸1280*720px或16:9。图片最大5M,支持jpg、jpeg和png;视频最大500M</div> <div>建议尺寸1280*720px或16:9。图片最大5M,支持jpg、jpeg和png;视频最大2G</div>
<div>支持mp4。</div> <div>支持mp4。</div>
</div> </div>
......
...@@ -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: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-02-04 16:41:05 * @LastEditTime: 2021-03-04 10:26:07
* @Description: 视频课新增/编辑页 * @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -475,7 +475,7 @@ class AddVideoCourse extends React.Component { ...@@ -475,7 +475,7 @@ class AddVideoCourse extends React.Component {
}} }}
>{`${(pageType === 'add' && !scheduleVideoId) ? '选择' : '更换'}视频`}</Button> >{`${(pageType === 'add' && !scheduleVideoId) ? '选择' : '更换'}视频`}</Button>
<span className="tips">视频数量限制1个,大小不超过500M</span> <span className="tips">视频数量限制1个,大小不超过2G</span>
</div> </div>
</div> </div>
...@@ -546,9 +546,9 @@ class AddVideoCourse extends React.Component { ...@@ -546,9 +546,9 @@ class AddVideoCourse extends React.Component {
accept="video/mp4" accept="video/mp4"
confirm={{ confirm={{
title: '文件过大,无法上传', title: '文件过大,无法上传',
content: '为保障学员的观看体验,上传的视频大小不能超过500M', content: '为保障学员的观看体验,上传的视频大小不能超过2G',
}} }}
tooltip={'格式支持mp4,大小不超过500M'} tooltip={'格式支持mp4,大小不超过2G'}
isOpen={showSelectFileModal} isOpen={showSelectFileModal}
diskList={diskList} diskList={diskList}
addVideo={true} addVideo={true}
......
...@@ -448,7 +448,7 @@ class FolderList extends React.Component { ...@@ -448,7 +448,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -135,7 +135,7 @@ class OperateArea extends React.Component { ...@@ -135,7 +135,7 @@ class OperateArea extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component { ...@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component {
<div className="tips"> <div className="tips">
<span className="icon iconfont">&#xe6f2;</span> <span className="icon iconfont">&#xe6f2;</span>
<span className="tips__text"> <span className="tips__text">
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(500M以内) 支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(2G以内)
</span> </span>
</div> </div>
</Modal> </Modal>
......
...@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component { ...@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component {
if (!type) { if (!type) {
type = getFileTypeByName(name); type = getFileTypeByName(name);
} }
// if (type.indexOf('image') > -1 && size > 5 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('audio') > -1 && size > 20 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
if (supportFileType.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) { if (supportFileType.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
......
...@@ -484,7 +484,7 @@ class FolderList extends React.Component { ...@@ -484,7 +484,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -125,18 +125,6 @@ class OperateArea extends React.Component { ...@@ -125,18 +125,6 @@ class OperateArea extends React.Component {
if (!type) { if (!type) {
type = getFileTypeByName(name); type = getFileTypeByName(name);
} }
// if (type.indexOf('image') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('audio') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
if (localFileTypeMap.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) { if (localFileTypeMap.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
......
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