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
069ac0c5
Commit
069ac0c5
authored
Aug 20, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
del build
parents
ee41d3c9
a97be348
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
30 deletions
+56
-30
src/components/classify/courselist.js
+5
-4
src/components/detail/outline/index.js
+9
-4
src/components/search/index.js
+1
-1
src/components/search/index.scss
+3
-0
src/components/video/index.js
+27
-16
src/components/video/video-catalog/index.js
+11
-5
No files found.
src/components/classify/courselist.js
View file @
069ac0c5
...
...
@@ -65,9 +65,10 @@ class Classify extends Component {
// 获取课程接口
getList
=
()
=>
{
const
_this
=
this
http
.
get
(
`
${
API
.
home
}
/m/course/list/
${
getParam
(
'id'
)}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
_
this
.
setState
({
data
:
res
.
data
.
data
,
isLoading
:
false
})
...
...
@@ -173,10 +174,10 @@ class Classify extends Component {
<
/div
>
)
return
(
<
VList
key
=
{
index
}
<
VList
key
=
{
index
}
status
=
{
status
}
img
=
{
item
.
image_name
}
img
=
{
item
.
image_name
}
id
=
{
item
.
course_id
}
info
=
{
Info
}
toDetail
=
{
this
.
toCourseDetail
}
...
...
src/components/detail/outline/index.js
View file @
069ac0c5
...
...
@@ -20,9 +20,11 @@ class OutLine extends Component {
return
e
.
childNodes
.
length
===
0
?
""
:
e
.
childNodes
[
0
].
nodeValue
;
}
componentDidMount
()
{
this
.
getList
()
}
tabchange
=
(
tab
,
index
)
=>
{
if
(
index
===
1
)
{
this
.
getList
()
}
};
// 获取大纲数据
getList
=
()
=>
{
...
...
@@ -49,7 +51,10 @@ class OutLine extends Component {
return
(
<
div
className
=
'course-detail'
>
<
WhiteSpace
/>
<
Tabs
tabs
=
{
tabs
}
>
<
Tabs
tabs
=
{
tabs
}
initialPage
=
{
0
}
onChange
=
{(
tab
,
index
)
=>
{
this
.
tabchange
(
tab
,
index
)
}}
>
{
/*介绍*/
}
<
div
className
=
'introduce'
>
<
p
>
讲师:
{
introduce
.
teachers
}
<
/p
>
...
...
src/components/search/index.js
View file @
069ac0c5
...
...
@@ -77,7 +77,7 @@ class Search extends PureComponent {
<
/Link
>
)
})
:
<
div
style
=
{{
textAlign
:
'center'
,
padding
:
'20px'
,
fontSize
:
'12
px'
}}
>
暂无历史
<
/div
>
:
<
div
className
=
{
'no_search_history'
}
style
=
{{
textAlign
:
'center'
,
padding
:
'20
px'
}}
>
暂无历史
<
/div
>
}
<
/div
>
<
/div
>
...
...
src/components/search/index.scss
View file @
069ac0c5
...
...
@@ -23,6 +23,9 @@
.search-tag
{
overflow
:
hidden
;
}
.no_search_history
{
font-size
:
12px
;
}
}
.search-hot
{
...
...
src/components/video/index.js
View file @
069ac0c5
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
HeaderBar
from
'@/common/HeaderBar'
import
'./video.scss'
import
{
NavLink
,
Route
,
Redirect
,
Switch
}
from
'react-router-dom'
import
{
NavLink
,
Route
,
Redirect
,
Switch
,
Link
}
from
'react-router-dom'
import
{
http
,
getParam
}
from
'@/utils'
import
Recommendation
from
'./recommendation'
import
VideoCatalog
from
'./video-catalog'
import
DatumCatalog
from
'./datum-catalog'
import
{
Toast
}
from
'antd-mobile'
import
{
Toast
}
from
'antd-mobile'
import
videojs
from
'video.js'
import
'video.js/dist/video-js.min.css'
import
{
Modal
}
from
"antd-mobile"
import
{
Loading
}
from
'@/common'
import
{
connect
}
from
"react-redux"
import
{
Modal
}
from
"antd-mobile"
import
{
Loading
}
from
'@/common'
import
{
connect
}
from
"react-redux"
import
jsCookie
from
'js-cookie'
import
io
from
'socket.io-client'
import
Single
from
"@/components/detail/single"
;
...
...
@@ -19,6 +19,7 @@ import Single from "@/components/detail/single";
let
alert
=
Modal
.
alert
function
ProgressShareModal
(
props
)
{
console
.
log
(
props
.
data
.
url
);
return
(
props
.
isShow
&&
<
div
className
=
'progress-share-modal-wrapper'
>
...
...
@@ -39,12 +40,16 @@ function ProgressShareModal(props) {
<
div
className
=
"title"
>
分享到
<
/div
>
<
ul
>
<
li
className
=
'share-icon'
>
<
div
className
=
"icon"
><
i
className
=
'iconfont iconweixinzhifu'
><
/i></
div
>
<
div
className
=
'text'
>
微信好友
<
/div
>
<
a
style
=
{{
display
:
'block'
}}
href
=
{
props
.
data
.
url
}
>
<
div
className
=
"icon"
><
i
className
=
'iconfont iconweixinzhifu'
/><
/div
>
<
div
className
=
'text'
>
微信好友
<
/div
>
<
/a
>
<
/li
>
<
li
className
=
'share-icon'
>
<
div
className
=
"icon"
><
i
className
=
'iconfont iconpengyouquaniconx'
><
/i></
div
>
<
div
className
=
'text'
>
朋友圈
<
/div
>
<
a
style
=
{{
display
:
'block'
}}
href
=
{
props
.
data
.
url
}
>
<
div
className
=
"icon"
><
i
className
=
'iconfont iconpengyouquaniconx'
/><
/div
>
<
div
className
=
'text'
>
朋友圈
<
/div
>
<
/a
>
<
/li
>
<
/ul
>
<
/div
>
...
...
@@ -96,6 +101,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 +126,6 @@ class Video extends Component {
}
// 购买单集
toSingleset
=
(
item
)
=>
{
console
.
log
(
item
)
this
.
setState
({
singleBox
:
true
,
singMess
:
item
...
...
@@ -132,8 +140,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 +230,7 @@ class Video extends Component {
v_course_id
:
vCourseId
,
uid
:
this
.
props
.
user
.
data
.
uid
,
token
:
this
.
token
,
platform
:
5
platform
:
0
})
}
...
...
@@ -300,12 +310,13 @@ class Video extends Component {
return
}
this
.
countSchedule
()
this
.
setState
({
activeIndex
:
index
},
()
=>
{
if
(
this
.
hasAuth
())
{
if
(
this
.
hasAuth
())
{
this
.
setPlayerSrc
(
this
.
state
.
videoList
[
index
][
'play_url'
])
this
.
sendLastRecord
()
this
.
playVideo
()
...
...
@@ -371,7 +382,7 @@ class Video extends Component {
}
setPlayerSrc
=
src
=>
{
if
(
!
this
.
player
)
{
if
(
!
this
.
player
)
{
this
.
initializePlayer
()
}
this
.
player
.
src
({
...
...
@@ -512,7 +523,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 @
069ac0c5
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