Commit 70ef5a4b by zhanghaozhe

Merge branch 'ai-test' of gitlab.julyedu.com:baiguangyao/mr-julyedu into ai-test

parents 79308038 fd8aab65
import React, {Component} from 'react' import React, {Component} from 'react'
import {CopyToClipboard} from 'react-copy-to-clipboard' import {CopyToClipboard} from 'react-copy-to-clipboard'
import {browser, http, wxShare} from '@/utils' import {browser, http, wxShare,getParam} from '@/utils'
import './index.scss' import './index.scss'
import {Toast} from "antd-mobile" import {Toast} from "antd-mobile"
...@@ -10,7 +10,6 @@ class aiTestHelp extends Component { ...@@ -10,7 +10,6 @@ class aiTestHelp extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
code: '',
total_num: '', total_num: '',
isshowYindao: false isshowYindao: false
} }
...@@ -24,7 +23,7 @@ class aiTestHelp extends Component { ...@@ -24,7 +23,7 @@ class aiTestHelp extends Component {
wxShare({ wxShare({
title: '全国AI水平测试开始了,看看你能答对几道题?', title: '全国AI水平测试开始了,看看你能答对几道题?',
desc: '', 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', imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/share-img.png',
}) })
this.setState({ this.setState({
...@@ -42,7 +41,6 @@ class aiTestHelp extends Component { ...@@ -42,7 +41,6 @@ class aiTestHelp extends Component {
if (code === 200) { if (code === 200) {
this.setState({ this.setState({
total_num: data.total_num, total_num: data.total_num,
code: data.code
}) })
} }
}) })
...@@ -50,7 +48,7 @@ class aiTestHelp extends Component { ...@@ -50,7 +48,7 @@ class aiTestHelp extends Component {
render() { render() {
const {code, total_num, isshowYindao} = this.state const {total_num, isshowYindao} = this.state
return ( return (
<div className={'ai-test-help'}> <div className={'ai-test-help'}>
<div className="banner"> <div className="banner">
...@@ -67,7 +65,7 @@ class aiTestHelp extends Component { ...@@ -67,7 +65,7 @@ class aiTestHelp extends Component {
{ {
!browser.isWeixin && !browser.isWeixin &&
<CopyToClipboard <CopyToClipboard
text={`${API.m}/ai-test/assist/${code}`} text={`${API.m}/ai-test/assist/${getParam('shareCode')}`}
onCopy={this.copyToSuccess} onCopy={this.copyToSuccess}
> >
<div className={'share-btn'}> <div className={'share-btn'}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment