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
420a47da
Commit
420a47da
authored
May 29, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index
parent
11cc2c08
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
src/common/VList/index.js
+4
-3
src/components/Index/index.js
+10
-10
src/components/preferential/index.js
+0
-0
src/components/preferential/index.scss
+3
-0
No files found.
src/common/VList/index.js
View file @
420a47da
...
@@ -2,12 +2,13 @@ import React from 'react';
...
@@ -2,12 +2,13 @@ import React from 'react';
import
'./index.scss'
import
'./index.scss'
const
VList
=
(
props
)
=>
{
const
VList
=
(
props
)
=>
{
console
.
log
(
props
)
return
(
return
(
<
li
className
=
'v-list-item'
>
<
li
className
=
'v-list-item'
onClick
=
{
e
=>
props
.
handleClick
(
props
.
courseInfo
.
course_id
)}
>
<
div
className
=
"content"
>
<
div
className
=
"content"
>
<
div
className
=
"cover"
onClick
=
{
props
.
handleClick
}
>
<
div
className
=
"cover"
>
{
props
.
status
}
{
props
.
status
}
<
img
src
=
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/4c5ccac604.jpg'
alt
=
""
/>
<
img
src
=
{
props
.
courseInfo
.
image_name
}
alt
=
""
/>
<
/div
>
<
/div
>
{
props
.
info
}
{
props
.
info
}
<
/div
>
<
/div
>
...
...
src/components/Index/index.js
View file @
420a47da
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
import
{
Course
}
from
'../../common'
import
{
Course
}
from
'../../common'
import
'./index.scss'
;
import
'./index.scss'
import
{
WithTab
}
from
'@/HOCs'
import
{
WithTab
}
from
'@/HOCs'
import
Swiper
from
'react-mobile-swiper'
import
Swiper
from
'react-mobile-swiper'
import
createStyle
from
'./createStyle'
import
createStyle
from
'./createStyle'
import
LazyLoad
from
'react-lazy-load'
;
import
LazyLoad
from
'react-lazy-load'
import
{
api
}
from
'@/utils'
import
{
api
}
from
'@/utils'
import
LiveRoom
from
'./liveRoom'
import
LiveRoom
from
'./liveRoom'
...
@@ -13,7 +13,7 @@ const animateTypes = Swiper.animateTypes
...
@@ -13,7 +13,7 @@ const animateTypes = Swiper.animateTypes
class
Index
extends
Component
{
class
Index
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
;
super
(
props
)
this
.
state
=
{
this
.
state
=
{
banner
:
[],
banner
:
[],
lives
:
[],
lives
:
[],
...
@@ -71,11 +71,11 @@ class Index extends Component {
...
@@ -71,11 +71,11 @@ class Index extends Component {
isShow
:
true
,
isShow
:
true
,
islive
:
true
,
islive
:
true
,
roomId
roomId
}))
;
}))
}
}
// 自组件传给父组件的isshow
// 自组件传给父组件的isshow
colseBox
=
(
val
)
=>
{
colseBox
=
(
val
)
=>
{
this
.
setState
({
isShow
:
val
})
;
this
.
setState
({
isShow
:
val
})
}
}
toSearch
()
{
toSearch
()
{
...
@@ -145,7 +145,7 @@ class Index extends Component {
...
@@ -145,7 +145,7 @@ class Index extends Component {
}
}
<
/div
>
<
/div
>
)
;
)
}
}
}
}
...
@@ -166,8 +166,8 @@ function TopSwiper({bannerList}) {
...
@@ -166,8 +166,8 @@ function TopSwiper({bannerList}) {
)
)
}
}
function
CourseList
({
modules
})
{
function
CourseList
({
modules
})
{
let
isOdd
=
modules
.
list
.
length
%
2
===
0
;
let
isOdd
=
modules
.
list
.
length
%
2
===
0
let
filterList
=
isOdd
?
modules
.
list
:
modules
.
list
.
slice
(
1
)
;
let
filterList
=
isOdd
?
modules
.
list
:
modules
.
list
.
slice
(
1
)
return
(
return
(
<
div
className
=
'category'
>
<
div
className
=
'category'
>
<
h2
className
=
"title"
>
{
modules
.
name
}
<
/h2
>
<
h2
className
=
"title"
>
{
modules
.
name
}
<
/h2
>
...
@@ -247,4 +247,4 @@ function ScrollBox(props) {
...
@@ -247,4 +247,4 @@ function ScrollBox(props) {
)
)
}
}
export
default
WithTab
(
Index
)
;
export
default
WithTab
(
Index
)
src/components/preferential/index.js
View file @
420a47da
This diff is collapsed.
Click to expand it.
src/components/preferential/index.scss
View file @
420a47da
...
@@ -117,6 +117,9 @@
...
@@ -117,6 +117,9 @@
display
:
flex
;
display
:
flex
;
margin-top
:
5px
;
margin-top
:
5px
;
margin-bottom
:
50px
;
margin-bottom
:
50px
;
ul
{
width
:
100%
;
}
}
}
.am-tabs-default-bar-tab
{
.am-tabs-default-bar-tab
{
...
...
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