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 {
nav
state
=
{
tab
:
{
0
:
'tab0'
,
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
,
},
],
tab
:
{},
courses
:
[],
navItemStyle
:
{},
tabActiveIndex
:
0
}
...
...
@@ -127,7 +91,7 @@ class LimitFree extends Component {
{
tab
&&
!!
Object
.
keys
(
tab
).
length
&&
Object
.
keys
(
tab
).
map
(
key
=>
{
return
(
<
li
key
=
{
key
}
>
<
li
key
=
{
key
}
className
=
{
'category'
}
>
<
h2
id
=
{
`category
${
key
}
`
}
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/time_limited_free/M/category-icon.png"
alt
=
""
/>
...
...
@@ -136,16 +100,23 @@ class LimitFree extends Component {
<
ul
className
=
{
'courses'
}
>
{
courses
&&
courses
.
length
&&
courses
.
map
((
item
,
index
)
=>
{
if
(
item
.
category_id
!=
key
){
return
null
}
/*
* course_status:
* 0未领取 1已领取未过期 2 已领取已过期 3 正常已购买
* */
let
des
,
bottom
switch
(
item
.
status
)
{
case
1
:
switch
(
item
.
course_
status
)
{
case
0
:
des
=
<
div
className
=
{
'learner'
}
>
<
i
className
=
'iconfont iconRectangleCopy4'
/>
<
span
>
{
item
.
play_times
}
人学习
<
/span
>
<
/div
>
bottom
=
<
div
className
=
{
'bottom'
}
>
<
span
className
=
{
'red'
}
>
限时免费
<
/span
>
<
span
className
=
{
'origin-price'
}
>
¥
{
item
.
price
1
}
<
/span
>
<
span
className
=
{
'origin-price'
}
>
¥
{
item
.
price
0
}
<
/span
>
<
button
>
免费领取
<
/button
>
<
/div
>
break
...
...
src/components/limit-free/index.scss
View file @
591fea8d
...
...
@@ -69,17 +69,26 @@
.course-list
{
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
)
{
margin-bottom
:
0
;
&
div
{
border-bottom
:
none
;
}
}
.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