Commit fde5fb23 by zhanghaozhe

Merge branch 'ai-test' into pre

parents ec495570 c5323308
......@@ -24,7 +24,7 @@ class Question extends Component {
<div className="question">
{activeIndex !== undefined && `${activeIndex + 1}.`}
{category && <span className={'category'}>{category}</span>}&nbsp;
<span dangerouslySetInnerHTML={html(question.ques)}></span>
<span dangerouslySetInnerHTML={{__html: question.ques}}></span>
</div>
}
<ul className={'options'}>
......
......@@ -72,6 +72,8 @@ class Scores extends Component {
this.setState({
pageState: data,
})
} else if (code === 3009) {
this.props.history.push('/')
} else {
Toast.fail(msg, 2, null, false)
}
......
......@@ -11,18 +11,20 @@ class aiTestHelp extends Component {
super(props)
this.state = {
total_num: '',
dec:'',
isshowYindao: false
}
}
componentDidMount() {
this.handleFetchInfo()
this.getAssist()
}
share = () => {
wxShare({
title: '全国AI水平测试开始了,看看你能答对几道题?',
desc: '',
desc: this.state.dec,
link: `${API.m}/ai-test/assist/${getParam('shareCode')}`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/share-img.png',
})
......@@ -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() {
const {total_num, isshowYindao} = this.state
......
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