Commit 290bff8c by xuzhenghua

赠一的一

parent 8fe277be
...@@ -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`}}>19VIP年会员、樱桃键盘</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})}}
......
...@@ -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;
......
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