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
6fccff3b
Commit
6fccff3b
authored
Jun 18, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播底部修改
parent
fb665f8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
src/components/study/freeCourses/index.js
+21
-20
src/components/study/index.js
+2
-1
No files found.
src/components/study/freeCourses/index.js
View file @
6fccff3b
...
...
@@ -25,8 +25,8 @@ class FreeCourse extends PureComponent {
componentDidMount
()
{
this
.
getFreeCourses
()
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
const
data
=
res
.
data
let
data
=
res
.
data
if
(
data
.
code
==
200
)
{
this
.
setState
({
courses
:
data
.
data
,
})
...
...
@@ -36,12 +36,13 @@ class FreeCourse extends PureComponent {
})
this
.
getFreeLive
()
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
data
=
res
.
data
if
(
data
.
code
==
200
)
{
this
.
setState
({
live
:
res
.
data
.
data
live
:
data
.
data
})
}
else
{
Toast
.
info
(
res
.
data
.
msg
)
Toast
.
info
(
data
.
msg
,
2
,
null
,
false
)
}
})
}
...
...
@@ -58,19 +59,6 @@ class FreeCourse extends PureComponent {
return
(
<
ul
className
=
'free-courses'
>
{
this
.
state
.
courses
.
map
((
item
,
index
)
=>
(
<
Course
img
=
{
item
.
logo
}
title
=
{
item
[
'video_course_name'
]}
bottom
=
{
<
Bottom
audience
=
{
item
[
'play_times'
]}
className
=
{
'tag-category'
}
text
=
{
item
.
category
}
/
>
}
id
=
{
item
[
'v_course_id'
]}
key
=
{
index
}
/
>
))
}
{
this
.
state
.
live
.
map
((
item
,
index
)
=>
{
const
Bottom
=
(
<
div
className
=
"bottom"
>
...
...
@@ -79,12 +67,12 @@ class FreeCourse extends PureComponent {
return
<
i
key
=
{
index
}
className
=
{
classnames
(
'column'
,
`column-
${
index
+
1
}
`
)}
/
>
})}
<
/div
>
<
div
className
=
"time"
>
{
`
直播:
${
item
[
'live_start_time'
]}
`
}
<
/div
>
<
div
className
=
"time"
>
{
`
${
item
[
'live_start_time'
]}
`
}
<
/div
>
<
/div
>
)
return
(
<
Course
img
=
{
item
[
'live_
img
'
]}
img
=
{
item
[
'live_
cover
'
]}
title
=
{
item
[
'live_title'
]}
top
=
{
<
Tag
className
=
{
'tag-starting top'
}
>
即将开始
<
/Tag
>
...
...
@@ -96,6 +84,19 @@ class FreeCourse extends PureComponent {
)
})
}
{
this
.
state
.
courses
.
map
((
item
,
index
)
=>
(
<
Course
img
=
{
item
.
logo
}
title
=
{
item
[
'video_course_name'
]}
bottom
=
{
<
Bottom
audience
=
{
item
[
'play_times'
]}
className
=
{
'tag-category'
}
text
=
{
item
.
category
}
/
>
}
id
=
{
item
[
'v_course_id'
]}
key
=
{
index
}
/
>
))
}
<
/ul
>
)
}
...
...
src/components/study/index.js
View file @
6fccff3b
...
...
@@ -7,6 +7,7 @@ import FreeCourses from './freeCourses'
import
WithTab
from
'@/HOCs/WithTab'
import
WithFullSize
from
'@/HOCs/WithFullSize'
import
{
compose
}
from
'redux'
import
PrivateRoute
from
'@/router/privateRoute'
class
Study
extends
Component
{
...
...
@@ -45,11 +46,11 @@ class Study extends Component {
<
Switch
>
<
Redirect
exact
from
=
'/study'
to
=
'study/my-course'
/>
<
Route
path
=
{
`
${
this
.
props
.
match
.
path
}
/my-course`
}
component
=
{
MyCourses
}
/
>
{
/*<PrivateRoute path={`${this.props.match.path}/my-course`} component={MyCourses}/>*/
}
<
Route
path
=
{
`
${
this
.
props
.
match
.
path
}
/free-course`
}
component
=
{
FreeCourses
}
/
>
{
/*<Route path={`${this.props.match.path}/my-course`} render={props => {
<MyCourses storeScrollPosition={this.storeScrollPosition}/>
}}/>*/
}
<
Route
path
=
{
`
${
this
.
props
.
match
.
path
}
/free-course`
}
component
=
{
FreeCourses
}
/
>
<
/Switch
>
<
/div
>
<
/section
>
...
...
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