Commit 0625e798 by zhangleyuan

feat:处理直播课件30分钟内不能删除

parent 219a97ce
...@@ -122,7 +122,7 @@ class ManageCoursewareModal extends React.Component { ...@@ -122,7 +122,7 @@ class ManageCoursewareModal extends React.Component {
// 上传文件 // 上传文件
addFile() { addFile() {
// 判断是否早于开课前45分钟 // 判断是否早于开课前30分钟
const { startTime } = this.props.data; const { startTime } = this.props.data;
const currentTime = new Date().getTime(); const currentTime = new Date().getTime();
if (currentTime >= startTime - 30 * 60 * 1000) { if (currentTime >= startTime - 30 * 60 * 1000) {
...@@ -313,7 +313,7 @@ class ManageCoursewareModal extends React.Component { ...@@ -313,7 +313,7 @@ class ManageCoursewareModal extends React.Component {
const uploadFail = failObject[item.id]; const uploadFail = failObject[item.id];
// 上课前45分钟/上课中/已结束的情况下都不可操作 // 上课前45分钟/上课中/已结束的情况下都不可操作
if (this.props.data.startTime < Date.now() + 2700000 || item.progress || uploadFail) { if (this.props.data.startTime < Date.now() + 1800000 || item.progress || uploadFail) {
return <span>-</span> return <span>-</span>
} }
return ( return (
......
...@@ -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-01-14 18:59:12 * @LastEditTime: 2021-01-18 18:18:49
* @Description: 视频课新增/编辑页 * @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -510,8 +510,8 @@ class AddVideoCourse extends React.Component { ...@@ -510,8 +510,8 @@ class AddVideoCourse extends React.Component {
</div> </div>
</div> </div>
</div> </div>
<div className="course-catalog"> <div className="course-catalog required">
<span className="label"><span className="require">*</span>课程分类:</span> <span className="label">课程分类:</span>
{ (pageType === 'add') && { (pageType === 'add') &&
<Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" /> <Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" />
} }
......
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