Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
e0291119
Commit
e0291119
authored
Aug 20, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频目录课后练习
parent
ebb03714
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
src/components/video/index.js
+10
-4
src/components/video/video-catalog/index.js
+11
-5
No files found.
src/components/video/index.js
View file @
e0291119
...
...
@@ -96,6 +96,10 @@ class Video extends Component {
componentDidMount
()
{
this
.
courseID
=
getParam
(
'id'
)
if
(
!
this
.
courseID
){
this
.
props
.
history
.
replace
(
'/'
)
return
}
this
.
setState
({
courseId
:
this
.
courseID
})
...
...
@@ -117,7 +121,6 @@ class Video extends Component {
}
// 购买单集
toSingleset
=
(
item
)
=>
{
console
.
log
(
item
)
this
.
setState
({
singleBox
:
true
,
singMess
:
item
...
...
@@ -132,8 +135,10 @@ class Video extends Component {
setupRecord
=
()
=>
{
this
.
recordSocket
=
io
(
API
.
record
,
{
transports
:
[
'websocket'
]
transports
:
[
'websocket'
],
forceNew
:
true
})
// this.recordSocket = io(API.record)
this
.
recordSocket
.
on
(
'seek'
,
time
=>
{
this
.
player
.
currentTime
(
time
)
})
...
...
@@ -220,7 +225,7 @@ class Video extends Component {
v_course_id
:
vCourseId
,
uid
:
this
.
props
.
user
.
data
.
uid
,
token
:
this
.
token
,
platform
:
5
platform
:
0
})
}
...
...
@@ -300,6 +305,7 @@ class Video extends Component {
return
}
this
.
countSchedule
()
this
.
setState
({
activeIndex
:
index
...
...
@@ -512,7 +518,7 @@ class Video extends Component {
return
<
VideoCatalog
activeIndex
=
{
this
.
state
.
activeIndex
}
selectVideo
=
{
this
.
selectVideo
}
videoCatalog
=
{
this
.
state
.
videoList
}
videoCatalog
=
{
videoList
}
{...
props
}
/
>
}}
/
>
<
Route
path
=
{
`
${
match
.
path
}
/datum`
}
render
=
{
props
=>
{
...
...
src/components/video/video-catalog/index.js
View file @
e0291119
import
React
,
{
Component
}
from
'react'
import
'./video-catalog.scss'
import
{
Link
}
from
"react-router-dom"
;
import
classnames
from
'classnames'
...
...
@@ -29,11 +30,16 @@ class VideoCatalog extends Component {
)}
/
>
<
/div
>
{
(
item
.
practice
&&
item
.
practice
.
qid
)
?
<
div
className
=
"exercise"
>
课后练习:
{
item
.
practice
.
title
}
<
i
className
=
{
classnames
(
'iconfont'
,
item
.
practice
.
is_tested
?
'iconiconfront-3'
:
'iconiconfront-74'
)}
/
>
{
/*<i className='iconfont iconiconfront-74'/>*/
}
<
/div
>
(
item
.
practice
&&
item
.
practice
.
qid
)
?
<
Link
to
=
{{
pathname
:
'/campTest'
,
search
:
`?keshi_id=
${
item
.
id
}
&qid=
${
item
.
practice
.
qid
}
`
}}
>
<
div
className
=
"exercise"
>
课后练习:
{
item
.
practice
.
title
}
<
i
className
=
{
classnames
(
'iconfont'
,
item
.
practice
.
is_tested
?
'iconiconfront-3'
:
'iconiconfront-74'
)}
/
>
<
/div
>
<
/Link
>
:
null
}
<
/li
>
...
...
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