webpackJsonp([27],{Iwgb:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("FevL"),r=a("P5P/"),i=a("AAHV"),n=a("p1Z8");s.default.component(i.Button.name,i.Button),s.default.component(i.ButtonGroup.name,i.ButtonGroup);var o={data:()=>({title:"会员注册",user:{name:"",pwd:"",repwd:"",captcha:""},captchaImg:""}),created(){this.changeCaptcha()},methods:{changeCaptcha:function(){this.captchaImg=this.api.captcha+"?v="+Math.random()},register:function(){return""==this.user.name?(Object(n.Toast)({mes:"请输入账号!",timeout:1e3,icon:"warning"}),!1):""==this.user.pwd||""==this.user.repwd?(Object(n.Toast)({mes:"请输入密码!",timeout:1e3,icon:"warning"}),!1):this.user.pwd!=this.user.repwd?(Object(n.Toast)({mes:"密码输入不一致",timeout:1e3,icon:"warning"}),!1):void this.submit()},submit:function(){this.$axios.post(this.api.register,{attr:this.user,type:1},{withCredentials:!0}).then(t=>{if(1==t.data.code){var e=t.data.data;Object(r.c)("name",e.name),Object(n.Toast)({mes:"注册成功!",timeout:1e3,icon:"success"}),this.$router.push({name:"userLogin"})}else Object(n.Toast)({mes:t.data.msg,timeout:1e3,icon:"warning"}),this.user.captcha="",this.changeCaptcha()},t=>{this.user.captcha="",this.changeCaptcha(),Object(n.Toast)({mes:"网络请求失败!",timeout:1e3,icon:"error"})})}}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"login signup"},[a("v-title",{attrs:{title:t.title}}),t._v(" "),a("div",{staticClass:"login-form"},[a("div",{staticClass:"group"},[a("label",{staticClass:"font-two"},[t._v("帐号")]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.user.name,expression:"user.name"}],staticClass:"form-text",attrs:{type:"text",name:"username",placeholder:"手机号/用户名/邮箱"},domProps:{value:t.user.name},on:{input:function(e){e.target.composing||t.$set(t.user,"name",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"group"},[a("label",{staticClass:"font-two"},[t._v("密码")]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.user.pwd,expression:"user.pwd"}],staticClass:"form-text",attrs:{type:"password",placeholder:"6-25个字符，数字、字母、符号"},domProps:{value:t.user.pwd},on:{input:function(e){e.target.composing||t.$set(t.user,"pwd",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"group"},[a("label",{staticClass:"font-two"},[t._v("确认密码")]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.user.repwd,expression:"user.repwd"}],staticClass:"form-text",attrs:{type:"password",placeholder:"6-25个字符，数字、字母、符号"},domProps:{value:t.user.repwd},on:{input:function(e){e.target.composing||t.$set(t.user,"repwd",e.target.value)}}})]),t._v(" "),a("div",{staticClass:"group captcha"},[a("label",{staticClass:"font-two"},[t._v("验证码")]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.user.captcha,expression:"user.captcha"}],staticClass:"form-text",attrs:{type:"number",placeholder:"输入图片验证码"},domProps:{value:t.user.captcha},on:{input:function(e){e.target.composing||t.$set(t.user,"captcha",e.target.value)}}}),t._v(" "),a("img",{attrs:{src:t.captchaImg},on:{click:t.changeCaptcha}})]),t._v(" "),a("div",{staticClass:"btn"},[a("yd-button",{attrs:{type:"danger",size:"large"},nativeOn:{click:function(e){return t.register(e)}}},[t._v("立即注册")])],1),t._v(" "),a("div",{staticClass:"text-right"},[a("router-link",{staticClass:"link",attrs:{to:"/user/login"}},[t._v(" 已有帐号，立即登录 ")])],1)])],1)},staticRenderFns:[]};var u=a("D8HT")(o,c,!1,function(t){a("tsKy")},"data-v-e7398dc0",null);e.default=u.exports},tsKy:function(t,e){}});