Commit c0553215 by zhanghaozhe

中奖纪录

parent 4066361e
......@@ -97,7 +97,7 @@ class BlessingPreheat extends Component {
}
componentDidMount() {
document.title = `11.11-11.13 AI充电节,预热来袭!积福气享1折秒课,海量奖品来就送-七月在线`;
document.title = `11.11-11.13 AI充电节,预热来袭!积福气享1折秒课,海量奖品来就送-七月在线`
this.fetchUserBlessing()
this.setInitialNavActiveStatus()
window.addEventListener('scroll', throttle(this.calcNavActive, 100))
......@@ -277,7 +277,7 @@ class BlessingPreheat extends Component {
handleToSign = () => {
const { userInfo } = this.state;
const {userInfo} = this.state
http.post(`${API.home}/sys/add/blessing`, {
type: 1 // 1:签到;3:分享;4:浏览课程;
}).then(res => {
......@@ -310,15 +310,15 @@ class BlessingPreheat extends Component {
if (isLogin && !isLoginnew) {
this.toLogin()
} else {
if(key === 'shareMark') {
if (key === 'shareMark') {
this.setState({
isClose: false
});
})
setTimeout(() => {
this.setState({
isClose: true
});
}, 5000);
})
}, 5000)
}
let obj = {}
obj[key] = true
......@@ -330,7 +330,7 @@ class BlessingPreheat extends Component {
handleToShowNotice = () => {
http.get(`${API['base-api']}/sys/activity/create_blessing_qrcode`).then(res => {
const {errno, data, msg} = res.data;
const {errno, data, msg} = res.data
if (errno === 200) {
QRCode.toDataURL(data.url, {
width: 120,
......@@ -436,14 +436,17 @@ class BlessingPreheat extends Component {
</div>
<ul>
{
data.map((item, index) => {
Array.isArray(data)
? data.map((item, index) => {
return (
<li key={index}>
<div className="time">{item.time}</div>
<div className="name" onClick={this.showAddressPopup.bind(this, item['is_virtual'],item.prize)}>{item.prize}</div>
<div className="name"
onClick={this.showAddressPopup.bind(this, item['is_virtual'], item.prize)}>{item.prize}</div>
</li>
)
})
: <li style={{justifyContent: 'center'}}>暂无中奖纪录</li>
}
</ul>
</div>
......@@ -486,7 +489,7 @@ class BlessingPreheat extends Component {
}
showAddressPopup = (isVirtual, prize) => {
if(isVirtual){
if (isVirtual) {
Toast.info(`恭喜你抽中${prize},奖品已存放到你的账户`, 2, null, false)
return
}
......
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