From 5c81998e99f055ee7896bbe9d5bb2380ae079aec Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Tue, 10 Mar 2020 00:39:27 +0800 Subject: [PATCH 1/2] operation --- public/react/src/modules/courses/Video/VideoIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index 15372e2cc..ff1129666 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -240,7 +240,7 @@ class VideoIndex extends Component{ const { coursesId , videoId }=this.props.match.params; const {course_identity} = this.props.coursedata; - const flag = parseInt(course_identity) < 4; + const flag = parseInt(course_identity) < 5; const newOperation = flag; const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); return( From 958a367f8f0bb4e410f39426b22d2dd9250ac388 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 10 Mar 2020 00:47:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course_video.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/course_video.rb b/app/models/course_video.rb index eb2a17595..2cfa151ce 100644 --- a/app/models/course_video.rb +++ b/app/models/course_video.rb @@ -3,6 +3,6 @@ class CourseVideo < ApplicationRecord belongs_to :video, optional: true belongs_to :user, optional: true - validates :title, length: { maximum: 60, too_long: "不能超过60个字符" } - validates :link, format: { with: CustomRegexp::URL, message: "必须为网址超链接" } + validates :title, length: { maximum: 60, too_long: "不能超过60个字符" }, allow_blank: true + validates :link, format: { with: CustomRegexp::URL, message: "必须为网址超链接" }, allow_blank: true end