Commit 6fd059d9 by zhanghaozhe

ai测试

parent 8a24a58a
......@@ -37,6 +37,7 @@ class Scores extends Component {
address: '',
},
isShowUserAddress: false,
entryButtonInRule: false,
}
componentDidMount() {
......@@ -160,6 +161,7 @@ class Scores extends Component {
userScore,
isShowUserAddress,
userAddress,
entryButtonInRule,
} = this.state
const _rankList = Array.isArray(rankList) ? isExpandRankList ? rankList : rankList.slice(0, 10) : []
return (
......@@ -296,6 +298,7 @@ class Scores extends Component {
pageState.daily_test_num > 0
? <button className={'available'} onClick={() => {
isNeverShow ? this.startTest() : this.setState({
entryButtonInRule: true,
isShowRule: true,
})
}}>开始测试<span>(今日可测试{pageState.daily_test_num}次)</span></button>
......@@ -311,8 +314,9 @@ class Scores extends Component {
close={() => {
this.setState({
isShowRule: false,
entryButtonInRule: false,
})
}}/>
}} entryButtonInRule={entryButtonInRule}/>
}
{
isShowUserAddress &&
......@@ -344,16 +348,20 @@ class Scores extends Component {
}
}
function Rule({neverShow, isNeverShow, rule, close, startTest}) {
function Rule({neverShow, isNeverShow, rule, close, startTest, entryButtonInRule}) {
return <div className="rule-mask">
<div className="rule">
<div>测试规则</div>
<div dangerouslySetInnerHTML={html(rule)}></div>
<div className="option">
<input id={'never-show'} type="checkbox" onChange={neverShow} checked={isNeverShow}/>
<label htmlFor="never-show">不再提示</label>
</div>
<button onClick={startTest}>进入测试</button>
{
entryButtonInRule && <>
<div className="option">
<input id={'never-show'} type="checkbox" onChange={neverShow} checked={isNeverShow}/>
<label htmlFor="never-show">不再提示</label>
</div>
<button onClick={startTest}>进入测试</button>
</>
}
<i className={'close iconfont iconiconfront-2'} onClick={close}/>
</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