(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-295fd9cf"],{"0995":function(t,e,o){"use strict";o("aaee")},"7daa":function(t,e){},"9ed6":function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"page-account",style:t.backgroundImages?{backgroundImage:"url("+t.backgroundImages+")"}:{backgroundImage:"url("+t.backgroundImageMo+")"}},[i("div",{staticClass:"container",class:[t.fullWidth>768?"containerSamll":"containerBig"]},[t.fullWidth>768?[i("div",{staticClass:"swiperPic"},[i("img",{attrs:{src:t.leftLogo}})])]:t._e(),t._v(" "),i("div",{staticClass:"index_from"},[i("div",{staticClass:"login-form-container"},[i("div",{staticClass:"title"},[t._v("账号登录")]),t._v(" "),i("div",{class:["form-item","account"===t.inputType?"form-item-input":"","account"===t.inputError?"form-item-error":""],staticStyle:{"margin-top":"40px"},on:{click:function(e){return t.onFocus("account")}}},[i("div",{class:["tip","account"===t.inputType||t.loginForm.account?"tip-input":""]},[t._v("账号")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.loginForm.account,expression:"loginForm.account",modifiers:{trim:!0}}],ref:"account",class:["input-block","account"===t.inputType||t.loginForm.account?"input-focus":""],attrs:{name:"username",tabindex:"1",autocomplete:"on"},domProps:{value:t.loginForm.account},on:{blur:[t.onBlur,function(e){return t.$forceUpdate()}],input:function(e){e.target.composing||t.$set(t.loginForm,"account",e.target.value.trim())}}})]),t._v(" "),i("div",{class:["form-item","pwd"===t.inputType?"form-item-input":"","pwd"===t.inputError?"form-item-error":""],staticStyle:{"margin-top":"60px"},on:{click:function(e){return t.onFocus("pwd")}}},[i("div",{staticClass:"left"},[i("div",{class:["tip","pwd"===t.inputType||t.loginForm.pwd?"tip-input":""]},[t._v("密码")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.loginForm.pwd,expression:"loginForm.pwd",modifiers:{trim:!0}}],key:t.passwordType,ref:"pwd",class:["input-block","pwd"===t.inputType||t.loginForm.pwd?"input-focus-in":""],attrs:{type:t.passwordType,name:"pwd",tabindex:"2","auto-complete":"on"},domProps:{value:t.loginForm.pwd},on:{blur:[t.onBlur,function(e){return t.$forceUpdate()}],input:function(e){e.target.composing||t.$set(t.loginForm,"pwd",e.target.value.trim())}}})]),t._v(" "),i("span",{staticClass:"show-pwd",on:{click:t.showPwd}},[i("svg-icon",{attrs:{"icon-class":"password"===t.passwordType?"eye":"eye-open"}})],1)]),t._v(" "),i("div",{class:["form-item","code"===t.inputType?"form-item-input":"","code"===t.inputError?"form-item-error":""],staticStyle:{"margin-top":"60px"},on:{click:function(e){return t.onFocus("code")}}},[i("div",{staticClass:"left"},[i("div",{class:["tip","code"===t.inputType||t.loginForm.code?"tip-input":""],staticStyle:{width:"50px"}},[t._v("验证码")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.loginForm.code,expression:"loginForm.code",modifiers:{trim:!0}}],ref:"code",class:["input-block","code"===t.inputType||t.loginForm.code?"input-focus-in":""],attrs:{tabindex:"3",autocomplete:"on",name:"username"},domProps:{value:t.loginForm.code},on:{blur:[t.onBlur,function(e){return t.$forceUpdate()}],input:function(e){e.target.composing||t.$set(t.loginForm,"code",e.target.value.trim())}}})]),t._v(" "),i("div",{staticClass:"imgs",on:{click:function(e){return e.stopPropagation(),t.getCaptcha()}}},[i("img",{attrs:{src:t.captchatImg}}),t._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showCaptchatImg,expression:"showCaptchatImg"}]},[t._v("已失效")])])]),t._v(" "),i("div",{staticClass:"acea-row"},[i("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:t.loading,type:"primary",disabled:t.disabled},nativeOn:{click:function(e){return e.preventDefault(),t.handleLogin(e)}}},[t._v("登录\n ")])],1)])])],2),t._v(" "),i("img",{staticClass:"merchant-logo",attrs:{src:o("e111")}})])},n=[],r=(o("61f7"),o("7daa"),o("c24f")),s={name:"Login",data:function(){return{showCaptchatImg:!1,captchatImg:"",leftLogo:"",loginLogo:"",backgroundImages:"",backgroundImageMo:o("e6df3"),fullWidth:document.body.clientWidth,swiperOption:{pagination:{el:".pagination"},autoplay:{enabled:!0,disableOnInteraction:!1,delay:3e3}},loginForm:{account:"",pwd:"",key:"",code:"",captcha:{captchaVerification:"",secretKey:"",token:""}},loginRules:{account:[{required:!0,trigger:"blur",message:"请输入用户名"}],pwd:[{required:!0,trigger:"blur",message:"请输入密码"}],code:[{required:!0,message:"请输入正确的验证码",trigger:"blur"}]},passwordType:"password",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{},disabled:!1,inputType:"",inputError:""}},components:{},watch:{fullWidth:function(t){if(!this.timer){this.screenWidth=t,this.timer=!0;var e=this;setTimeout((function(){e.timer=!1}),400)}},$route:{handler:function(t){var e=t.query;e&&(this.redirect=e.redirect,this.otherQuery=this.getOtherQuery(e))},immediate:!0}},created:function(){var t=this;document.onkeydown=function(e){if(-1!==t.$route.path.indexOf("login")){var o=window.event.keyCode;13===o&&t.handleLogin()}},window.addEventListener("resize",this.handleResize)},mounted:function(){var t=this;this.getInfo(),this.$nextTick((function(){t.screenWidth})),""===this.loginForm.account?this.$refs.account.focus():""===this.loginForm.pwd&&this.$refs.pwd.focus(),this.getCaptcha()},beforeCreate:function(){this.fullWidth},destroyed:function(){},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize)},methods:{handleResize:function(t){this.fullWidth=document.body.clientWidth,this.fullWidth},getInfo:function(){var t=this;Object(r["d"])().then((function(e){t.leftLogo=e.leftLogo,t.loginLogo=e.loginLogo,t.backgroundImages=e.backgroundImage}))},checkCapslock:function(t){var e=t.key;this.capsTooltip=e&&1===e.length&&e>="A"&&e<="Z"},showPwd:function(){var t=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){t.$refs.pwd.focus()}))},validateParam:function(t){return t.account?t.pwd?!!t.code||(this.$message({message:"验证码不能为空",type:"error",showClose:!0}),this.inputError="code",!1):(this.$message({message:"密码不能为空",type:"error",showClose:!0}),this.inputError="pwd",!1):(this.$message({message:"用户名不能为空",type:"error",showClose:!0}),this.inputError="account",!1)},handleLogin:function(){this.validateParam(this.loginForm)&&this.success(null)},success:function(t){var e=this;this.loginForm.captcha=this.$store.state.user.captcha;var o=this.$loading({lock:!0,text:"正在登录中."});this.$store.dispatch("user/login",this.loginForm).then((function(){e.$store.commit("product/SET_AdminProductClassify",[]),e.$store.commit("product/SET_MerProductClassify",[]),e.$store.commit("merchant/SET_MerchantClassify",[]),e.$store.commit("merchant/SET_MerchantType",[]),e.$store.commit("product/SET_ShippingTemplates",[]),e.$router.push({path:e.redirect||"/",query:e.otherQuery}),o.close(),e.disabled=!0})).catch((function(t){o.close(),e.disabled=!1,e.getCaptcha()}))},getCaptcha:function(){var t=this;Object(r["b"])().then((function(e){t.captchatImg=e.code,t.loginForm.key=e.key,t.showCaptchatImg=!1,setTimeout((function(){t.showCaptchatImg=!0}),27e4)})).catch((function(e){var o=e.message;t.$message.error(o)}))},getOtherQuery:function(t){return Object.keys(t).reduce((function(e,o){return"redirect"!==o&&(e[o]=t[o]),e}),{})},onFocus:function(t){this.inputError="",this.inputType=t,"account"===t?this.$refs.account.focus():"pwd"===t?this.$refs.pwd.focus():this.$refs.code.focus()},onBlur:function(){this.inputType="",this.inputError=""},onError:function(t){this.inputError=t}}},a=s,c=(o("0995"),o("a877"),o("2877")),u=Object(c["a"])(a,i,n,!1,null,"335389d8",null);e["default"]=u.exports},a877:function(t,e,o){"use strict";o("efb6")},aaee:function(t,e,o){},e111:function(t,e,o){t.exports=o.p+"static/img/merchant_logo.6ba96f19.png"},e6df3:function(t,e,o){t.exports=o.p+"static/img/bg.590046d3.jpg"},efb6:function(t,e,o){}}]);