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
Hide 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 {
...
@@ -83,6 +83,7 @@ class BlessingPreheat extends Component {
userHasError
:
props
.
user
.
hasError
,
userHasError
:
props
.
user
.
hasError
,
isApp
:
false
,
isApp
:
false
,
isClose
:
false
,
isClose
:
false
,
testSum
:
0
,
}
}
}
}
...
@@ -232,9 +233,11 @@ class BlessingPreheat extends Component {
...
@@ -232,9 +233,11 @@ class BlessingPreheat extends Component {
http
.
get
(
`
${
API
.
home
}
/sys/user/blessing`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/user/blessing`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
if
(
code
===
200
)
{
console
.
log
(
data
.
user_test_total
);
this
.
setState
({
this
.
setState
({
isSign
:
!!
data
.
today_signed
,
isSign
:
!!
data
.
today_signed
,
isFormal
:
data
.
is_activity
,
isFormal
:
data
.
is_activity
,
testSum
:
parseInt
(
data
.
user_test_total
,
10
)
||
0
,
userInfo
:
Object
.
assign
({},
userInfo
,
{
userInfo
:
Object
.
assign
({},
userInfo
,
{
isFollow
:
data
.
subscribed
,
isFollow
:
data
.
subscribed
,
blessingVal
:
data
.
user_blessing_value
,
blessingVal
:
data
.
user_blessing_value
,
...
@@ -420,8 +423,10 @@ class BlessingPreheat extends Component {
...
@@ -420,8 +423,10 @@ class BlessingPreheat extends Component {
shareMark
,
shareMark
,
index
,
index
,
isApp
,
isApp
,
isClose
isClose
,
}
=
this
.
state
testSum
}
=
this
.
state
;
console
.
log
(
testSum
);
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
const
isLogin
=
!
this
.
props
.
user
.
hasError
const
isLogin
=
!
this
.
props
.
user
.
hasError
return
(
return
(
...
@@ -525,7 +530,12 @@ class BlessingPreheat extends Component {
...
@@ -525,7 +530,12 @@ class BlessingPreheat extends Component {
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
测试记录
>
测试记录
>
<
/div
>
<
/div
>
<
LevelTest
history
=
{
history
}
isLogin
=
{
isLogin
}
toLogin
=
{
this
.
toLogin
}
><
/LevelTest
>
<
LevelTest
history
=
{
history
}
testSum
=
{
testSum
}
isLogin
=
{
isLogin
}
toLogin
=
{
this
.
toLogin
}
/
>
<
RankList
><
/RankList
>
<
RankList
><
/RankList
>
...
...
src/components/blessingPreheat/levelTest/index.js
View file @
5019ac9a
...
@@ -7,7 +7,7 @@ class LevelTest extends Component {
...
@@ -7,7 +7,7 @@ class LevelTest extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
testNumber
:
12345
,
testNumber
:
''
,
number
:
1
,
number
:
1
,
prizeListUrl
:
[
prizeListUrl
:
[
{
{
...
@@ -70,7 +70,7 @@ class LevelTest extends Component {
...
@@ -70,7 +70,7 @@ class LevelTest extends Component {
number
,
number
,
prizeListUrl
,
prizeListUrl
,
}
=
this
.
state
;
}
=
this
.
state
;
const
{
isLogin
}
=
this
.
props
;
const
{
isLogin
,
testSum
}
=
this
.
props
;
return
(
return
(
<>
<>
<
div
className
=
"level__test_module"
>
<
div
className
=
"level__test_module"
>
...
@@ -83,7 +83,7 @@ class LevelTest extends Component {
...
@@ -83,7 +83,7 @@ class LevelTest extends Component {
<
div
className
=
'test__number'
>
<
div
className
=
'test__number'
>
已有
已有
<
span
className
=
'number'
>
<
span
className
=
'number'
>
{
testNumber
}
{
testNumber
||
testSum
}
<
/span
>
<
/span
>
人参加测试
人参加测试
<
/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