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
44fd952c
Commit
44fd952c
authored
Apr 19, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组件
parent
8510ff53
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
57 additions
and
52 deletions
+57
-52
.idea/workspace.xml
+0
-0
src/common/Scroll/index.js
+1
-0
src/common/Topscroll/index.js
+2
-2
src/common/carousel/carousel.js
+0
-17
src/common/carousel/carousel.scss
+0
-1
src/common/carousel/index.js
+15
-0
src/common/index.js
+4
-2
src/components/Index/index.js
+12
-14
src/components/Index/index.scss
+22
-16
src/styles/variable.scss
+1
-0
No files found.
.idea/workspace.xml
View file @
44fd952c
This diff is collapsed.
Click to expand it.
src/common/
scroll/scroll
.js
→
src/common/
Scroll/index
.js
View file @
44fd952c
...
@@ -33,3 +33,4 @@ class Scroll extends Component {
...
@@ -33,3 +33,4 @@ class Scroll extends Component {
}
}
export
default
Scroll
export
default
Scroll
src/common/
scroll/topscroll
.js
→
src/common/
Topscroll/index
.js
View file @
44fd952c
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Carousel
,
WingBlank
}
from
'antd-mobile'
;
import
{
Carousel
,
WingBlank
}
from
'antd-mobile'
;
class
Top
S
croll
extends
Component
{
class
Top
s
croll
extends
Component
{
state
=
{}
state
=
{}
render
()
{
render
()
{
...
@@ -45,4 +45,4 @@ class TopScroll extends Component {
...
@@ -45,4 +45,4 @@ class TopScroll extends Component {
}
}
}
}
export
default
Top
S
croll
export
default
Top
s
croll
src/common/carousel/carousel.js
deleted
100644 → 0
View file @
8510ff53
import
React
,
{
Component
}
from
'react'
;
import
'./carousel.scss'
;
class
Carousel
extends
Component
{
render
()
{
return
(
<
div
className
=
'scroll-box'
>
<
ul
className
=
'scroll-list'
>
{
this
.
props
.
children
}
<
/ul
>
<
/div
>
)
}
}
export
default
Carousel
src/common/carousel/carousel.scss
View file @
44fd952c
.scroll-box
{
.scroll-box
{
width
:
100%
;
width
:
100%
;
height
:
92px
;
overflow
:
auto
;
overflow
:
auto
;
position
:
relative
;
position
:
relative
;
margin-top
:
15px
;
margin-top
:
15px
;
...
...
src/common/carousel/index.js
0 → 100644
View file @
44fd952c
import
React
from
'react'
;
import
'./carousel.scss'
const
Carousel
=
(
props
)
=>
{
return
(
<
div
className
=
'scroll-box'
>
<
ul
className
=
'scroll-list'
>
{
props
.
children
}
<
/ul
>
<
/div
>
)
};
export
default
Carousel
;
src/common/index.js
View file @
44fd952c
// 底部路由
// 底部路由
export
{
default
as
Nav
}
from
'./Nav'
export
{
default
as
Nav
}
from
'./Nav'
export
{
default
as
VList
}
from
'./VList'
export
{
default
as
VList
}
from
'./VList'
export
{
default
as
Course
}
from
'./Course'
export
{
default
as
Course
}
from
'./Course'
// 课程状态(试听 正在直播)+封面+标题+ 详情
\ No newline at end of file
export
{
default
as
Carousel
}
from
'./Carousel'
// 横向滚动
export
{
default
as
Topscroll
}
from
'./Topscroll'
// 首页头部轮播
export
{
default
as
Scroll
}
from
'./Scroll'
// 首页正常轮播图
src/components/Index/index.js
View file @
44fd952c
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Course
,
VList
}
from
'../../common'
import
{
Course
,
Carousel
,
Scroll
,
Topscroll
}
from
'../../common'
import
Scroll
from
'../../common/scroll/scroll.js'
;
import
TopScroll
from
'../../common/scroll/topscroll.js'
;
import
Carousel
from
'../../common/carousel/carousel.js'
;
import
'./index.scss'
;
import
'./index.scss'
;
class
Index
extends
Component
{
class
Index
extends
Component
{
state
=
{
state
=
{
dataList
:
[
dataList
:
[
...
@@ -42,8 +38,8 @@ class Index extends Component {
...
@@ -42,8 +38,8 @@ class Index extends Component {
'teacher'
:
'wwwwww'
,
'teacher'
:
'wwwwww'
,
'time'
:
'2343234'
,
'time'
:
'2343234'
,
'isbuy'
:
1
,
'isbuy'
:
1
,
'price0'
:
1
00
,
'price0'
:
2
00
,
'price1'
:
1
000
'price1'
:
2
000
}
}
],
],
tabdata
:
[
tabdata
:
[
...
@@ -74,7 +70,7 @@ class Index extends Component {
...
@@ -74,7 +70,7 @@ class Index extends Component {
const
top
=
<
div
>
333
<
/div
>
const
top
=
<
div
>
333
<
/div
>
return
(
return
(
<
div
className
=
'indexbox'
>
<
div
className
=
'indexbox'
>
<
Top
Scroll
data
=
{
this
.
state
.
dataList
}
height
=
'168px'
><
/TopS
croll
>
<
Top
scroll
data
=
{
this
.
state
.
dataList
}
height
=
'168px'
><
/Tops
croll
>
<
div
className
=
"tabbox"
>
<
div
className
=
"tabbox"
>
<
ul
>
<
ul
>
{
{
...
@@ -121,12 +117,14 @@ class Index extends Component {
...
@@ -121,12 +117,14 @@ class Index extends Component {
<
h2
className
=
"title"
>
新上好课
<
/h2
>
<
h2
className
=
"title"
>
新上好课
<
/h2
>
<
ul
className
=
'course-detail'
>
<
ul
className
=
'course-detail'
>
{
this
.
state
.
dataList
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
dataList
.
map
((
item
,
index
)
=>
{
const
top
=
(
// const top = (
<
span
className
=
'audition'
>
// {
<
i
className
=
{
'iconfont iconerji'
}
><
/i
>
// item.isbuy === '1' && <span className='audition'>
试听
// <i className={'iconfont iconerji'}></i>
<
/span
>
// 试听
)
// </span>
// }
// )
const
bottom
=
(
const
bottom
=
(
<
p
className
=
"course-price"
>
<
p
className
=
"course-price"
>
<
span
className
=
"new"
>
¥
{
item
.
price0
}
<
/span
>
<
span
className
=
"new"
>
¥
{
item
.
price0
}
<
/span
>
...
...
src/components/Index/index.scss
View file @
44fd952c
.indexbox
{
.indexbox
{
overflow
:
hidden
;
overflow
:
hidden
;
background-color
:
#
fff
;
background-color
:
$bg_
fff
;
}
}
.am-wingblank
{
.am-wingblank
{
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
}
}
span
{
span
{
color
:
#606060
;
color
:
$color_606
;
font-size
:
13px
;
font-size
:
13px
;
display
:
block
;
display
:
block
;
margin-top
:
10px
;
margin-top
:
10px
;
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
height
:
100%
;
height
:
100%
;
margin-right
:
20px
;
margin-right
:
20px
;
box-shadow
:
0px
0px
5px
0px
rgba
(
0
,
0
,
0
,
0
.1
);
box-shadow
:
0px
0px
5px
0px
rgba
(
0
,
0
,
0
,
0
.1
);
background-color
:
#
fff
;
background-color
:
$bg_
fff
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
border-radius
:
5px
;
border-radius
:
5px
;
...
@@ -82,18 +82,18 @@
...
@@ -82,18 +82,18 @@
.item-title
{
.item-title
{
font-size
:
15px
;
font-size
:
15px
;
color
:
#
333
;
color
:
$color_
333
;
}
}
.item-teacher
{
.item-teacher
{
font-size
:
13px
;
font-size
:
13px
;
color
:
#
555
;
color
:
$color_
555
;
margin-top
:
6px
;
margin-top
:
6px
;
}
}
.item-time
{
.item-time
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#
999
;
color
:
$color_
999
;
margin-top
:
11px
;
margin-top
:
11px
;
}
}
}
}
...
@@ -121,12 +121,12 @@
...
@@ -121,12 +121,12 @@
.title
{
.title
{
font-size
:
15px
;
font-size
:
15px
;
color
:
#
333
;
color
:
$color_
333
;
display
:
inline-block
;
display
:
inline-block
;
}
}
.more
{
.more
{
color
:
#09f
;
color
:
$active
;
font-size
:
12px
;
font-size
:
12px
;
float
:
right
;
float
:
right
;
}
}
...
@@ -141,13 +141,13 @@
...
@@ -141,13 +141,13 @@
margin-bottom
:
50px
;
margin-bottom
:
50px
;
p
{
p
{
color
:
#
555
;
color
:
$color_
555
;
font-size
:
15px
;
font-size
:
15px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
span
{
span
{
color
:
#
999
;
color
:
$color_
999
;
font-size
:
12px
;
font-size
:
12px
;
}
}
}
}
...
@@ -165,9 +165,9 @@
...
@@ -165,9 +165,9 @@
width
:
54px
;
width
:
54px
;
height
:
18px
;
height
:
18px
;
line-height
:
18px
;
line-height
:
18px
;
background-color
:
#09f
;
background-color
:
$bg_active
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#fff
;
color
:
$white
;
text-align
:
center
;
text-align
:
center
;
border-radius
:
1px
;
border-radius
:
1px
;
...
@@ -183,12 +183,12 @@
...
@@ -183,12 +183,12 @@
margin-top
:
15px
;
margin-top
:
15px
;
.new
{
.new
{
color
:
#FF2121
;
color
:
$red
;
font-size
:
15px
;
font-size
:
15px
;
}
}
.old
{
.old
{
color
:
#
999
;
color
:
$color_
999
;
font-size
:
12px
;
font-size
:
12px
;
display
:
inline-block
;
display
:
inline-block
;
margin-left
:
15px
;
margin-left
:
15px
;
...
@@ -201,12 +201,18 @@
...
@@ -201,12 +201,18 @@
margin-top
:
15px
;
margin-top
:
15px
;
width
:
61px
;
width
:
61px
;
height
:
18px
;
height
:
18px
;
background-color
:
#09f
;
background-color
:
$bg_active
;
border-radius
:
9px
;
border-radius
:
9px
;
color
:
#fff
;
color
:
$white
;
font-size
:
12px
;
font-size
:
12px
;
text-align
:
center
;
text-align
:
center
;
line-height
:
18px
;
line-height
:
18px
;
}
}
}
}
/*
横向滚动
*/
.scroll-box
{
height
:
92px
;
}
src/styles/variable.scss
View file @
44fd952c
...
@@ -9,6 +9,7 @@ $color_333: #333;
...
@@ -9,6 +9,7 @@ $color_333: #333;
$color_555
:
#555
;
$color_555
:
#555
;
$color_666
:
#666
;
$color_666
:
#666
;
$color_999
:
#999
;
$color_999
:
#999
;
$color_606
:
#606060
;
/*
/*
...
...
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