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
591fea8d
Commit
591fea8d
authored
Mar 09, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限时免费
parent
903baf13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
46 deletions
+26
-46
src/components/limit-free/index.js
+13
-42
src/components/limit-free/index.scss
+13
-4
No files found.
src/components/limit-free/index.js
View file @
591fea8d
...
@@ -14,44 +14,8 @@ class LimitFree extends Component {
...
@@ -14,44 +14,8 @@ class LimitFree extends Component {
nav
nav
state
=
{
state
=
{
tab
:
{
tab
:
{},
0
:
'tab0'
,
courses
:
[],
1
:
'tab1'
,
2
:
'tab2'
,
3
:
'tab3'
,
4
:
'tab4'
,
5
:
'tab5'
,
6
:
'tab6'
,
7
:
'tab7'
,
8
:
'tab8'
,
9
:
'tab9'
,
},
courses
:
[
{
img
:
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
,
title
:
'NLP到Word2Vec实战班'
,
count
:
'1212'
,
status
:
1
,
price
:
99
,
price1
:
199
,
},
{
img
:
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
,
title
:
'NLP到Word2Vec实战班'
,
count
:
'1212'
,
status
:
1
,
price
:
99
,
price1
:
199
,
},
{
img
:
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
,
title
:
'NLP到Word2Vec实战班'
,
count
:
'1212'
,
status
:
1
,
price
:
99
,
price1
:
199
,
},
],
navItemStyle
:
{},
navItemStyle
:
{},
tabActiveIndex
:
0
tabActiveIndex
:
0
}
}
...
@@ -127,7 +91,7 @@ class LimitFree extends Component {
...
@@ -127,7 +91,7 @@ class LimitFree extends Component {
{
{
tab
&&
!!
Object
.
keys
(
tab
).
length
&&
Object
.
keys
(
tab
).
map
(
key
=>
{
tab
&&
!!
Object
.
keys
(
tab
).
length
&&
Object
.
keys
(
tab
).
map
(
key
=>
{
return
(
return
(
<
li
key
=
{
key
}
>
<
li
key
=
{
key
}
className
=
{
'category'
}
>
<
h2
id
=
{
`category
${
key
}
`
}
>
<
h2
id
=
{
`category
${
key
}
`
}
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/time_limited_free/M/category-icon.png"
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/time_limited_free/M/category-icon.png"
alt
=
""
/>
alt
=
""
/>
...
@@ -136,16 +100,23 @@ class LimitFree extends Component {
...
@@ -136,16 +100,23 @@ class LimitFree extends Component {
<
ul
className
=
{
'courses'
}
>
<
ul
className
=
{
'courses'
}
>
{
{
courses
&&
courses
.
length
&&
courses
.
map
((
item
,
index
)
=>
{
courses
&&
courses
.
length
&&
courses
.
map
((
item
,
index
)
=>
{
if
(
item
.
category_id
!=
key
){
return
null
}
/*
* course_status:
* 0未领取 1已领取未过期 2 已领取已过期 3 正常已购买
* */
let
des
,
bottom
let
des
,
bottom
switch
(
item
.
status
)
{
switch
(
item
.
course_
status
)
{
case
1
:
case
0
:
des
=
<
div
className
=
{
'learner'
}
>
des
=
<
div
className
=
{
'learner'
}
>
<
i
className
=
'iconfont iconRectangleCopy4'
/>
<
i
className
=
'iconfont iconRectangleCopy4'
/>
<
span
>
{
item
.
play_times
}
人学习
<
/span
>
<
span
>
{
item
.
play_times
}
人学习
<
/span
>
<
/div
>
<
/div
>
bottom
=
<
div
className
=
{
'bottom'
}
>
bottom
=
<
div
className
=
{
'bottom'
}
>
<
span
className
=
{
'red'
}
>
限时免费
<
/span
>
<
span
className
=
{
'red'
}
>
限时免费
<
/span
>
<
span
className
=
{
'origin-price'
}
>
¥
{
item
.
price
1
}
<
/span
>
<
span
className
=
{
'origin-price'
}
>
¥
{
item
.
price
0
}
<
/span
>
<
button
>
免费领取
<
/button
>
<
button
>
免费领取
<
/button
>
<
/div
>
<
/div
>
break
break
...
...
src/components/limit-free/index.scss
View file @
591fea8d
...
@@ -69,17 +69,26 @@
...
@@ -69,17 +69,26 @@
.course-list
{
.course-list
{
border-top
:
1px
solid
transparent
;
border-top
:
1px
solid
transparent
;
padding
:
0
12px
;
}
background
:
#fff
;
.category
{
padding
:
12px
12px
0
;
background
:
#fff
;
margin-bottom
:
8px
;
}
}
.course-list
li
{
scroll-margin-top
:
100px
;
h2
{
scroll-margin-top
:
45px
;
}
}
.courses
li
:nth-last-child
(
1
)
{
.courses
li
:nth-last-child
(
1
)
{
margin-bottom
:
0
;
margin-bottom
:
0
;
&
div
{
border-bottom
:
none
;
}
}
}
.v-list-base-item
{
.v-list-base-item
{
...
...
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