Commit 290bff8c by xuzhenghua

赠一的一

parent 8fe277be
......@@ -11,21 +11,14 @@ function showToast(text) {
class Prizes extends Component {
state = {
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',
],
list: [],
isShowRule: false,
rule:'',
rankList: []
}
componentDidMount() {
const {rankingList} = this.props
console.log(rankingList)
if (!rankingList || !rankingList.length) {
this.getRankingList()
} else {
......@@ -33,8 +26,23 @@ class Prizes extends Component {
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 = () => {
const {saveRankingList} = this.props
......@@ -59,7 +67,8 @@ class Prizes extends Component {
const {
list,
rankList,
isShowRule
isShowRule,
rule
} = this.state
return (
<div id={'prizes'}>
......@@ -123,13 +132,14 @@ class Prizes extends Component {
<div className="mbc-box">
<div className="rele-content">
<div className="title">活动规则</div>
<p>1、进入七月在线服务号<a
style={{fontSize: `16px`, color: `rgba(47, 248, 255, 1)`, display: `inline-block`}}>回复77</a>获取活动海报,将上方课程赠送给好友,每有1名好友领取后,您和好友均可免费学习1课时该课
</p>
<p>2、每多1名好友领取,您获得的课时数+1,直到获得全部课时,届时仍可赠送给好友;</p>
<p>3、活动结束后,邀请好友数超过50人且排行榜前20名用户会得到<a
style={{fontSize: `16px`, color: `rgba(47, 248, 255, 1)`, display: `inline-block`}}>19VIP年会员、樱桃键盘</a>等大奖
</p>
<div dangerouslySetInnerHTML={{__html: rule}}></div>
{/*<p>1、进入七月在线服务号<a*/}
{/*style={{fontSize: `16px`, color: `rgba(47, 248, 255, 1)`, display: `inline-block`}}>回复77</a>获取活动海报,将上方课程赠送给好友,每有1名好友领取后,您和好友均可免费学习1课时该课;*/}
{/*</p>*/}
{/*<p>2、每多1名好友领取,您获得的课时数+1,直到获得全部课时,届时仍可赠送给好友;</p>*/}
{/*<p>3、活动结束后,邀请好友数超过50人且排行榜前20名用户会得到<a*/}
{/*style={{fontSize: `16px`, color: `rgba(47, 248, 255, 1)`, display: `inline-block`}}>19VIP年会员、樱桃键盘</a>等大奖。*/}
{/*</p>*/}
</div>
<img className="close"
onClick={() => {this.setState({isShowRule: false})}}
......
......@@ -121,6 +121,7 @@
padding: 20px 28px 30px 28px;
box-sizing: border-box;
margin: 145px auto 30px auto;
letter-spacing: 1px;
.title {
font-size: 18px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment