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