(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[10],{1734: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(989),a(12)),r=a.n(o),c=a(18);a(990);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(c.a,{className:"right"},"\u5728APP\u6253\u5f00")),i=a(1),m=a(991);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(API.home+"/m/dailyQuestion").then(e=>{const{data:{data:t,code:a}}=e;if(200===a){const e=m.Object.assign(t,{analysis:t.analysis.length>0?t.analysis.split("\n"):[]});this.setState({questionData:e})}})}render(){let{questionData:{ques:e,type_id:t,options:a,analysis:s,category:o},isShowAnswer:r}=this.state;return n.a.createElement("div",{className:"examination"},n.a.createElement(c.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(c.i,{className:"category-tag"},o),n.a.createElement("span",{dangerouslySetInnerHTML:{__html:e}})),1===t&&n.a.createElement(p,{className:"options",options:a,showCorrect:this.state.isShowAnswer}),!r&&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"})))),r&&n.a.createElement(u,{content:s,isShowAnswer:!0}),n.a.createElement(l,null))}}const p=n.a.memo(e=>{let{options:t,showCorrect:a}=e;return n.a.createElement("ul",{className:"options"},t.map((e,t)=>n.a.createElement("li",{key:t,className:r()("option",{active:1===e.is_ans&&a})},n.a.createElement("span",{className:"alphabet"},String.fromCharCode(65+t)),e.des)))}),u=n.a.memo(e=>{let{content:t,isShowAnswer:a}=e;return n.a.createElement("div",{className:r()("answer",{scale:a})},n.a.createElement("p",{className:"legend"},"\u89e3\u6790"),t.length>0&&t.map((e,t)=>n.a.createElement("p",{key:t,className:"content",dangerouslySetInnerHTML:{__html:e}})))})},989:function(e,t,a){},990:function(e,t,a){}}]);
//# sourceMappingURL=Examination.40dd7f08.chunk.js.map