webpackJsonp([19],{"T+/8":function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=e("lbHh"),i=e.n(n),s="supportKey";function r(t){return i.a.set(s,t,{expires:3})}function a(t,o,e){return i.a.set(t,o,{expires:e})}function l(t){return i.a.get(t)}var c=e("hNpR"),p=e.n(c),u={name:"login",data:function(){return{loginForm:{username:"",password:""},loginRules:{username:[{required:!0,trigger:"blur",validator:function(t,o,e){o.trim().length>=3?e():e(new Error("请输入正确的用户名"))}}],password:[{required:!0,trigger:"blur",validator:function(t,o,e){o.length<6?e(new Error("密码不能小于3位")):e()}}]},loading:!1,pwdType:"password",login_center_bg:p.a,dialogVisible:!1,supportDialogVisible:!1}},created:function(){this.loginForm.username=l("username"),this.loginForm.password=l("password"),void 0!==this.loginForm.username&&null!=this.loginForm.username&&""!==this.loginForm.username||(this.loginForm.username=""),void 0!==this.loginForm.password&&null!=this.loginForm.password||(this.loginForm.password="")},methods:{showPwd:function(){"password"===this.pwdType?this.pwdType="":this.pwdType="password"},handleLogin:function(){var t=this;this.$refs.loginForm.validate(function(o){if(!o)return console.log("参数验证不合法！"),!1;t.loading=!0,t.$store.dispatch("Login",t.loginForm).then(function(){t.loading=!1,a("username",t.loginForm.username,15),a("password",t.loginForm.password,15),t.$router.push({path:"/"})}).catch(function(o){t.loading=!1})})},handleTry:function(){this.dialogVisible=!0},dialogConfirm:function(){this.dialogVisible=!1,r(!0)},dialogCancel:function(){this.dialogVisible=!1,r(!1)}}},g={render:function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("el-card",{staticClass:"login-form-layout"},[e("el-form",{ref:"loginForm",attrs:{autoComplete:"on",model:t.loginForm,rules:t.loginRules,"label-position":"left"}},[e("div",{staticStyle:{"text-align":"center"}},[e("svg-icon",{staticStyle:{width:"56px",height:"56px",color:"#409EFF"},attrs:{"icon-class":"login-mall"}})],1),t._v(" "),e("h2",{staticClass:"login-title color-main"},[t._v("管乐迷-商城管理系统")]),t._v(" "),e("el-form-item",{attrs:{prop:"username"}},[e("el-input",{attrs:{name:"username",type:"text",autoComplete:"on",placeholder:"请输入用户名"},model:{value:t.loginForm.username,callback:function(o){t.$set(t.loginForm,"username",o)},expression:"loginForm.username"}},[e("span",{attrs:{slot:"prefix"},slot:"prefix"},[e("svg-icon",{staticClass:"color-main",attrs:{"icon-class":"user"}})],1)])],1),t._v(" "),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{name:"password",type:t.pwdType,autoComplete:"on",placeholder:"请输入密码"},nativeOn:{keyup:function(o){return"button"in o||!t._k(o.keyCode,"enter",13,o.key,"Enter")?t.handleLogin(o):null}},model:{value:t.loginForm.password,callback:function(o){t.$set(t.loginForm,"password",o)},expression:"loginForm.password"}},[e("span",{attrs:{slot:"prefix"},slot:"prefix"},[e("svg-icon",{staticClass:"color-main",attrs:{"icon-class":"password"}})],1),t._v(" "),e("span",{attrs:{slot:"suffix"},on:{click:t.showPwd},slot:"suffix"},[e("svg-icon",{staticClass:"color-main",attrs:{"icon-class":"eye"}})],1)])],1),t._v(" "),e("el-form-item",{staticStyle:{"margin-bottom":"60px","text-align":"center"}},[e("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(o){return o.preventDefault(),t.handleLogin(o)}}},[t._v("\n          登录\n        ")])],1)],1)],1),t._v(" "),e("img",{staticClass:"login-center-layout",attrs:{src:t.login_center_bg}}),t._v(" "),e("el-dialog",{attrs:{title:"公众号二维码",visible:t.dialogVisible,"show-close":!1,center:!0,width:"30%"},on:{"update:visible":function(o){t.dialogVisible=o}}},[e("div",{staticStyle:{"text-align":"center"}},[e("span",{staticClass:"font-title-large"},[e("span",{staticClass:"color-main font-extra-large"},[t._v("关注公众号")]),t._v("回复"),e("span",{staticClass:"color-main font-extra-large"},[t._v("体验")]),t._v("获取体验账号")]),t._v(" "),e("br"),t._v(" "),e("img",{staticStyle:{"margin-top":"10px"},attrs:{src:"http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/banner/qrcode_for_macrozheng_258.jpg",width:"160",height:"160"}})]),t._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.dialogConfirm}},[t._v("确定")])],1)])],1)},staticRenderFns:[]};var m=e("VU/8")(u,g,!1,function(t){e("kvHm")},"data-v-0fa92606",null);o.default=m.exports},hNpR:function(t,o,e){t.exports=e.p+"static/img/login_center_bg.5307896.png"},kvHm:function(t,o){}});
//# sourceMappingURL=19.c2732f6a301709238954.js.map