(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["login"],{"50aa":function(e,t){function r(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&r(e.slice(0,0))} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ e.exports=function(e){return null!=e&&(r(e)||n(e)||!!e._isBuffer)}},"5c53":function(e,t){var r={utf8:{stringToBytes:function(e){return r.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(r.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=r},"8a63":function(e,t,r){},"8ef3":function(e,t){(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],s=0;s<4;s++)8*n+6*s<=8*e.length?r.push(t.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(n))>>>6-2*o);return r}};e.exports=r})()},bdc9:function(e,t,r){(function(){var t=r("8ef3"),n=r("5c53").utf8,o=r("50aa"),s=r("5c53").bin,a=function(e,r){e.constructor==String?e=r&&"binary"===r.encoding?s.stringToBytes(e):n.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var i=t.bytesToWords(e),u=8*e.length,c=1732584193,l=-271733879,f=-1732584194,p=271733878,d=0;d<i.length;d++)i[d]=16711935&(i[d]<<8|i[d]>>>24)|4278255360&(i[d]<<24|i[d]>>>8);i[u>>>5]|=128<<u%32,i[14+(u+64>>>9<<4)]=u;var m=a._ff,g=a._gg,h=a._hh,v=a._ii;for(d=0;d<i.length;d+=16){var b=c,y=l,w=f,k=p;c=m(c,l,f,p,i[d+0],7,-680876936),p=m(p,c,l,f,i[d+1],12,-389564586),f=m(f,p,c,l,i[d+2],17,606105819),l=m(l,f,p,c,i[d+3],22,-1044525330),c=m(c,l,f,p,i[d+4],7,-176418897),p=m(p,c,l,f,i[d+5],12,1200080426),f=m(f,p,c,l,i[d+6],17,-1473231341),l=m(l,f,p,c,i[d+7],22,-45705983),c=m(c,l,f,p,i[d+8],7,1770035416),p=m(p,c,l,f,i[d+9],12,-1958414417),f=m(f,p,c,l,i[d+10],17,-42063),l=m(l,f,p,c,i[d+11],22,-1990404162),c=m(c,l,f,p,i[d+12],7,1804603682),p=m(p,c,l,f,i[d+13],12,-40341101),f=m(f,p,c,l,i[d+14],17,-1502002290),l=m(l,f,p,c,i[d+15],22,1236535329),c=g(c,l,f,p,i[d+1],5,-165796510),p=g(p,c,l,f,i[d+6],9,-1069501632),f=g(f,p,c,l,i[d+11],14,643717713),l=g(l,f,p,c,i[d+0],20,-373897302),c=g(c,l,f,p,i[d+5],5,-701558691),p=g(p,c,l,f,i[d+10],9,38016083),f=g(f,p,c,l,i[d+15],14,-660478335),l=g(l,f,p,c,i[d+4],20,-405537848),c=g(c,l,f,p,i[d+9],5,568446438),p=g(p,c,l,f,i[d+14],9,-1019803690),f=g(f,p,c,l,i[d+3],14,-187363961),l=g(l,f,p,c,i[d+8],20,1163531501),c=g(c,l,f,p,i[d+13],5,-1444681467),p=g(p,c,l,f,i[d+2],9,-51403784),f=g(f,p,c,l,i[d+7],14,1735328473),l=g(l,f,p,c,i[d+12],20,-1926607734),c=h(c,l,f,p,i[d+5],4,-378558),p=h(p,c,l,f,i[d+8],11,-2022574463),f=h(f,p,c,l,i[d+11],16,1839030562),l=h(l,f,p,c,i[d+14],23,-35309556),c=h(c,l,f,p,i[d+1],4,-1530992060),p=h(p,c,l,f,i[d+4],11,1272893353),f=h(f,p,c,l,i[d+7],16,-155497632),l=h(l,f,p,c,i[d+10],23,-1094730640),c=h(c,l,f,p,i[d+13],4,681279174),p=h(p,c,l,f,i[d+0],11,-358537222),f=h(f,p,c,l,i[d+3],16,-722521979),l=h(l,f,p,c,i[d+6],23,76029189),c=h(c,l,f,p,i[d+9],4,-640364487),p=h(p,c,l,f,i[d+12],11,-421815835),f=h(f,p,c,l,i[d+15],16,530742520),l=h(l,f,p,c,i[d+2],23,-995338651),c=v(c,l,f,p,i[d+0],6,-198630844),p=v(p,c,l,f,i[d+7],10,1126891415),f=v(f,p,c,l,i[d+14],15,-1416354905),l=v(l,f,p,c,i[d+5],21,-57434055),c=v(c,l,f,p,i[d+12],6,1700485571),p=v(p,c,l,f,i[d+3],10,-1894986606),f=v(f,p,c,l,i[d+10],15,-1051523),l=v(l,f,p,c,i[d+1],21,-2054922799),c=v(c,l,f,p,i[d+8],6,1873313359),p=v(p,c,l,f,i[d+15],10,-30611744),f=v(f,p,c,l,i[d+6],15,-1560198380),l=v(l,f,p,c,i[d+13],21,1309151649),c=v(c,l,f,p,i[d+4],6,-145523070),p=v(p,c,l,f,i[d+11],10,-1120210379),f=v(f,p,c,l,i[d+2],15,718787259),l=v(l,f,p,c,i[d+9],21,-343485551),c=c+b>>>0,l=l+y>>>0,f=f+w>>>0,p=p+k>>>0}return t.endian([c,l,f,p])};a._ff=function(e,t,r,n,o,s,a){var i=e+(t&r|~t&n)+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._gg=function(e,t,r,n,o,s,a){var i=e+(t&n|r&~n)+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._hh=function(e,t,r,n,o,s,a){var i=e+(t^r^n)+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._ii=function(e,t,r,n,o,s,a){var i=e+(r^(t|~n))+(o>>>0)+a;return(i<<s|i>>>32-s)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,r){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var n=t.wordsToBytes(a(e,r));return r&&r.asBytes?n:r&&r.asString?s.bytesToString(n):t.bytesToHex(n)}})()},ede4:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-wrap"},[r("div",{staticClass:"ms-login"},[r("div",{staticClass:"ms-title"},[e._v("\n HSCloud\n ")]),r("el-form",{ref:"login",staticClass:"ms-content",attrs:{model:e.param,rules:e.rules,"label-width":"0px"}},[r("el-form-item",{staticClass:"inputrow",attrs:{prop:"userName"}},[r("el-input",{attrs:{placeholder:"账号",autocomplete:"off"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm()}},model:{value:e.param.userName,callback:function(t){e.$set(e.param,"userName",t)},expression:"param.userName"}})],1),r("el-form-item",{staticClass:"inputrow",attrs:{prop:"password"}},[r("el-input",{attrs:{type:"password",placeholder:"密码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submitForm()}},model:{value:e.param.password,callback:function(t){e.$set(e.param,"password",t)},expression:"param.password"}})],1),r("el-form-item",{staticClass:"inputrow state"},[r("el-checkbox-group",{model:{value:e.keepwd,callback:function(t){e.keepwd=t},expression:"keepwd"}},[r("el-checkbox",{attrs:{label:!0}},[e._v("记住密码")])],1),r("div",{staticClass:"lastrow"})],1),r("div",{staticClass:"login-btn inputrow"},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm()}}},[e._v("立即登录")])],1)],1)],1)])},o=[],s=(r("4057"),r("6a61"),r("4833")),a=(r("bdc9"),r("7ded")),i={data:function(){return{param:{userName:"admin",password:"123456"},rules:{userName:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],valicode:[{required:!0,message:"请输入验证码",trigger:"blur"}]},keepwd:!0,autologin:!0,valicode:{time:0,src:""},getValicodeApi:Object(a["a"])()}},methods:{submitForm:function(){var e=this;this.$refs.login.validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(r){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=15;break}return t.next=3,e.$store.dispatch("user/login",{username:e.param.userName,password:e.param.password});case 3:if(n=t.sent,!n.success){t.next=12;break}return e.keepwd?e.$store.commit("user/set_user_account",{username:e.param.userName,password:e.param.password}):e.$store.commit("user/reset_user_account"),t.next=8,e.$store.dispatch("root/setRoot");case 8:console.log("权限对象:",e.$store.state.root),e.$router.push({path:"/personnel"}),t.next=13;break;case 12:e.$message({message:"账号或密码错误!",type:"error",duration:2e3});case 13:t.next=16;break;case 15:return t.abrupt("return",!1);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},toRegister:function(){this.$router.push({path:"/register"})},getValicode:function(){this.getValicodeApi=Object(a["a"])()+"?time="+new Date},changeValicode:function(){var e=this;this.valicode.time>0&&setTimeout((function(){e.valicode.time=e.valicode.time-1,e.changeValicode()}),1e3)}},mounted:function(){var e=this.$router.currentRoute.params;(e.userName||"undefined"!=typeof e.userName&&e.userName.toString())&&(this.param.userName=e.userName,this.param.password=e.password)}},u=i,c=(r("feb9"),r("5d22")),l=Object(c["a"])(u,n,o,!1,null,"20ef3f6e",null);t["default"]=l.exports},feb9:function(e,t,r){"use strict";r("8a63")}}]);