Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
6fd059d9
Commit
6fd059d9
authored
Jun 05, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai测试
parent
8a24a58a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
src/components/ai-test/scores/index.js
+15
-7
No files found.
src/components/ai-test/scores/index.js
View file @
6fd059d9
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment