diff --git a/app/services/create_watch_video_service.rb b/app/services/create_watch_video_service.rb index 0f1b32814..5a3813571 100644 --- a/app/services/create_watch_video_service.rb +++ b/app/services/create_watch_video_service.rb @@ -33,12 +33,10 @@ class CreateWatchVideoService < ApplicationService if watch_course_video.present? watch_course_video.total_duration = watch_course_video.watch_video_histories.sum(:total_duration) watch_course_video.end_at = current_time - if !watch_course_video.is_finished && watch_course_video.watch_duration < params[:watch_duration] + if !watch_course_video.is_finished # 更新课程视频的时长及是否看完状态 - watch_course_video.watch_duration = params[:watch_duration] - if params[:ed].present? - watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration - end + watch_course_video.watch_duration = params[:watch_duration] if watch_course_video.watch_duration < params[:watch_duration] + watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration if params[:ed].present? end watch_course_video.save! end diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index a7fbbb20a..cdd41eede 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -100,7 +100,10 @@ width: 80%; } .ws50s{ - width: 50%; + width: 50%; + } +.ws40s{ + width: 40%; } .hs30s{ height: 30%; @@ -425,6 +428,14 @@ white-space:nowrap; cursor: default; } +.maxnamewidth90s{ + width: 90px; + max-width: 90px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} .maxnamewidth100s{ width: 100px; max-width: 100px; @@ -440,3 +451,4 @@ .mr32{ margin-right: 32px; } + diff --git a/public/react/src/modules/courses/videostatistics/Videostatistics.js b/public/react/src/modules/courses/videostatistics/Videostatistics.js index f497b3ca6..ba4891b2c 100644 --- a/public/react/src/modules/courses/videostatistics/Videostatistics.js +++ b/public/react/src/modules/courses/videostatistics/Videostatistics.js @@ -64,19 +64,8 @@ class Videostatistics extends Component{
-
-

- this.props.statisticsy(false)}> -

this.props.statisticsy(false)}>返回

-

- - -
- + this.props.statisticsy(b)}> diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js index 1111b6509..dff57d642 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js @@ -35,7 +35,11 @@ class Videostatisticscom extends Component { }}>
-
视频统计总览
+

this.props.statisticsy(false)} > + this.props.statisticsy(false)}> +

this.props.statisticsy(false)}>返回

+

+
视频统计总览
播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计