(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[19],{aSaP:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return m});a("/xke");var r=a("TeRw"),s=a("q1tI"),i=a.n(s),o=a("t3Un"),l=a("3a4m"),n=a.n(l);class m extends i.a.Component{constructor(){super(...arguments),this.state={isEmailVerify:!1,sendEmailVerifyTimeout:60}}componentDidMount(){this.props.location.query.code&&(this.refs.invite.value=this.props.location.query.code),Object(o["a"])("/passport/isEmailVerify").then(e=>{200===e.code&&this.setState({isEmailVerify:e.data})})}sendEmailVerify(){var e=this;function t(){setTimeout(()=>{0!==e.state.sendEmailVerifyTimeout?(e.setState({sendEmailVerifyTimeout:e.state.sendEmailVerifyTimeout-1}),t()):e.setState({sendEmailVerifyTimeout:60})},1e3)}Object(o["b"])("/passport/sendEmailVerify",{email:this.refs.email.value}).then(e=>{200===e.code&&t()})}submit(){if(this.refs.password.value!==this.refs.repassword.value)return r["a"]["error"]({message:"\u8bf7\u6c42\u9519\u8bef",description:"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u4e0d\u540c",duration:1.5});Object(o["b"])("/passport/register",{email:this.refs.email.value,password:this.refs.password.value,invite_code:this.refs.invite.value,email_code:this.refs.email_code?this.refs.email_code.value:""}).then(e=>{200===e.code&&e.data&&n.a.push("/login")})}render(){return i.a.createElement("div",{id:"page-container"},i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"row no-gutters justify-content-center bg-body-dark"},i.a.createElement("div",{className:"hero-static col-sm-10 col-md-6 col-xl-4 d-flex align-items-center p-2"},i.a.createElement("div",{className:"block block-rounded block-transparent block-fx-pop w-100 mb-0 overflow-hidden bg-image"},i.a.createElement("div",{className:"row no-gutters"},i.a.createElement("div",{className:"col-md-12 order-md-1 bg-white"},i.a.createElement("div",{className:"block-content block-content-full px-lg-4 py-md-4 py-lg-4"},i.a.createElement("div",{className:"mb-2 text-center"},i.a.createElement("a",{className:"link-fx font-w700 font-size-h1",href:"index.html"},i.a.createElement("span",{className:"text-dark"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("p",{className:"text-uppercase font-w700 font-size-sm text-muted"},"\u8be5\u9875\u9762\u662f\u88ab\u52a0\u5bc6\u7684")),i.a.createElement("div",{className:"form-group"},i.a.createElement("input",{type:"text",className:"form-control form-control-alt",placeholder:"\u90ae\u7bb1",ref:"email"})),this.state.isEmailVerify?i.a.createElement("div",{className:"form-group form-row"},i.a.createElement("div",{className:"col-9"},i.a.createElement("input",{type:"text",className:"form-control form-control-alt",placeholder:"\u90ae\u7bb1\u9a8c\u8bc1\u7801",ref:"email_code"})),i.a.createElement("div",{className:"col-3"},i.a.createElement("button",{type:"submit",disabled:60!==this.state.sendEmailVerifyTimeout,className:"btn btn-block btn-primary",onClick:()=>this.sendEmailVerify()},60===this.state.sendEmailVerifyTimeout?"\u53d1\u9001":this.state.sendEmailVerifyTimeout))):"",i.a.createElement("div",{className:"form-group"},i.a.createElement("input",{type:"password",className:"form-control form-control-alt",placeholder:"\u5bc6\u7801",ref:"password"})),i.a.createElement("div",{className:"form-group"},i.a.createElement("input",{type:"password",className:"form-control form-control-alt",placeholder:"\u5bc6\u7801",ref:"repassword"})),i.a.createElement("div",{className:"form-group"},i.a.createElement("input",{type:"text",className:"form-control form-control-alt",placeholder:"\u9080\u8bf7\u7801",ref:"invite"})),i.a.createElement("div",{className:"form-group"},i.a.createElement("button",{type:"submit",className:"btn btn-block btn-hero-primary",onClick:()=>this.submit()},i.a.createElement("i",{className:"fa fa-fw fa-smile mr-1"}),"\u6ce8\u518c"))))))))))}}}}]);