text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61f35a47"],{"27ae":function(module,exports,__webpack_require__){(function(global){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(e,t){module.exports=t(e)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof global?global:this,(function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.1",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(err){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},r=0,o=e.length;r<o;r++)t[e.charAt(r)]=r;return t}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?fromCharCode(192|t>>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),o=[b64chars.charAt(r>>>18),b64chars.charAt(r>>>12&63),t>=2?"=":b64chars.charAt(r>>>6&63),t>=1?"=":b64chars.charAt(63&r)];return o.join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[À-ß][-¿]","[à-ï][-¿]{2}","[ð-÷][-¿]{3}"].join("|"),"g"),cb_btou=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return fromCharCode(55296+(r>>>10))+fromCharCode(56320+(1023&r));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,r=t%4,o=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),a=[fromCharCode(o>>>16),fromCharCode(o>>>8&255),fromCharCode(255&o)];return a.length-=[0,0,2,1][r],a.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"===typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(e){return encode(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global["Meteor"]&&(Base64=global.Base64),module.exports?module.exports.Base64=global.Base64:(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return global.Base64}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)),{Base64:global.Base64}}))}).call(this,__webpack_require__("c8ba"))},"3e38":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-wrap"},[r("div",{staticClass:"ms-login"},[r("div",{staticClass:"ms-title"},[e._v("注册")]),r("el-form",{ref:"login",staticClass:"ms-content",attrs:{model:e.param,rules:e.rules,"label-width":"0px"}},[r("el-form-item",{attrs:{prop:"username"}},[r("el-input",{attrs:{placeholder:"请输入邮箱"},model:{value:e.param.username,callback:function(t){e.$set(e.param,"username",t)},expression:"param.username"}})],1),r("el-form-item",{attrs:{prop:"password"}},[r("el-input",{attrs:{type:"password",placeholder:"请输入密码"},model:{value:e.param.password,callback:function(t){e.$set(e.param,"password",t)},expression:"param.password"}})],1),r("el-form-item",{attrs:{prop:"tel"}},[r("el-input",{attrs:{placeholder:"请输入手机号"},model:{value:e.param.tel,callback:function(t){e.$set(e.param,"tel",t)},expression:"param.tel"}})],1),r("el-form-item",{staticStyle:{position:"relative"},attrs:{prop:"code"}},[r("el-input",{attrs:{type:"text",placeholder:"请输入验证码"},model:{value:e.param.code,callback:function(t){e.$set(e.param,"code",t)},expression:"param.code"}}),r("el-button",{staticStyle:{position:"absolute",right:"3.5px",top:"3.5px"},attrs:{size:"mini",type:"primary",disabled:e.sendAuthCode},on:{click:function(t){return e.getCode()}}},[e._v(e._s(e.btnText))])],1),r("div",{staticClass:"login-btn"},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm()}}},[e._v("注册")])],1),r("p",{staticClass:"login-tips"},[e._v("或 "),r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.login()}}},[e._v("登录")])],1)],1)],1)])},a=[],n=r("27ae").Base64,u={data:function(){var e=this,t=function(t,r,o){var a={email:e.param.username};e.$http.get("/merchant/checkEmail","application/json",a,(function(e){e.data?o():o(new Error("邮箱重复"))}),(function(e){o(new Error(e.msg))}))},r=function(t,r,o){var a={mobile:e.param.tel};e.$http.get("/merchant/checkMobile","application/json",a,(function(e){console.log(e),e.data?o():o(new Error("手机号重复"))}),(function(e){o(new Error(e.msg))}))};return{phoneLogin:!1,param:{username:"",password:"",tel:"",code:""},rules:{username:[{validator:t,trigger:"blur"},{pattern:/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,message:"邮箱格式不正确"},{required:!0,message:"请输入邮箱",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],tel:[{validator:r,trigger:"blur"},{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[34578]\d{9}$/,message:"目前只支持中国大陆的手机号码"}]},auth_time:180,sendAuthCode:!1,authTimeTimer:null,btnText:"获取验证码"}},methods:{submitForm:function(){var e=this;this.$refs.login.validate((function(t){if(!t)return!1;var r={email:e.param.username,mobile:e.param.tel,verifyCode:e.param.code,password:n.encode(e.param.password)};e.$http.post("/merchant/register","application/json",r,(function(t){t.data&&(localStorage.setItem("ms_username",e.param.username),localStorage.setItem("merchantGuid",t.data),e.$message.success("注册成功"),e.$router.push("/check"))}),(function(t){e.$message({showClose:!0,message:t.msg,type:"error"})}))}))},getCode:function(){var e=this;this.$refs.login.validateField("tel",(function(t){if(console.log(t),t)console.log("不发");else{console.log("发"),e.auth_time=180,e.sendAuthCode=!0;var r={mobile:e.param.tel,type:"0"};console.log(r),e.$http.post("/merchant/verifyCode","application/json",r,(function(t){t.data&&(e.getAuthCode(),e.$message({showClose:!0,message:"验证码已发送至登记手机号上，请查收。",type:"success"}))}),(function(t){e.sendAuthCode=!1,e.$message({showClose:!0,message:t.msg,type:"error"})}))}}))},getAuthCode:function(){var e=this;this.authTimeTimer&&clearTimeout(this.authTimeTimer),this.authTimeTimer=setTimeout((function(){e.auth_time-=1,e.btnText=e.auth_time+"",e.auth_time<0?(e.sendAuthCode=!1,e.btnText="获取验证码",clearTimeout(e.authTimeTimer)):e.getAuthCode()}),1e3)},login:function(){this.$router.push("/login")},forgetPassword:function(){this.$router.push("/forgetPassword")}}},c=u,s=(r("fb44"),r("2877")),i=Object(s["a"])(c,o,a,!1,null,"2800074a",null);t["default"]=i.exports},6610:function(e,t,r){},fb44:function(e,t,r){"use strict";var o=r("6610"),a=r.n(o);a.a}}]);