Commit 23ae3a76 by zhanghaozhe

周年庆

parent a52f4919
......@@ -81,9 +81,10 @@ class Question extends Component {
})
}
resultFun = () => {
resultFun = (e) => {
const {history} = this.props
if (this.state.is_sign) {
let notNeedSign = e.target.getAttribute('data-sign') == 0
if (this.state.is_sign || !notNeedSign) {
history.push('/anniversary_2020#lottery')
} else {
http.get(`${API.home}/activity/anniversary/sign`)
......@@ -281,7 +282,7 @@ function BottomButton({resultFun, result, submit, isTeamHead, redo, isActivityEn
if (result.analysis) {
return !result.is_sign
? <button className={'lottery-related'} onClick={resultFun}>签到领取抽奖机会</button>
: <button className={'submit'} onClick={resultFun}>去抽奖</button>
: <button className={'submit'} onClick={resultFun} data-sign={'0'}>去抽奖</button>
}
return <button className={'submit'} onClick={submit}>提交</button>
}
......
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