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
b8022196
Commit
b8022196
authored
Jun 05, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ai-test-merge' into dev
parents
5da0e928
6fd059d9
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 @
b8022196
...
@@ -37,6 +37,7 @@ class Scores extends Component {
...
@@ -37,6 +37,7 @@ class Scores extends Component {
address
:
''
,
address
:
''
,
},
},
isShowUserAddress
:
false
,
isShowUserAddress
:
false
,
entryButtonInRule
:
false
,
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -160,6 +161,7 @@ class Scores extends Component {
...
@@ -160,6 +161,7 @@ class Scores extends Component {
userScore
,
userScore
,
isShowUserAddress
,
isShowUserAddress
,
userAddress
,
userAddress
,
entryButtonInRule
,
}
=
this
.
state
}
=
this
.
state
const
_rankList
=
Array
.
isArray
(
rankList
)
?
isExpandRankList
?
rankList
:
rankList
.
slice
(
0
,
10
)
:
[]
const
_rankList
=
Array
.
isArray
(
rankList
)
?
isExpandRankList
?
rankList
:
rankList
.
slice
(
0
,
10
)
:
[]
return
(
return
(
...
@@ -296,6 +298,7 @@ class Scores extends Component {
...
@@ -296,6 +298,7 @@ class Scores extends Component {
pageState
.
daily_test_num
>
0
pageState
.
daily_test_num
>
0
?
<
button
className
=
{
'available'
}
onClick
=
{()
=>
{
?
<
button
className
=
{
'available'
}
onClick
=
{()
=>
{
isNeverShow
?
this
.
startTest
()
:
this
.
setState
({
isNeverShow
?
this
.
startTest
()
:
this
.
setState
({
entryButtonInRule
:
true
,
isShowRule
:
true
,
isShowRule
:
true
,
})
})
}}
>
开始测试
<
span
>
(今日可测试
{
pageState
.
daily_test_num
}
次)
<
/span></
button
>
}}
>
开始测试
<
span
>
(今日可测试
{
pageState
.
daily_test_num
}
次)
<
/span></
button
>
...
@@ -311,8 +314,9 @@ class Scores extends Component {
...
@@ -311,8 +314,9 @@ class Scores extends Component {
close
=
{()
=>
{
close
=
{()
=>
{
this
.
setState
({
this
.
setState
({
isShowRule
:
false
,
isShowRule
:
false
,
entryButtonInRule
:
false
,
})
})
}}
/
>
}}
entryButtonInRule
=
{
entryButtonInRule
}
/
>
}
}
{
{
isShowUserAddress
&&
isShowUserAddress
&&
...
@@ -344,16 +348,20 @@ class Scores extends Component {
...
@@ -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"
>
return
<
div
className
=
"rule-mask"
>
<
div
className
=
"rule"
>
<
div
className
=
"rule"
>
<
div
>
测试规则
<
/div
>
<
div
>
测试规则
<
/div
>
<
div
dangerouslySetInnerHTML
=
{
html
(
rule
)}
><
/div
>
<
div
dangerouslySetInnerHTML
=
{
html
(
rule
)}
><
/div
>
<
div
className
=
"option"
>
{
<
input
id
=
{
'never-show'
}
type
=
"checkbox"
onChange
=
{
neverShow
}
checked
=
{
isNeverShow
}
/
>
entryButtonInRule
&&
<>
<
label
htmlFor
=
"never-show"
>
不再提示
<
/label
>
<
div
className
=
"option"
>
<
/div
>
<
input
id
=
{
'never-show'
}
type
=
"checkbox"
onChange
=
{
neverShow
}
checked
=
{
isNeverShow
}
/
>
<
button
onClick
=
{
startTest
}
>
进入测试
<
/button
>
<
label
htmlFor
=
"never-show"
>
不再提示
<
/label
>
<
/div
>
<
button
onClick
=
{
startTest
}
>
进入测试
<
/button
>
<
/
>
}
<
i
className
=
{
'close iconfont iconiconfront-2'
}
onClick
=
{
close
}
/
>
<
i
className
=
{
'close iconfont iconiconfront-2'
}
onClick
=
{
close
}
/
>
<
/div
>
<
/div
>
<
/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