(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{1136:function(e,t,a){},1181:function(e,t,a){"use strict";a.r(t);a(40);var n=a(10),c=a.n(n),o=a(3),s=a(5),r=a(4),l=a(6),i=a(7),m=a(0),p=a.n(m),u=(a(1136),a(25)),h=a(2),d=a(13),b=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(a=Object(r.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(s)))).state={isShowAnswer:!1,isShowCaptcha:!0,instance:null,problem:{}},a.onVerify=function(e){h.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(){h.e.get("".concat(API.home,"/m/question/").concat(a.props.match.params.id)).then(function(e){var t=e.data,n=t.code,o=t.msg,s=t.data;200===n?a.setState({problem:s}):1===n?a.setState({isShowCaptcha:!0}):c.a.info(o)})},a}return Object(i.a)(t,e),Object(s.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:{}}),this.getProblem())}},{key:"render",value:function(){var e=this,t=this.state,a=t.isShowAnswer,n=t.problem,c=n.quesInfo,o=n.between,s=t.isShowCaptcha;return c||s?p.a.createElement("article",{id:"problems"},s?p.a.createElement("div",{className:"captcha-container"},p.a.createElement("div",null,"\u4eb2\uff0c\u7cfb\u7edf\u6b63\u5fd9\uff0c\u6ed1\u52a8\u4e00\u4e0b\u9a6c\u4e0a\u56de\u6765"),p.a.createElement(u.b,{getInstance:this.getInstance,onVerify:this.onVerify})):p.a.createElement(p.a.Fragment,null,p.a.createElement(u.e,{title:c&&c.category,arrow:!0,cart:!1}),p.a.createElement("div",{className:"topic"},p.a.createElement("span",null,c&&c.order_id,"."),p.a.createElement("span",{dangerouslySetInnerHTML:{__html:c&&c.ques}})),!a&&p.a.createElement("div",{className:"btn",onClick:function(){e.setState({isShowAnswer:!0})}},p.a.createElement("button",null,"\u67e5\u770b\u89e3\u6790 ",p.a.createElement("i",{className:"iconfont iconiconfront-69"}))),a&&p.a.createElement("div",{className:"content ".concat(a?"slideInDown":"")},p.a.createElement("div",{className:"title"},"\u89e3\u6790"),p.a.createElement("span",{dangerouslySetInnerHTML:{__html:c.analysis}})),p.a.createElement("footer",null,p.a.createElement("div",{className:"app"},"\u66f4\u591a\u9898\u76ee\u8bf7 ",p.a.createElement(u.a,{text:"\u524d\u5f80APP"})),p.a.createElement("div",{className:"op"},o&&!!o.up&&p.a.createElement(d.b,{to:"/problems/".concat(o.up),className:"nav"},"\u4e0a\u4e00\u9898"),o&&!!o.down&&p.a.createElement(d.b,{to:"/problems/".concat(o.down),className:"nav"},"\u4e0b\u4e00\u9898"))))):null}}]),t}(m.Component);t.default=b}}]);
//# sourceMappingURL=66.4ee776df.chunk.js.map