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 {
...
@@ -96,6 +96,10 @@ class Video extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
courseID
=
getParam
(
'id'
)
this
.
courseID
=
getParam
(
'id'
)
if
(
!
this
.
courseID
){
this
.
props
.
history
.
replace
(
'/'
)
return
}
this
.
setState
({
this
.
setState
({
courseId
:
this
.
courseID
courseId
:
this
.
courseID
})
})
...
@@ -117,7 +121,6 @@ class Video extends Component {
...
@@ -117,7 +121,6 @@ class Video extends Component {
}
}
// 购买单集
// 购买单集
toSingleset
=
(
item
)
=>
{
toSingleset
=
(
item
)
=>
{
console
.
log
(
item
)
this
.
setState
({
this
.
setState
({
singleBox
:
true
,
singleBox
:
true
,
singMess
:
item
singMess
:
item
...
@@ -132,8 +135,10 @@ class Video extends Component {
...
@@ -132,8 +135,10 @@ class Video extends Component {
setupRecord
=
()
=>
{
setupRecord
=
()
=>
{
this
.
recordSocket
=
io
(
API
.
record
,
{
this
.
recordSocket
=
io
(
API
.
record
,
{
transports
:
[
'websocket'
]
transports
:
[
'websocket'
],
forceNew
:
true
})
})
// this.recordSocket = io(API.record)
this
.
recordSocket
.
on
(
'seek'
,
time
=>
{
this
.
recordSocket
.
on
(
'seek'
,
time
=>
{
this
.
player
.
currentTime
(
time
)
this
.
player
.
currentTime
(
time
)
})
})
...
@@ -220,7 +225,7 @@ class Video extends Component {
...
@@ -220,7 +225,7 @@ class Video extends Component {
v_course_id
:
vCourseId
,
v_course_id
:
vCourseId
,
uid
:
this
.
props
.
user
.
data
.
uid
,
uid
:
this
.
props
.
user
.
data
.
uid
,
token
:
this
.
token
,
token
:
this
.
token
,
platform
:
5
platform
:
0
})
})
}
}
...
@@ -300,6 +305,7 @@ class Video extends Component {
...
@@ -300,6 +305,7 @@ class Video extends Component {
return
return
}
}
this
.
countSchedule
()
this
.
setState
({
this
.
setState
({
activeIndex
:
index
activeIndex
:
index
...
@@ -512,7 +518,7 @@ class Video extends Component {
...
@@ -512,7 +518,7 @@ class Video extends Component {
return
<
VideoCatalog
return
<
VideoCatalog
activeIndex
=
{
this
.
state
.
activeIndex
}
activeIndex
=
{
this
.
state
.
activeIndex
}
selectVideo
=
{
this
.
selectVideo
}
selectVideo
=
{
this
.
selectVideo
}
videoCatalog
=
{
this
.
state
.
videoList
}
videoCatalog
=
{
videoList
}
{...
props
}
/
>
{...
props
}
/
>
}}
/
>
}}
/
>
<
Route
path
=
{
`
${
match
.
path
}
/datum`
}
render
=
{
props
=>
{
<
Route
path
=
{
`
${
match
.
path
}
/datum`
}
render
=
{
props
=>
{
...
...
src/components/video/video-catalog/index.js
View file @
e0291119
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
'./video-catalog.scss'
import
'./video-catalog.scss'
import
{
Link
}
from
"react-router-dom"
;
import
classnames
from
'classnames'
import
classnames
from
'classnames'
...
@@ -29,11 +30,16 @@ class VideoCatalog extends Component {
...
@@ -29,11 +30,16 @@ class VideoCatalog extends Component {
)}
/
>
)}
/
>
<
/div
>
<
/div
>
{
{
(
item
.
practice
&&
item
.
practice
.
qid
)
?
<
div
className
=
"exercise"
>
(
item
.
practice
&&
item
.
practice
.
qid
)
课后练习:
{
item
.
practice
.
title
}
?
<
Link
to
=
{{
<
i
className
=
{
classnames
(
'iconfont'
,
item
.
practice
.
is_tested
?
'iconiconfront-3'
:
'iconiconfront-74'
)}
/
>
pathname
:
'/campTest'
,
{
/*<i className='iconfont iconiconfront-74'/>*/
}
search
:
`?keshi_id=
${
item
.
id
}
&qid=
${
item
.
practice
.
qid
}
`
<
/div
>
}}
>
<
div
className
=
"exercise"
>
课后练习:
{
item
.
practice
.
title
}
<
i
className
=
{
classnames
(
'iconfont'
,
item
.
practice
.
is_tested
?
'iconiconfront-3'
:
'iconiconfront-74'
)}
/
>
<
/div
>
<
/Link
>
:
null
:
null
}
}
<
/li
>
<
/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