webpackJsonp([8],{BJH1:function(e,r,o){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=o("lbHh"),s=o.n(t),n=o("P9l9"),i=o("PI0u"),c={name:"login",data:function(){return{requestProject:"gic-authcenter",account:"",password:"",errorMsg:"",errorBool1:!1,errorBool2:!1,successBool1:!1,successBool2:!1,currentYear:"",saveFlag:!0}},mounted:function(){this.currentYear=(new Date).getFullYear()},methods:{hasAccount:Object(i.a)(function(e){"keyup"==e?""==this.account?(this.errorBool1=!0,this.successBool1=!1):(this.successBool1=!0,this.errorBool1=!1,this.errorMsg=""):"blur"==e&&(this.successBool1=!1)},500),hasPassword:function(e){this.errorBool1||("keyup"==e?""==this.password?(this.errorBool2=!0,this.successBool2=!1):(this.successBool2=!0,this.errorBool2=!1,this.errorMsg="",this.loginBtn()):"blur"==e&&(this.successBool2=!1))},loginBtn:function(){if(!this.errorBool1){if(""==this.account)return this.errorBool1=!0,this.errorMsg="请输入账号",void(this.saveFlag=!1);if(this.errorBool1=!1,this.saveFlag=!0,""==this.password)return this.errorBool2=!0,this.errorMsg="请输入密码",void(this.saveFlag=!1);this.saveFlag=!0}this.saveFlag&&this.submitLogin()},submitLogin:function(){var e=this;Object(n.c)("/gic-authcenter/login",{requestProject:this.requestProject,username:this.account,password:this.password}).then(function(r){var o=r.data;e.saveFlag=!1,0==o.errorCode?(s.a.set("AUTHCENTERSESSIONID",o.sessionId),e.saveFlag=!0,e.$router.push("/index")):4005==o.errorCode?(e.errorMsg="账号已失效",e.errorBool1=!0):4006==o.errorCode?(e.errorMsg="账号被锁定",e.errorBool1=!0):4007==o.errorCode?(e.errorMsg="账号或密码错误",e.errorBool2=!0):4008==o.errorCode?(e.errorMsg="账号不存在",e.errorBool1=!0):e.$message.error(o.message)})}}},a={render:function(){var e=this,r=e.$createElement,o=e._self._c||r;return o("div",{staticClass:"login-wrap"},[o("div",{staticClass:"login-fl"},[e._m(0),e._v(" "),e._m(1),e._v(" "),o("div",{staticClass:"footer"},[e._v("Copyright "+e._s(e.currentYear)+" Demogic.com All Rights Reserved 浙ICP备15033117号-1")])]),e._v(" "),o("div",{staticClass:"login-fr"},[o("h3",[e._v("登录达摩运维平台")]),e._v(" "),o("div",{staticClass:"login-content"},[o("h4",[e._v("登录账号")]),e._v(" "),o("el-input",{staticClass:"input-w350",class:{error:e.errorBool1,success:e.successBool1},attrs:{autocomplete:"on",placeholder:"请输入账号"},on:{blur:function(r){return e.hasAccount("blur")},focus:function(r){e.successBool1=!0}},nativeOn:{keyup:function(r){return e.hasAccount("keyup")}},model:{value:e.account,callback:function(r){e.account=r},expression:"account"}}),e._v(" "),o("h4",[e._v("登录密码")]),e._v(" "),o("el-input",{staticClass:"input-w350 input-password",class:{error:e.errorBool2,success:e.successBool2},attrs:{type:"password",placeholder:"请输入密码"},on:{blur:function(r){return e.hasPassword("blur")},focus:function(r){e.successBool2=!0}},nativeOn:{keyup:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.hasPassword("keyup")}},model:{value:e.password,callback:function(r){e.password=r},expression:"password"}})],1),e._v(" "),o("div",{staticClass:"login-error-tip"},[o("p",[e._v(e._s(e.errorMsg))])]),e._v(" "),o("el-button",{staticClass:"login-btn",attrs:{type:"primary"},on:{click:e.loginBtn}},[e._v("登 录")])],1)])},staticRenderFns:[function(){var e=this.$createElement,r=this._self._c||e;return r("div",{staticClass:"logo"},[r("img",{attrs:{src:o("ZBJ4"),alt:"",width:"247",height:"45"}})])},function(){var e=this.$createElement,r=this._self._c||e;return r("div",{staticClass:"center-img"},[r("img",{attrs:{src:o("udlM"),alt:"",width:"839",height:"850"}})])}]};var l=o("VU/8")(c,a,!1,function(e){o("ms4L")},"data-v-a5039e7c",null);r.default=l.exports},PI0u:function(e,r,o){"use strict";r.a=function(e,r){var o,r=r||200;return function(){var t=this,s=arguments;o&&clearTimeout(o),o=setTimeout(function(){o=null,e.apply(t,s)},r)}}},lbHh:function(e,r,o){var t,s;
/*!
 * JavaScript Cookie v2.2.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */!function(n){if(void 0===(s="function"==typeof(t=n)?t.call(r,o,r,e):t)||(e.exports=s),!0,e.exports=n(),!!0){var i=window.Cookies,c=window.Cookies=n();c.noConflict=function(){return window.Cookies=i,c}}}(function(){function e(){for(var e=0,r={};e<arguments.length;e++){var o=arguments[e];for(var t in o)r[t]=o[t]}return r}return function r(o){function t(r,s,n){var i;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(n=e({path:"/"},t.defaults,n)).expires){var c=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*n.expires),n.expires=c}n.expires=n.expires?n.expires.toUTCString():"";try{i=JSON.stringify(s),/^[\{\[]/.test(i)&&(s=i)}catch(e){}s=o.write?o.write(s,r):encodeURIComponent(String(s)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),r=(r=(r=encodeURIComponent(String(r))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var a="";for(var l in n)n[l]&&(a+="; "+l,!0!==n[l]&&(a+="="+n[l]));return document.cookie=r+"="+s+a}r||(i={});for(var u=document.cookie?document.cookie.split("; "):[],h=/(%[0-9A-Z]{2})+/g,d=0;d<u.length;d++){var p=u[d].split("="),f=p.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var v=p[0].replace(h,decodeURIComponent);if(f=o.read?o.read(f,v):o(f,v)||f.replace(h,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(r===v){i=f;break}r||(i[v]=f)}catch(e){}}return i}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(r,o){t(r,"",e(o,{expires:-1}))},t.withConverter=r,t}(function(){})})},ms4L:function(e,r){}});
//# sourceMappingURL=8.7c18bd7603e2a2cb1d5d.1557996053771.js.map