(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[11],{1199:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return h}));var s=a(0),n=a.n(s),o=(a(737),a(13)),c=a.n(o),r=a(20);a(738);var l=()=>n.a.createElement("div",{className:"open-app"},n.a.createElement("p",{className:"left"},"\u66f4\u591a\u8bd5\u9898\u8bf7\u524d\u5f80App\u67e5\u770b"),n.a.createElement(r.a,{className:"right"},"\u5728APP\u6253\u5f00")),i=a(1),m=a(739);class h extends s.PureComponent{constructor(e){super(e),this.showAnswer=()=>{this.setState({isShowAnswer:!this.state.isShowAnswer})},this.state={isShowAnswer:!1,questionData:{}}}componentDidMount(){i.f.get("".concat(API.home,"/m/dailyQuestion")).then(e=>{const t=e.data,a=t.data;if(200===t.code){const e=m.Object.assign(a,{analysis:a.analysis.length>0?a.analysis.split("\n"):[]});this.setState({questionData:e})}})}render(){let e=this.state,t=e.questionData,a=t.ques,s=t.type_id,o=t.options,c=t.analysis,i=t.category,m=e.isShowAnswer;return n.a.createElement("div",{className:"examination"},n.a.createElement(r.e,{title:"\u6bcf\u65e5\u4e00\u9898",arrow:!0,cart:!1}),n.a.createElement("div",{className:"question-container"},n.a.createElement("div",{className:"topic"},n.a.createElement(r.i,{className:"category-tag"},i),n.a.createElement("span",{dangerouslySetInnerHTML:{__html:a}})),1===s&&n.a.createElement(p,{className:"options",options:o,showCorrect:this.state.isShowAnswer}),!m&&n.a.createElement("div",{className:"show-answer",onClick:this.showAnswer},n.a.createElement("span",null,"\u67e5\u770b\u89e3\u6790",n.a.createElement("i",{className:"iconfont iconiconfront-69"})))),m&&n.a.createElement(u,{content:c,isShowAnswer:!0}),n.a.createElement(l,null))}}const p=n.a.memo(({options:e,showCorrect:t})=>n.a.createElement("ul",{className:"options"},e.map((e,a)=>n.a.createElement("li",{key:a,className:c()("option",{active:1===e.is_ans&&t})},n.a.createElement("span",{className:"alphabet"},String.fromCharCode(65+a)),e.des)))),u=n.a.memo(({content:e,isShowAnswer:t})=>n.a.createElement("div",{className:c()("answer",{scale:t})},n.a.createElement("p",{className:"legend"},"\u89e3\u6790"),e.length>0&&e.map((e,t)=>n.a.createElement("p",{key:t,className:"content",dangerouslySetInnerHTML:{__html:e}}))))},737:function(e,t,a){},738:function(e,t,a){}}]);
//# sourceMappingURL=Examination.cbc8e999.chunk.js.map