From 7f0c3f3875f38a4da269176f47449c39ba057595 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 14 Feb 2020 12:03:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/statistic_subject_info.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/statistic_subject_info.rake b/lib/tasks/statistic_subject_info.rake index 71fb8ed36..694b99e84 100644 --- a/lib/tasks/statistic_subject_info.rake +++ b/lib/tasks/statistic_subject_info.rake @@ -47,8 +47,7 @@ namespace :subjects do subjects = subjects.where(id:ENV['subject_id']) end subjects.find_in_batches(batch_size: 20) do |s| - str = [] - Parallel.each(s, in_processes: 6) do |subject| + Parallel.each_with_index(s, in_processes: 4) do |subject, index, str = []| puts("---------------------course_info_statistic: #{subject.id}") Rails.logger.info("---------------------course_info_statistic: #{subject.id}") data = Subjects::CourseUsedInfoService.call(subject) From 87e0cb846b378a29ae01af80baad1e13674e6113 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 14 Feb 2020 12:17:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Video/LiveItem.js | 12 +++++++++--- public/react/src/modules/courses/Video/LiveNew.js | 2 +- public/react/src/modules/courses/Video/VideoIndex.js | 11 +++++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/Video/LiveItem.js b/public/react/src/modules/courses/Video/LiveItem.js index 405cdfaf2..28a1588bd 100644 --- a/public/react/src/modules/courses/Video/LiveItem.js +++ b/public/react/src/modules/courses/Video/LiveItem.js @@ -11,6 +11,12 @@ function jsCopy(props){ document.execCommand("Copy"); props.showNotification("复制成功!"); } +const $ = window.$; + +function getRight(){ + var right = parseInt($(".-task-sidebar").css("right")); + return right; +} class LiveItem extends Component{ constructor(props) { super(props); @@ -42,10 +48,10 @@ class LiveItem extends Component{ } alertInfo=()=>{ - console.log("dddd"); this.setState({ visible:true }) + getRight(); } onDialogOkBtnClick=()=>{ this.setState({ @@ -106,7 +112,7 @@ class LiveItem extends Component{ overflow: hidden!important; } .-task-sidebar{ - right:42px!important + right:${getRight()+7}px!important; } `} @@ -150,7 +156,7 @@ class LiveItem extends Component{ { item.platform && 直播平台:{item.platform} } { item.live_time && 开播时间:{item.live_time}} - { item.duration && 直播时长:{item.duration}分钟 } + { item.duration && 直播预计时长:{item.duration}分钟 } { diff --git a/public/react/src/modules/courses/Video/LiveNew.js b/public/react/src/modules/courses/Video/LiveNew.js index 737456f13..dc113b805 100644 --- a/public/react/src/modules/courses/Video/LiveNew.js +++ b/public/react/src/modules/courses/Video/LiveNew.js @@ -258,7 +258,7 @@ class LiveNew extends Component{ onChange={this.onChangeTime} > - + {getFieldDecorator('duration', { rules: [], })( diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index 6807cef7d..81f074181 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -14,6 +14,12 @@ import '../css/Courses.css'; import '../publicNav/nav.css'; const PAGE_SIZE = 15; const LIVE_PAGE_SIZE = 10; +const $ = window.$; + +function getRight(){ + var right = parseInt($(".-task-sidebar").css("right")); + return right; +} class VideoIndex extends Component{ constructor(props){ super(props); @@ -209,14 +215,11 @@ class VideoIndex extends Component{ overflow: hidden!important; } .-task-sidebar{ - right:42px!important + right:${getRight()+7}px!important; } `}: