(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3afb42fc"],{"07af":function(t,e,o){"use strict";o("64f2")},"64f2":function(t,e,o){},7167:function(t,e,o){"use strict";o("a201")},7565:function(t,e,o){t.exports=o.p+"static/img/plat_logo.6f3d68de.png"},"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:"plat-logo",attrs:{src:o("7565")}})])},n=[],r=(o("61f7"),o("7daa"),o("c24f")),s=o("2b9b"),a={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,isWeixin:this.$wechat.isWeixin(),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:{getUrl:function(){var t=this;Object(s["e"])().then((function(e){t.$store.commit("settings/SET_FrontDomain",e)}))},handleResize:function(t){this.fullWidth=document.body.clientWidth,this.fullWidth<768&&document.getElementsByTagName("canvas")[0].removeAttribute("class","index_bg")},getInfo:function(){var t=this;Object(r["f"])().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.getUrl(),e.$router.push({path:e.redirect||"/dashboard",query:e.otherQuery}),e.$store.commit("product/SET_AdminProductClassify",[]),e.$store.commit("product/SET_ProductBrand",[]),e.$store.commit("merchant/SET_MerchantClassify",[]),e.$store.commit("merchant/SET_MerchantType",[]),o.close(),e.disabled=!0})).catch((function(t){o.close(),e.disabled=!1,e.$wechat.isPhone()&&e.$dialog.error(t.message),e.loginForm.code="",e.getCaptcha()}))},getCaptcha:function(){var t=this;Object(r["c"])().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}}},c=a,u=(o("7167"),o("07af"),o("2877")),d=Object(u["a"])(c,i,n,!1,null,"339a5fc8",null);e["default"]=d.exports},a201:function(t,e,o){},e6df3:function(t,e,o){t.exports=o.p+"static/img/bg.590046d3.jpg"}}]);