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
70ef5a4b
Commit
70ef5a4b
authored
Jun 09, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ai-test' of gitlab.julyedu.com:baiguangyao/mr-julyedu into ai-test
parents
79308038
fd8aab65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/components/ai-test/share/index.js
+4
-6
No files found.
src/components/ai-test/share/index.js
View file @
70ef5a4b
import
React
,
{
Component
}
from
'react'
import
{
CopyToClipboard
}
from
'react-copy-to-clipboard'
import
{
browser
,
http
,
wxShare
}
from
'@/utils'
import
{
browser
,
http
,
wxShare
,
getParam
}
from
'@/utils'
import
'./index.scss'
import
{
Toast
}
from
"antd-mobile"
...
...
@@ -10,7 +10,6 @@ class aiTestHelp extends Component {
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
code
:
''
,
total_num
:
''
,
isshowYindao
:
false
}
...
...
@@ -24,7 +23,7 @@ class aiTestHelp extends Component {
wxShare
({
title
:
'全国AI水平测试开始了,看看你能答对几道题?'
,
desc
:
''
,
link
:
`
${
API
.
m
}
/ai-test/assist/
${
this
.
state
.
code
}
`
,
link
:
`
${
API
.
m
}
/ai-test/assist/
${
getParam
(
'shareCode'
)
}
`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/share-img.png'
,
})
this
.
setState
({
...
...
@@ -42,7 +41,6 @@ class aiTestHelp extends Component {
if
(
code
===
200
)
{
this
.
setState
({
total_num
:
data
.
total_num
,
code
:
data
.
code
})
}
})
...
...
@@ -50,7 +48,7 @@ class aiTestHelp extends Component {
render
()
{
const
{
code
,
total_num
,
isshowYindao
}
=
this
.
state
const
{
total_num
,
isshowYindao
}
=
this
.
state
return
(
<
div
className
=
{
'ai-test-help'
}
>
<
div
className
=
"banner"
>
...
...
@@ -67,7 +65,7 @@ class aiTestHelp extends Component {
{
!
browser
.
isWeixin
&&
<
CopyToClipboard
text
=
{
`
${
API
.
m
}
/ai-test/assist/
${
code
}
`
}
text
=
{
`
${
API
.
m
}
/ai-test/assist/
${
getParam
(
'shareCode'
)
}
`
}
onCopy
=
{
this
.
copyToSuccess
}
>
<
div
className
=
{
'share-btn'
}
>
...
...
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