Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
8c741b60
Commit
8c741b60
authored
Jan 09, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理视频课的预览显示
parent
f8df8db0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
11 deletions
+28
-11
src/modules/course-manage/modal/PreviewCourseModal.jsx
+23
-8
src/modules/course-manage/video-course/AddVideoCourse.jsx
+5
-3
No files found.
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
8c741b60
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-07-23 14:54:16
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-09 1
0:55:29
* @LastEditTime: 2021-01-09 1
6:26:03
* @Description: 大班直播课预览弹窗
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -36,7 +36,16 @@ class PreviewCourseModal extends React.Component {
}
}
dealTimeDuration
=
(
time
)
=>
{
const
diff
=
Math
.
floor
(
time
%
3600
);
let
hours
=
Math
.
floor
(
time
/
3600
);
let
mins
=
Math
.
floor
(
diff
/
60
);
let
seconds
=
Math
.
floor
(
time
%
60
);
hours
=
hours
<
10
?
(
"0"
+
hours
)
:
hours
;
mins
=
mins
<
10
?
(
"0"
+
mins
)
:
mins
;
seconds
=
seconds
<
10
?
(
"0"
+
seconds
)
:
seconds
;
return
hours
+
":"
+
mins
+
":"
+
seconds
;
}
dealWithTime
=
(
startTime
,
endTime
)
=>
{
const
startDate
=
new
Date
(
Number
(
startTime
));
const
endDate
=
new
Date
(
Number
(
endTime
));
...
...
@@ -64,8 +73,8 @@ class PreviewCourseModal extends React.Component {
render
()
{
const
{
courseBasicInfo
,
courseClassInfo
=
{},
courseIntroInfo
,
type
,
courseState
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
}
=
courseBasicInfo
;
const
{
courseBasicInfo
,
courseClassInfo
=
{},
courseIntroInfo
,
type
,
courseState
,
origin
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
,
videoDuration
}
=
courseBasicInfo
;
const
{
liveDate
,
calendarTime
,
startTime
,
endTime
,
timeHorizonStart
,
timeHorizonEnd
,
teacherName
}
=
courseClassInfo
;
const
{
liveCourseMediaRequests
}
=
courseIntroInfo
;
...
...
@@ -128,13 +137,15 @@ class PreviewCourseModal extends React.Component {
<
img
src=
{
coverUrl
}
className=
"course-cover"
/>
}
</
div
>
{
type
===
'videoCourse'
?
<
div
className=
"container__body"
>
<
div
className=
"title__name"
>
{
courseName
}
</
div
>
<
div
className=
"title__inst-name"
>
{
window
.
currentUserInstInfo
.
name
}
</
div
>
</
div
>
:
{
videoDuration
&&
<
div
>
视频时长:
{
this
.
dealTimeDuration
(
videoDuration
)
}
</
div
>
}
</
div
>
:
<
div
className=
"container__body"
>
<
div
className=
"container__body__title"
>
<
div
className=
"title__name"
>
{
courseName
}
</
div
>
...
...
@@ -159,7 +170,11 @@ class PreviewCourseModal extends React.Component {
}
<
div
className=
"container__introduction"
>
<
div
className=
"container__introduction__title"
>
直播简介
</
div
>
{
type
===
'videoCourse'
?
<
div
className=
"container__introduction__title"
>
视频简介
</
div
>
:
<
div
className=
"container__introduction__title"
>
直播简介
</
div
>
}
<
div
className=
"container__introduction__list editor-box"
>
{
liveCourseMediaRequests
.
map
((
item
,
index
)
=>
{
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
8c741b60
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-0
8 17:56:17
* @LastEditTime: 2021-01-0
9 16:15:43
* @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -239,15 +239,17 @@ class AddVideoCourse extends React.Component {
coverUrl
,
scheduleVideoUrl
,
courseName
,
scheduleMedia
scheduleMedia
,
videoDuration
}
=
this
.
state
;
const
courseBasinInfo
=
{
coverUrl
,
scheduleVideoUrl
,
courseName
,
videoDuration
}
const
courseIntroInfo
=
{
liveCourseMediaRequests
:
scheduleMedia
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment