Commit 6f5fbe3c by xuzhenghua

Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu into detail

parents 3425c7ed 6590508b
...@@ -30,10 +30,9 @@ export default class Examination extends PureComponent { ...@@ -30,10 +30,9 @@ export default class Examination extends PureComponent {
} }
render() { render() {
// let {ques, type_id, options, analysis} = this.state.questionData
let { let {
questionData: { questionData: {
ques, type_id, options, analysis ques, type_id, options, analysis, category
}, },
isShowAnswer isShowAnswer
} = this.state } = this.state
...@@ -41,7 +40,7 @@ export default class Examination extends PureComponent { ...@@ -41,7 +40,7 @@ export default class Examination extends PureComponent {
<div className='examination'> <div className='examination'>
<div className="question-container"> <div className="question-container">
<div className="topic"> <div className="topic">
<Tag className='category-tag'>深度学习</Tag> <Tag className='category-tag'>{category}</Tag>
{ques} {ques}
</div> </div>
{ {
......
...@@ -51,3 +51,10 @@ export const isPhone = ($poneInput) => { ...@@ -51,3 +51,10 @@ export const isPhone = ($poneInput) => {
return false; return false;
} }
} }
export const getParam = (key, str) => {
const _s = str ? str : location.href;
const re = new RegExp(`(?:\\?|#|&)(${key})=([^=&#\\?]+)`, 'ig');
let found;
return (found = re.exec(_s)) ? found[2] : null;
}
\ No newline at end of file
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