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
290bff8c
Commit
290bff8c
authored
Aug 22, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赠一的一
parent
8fe277be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
17 deletions
+28
-17
src/components/activity/give-courses/share-content/prizes/prizes.js
+27
-17
src/components/activity/give-courses/share-content/prizes/prizes.scss
+1
-0
No files found.
src/components/activity/give-courses/share-content/prizes/prizes.js
View file @
290bff8c
...
@@ -11,21 +11,14 @@ function showToast(text) {
...
@@ -11,21 +11,14 @@ function showToast(text) {
class
Prizes
extends
Component
{
class
Prizes
extends
Component
{
state
=
{
state
=
{
list
:
[
list
:
[],
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/prize-1.png'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/prize-2.png'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/prize-3.png'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/prize-4.png'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/prize-5.png'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/prize-6.png'
,
],
isShowRule
:
false
,
isShowRule
:
false
,
rule
:
''
,
rankList
:
[]
rankList
:
[]
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
rankingList
}
=
this
.
props
const
{
rankingList
}
=
this
.
props
console
.
log
(
rankingList
)
if
(
!
rankingList
||
!
rankingList
.
length
)
{
if
(
!
rankingList
||
!
rankingList
.
length
)
{
this
.
getRankingList
()
this
.
getRankingList
()
}
else
{
}
else
{
...
@@ -33,8 +26,23 @@ class Prizes extends Component {
...
@@ -33,8 +26,23 @@ class Prizes extends Component {
rankingList
rankingList
})
})
}
}
this
.
getPrizes
()
}
}
getPrizes
=
()
=>
{
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/invite`
)
.
then
(
res
=>
{
const
{
data
,
msg
,
errno
}
=
res
.
data
if
(
errno
===
200
)
{
this
.
setState
({
list
:
data
.
awards
,
rule
:
data
.
rule
})
}
else
{
showToast
(
msg
)
}
})
}
getRankingList
=
()
=>
{
getRankingList
=
()
=>
{
const
{
saveRankingList
}
=
this
.
props
const
{
saveRankingList
}
=
this
.
props
...
@@ -59,7 +67,8 @@ class Prizes extends Component {
...
@@ -59,7 +67,8 @@ class Prizes extends Component {
const
{
const
{
list
,
list
,
rankList
,
rankList
,
isShowRule
isShowRule
,
rule
}
=
this
.
state
}
=
this
.
state
return
(
return
(
<
div
id
=
{
'prizes'
}
>
<
div
id
=
{
'prizes'
}
>
...
@@ -123,13 +132,14 @@ class Prizes extends Component {
...
@@ -123,13 +132,14 @@ class Prizes extends Component {
<
div
className
=
"mbc-box"
>
<
div
className
=
"mbc-box"
>
<
div
className
=
"rele-content"
>
<
div
className
=
"rele-content"
>
<
div
className
=
"title"
>
活动规则
<
/div
>
<
div
className
=
"title"
>
活动规则
<
/div
>
<
p
>
1
、进入七月在线服务号
<
a
<
div
dangerouslySetInnerHTML
=
{{
__html
:
rule
}}
><
/div
>
style
=
{{
fontSize
:
`16px`
,
color
:
`rgba(47, 248, 255, 1)`
,
display
:
`inline-block`
}}
>
回复
77
<
/a>获取活动海报,将上方课程赠送给好友,每有1名好友领取后,您和好友均可免费学习1课时该课
;
{
/*<p>1、进入七月在线服务号<a*/
}
<
/p
>
{
/*style={{fontSize: `16px`, color: `rgba(47, 248, 255, 1)`, display: `inline-block`}}>回复77</a>获取活动海报,将上方课程赠送给好友,每有1名好友领取后,您和好友均可免费学习1课时该课;*/
}
<
p
>
2
、每多
1
名好友领取,您获得的课时数
+
1
,直到获得全部课时,届时仍可赠送给好友;
<
/p
>
{
/*</p>*/
}
<
p
>
3
、活动结束后,邀请好友数超过
50
人且排行榜前
20
名用户会得到
<
a
{
/*<p>2、每多1名好友领取,您获得的课时数+1,直到获得全部课时,届时仍可赠送给好友;</p>*/
}
style
=
{{
fontSize
:
`16px`
,
color
:
`rgba(47, 248, 255, 1)`
,
display
:
`inline-block`
}}
>
19
VIP
年会员、樱桃键盘
<
/a>等大奖
。
{
/*<p>3、活动结束后,邀请好友数超过50人且排行榜前20名用户会得到<a*/
}
<
/p
>
{
/*style={{fontSize: `16px`, color: `rgba(47, 248, 255, 1)`, display: `inline-block`}}>19VIP年会员、樱桃键盘</a>等大奖。*/
}
{
/*</p>*/
}
<
/div
>
<
/div
>
<
img
className
=
"close"
<
img
className
=
"close"
onClick
=
{()
=>
{
this
.
setState
({
isShowRule
:
false
})}}
onClick
=
{()
=>
{
this
.
setState
({
isShowRule
:
false
})}}
...
...
src/components/activity/give-courses/share-content/prizes/prizes.scss
View file @
290bff8c
...
@@ -121,6 +121,7 @@
...
@@ -121,6 +121,7 @@
padding
:
20px
28px
30px
28px
;
padding
:
20px
28px
30px
28px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
145px
auto
30px
auto
;
margin
:
145px
auto
30px
auto
;
letter-spacing
:
1px
;
.title
{
.title
{
font-size
:
18px
;
font-size
:
18px
;
...
...
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