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
a66e5df4
Commit
a66e5df4
authored
Jun 20, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播状态
parent
a5373bf5
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 @
a66e5df4
...
@@ -10,10 +10,14 @@
...
@@ -10,10 +10,14 @@
left
:
0
;
left
:
0
;
}
}
.tag-s
tarting
{
.tag-s
oon
{
background
:
$red
;
background
:
$red
;
color
:
$white
;
color
:
$white
;
}
}
.tag-soon
{
background
:
$active
;
color
:
$white
;
}
.tag-category
{
.tag-category
{
background
:
#E0B97B
;
background
:
#E0B97B
;
...
...
src/components/study/freeCourses/index.js
View file @
a66e5df4
...
@@ -4,7 +4,7 @@ import Course from '@/common/course-base'
...
@@ -4,7 +4,7 @@ import Course from '@/common/course-base'
import
{
http
,
api
}
from
'@/utils'
import
{
http
,
api
}
from
'@/utils'
import
{
Toast
}
from
"antd-mobile"
;
import
{
Toast
}
from
"antd-mobile"
;
import
classnames
from
'classnames'
import
classnames
from
'classnames'
import
{
isEmpty
}
from
'lodash'
import
{
isEmpty
}
from
'lodash'
import
'./free-courses.scss'
import
'./free-courses.scss'
...
@@ -61,6 +61,15 @@ class FreeCourse extends PureComponent {
...
@@ -61,6 +61,15 @@ class FreeCourse extends PureComponent {
return
http
.
get
(
`
${
api
.
home
}
/m/live/free_list`
)
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
()
{
render
()
{
return
(
return
(
<
ul
className
=
'free-courses'
>
<
ul
className
=
'free-courses'
>
...
@@ -76,17 +85,20 @@ class FreeCourse extends PureComponent {
...
@@ -76,17 +85,20 @@ class FreeCourse extends PureComponent {
<
div
className
=
"time"
>
{
`
${
item
[
'live_start_time'
]}
`
}
<
/div
>
<
div
className
=
"time"
>
{
`
${
item
[
'live_start_time'
]}
`
}
<
/div
>
<
/div
>
<
/div
>
)
)
const
LiveStatus
=
(
item
[
'live_status'
]
?
<
Tag
className
=
{
'tag-soon top'
}
>
即将开始
<
/Tag>
:
<
Tag
className
=
{
'tag-playing top'
}
>
正在直播
<
/Tag
>
)
return
(
return
(
<
Course
<
Course
img
=
{
item
[
'live_cover'
]}
img
=
{
item
[
'live_cover'
]}
title
=
{
item
[
'live_title'
]}
title
=
{
item
[
'live_title'
]}
top
=
{
top
=
{
LiveStatus
}
<
Tag
className
=
{
'tag-starting top'
}
>
即将开始
<
/Tag
>
}
bottom
=
{
Bottom
}
bottom
=
{
Bottom
}
key
=
{
item
[
'live_id'
]}
key
=
{
item
[
'live_id'
]}
className
=
{
'live'
}
className
=
{
'live'
}
handleClick
=
{
this
.
handleClick
}
handleClick
=
{
this
.
toLive
.
bind
(
this
,
item
)
}
id
=
{
index
}
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