(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[69],{1471:function(e,t,a){},1538:function(e,t,a){"use strict";a.r(t);a(36);var n=a(10),o=a.n(n),c=a(3),r=a(4),s=a(6),i=a(7),l=a(0),m=a.n(l),h=(a(1471),a(24)),p=a(1),u=a(15),d=function(e){Object(s.a)(a,e);var t=Object(i.a)(a);function a(){var e;Object(c.a)(this,a);for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return(e=t.call.apply(t,[this].concat(r))).state={isShowAnswer:!1,isShowCaptcha:!1,instance:null,problem:{}},e.onVerify=function(t){p.f.post("".concat(API.home,"/m/safety"),t).then((function(t){200===t.data.code?(e.setState({isShowCaptcha:!1}),e.getProblem()):e.state.instance&&e.state.instance.reset()}))},e.getInstance=function(t){e.setState({instance:t})},e.getProblem=function(){p.f.get("".concat(API.home,"/m/question/").concat(e.props.match.params.id)).then((function(t){var a=t.data,n=a.code,c=a.msg,r=a.data;200===n?e.setState({problem:r}):1===n?e.setState({isShowCaptcha:!0}):o.a.info(c)}))},e.goBack=function(){if(document.referrer.includes(API.www))window.history.go(-1);else{var t=e.props.location,a=t.state;if(t.hash.includes("goback"))return window.history.go(-1);p.b.isWeixin&&Object(p.c)("code")&&Object(p.c)("state")&&window.history.go(-2),a.records&&a.records.length>1?window.history.go(-1):a.from&&a.from.pathname?window.location.replace("".concat(a.from.pathname).concat(a.from.search)):window.location.href=window.location.origin}},e}return Object(r.a)(a,[{key:"componentDidMount",value:function(){this.getProblem()}},{key:"componentDidUpdate",value:function(e,t){e.match.params.id!==this.props.match.params.id&&(this.setState({problem:{},isShowAnswer:!1}),this.getProblem())}},{key:"render",value:function(){var e=this,t=this.state,a=t.isShowAnswer,n=t.problem,o=n.quesInfo,c=n.between,r=t.isShowCaptcha;return o||r?m.a.createElement("article",{id:"problems"},r?m.a.createElement("div",{className:"captcha-container"},m.a.createElement("div",null,"\u4eb2\uff0c\u7cfb\u7edf\u6b63\u5fd9\uff0c\u6ed1\u52a8\u4e00\u4e0b\u9a6c\u4e0a\u56de\u6765"),m.a.createElement(h.b,{getInstance:this.getInstance,onVerify:this.onVerify})):m.a.createElement(m.a.Fragment,null,m.a.createElement(h.e,{title:o&&o.category,arrow:!0,cart:!1,goBack:this.goBack}),m.a.createElement("div",{className:"topic"},m.a.createElement("span",null,o&&o.order_id,"."),m.a.createElement("span",{dangerouslySetInnerHTML:{__html:o&&o.ques}})),!a&&m.a.createElement("div",{className:"btn",onClick:function(){e.setState({isShowAnswer:!0})}},m.a.createElement("button",null,"\u67e5\u770b\u89e3\u6790 ",m.a.createElement("i",{className:"iconfont iconiconfront-69"}))),a&&m.a.createElement("div",{className:"content"},m.a.createElement("div",{className:"title"},"\u89e3\u6790"),m.a.createElement("span",{dangerouslySetInnerHTML:{__html:o.analysis}})),m.a.createElement("footer",null,m.a.createElement("div",{className:"app"},"\u66f4\u591a\u9898\u76ee\u8bf7 ",m.a.createElement(h.a,{text:"\u524d\u5f80APP"})),m.a.createElement("div",{className:"op"},c&&!!c.up&&m.a.createElement(u.b,{to:"/problems/".concat(c.up),replace:!0,className:"nav"},"\u4e0a\u4e00\u9898"),c&&!!c.down&&m.a.createElement(u.b,{to:"/problems/".concat(c.down),replace:!0,className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),a}(l.Component);t.default=d}}]);
//# sourceMappingURL=69.01621d03.chunk.js.map