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
128e59bd
Commit
128e59bd
authored
Mar 10, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限时免费
parent
bee07508
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletions
+69
-1
src/components/limit-free/index.js
+23
-1
src/components/limit-free/index.scss
+46
-0
No files found.
src/components/limit-free/index.js
View file @
128e59bd
...
@@ -4,6 +4,7 @@ import './index.scss'
...
@@ -4,6 +4,7 @@ import './index.scss'
import
{
HeaderBar
}
from
"@common/index"
import
{
HeaderBar
}
from
"@common/index"
import
{
WhiteSpace
,
Toast
}
from
"antd-mobile"
;
import
{
WhiteSpace
,
Toast
}
from
"antd-mobile"
;
import
VList
from
'@/common/v-list-base'
import
VList
from
'@/common/v-list-base'
import
{
Popup
}
from
"@common/index"
import
WithFullSize
from
"@/HOCs/WithFullSize"
import
WithFullSize
from
"@/HOCs/WithFullSize"
function
showToast
(
msg
)
{
function
showToast
(
msg
)
{
...
@@ -61,6 +62,26 @@ class LimitFree extends Component {
...
@@ -61,6 +62,26 @@ class LimitFree extends Component {
}
}
}
}
getCourse
=
id
=>
{
//todo 联调
const
instance
=
Popup
({
className
:
'get-course-popup'
,
closable
:
false
,
clickMaskClose
:
false
,
title
:
<
div
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/time_limited_free/M/check.png"
alt
=
""
/>
<
div
>
课程有效期
7
天,快去学习吧
~<
/div
>
<
/div>
,
content
:
<
div
className
=
{
'btns'
}
>
<
button
onClick
=
{()
=>
{
instance
.
close
()
}}
>
知道了
<
/button
>
<
button
>
立即学习
<
/button
>
<
/div
>
})
}
render
()
{
render
()
{
const
{
tab
,
courses
,
navItemStyle
,
tabActiveIndex
}
=
this
.
state
const
{
tab
,
courses
,
navItemStyle
,
tabActiveIndex
}
=
this
.
state
return
(
return
(
...
@@ -107,6 +128,7 @@ class LimitFree extends Component {
...
@@ -107,6 +128,7 @@ class LimitFree extends Component {
* course_status:
* course_status:
* 0未领取 1已领取未过期 2 已领取已过期 3 正常已购买
* 0未领取 1已领取未过期 2 已领取已过期 3 正常已购买
* */
* */
//todo 状态2
let
des
,
bottom
let
des
,
bottom
switch
(
item
.
course_status
)
{
switch
(
item
.
course_status
)
{
case
0
:
case
0
:
...
@@ -117,7 +139,7 @@ class LimitFree extends Component {
...
@@ -117,7 +139,7 @@ class LimitFree extends Component {
bottom
=
<
div
className
=
{
'bottom'
}
>
bottom
=
<
div
className
=
{
'bottom'
}
>
<
span
className
=
{
'red'
}
>
限时免费
<
/span
>
<
span
className
=
{
'red'
}
>
限时免费
<
/span
>
<
span
className
=
{
'origin-price'
}
>
¥
{
item
.
price0
}
<
/span
>
<
span
className
=
{
'origin-price'
}
>
¥
{
item
.
price0
}
<
/span
>
<
button
>
免费领取
<
/button
>
<
button
onClick
=
{
this
.
getCourse
.
bind
(
this
,
item
.
course_id
)}
>
免费领取
<
/button
>
<
/div
>
<
/div
>
break
break
case
1
:
case
1
:
...
...
src/components/limit-free/index.scss
View file @
128e59bd
...
@@ -173,4 +173,49 @@
...
@@ -173,4 +173,49 @@
color
:
#AAA
;
color
:
#AAA
;
text-align
:
center
;
text-align
:
center
;
}
}
}
.get-course-popup
{
top
:
210px
!
important
;
padding-bottom
:
0
!
important
;
padding-left
:
0
!
important
;
padding-right
:
0
!
important
;
.title
{
text-align
:
center
;
margin-bottom
:
30px
;
img
{
width
:
30px
;
height
:
30px
;
}
div
{
font-size
:
14px
;
color
:
#525C65
;
}
}
.btns
{
border-top
:
1px
solid
#DDD
;
display
:
flex
;
height
:
40px
;
button
{
-webkit-appearance
:
none
;
width
:
50%
;
border
:
none
;
outline
:
none
;
color
:
#333
;
background
:
#fff
;
border-radius
:
0
0
5px
5px
;
}
&
button
:first-child
{
border-right
:
1px
solid
#DDD
;
}
&
button
:last-child
{
color
:
#09f
;
}
}
}
}
\ No newline at end of file
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