(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ed10db2"],{"067e":function(e,t,o){},6920:function(e,t,o){"use strict";o("067e")},a55b:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"backimg"},[t("div",{staticClass:"sign"},[t("span",{staticClass:"title"},[e._v("Hi 欢迎使用")]),e._m(0),t("p",{staticClass:"title-1"},[e._v("登录")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.name,expression:"form.name"}],attrs:{type:"text",placeholder:"请输入用户名"},domProps:{value:e.form.name},on:{input:function(t){t.target.composing||e.$set(e.form,"name",t.target.value)}}}),t("br"),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password,expression:"form.password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:e.form.password},on:{input:function(t){t.target.composing||e.$set(e.form,"password",t.target.value)}}}),t("br"),t("el-checkbox",{model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},[e._v("记住密码")]),t("br"),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.Login()}}},[e._v("登录")])],1)])},a=[function(){var e=this,t=e._self._c;return t("p",{staticClass:"manage"},[t("img",{attrs:{src:o("c663"),alt:""}}),t("span",[e._v("ERP管理系统")])])}],r=o("4ff3"),i=o.n(r),n={data(){return{checked:!1,form:{name:"",password:""}}},mounted(){this.getCookie()},methods:{Login(){!0===this.checked?this.setCookie(this.form.name,this.form.password,!0,7):this.clearCookie(),""===this.form.name||""===this.form.password?this.$message({message:"账号或密码不能为空",type:"error"}):i.a.post("/api/auth/login",this.form).then(e=>{let t=e.data;console.log(t),t.error&&(this.$message({message:"账号或密码错误，请重新输入",type:"error"}),this.form.name="",this.form.password="",this.checked=!1),t.token&&(this.form={},localStorage.setItem("token",t.token),this.$message({message:"成功登录，欢迎来到后台管理系统",type:"success"}),this.$router.push("/GOODS_LIST"))})},setCookie(e,t,o,s){const a=new Date;a.setTime(a.getTime()+864e5*s),window.document.cookie="name="+e+";path=/;expires="+a.toGMTString(),window.document.cookie="password="+t+";path=/;expires="+a.toGMTString(),window.document.cookie="state="+o+";path=/;expires="+a.toGMTString()},getCookie(){if(document.cookie.length>0){const e=document.cookie.split("; ");for(let t=0;t<e.length;t++){const o=e[t].split("=");"name"===o[0]?this.form.name=o[1]:"password"===o[0]?this.form.password=o[1]:"state"===o[0]&&(this.checked=Boolean(o[1]))}}},clearCookie:function(){this.setCookie("","",!1,-1)}}},c=n,m=(o("6920"),o("0b56")),p=Object(m["a"])(c,s,a,!1,null,"4d3b70b5",null);t["default"]=p.exports},c663:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAIAAAADehTSAAAAAXNSR0IArs4c6QAABYhJREFUaN7tmv1PW1UYx/svAKIx8SUx+stM9FfdjIkJi/EHMzUzcbpf1LHNiUaX6UwBF8jI3Aiii04jExoGGmCLYhV5GWXjRbpSBCzv671toS29fbl9oW/33nNan0u7An2jve1Fm3DypGkPbe/nfs/3PM85p0jChdMke6x7rHuse6x5/K5Qsvb/YgUghrQ7Lw+vHW1befYr3WPndQ/V6B6vM5ZdsVf3BBcs+SKW5KhiYMpoPtxCllYRxZUQ5JaIviytpk50cNb13IklwkkxphuGyPurI5Tpw/BUfe4CSwSjOmr7yO1CposiqWHfBdbozIVWIgg07B1YJEoqs2DlQ2p+XQajIRZr0umMETK+8E2WoFEHB9QrorBGp86rP4IvMcvF+oOzZgGgkaAvDorFaj39K4wduM36wY0QjgrsblVBjzBWe+UfYrHaPpPHLuNuV0dYHef7iSKButo//1MsVk+7Oiah/ok6zuaFfntlDymU1fn1sFhzizO5IM/HJjLUIbgBuvGWQA8UVXr7F0XMA2tHWjdVfPAc5Mj1bo1A1geqkdMvYn7lU2lxlIwokoLhmLu27JMrHyvPNMIEFZEVY2w8+F3serpHaznbun7fFwJY195qS1VmoRv+5GW5v20uhcm24PTAdePenFHd8o+SRElVrFrSl29TJzuzN6sUElZSVuik/IEGjbasZ3y/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