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
dc17dab5
Commit
dc17dab5
authored
Jun 20, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu
parents
e002b220
a66e5df4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
src/components/study/freeCourses/free-courses.scss
+5
-1
src/components/study/freeCourses/index.js
+17
-5
No files found.
src/components/study/freeCourses/free-courses.scss
View file @
dc17dab5
...
...
@@ -10,10 +10,14 @@
left
:
0
;
}
.tag-s
tarting
{
.tag-s
oon
{
background
:
$red
;
color
:
$white
;
}
.tag-soon
{
background
:
$active
;
color
:
$white
;
}
.tag-category
{
background
:
#E0B97B
;
...
...
src/components/study/freeCourses/index.js
View file @
dc17dab5
...
...
@@ -4,7 +4,7 @@ import Course from '@/common/course-base'
import
{
http
,
api
}
from
'@/utils'
import
{
Toast
}
from
"antd-mobile"
;
import
classnames
from
'classnames'
import
{
isEmpty
}
from
'lodash'
import
{
isEmpty
}
from
'lodash'
import
'./free-courses.scss'
...
...
@@ -61,6 +61,15 @@ class FreeCourse extends PureComponent {
return
http
.
get
(
`
${
api
.
home
}
/m/live/free_list`
)
}
toLive
=
live
=>
{
const
{
room_id
,
live_status
}
=
live
if
(
live_status
)
{
window
.
location
.
assign
(
`http://www-test.julyedu.com/live/m_room/
${
room_id
}
`
)
}
else
{
Toast
.
info
(
'直播即将开始,敬请期待'
,
2
,
null
,
false
)
}
}
render
()
{
return
(
<
ul
className
=
'free-courses'
>
...
...
@@ -76,17 +85,20 @@ class FreeCourse extends PureComponent {
<
div
className
=
"time"
>
{
`
${
item
[
'live_start_time'
]}
`
}
<
/div
>
<
/div
>
)
const
LiveStatus
=
(
item
[
'live_status'
]
?
<
Tag
className
=
{
'tag-soon top'
}
>
即将开始
<
/Tag>
:
<
Tag
className
=
{
'tag-playing top'
}
>
正在直播
<
/Tag
>
)
return
(
<
Course
img
=
{
item
[
'live_cover'
]}
title
=
{
item
[
'live_title'
]}
top
=
{
<
Tag
className
=
{
'tag-starting top'
}
>
即将开始
<
/Tag
>
}
top
=
{
LiveStatus
}
bottom
=
{
Bottom
}
key
=
{
item
[
'live_id'
]}
className
=
{
'live'
}
handleClick
=
{
this
.
handleClick
}
handleClick
=
{
this
.
toLive
.
bind
(
this
,
item
)
}
id
=
{
index
}
/
>
)
...
...
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