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
5019ac9a
Commit
5019ac9a
authored
Nov 04, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai test sum
parent
a789de0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
src/components/blessingPreheat/index.js
+13
-3
src/components/blessingPreheat/levelTest/index.js
+3
-3
No files found.
src/components/blessingPreheat/index.js
View file @
5019ac9a
...
...
@@ -83,6 +83,7 @@ class BlessingPreheat extends Component {
userHasError
:
props
.
user
.
hasError
,
isApp
:
false
,
isClose
:
false
,
testSum
:
0
,
}
}
...
...
@@ -232,9 +233,11 @@ class BlessingPreheat extends Component {
http
.
get
(
`
${
API
.
home
}
/sys/user/blessing`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
console
.
log
(
data
.
user_test_total
);
this
.
setState
({
isSign
:
!!
data
.
today_signed
,
isFormal
:
data
.
is_activity
,
testSum
:
parseInt
(
data
.
user_test_total
,
10
)
||
0
,
userInfo
:
Object
.
assign
({},
userInfo
,
{
isFollow
:
data
.
subscribed
,
blessingVal
:
data
.
user_blessing_value
,
...
...
@@ -420,8 +423,10 @@ class BlessingPreheat extends Component {
shareMark
,
index
,
isApp
,
isClose
}
=
this
.
state
isClose
,
testSum
}
=
this
.
state
;
console
.
log
(
testSum
);
const
{
history
}
=
this
.
props
const
isLogin
=
!
this
.
props
.
user
.
hasError
return
(
...
...
@@ -525,7 +530,12 @@ class BlessingPreheat extends Component {
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
测试记录
>
<
/div
>
<
LevelTest
history
=
{
history
}
isLogin
=
{
isLogin
}
toLogin
=
{
this
.
toLogin
}
><
/LevelTest
>
<
LevelTest
history
=
{
history
}
testSum
=
{
testSum
}
isLogin
=
{
isLogin
}
toLogin
=
{
this
.
toLogin
}
/
>
<
RankList
><
/RankList
>
...
...
src/components/blessingPreheat/levelTest/index.js
View file @
5019ac9a
...
...
@@ -7,7 +7,7 @@ class LevelTest extends Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
testNumber
:
12345
,
testNumber
:
''
,
number
:
1
,
prizeListUrl
:
[
{
...
...
@@ -70,7 +70,7 @@ class LevelTest extends Component {
number
,
prizeListUrl
,
}
=
this
.
state
;
const
{
isLogin
}
=
this
.
props
;
const
{
isLogin
,
testSum
}
=
this
.
props
;
return
(
<>
<
div
className
=
"level__test_module"
>
...
...
@@ -83,7 +83,7 @@ class LevelTest extends Component {
<
div
className
=
'test__number'
>
已有
<
span
className
=
'number'
>
{
testNumber
}
{
testNumber
||
testSum
}
<
/span
>
人参加测试
<
/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