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
dad2df0e
Commit
dad2df0e
authored
Jun 09, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
a3d1d96a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/components/ai-test/report/index.js
+11
-3
No files found.
src/components/ai-test/report/index.js
View file @
dad2df0e
...
...
@@ -28,12 +28,17 @@ class scoreReport extends Component {
}
componentDidMount
()
{
window
.
onbeforeunload
=
()
=>
{
document
.
documentElement
.
scrollTop
=
0
document
.
body
.
scrollTop
=
0
}
this
.
getCodeWe
()
this
.
handleFetchInfo
(
0
)
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
user
.
data
.
avatar
!==
nextProps
.
user
.
data
.
avatar
)
{
if
(
this
.
props
.
user
.
data
.
avatar
!==
nextProps
.
user
.
data
.
avatar
)
{
this
.
getCanvas
()
return
false
}
...
...
@@ -42,10 +47,13 @@ class scoreReport extends Component {
getCanvas
()
{
document
.
documentElement
.
scrollTop
=
0
document
.
body
.
scrollTop
=
0
let
_this
=
this
var
canvas2
=
document
.
createElement
(
"canvas"
)
let
_canvas
=
document
.
getElementsByClassName
(
'score-list'
)[
0
]
if
(
!
_canvas
)
{
if
(
!
_canvas
)
{
return
}
var
w
=
parseInt
(
window
.
getComputedStyle
(
_canvas
).
width
)
...
...
@@ -98,7 +106,7 @@ class scoreReport extends Component {
this
.
getBase64
(
avatar
)
setTimeout
(()
=>
{
this
.
getCanvas
()
},
500
)
},
500
)
}
})
}
...
...
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