(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a8284054"],{"793e":function(t,e,a){"use strict";a("a8ff")},"9ed6":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"login-container"},[a("el-card",{attrs:{"body-style":{padding:0},shadow:"none"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("数据资源中心")]),a("div",{staticStyle:{float:"right",color:"#666666"}},[t._v(" 服务热线："),a("span",{staticStyle:{color:"#FF970F","font-weight":"bold"}},[t._v("400-698-5980")])])]),a("div",{staticStyle:{"min-height":"500px"}},[a("el-row",{staticStyle:{width:"1000px",margin:"99px auto 0 auto",overflow:"hidden"}},[a("el-col",{attrs:{span:16}},[a("el-image",{attrs:{src:"http://lcadmin.tongyu99.com/statics/image/dl01.png"}})],1),a("el-col",{attrs:{span:8}},[a("el-card",{attrs:{shadow:"always"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("strong",[t._v("用户登录")])]),a("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:t.loginForm,"auto-complete":"on","label-position":"left"}},[a("el-form-item",{attrs:{prop:"username"}},[a("el-input",{ref:"username",attrs:{placeholder:"请输入手机号/邮箱",name:"username",type:"text","auto-complete":"on"},model:{value:t.loginForm.username,callback:function(e){t.$set(t.loginForm,"username",e)},expression:"loginForm.username"}},[a("span",{staticClass:"svg-container el-icon-user-solid",attrs:{slot:"prepend"},slot:"prepend"})])],1),a("el-form-item",{attrs:{prop:"password"}},[a("el-input",{key:t.passwordType,ref:"password",attrs:{type:t.passwordType,placeholder:"请输入登录密码",name:"password","auto-complete":"on"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin(e)}},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}},[a("span",{staticClass:"svg-container el-icon-lock",attrs:{slot:"prepend"},slot:"prepend"}),a("span",{staticClass:"show-pwd",attrs:{slot:"append"},on:{click:t.showPwd},slot:"append"},[a("svg-icon",{attrs:{"icon-class":"password"===t.passwordType?"eye":"eye-open"}})],1)])],1),a("el-row",[a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"password"}},[a("el-input",{ref:"captcha",attrs:{placeholder:"请输入验证码",name:"captcha",type:"text"},model:{value:t.loginForm.captcha,callback:function(e){t.$set(t.loginForm,"captcha",e)},expression:"loginForm.captcha"}},[a("span",{staticClass:"svg-container el-icon-warning",attrs:{slot:"prepend"},slot:"prepend"})])],1)],1),a("el-col",{staticStyle:{"text-align":"right"},attrs:{span:8}},[t.captcha&&""!==t.captcha?a("el-image",{staticClass:"show-pwd",staticStyle:{width:"80px"},attrs:{src:t.captcha},on:{click:t.refreshCaptcha}}):t._e()],1)],1),a("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:t.loading,type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.handleLogin(e)}}},[t._v(" 登录 ")])],1)],1)],1)],1)],1)]),a("div",{staticClass:"footer"},[t._v(" ©2022 智慧旅游 版权所有 All Rights Reserved. ")])],1)},o=[],n=a("5530"),r=a("e1b8"),i={name:"Login",data:function(){return{loginForm:{username:"",password:"",captcha:""},loading:!1,passwordType:"password",redirect:void 0,token:"",captcha:""}},watch:{$route:{handler:function(t){this.redirect=t.query&&t.query.redirect},immediate:!0}},created:function(){this.refreshCaptcha()},methods:{refreshCaptcha:function(){var t=this;Object(r["b"])().then((function(e){console.log(e),t.token=e.token,t.captcha=e.captcha}))},showPwd:function(){var t=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){t.$refs.password.focus()}))},handleLogin:function(){var t=this;this.$refs.loginForm.validate((function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,t.$store.dispatch("user/login",Object(n["a"])(Object(n["a"])({},t.loginForm),{},{token:t.token})).then((function(){t.$router.push({path:t.redirect||"/"}),t.loading=!1})).catch((function(){t.loading=!1}))}))}}},l=i,c=(a("793e"),a("2877")),p=Object(c["a"])(l,s,o,!1,null,null,null);e["default"]=p.exports},a8ff:function(t,e,a){}}]);