Commit 8e30482d by zhanghaozhe

周年庆

parent ac4d21a6
......@@ -420,6 +420,9 @@ class Anniversary2020 extends Component {
}
draw = debounce((i) => {
if(this.isGotoLogin()){
return
}
const {activityData, prizeData, isDrawing} = this.state
if (i !== 4 || isDrawing || prizeData.odd_times === 0 || activityData.stage === 4) {
return
......@@ -484,7 +487,7 @@ class Anniversary2020 extends Component {
this.setState((state, props) => {
return {
prizeData: {...state.prizeData, ...{odd_times: state.prizeData.odd_times + 1}},
activityData: {...state.activity_stage, ...{is_sign: true}},
activityData: {...state.activityData, ...{is_sign: true}},
}
});
} else {
......@@ -686,7 +689,7 @@ class Anniversary2020 extends Component {
prizeData.prizes && !!prizeData.prizes.length && prizeData.prizes.map((item, index) => {
return <li key={index}
className={classnames([
index === 4 ? (prizeData.odd_times ? 'available' : 'unavailable') : '',
index === 4 ? (user.hasError || prizeData.odd_times ? 'available' : 'unavailable') : '',
{
active: drawingItemId === item.id,
},
......@@ -696,8 +699,18 @@ class Anniversary2020 extends Component {
? <div className={'prize'}>
<img src={item.img_name} alt=""/>
</div>
: activityData.stage === 1 ?
<div className={'draw'} style={{lineHeight: '350%'}}>715日开始</div> : <div className={'draw'}>
: activityData.stage === 1
? <div className={'draw'} style={{lineHeight: '350%'}}>715日开始</div>
: user.hasError
? <div className="draw" style={{
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}>
<div>抽奖</div>
</div>
: <div className={'draw'}>
<div>抽奖</div>
<div>剩余{prizeData.odd_times || 0}次机会</div>
</div>
......
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