webpackJsonp([9],{PI0u:function(e,r,t){"use strict";r.a=function(e,r){var t,r=r||200;return function(){var o=this,s=arguments;t&&clearTimeout(t),t=setTimeout(function(){t=null,e.apply(o,s)},r)}}},W2Q3:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=t("lbHh"),s=t.n(o),n=t("P9l9"),i=t("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 t=r.data;e.saveFlag=!1,0==t.errorCode?(s.a.set("AUTHCENTERSESSIONID",t.sessionId),e.saveFlag=!0,e.$router.push("/index")):4005==t.errorCode?(e.errorMsg="账号已失效",e.errorBool1=!0):4006==t.errorCode?(e.errorMsg="账号被锁定",e.errorBool1=!0):4007==t.errorCode?(e.errorMsg="账号或密码错误",e.errorBool2=!0):4008==t.errorCode?(e.errorMsg="账号不存在",e.errorBool1=!0):e.$message.error(t.message)})}}},a={render:function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"login-wrap"},[t("div",{staticClass:"login-fl"},[e._m(0),e._v(" "),e._m(1),e._v(" "),t("div",{staticClass:"footer"},[e._v("Copyright "+e._s(e.currentYear)+" Demogic.com All Rights Reserved 浙ICP备15033117号-1")])]),e._v(" "),t("div",{staticClass:"login-fr"},[t("h3",[e._v("登录达摩运维平台")]),e._v(" "),t("div",{staticClass:"login-content"},[t("h4",[e._v("登录账号")]),e._v(" "),t("div",{staticClass:"input-w350",class:{error:e.errorBool1,success:e.successBool1}},[t("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.account,expression:"account",modifiers:{trim:!0}}],attrs:{autocomplete:"on",placeholder:"请输入账号"},domProps:{value:e.account},on:{keyup:function(r){return e.hasAccount("keyup")},blur:[function(r){return e.hasAccount("blur")},function(r){return e.$forceUpdate()}],focus:function(r){e.successBool1=!0},input:function(r){r.target.composing||(e.account=r.target.value.trim())}}})]),e._v(" "),t("h4",[e._v("登录密码")]),e._v(" "),t("div",{staticClass:"input-w350 input-password",class:{error:e.errorBool2,success:e.successBool2}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:e.password},on:{keyup:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.hasPassword("keyup")},blur:function(r){return e.hasPassword("blur")},focus:function(r){e.successBool2=!0},input:function(r){r.target.composing||(e.password=r.target.value)}}})])]),e._v(" "),t("div",{staticClass:"login-error-tip"},[t("p",[e._v(e._s(e.errorMsg))])]),e._v(" "),t("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:t("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:t("udlM"),alt:"",width:"839",height:"850"}})])}]};var u=t("VU/8")(c,a,!1,function(e){t("dQZr")},"data-v-51beaff5",null);r.default=u.exports},dQZr:function(e,r){},lbHh:function(e,r,t){var o,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(o=n)?o.call(r,t,r,e):o)||(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 t=arguments[e];for(var o in t)r[o]=t[o]}return r}return function r(t){function o(r,s,n){var i;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(n=e({path:"/"},o.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=t.write?t.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 u in n)n[u]&&(a+="; "+u,!0!==n[u]&&(a+="="+n[u]));return document.cookie=r+"="+s+a}r||(i={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,p=0;p<l.length;p++){var h=l[p].split("="),f=h.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var v=h[0].replace(d,decodeURIComponent);if(f=t.read?t.read(f,v):t(f,v)||f.replace(d,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 o.set=o,o.get=function(e){return o.call(o,e)},o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(r,t){o(r,"",e(t,{expires:-1}))},o.withConverter=r,o}(function(){})})}});
//# sourceMappingURL=9.5785151b121bc51a14e8.1558087223141.js.map