(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-074f8d06"],{"35c5":function(e,t,o){},"9ed6":function(e,t,o){"use strict";o.r(t);var a=o("7a23");const l=e=>(Object(a["pushScopeId"])("data-v-62aa86d2"),e=e(),Object(a["popScopeId"])(),e),c={class:"login-container"},r=l(()=>Object(a["createElementVNode"])("h2",{class:"login-title"},"管理后台",-1)),s={class:"codeDiv"},n=["src"];function i(e,t,o,l,i,d){const m=Object(a["resolveComponent"])("el-input"),u=Object(a["resolveComponent"])("el-form-item"),p=Object(a["resolveComponent"])("el-button"),b=Object(a["resolveComponent"])("el-form");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",c,[r,Object(a["createVNode"])(b,{model:i.loginForm,ref:"loginForm",rules:i.rules,"label-width":"80px",class:"login-form"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{label:"用户名",prop:"username"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.loginForm.username,"onUpdate:modelValue":t[0]||(t[0]=e=>i.loginForm.username=e)},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(u,{label:"密码",prop:"password"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{type:"password",modelValue:i.loginForm.password,"onUpdate:modelValue":t[1]||(t[1]=e=>i.loginForm.password=e)},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(u,{label:"验证码",prop:"captcha"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",s,[Object(a["createVNode"])(m,{modelValue:i.loginForm.captcha,"onUpdate:modelValue":t[2]||(t[2]=e=>i.loginForm.captcha=e),class:"code"},null,8,["modelValue"]),Object(a["createElementVNode"])("img",{class:"captcha-img",src:i.imgUrl,alt:"点击验证码",onClick:t[3]||(t[3]=(...e)=>d.getCaptcha&&d.getCaptcha(...e))},null,8,n)])]),_:1}),Object(a["createVNode"])(u,null,{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{type:"primary",onClick:d.handleSubmit},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])("登录")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model","rules"])])}o("655c");var d={data(){return{imgUrl:"",loginForm:{username:"",password:"",captcha:"1234"},rules:{username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],captcha:[{required:!0,message:"请输入验证码",trigger:"blur"}]}}},methods:{handleSubmit(){this.$refs.loginForm.validate(e=>{if(!e)return console.log("验证失败！"),!1;{let e={username:this.loginForm.username,password:this.loginForm.password,captcha:this.loginForm.captcha,type:1};this.$api.login.loginApi(e).then(e=>{console.log(e),200==e.code?(document.setCookie("token",e.data.token,86400),this.$message.success("登录成功"),this.$router.push("/left/complaintList")):this.$message.error(e.message)})}})},getCaptcha(){this.$api.pub.verifyCode().then(e=>{this.imgUrl=e.data})}},created(){this.getCaptcha()}},m=(o("c08d"),o("6b0d")),u=o.n(m);const p=u()(d,[["render",i],["__scopeId","data-v-62aa86d2"]]);t["default"]=p},c08d:function(e,t,o){"use strict";o("35c5")}}]);
//# sourceMappingURL=chunk-074f8d06.4174cac5.js.map