|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5872ecba"],{"36c9":function(e,t,a){"use strict";a("fe54")},"9d64":function(e,t,a){e.exports=a.p+"img/logo.7b2b763c.png"},"9ed6":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{class:["login-wrapper",["","login-form-right","login-form-left"][e.direction]]},[e._m(0),r("el-form",{ref:"loginForm",staticClass:"login-form ele-bg-white",attrs:{model:e.form,rules:e.rules,size:"large"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.doSubmit.apply(null,arguments)}}},[r("p",{staticClass:"login_title"},[e._v("登录")]),r("el-form-item",{attrs:{prop:"username"}},[r("el-input",{attrs:{placeholder:"请输入证件号码",clearable:""},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),r("el-form-item",{attrs:{prop:"password"}},[r("el-input",{attrs:{placeholder:"请输入密码","show-password":""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),r("el-form-item",{attrs:{prop:"code"}},[r("el-input",{staticStyle:{width:"63%"},attrs:{placeholder:"验证码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin.apply(null,arguments)}},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}}),r("div",{staticClass:"login-code",staticStyle:{width:"37%"}},[r("img",{staticClass:"login-code-img",attrs:{src:a("9d64")},on:{click:e.getCode}})])],1),r("div",{staticClass:"el-form-item"},[r("el-checkbox",{staticClass:"login-remember",model:{value:e.form.remember,callback:function(t){e.$set(e.form,"remember",t)},expression:"form.remember"}},[e._v("记住密码 ")])],1),r("div",{staticClass:"el-form-item"},[r("el-button",{staticClass:"login-btn",attrs:{loading:e.loading,type:"primary",size:"large"},on:{click:e.doSubmit}},[e._v(" "+e._s(e.loading?"登录中":"登录")+" ")])],1),r("div",{staticClass:"ele-text-center",staticStyle:{"margin-bottom":"10px"}})],1)],1)},s=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"title-div flex "},[r("img",{staticClass:"title-img",attrs:{src:a("9d64"),alt:""}}),r("p",{staticClass:"title-p"},[e._v("洛阳市机动车驾驶人培训公众服务平台")])])}],o=(a("a15b"),{name:"Login",data:function(){return{direction:1,loading:!1,form:{username:"",password:"",captcha:"",remember:!0,key:""},rules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],captcha:[{required:!0,message:"请按住滑块,拖动到最右边",trigger:"blur"}]},captcha:""}},mounted:function(){this.$message(this.$store.state.user.token)},methods:{getCode:function(){},doSubmit:function(){var e=this;this.$refs["loginForm"].validate((function(t){if(!t)return!1;e.loading=!0;var a=new FormData;for(var r in e.form)a.append(r,e.form[r]);e.$http.post("/login/login",e.form).then((function(t){if(e.loading=!1,0===t.data.code){e.$message({type:"success",message:"登录成功"}),e.$store.dispatch("user/setToken",t.data.data.access_token).then((function(){e.$router.push(e.$route.query.from||"/").catch((function(){}))})),e.$setting.parseUser&&(t.data.data.userInfo=e.$setting.parseUser(JSON.parse(t.data.data.userInfo)));var a=t.data.data.userInfo;e.$store.dispatch("user/setUser",a),e.$store.dispatch("user/setRoles",a?a.roles:null),e.$store.dispatch("user/setAuthorities",a?a.authorities:null),e.$store.dispatch("user/setPermission",a?a.permissionList:null)}else e.$message.error(t.data.msg)})).catch((function(t){e.loading=!1,e.$message.error("用户名或密码不正确")}))}))},changeCaptcha:function(){var e=this;this.$http.get("/login/captcha").then((function(t){0===t.data.code?(e.captcha=t.data.data.captcha,e.form.key=t.data.data.key):e.$message.error(t.data.msg)})).catch((function(t){e.$message.error(t.message)}))},aliyunCaptcha:funct //# sourceMappingURL=chunk-5872ecba.a80f086b.js.map
|