text: exports.ids=[7],exports.modules={100:function(e,r,t){var content=t(121);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);var o=t(3).default;e.exports.__inject__=function(e){o("788c311e",content,!0,e)}},120:function(e,r,t){"use strict";t.r(r);var o=t(100),l=t.n(o);for(var n in o)"default"!==n&&function(e){t.d(r,e,function(){return o[e]})}(n);r.default=l.a},121:function(e,r,t){(e.exports=t(2)(!1)).push([e.i,".page-register .header{border-bottom:2px solid #2bb8aa;min-width:980px;color:#666}.page-register .header header{margin:0 auto;padding:10px 0;width:980px}.page-register .header header .site-logo{display:inline-block;width:128px;width:54px;height:36px;text-indent:-9999px;background-position:-669px -748px;background-image:url(//s0.meituan.net/bs/file/?f=fe-sso-fs%3Abuild%2Fassets%2Fsp-normal.2ee5c09.png)}.page-register .header header .login{float:right}.page-register .header header .bold{font-style:normal}.page-register>section{margin:0 auto 30px;padding-top:30px;width:980px;min-height:300px;padding-right:550px;box-sizing:border-box}.page-register>section .status{font-size:12px;margin-left:20px;color:#e6a23c}.page-register>section .error{color:red}",""])},134:function(e,r,t){"use strict";t.r(r);var o=t(6),l=t.n(o),n=t(90),d=t.n(n),m={layout:"blank",data(){return{statusMsg:"",error:"",ruleForm:{name:"",code:"",pwd:"",cpwd:"",email:""},rules:{name:[{required:!0,type:"string",message:"请输入昵称",trigger:"blur"}],email:[{required:!0,type:"email",message:"请输入邮箱",trigger:"blur"}],pwd:[{required:!0,message:"请输入密码",trigger:"blur"}],cpwd:[{required:!0,message:"确认密码",trigger:"blur"},{validator:(e,r,t)=>{""===r?t(new Error("请再次输入密码")):r!==this.ruleForm.pwd?t(new Error("两次输入的密码不一致")):t()},trigger:"blur"}]}}},methods:{sendMsg(){let e,r;return!this.timerid&&(this.$refs.ruleForm.validateField("name",r=>{e=r}),this.statusMsg="",!e&&(this.$refs.ruleForm.validateField("email",e=>{r=e}),!r&&void l.a.post("/users/verify",{username:encodeURIComponent(this.ruleForm.name),email:this.ruleForm.email}).then(({status:e,data:data})=>{if(console.log("======ok=======",200===e&&data&&0===data.code,e,data.code,data.msg),200===e&&data&&0===data.code){let e=60;this.statusMsg=`验证码已发送，剩余${e}秒后可再次发送`,this.timerid=setInterval(()=>{this.statusMsg=`验证码已发送，剩余${e--}秒后可再次发送`,0===e&&(this.statusMsg="",clearInterval(this.timerid))},1e3)}else this.statusMsg=data.msg,setTimeout(()=>{this.statusMsg=""},1500)})))},register(){this.$refs.ruleForm.validate(e=>{e&&l.a.post("/users/signup",{username:window.encodeURIComponent(this.ruleForm.name),password:d.a.MD5(this.ruleForm.pwd).toString(),email:this.ruleForm.email,code:this.ruleForm.code}).then(({status:e,data:data})=>{200===e?data&&0===data.code?location.href="/login":this.error=data.msg:this.error=`服务器出错，错误码：${e}`,setTimeout(()=>{this.error=""},1500)})})}}},c=t(1);var component=Object(c.a)(m,function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"page-register"},[e._ssrNode('<article class="header">',"</article>",[e._ssrNode("<header>","</header>",[e._ssrNode('<a href="/" class="site-logo"></a> '),e._ssrNode('<span class="login">',"</span>",[e._ssrNode('<em class="bold">已有美团账号</em> '),e._ssrNode('<a href="/login">',"</a>",[t("el-button",{attrs:{type:"primary",size:"small"}},[e._v("登录")])],1)],2)],2)]),e._ssrNode(" "),e._ssrNode("<section>","</section>",[t("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[t("div",[e._v("160923863@qq.com")]),e._v(" "),t("el-form-item",{attrs:{label:"昵称",prop:"name"}},[t("el-input",{model:{value:e.ruleForm.name,callback:function(r){e.$set(e.ruleForm,"name",r)},expression:"ruleForm.name"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[t("el-input",{model:{value:e.ruleForm.email,callback:function(r){e.$set(e.ruleForm,"email",r)},expression:"ruleForm.email"}}),e._v(" "),t("el-button",{attrs:{size:"mini",round:""},on:{click:e.sendMsg}},[e._v("发送验证码")]),e._v(" "),t("span",{staticClass:"status"},[e._v(e._s(e.statusMsg))])],1),e._v(" "),t("el-form-item",{attrs:{label:"验证码",prop:"code"}},[t("el-input",{attrs:{maxlength:"4"},model:{value:e.ruleForm.code,callback:function(r){e.$set(e.ruleForm,"code",r)},expression:"ruleForm.code"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"密码",prop:"pwd"}},[t("el-input",{attrs:{type:"password"},model:{value:e.ruleForm.pwd,callback:function(r){e.$set(e.ruleForm,"pwd",r)},expression:"ruleForm.pwd"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"确认密码",prop:"cpwd"}},[t("el-input",{attrs:{type:"password"},model:{value:e.ruleForm.cpwd,callback:function(r){e.$set(e.ruleForm,"cpwd",r)},expression:"ruleForm.cpwd"}})],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.register}},[e._v("同意以下协议并注册")]),e._v(" "),t("div",{staticClass:"error"},[e._v(e._s(e.error))])],1),e._v(" "),t("el-form-item",[t("a",{attrs:{href:"https://www.meituan.com/about/terms",target:"_blank"}},[e._v("《美团网用户协议》")])])],1)],1)],2)},[],!1,function(e){var r=t(120);r.__inject__&&r.__inject__(e)},null,"24d7c9e7");r.default=component.exports}};
  //# sourceMappingURL=aba75da2dffe95850b9e.js.map