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