Commit bf816cb2 by xuzhenghua

bug

parent 97b712fd
...@@ -78,57 +78,48 @@ class FormalDraw extends Component { ...@@ -78,57 +78,48 @@ class FormalDraw extends Component {
draw = id => { draw = id => {
var _czc = _czc || [] var _czc = _czc || []
_czc.push(["_trackEvent", '点击抽奖', 'm端双十一正式活动-点击抽奖']) _czc.push(["_trackEvent", '点击抽奖', 'm端双十一正式活动-点击抽奖'])
<<<<<<< HEAD
let {surplus, is_prize, hot_value} = this.state.userValue let {surplus, is_prize, hot_value} = this.state.userValue
if(hot_value<50){ if(hot_value<50){
Toast.info('你的福气值未达到参与抽奖所需福气值分数,快去积攒福气值吧', 2, null, false) Toast.info('你的福气值未达到参与抽奖所需福气值分数,快去积攒福气值吧', 2, null, false)
return } else if(is_prize == 1){
}
if(is_prize == 1){
Toast.info('你已参与当前时段抽奖', 2, null, false) Toast.info('你已参与当前时段抽奖', 2, null, false)
return } else if(surplus<1){
}
if(surplus<1){
Toast.info('你的抽奖次数已用光,快去积攒福气值可获得更多抽奖机会', 2, null, false) Toast.info('你的抽奖次数已用光,快去积攒福气值可获得更多抽奖机会', 2, null, false)
======= } else {
let {surplus, is_prize} = this.state.userValue http.post(`${API.home}/sys/activity/prize`, {
if (is_prize || this.popupInstance || surplus <= 0) { id
>>>>>>> bda3e512eab055c3737e2b8e95c5dcc7a5e45d53 }).then(res => {
return const {code, msg, data} = res.data
} if (code == 200) {
http.post(`${API.home}/sys/activity/prize`, { QRCode.toDataURL(data.url, (err, url) => {
id this.popupInstance = Popup({
}).then(res => { title: '你已成功参与本时段抽奖',
const {code, msg, data} = res.data className: 'join-lottery',
if (code == 200) { content: (
QRCode.toDataURL(data.url, (err, url) => { <>
this.popupInstance = Popup({ <div className="text">
title: '你已成功参与本时段抽奖', <div className="code">抽奖码为:{data.code}</div>
className: 'join-lottery', <div className="time">本时段的中奖结果将在{data.date}公布</div>
content: ( <div className="hint">你可关注‘七月在线’服务号第一时间获得中奖信息。</div>
<> <img src={url} className='qr-code' alt=""/>
<div className="text"> </div>
<div className="code">抽奖码为:{data.code}</div> <button onClick={() => {
<div className="time">本时段的中奖结果将在{data.date}公布</div> this.popupInstance.close()
<div className="hint">你可关注‘七月在线’服务号第一时间获得中奖信息。</div> }}>知道了
<img src={url} className='qr-code' alt=""/> </button>
</div> </>
<button onClick={() => { )
this.popupInstance.close() })
}}>知道了 this.setState({
</button> userValue: {...this.state.userValue, ...{surplus: --surplus}}
</> })
)
})
this.setState({
userValue: {...this.state.userValue, ...{surplus: --surplus}}
}) })
})
} else { } else {
Toast.info(msg, 2, null, false) Toast.info(msg, 2, null, false)
} }
}) })
}
} }
lotteryFunc = (status, id) => { lotteryFunc = (status, id) => {
......
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