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
5acb6cd4
Commit
5acb6cd4
authored
Jun 10, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ai-test' into dev
parents
cbd7813d
c5323308
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
src/components/ai-test/common/question/index.js
+1
-1
src/components/ai-test/scores/index.js
+2
-0
src/components/ai-test/share/index.js
+14
-1
No files found.
src/components/ai-test/common/question/index.js
View file @
5acb6cd4
...
@@ -24,7 +24,7 @@ class Question extends Component {
...
@@ -24,7 +24,7 @@ class Question extends Component {
<
div
className
=
"question"
>
<
div
className
=
"question"
>
{
activeIndex
!==
undefined
&&
`
${
activeIndex
+
1
}
.`
}
{
activeIndex
!==
undefined
&&
`
${
activeIndex
+
1
}
.`
}
{
category
&&
<
span
className
=
{
'category'
}
>
{
category
}
<
/span>} 
;
{
category
&&
<
span
className
=
{
'category'
}
>
{
category
}
<
/span>} 
;
<
span
dangerouslySetInnerHTML
=
{
html
(
question
.
ques
)
}
><
/span
>
<
span
dangerouslySetInnerHTML
=
{
{
__html
:
question
.
ques
}
}
><
/span
>
<
/div
>
<
/div
>
}
}
<
ul
className
=
{
'options'
}
>
<
ul
className
=
{
'options'
}
>
...
...
src/components/ai-test/scores/index.js
View file @
5acb6cd4
...
@@ -72,6 +72,8 @@ class Scores extends Component {
...
@@ -72,6 +72,8 @@ class Scores extends Component {
this
.
setState
({
this
.
setState
({
pageState
:
data
,
pageState
:
data
,
})
})
}
else
if
(
code
===
3009
)
{
this
.
props
.
history
.
push
(
'/'
)
}
else
{
}
else
{
Toast
.
fail
(
msg
,
2
,
null
,
false
)
Toast
.
fail
(
msg
,
2
,
null
,
false
)
}
}
...
...
src/components/ai-test/share/index.js
View file @
5acb6cd4
...
@@ -11,18 +11,20 @@ class aiTestHelp extends Component {
...
@@ -11,18 +11,20 @@ class aiTestHelp extends Component {
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
total_num
:
''
,
total_num
:
''
,
dec
:
''
,
isshowYindao
:
false
isshowYindao
:
false
}
}
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
handleFetchInfo
()
this
.
handleFetchInfo
()
this
.
getAssist
()
}
}
share
=
()
=>
{
share
=
()
=>
{
wxShare
({
wxShare
({
title
:
'全国AI水平测试开始了,看看你能答对几道题?'
,
title
:
'全国AI水平测试开始了,看看你能答对几道题?'
,
desc
:
''
,
desc
:
this
.
state
.
dec
,
link
:
`
${
API
.
m
}
/ai-test/assist/
${
getParam
(
'shareCode'
)}
`
,
link
:
`
${
API
.
m
}
/ai-test/assist/
${
getParam
(
'shareCode'
)}
`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/share-img.png'
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/share-img.png'
,
})
})
...
@@ -46,6 +48,17 @@ class aiTestHelp extends Component {
...
@@ -46,6 +48,17 @@ class aiTestHelp extends Component {
})
})
}
}
getAssist
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/aitest/assist`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
dec
:
data
.
ques
,
})
}
})
}
render
()
{
render
()
{
const
{
total_num
,
isshowYindao
}
=
this
.
state
const
{
total_num
,
isshowYindao
}
=
this
.
state
...
...
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