chunk-1804f4a4.dbf9196e.js 5.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1804f4a4"],{"09da":function(t,o,n){"use strict";n("3e56")},"1ef3":function(t,o,n){"use strict";n("4804")},"3e56":function(t,o,n){},4804:function(t,o,n){},"9ed6":function(t,o,n){"use strict";n.r(o);var e=function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("div",{staticClass:"login-container"},[n("div",{ref:"particle",staticClass:"login-bg"},[n("div",{staticClass:"login-bg__img"})]),n("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:t.loginForm,rules:t.loginRules,"auto-complete":"on","label-position":"left"}},[n("div",{staticClass:"title-container"},[n("h3",{staticClass:"title"},[t._v("洪楼Plus管理系统")])]),n("el-form-item",{attrs:{prop:"username"}},[n("span",{staticClass:"svg-container"},[n("svg-icon",{attrs:{"icon-class":"user"}})],1),n("el-input",{ref:"username",attrs:{placeholder:"请输入账号",name:"username",type:"text",tabindex:"1","auto-complete":"on"},model:{value:t.loginForm.username,callback:function(o){t.$set(t.loginForm,"username",o)},expression:"loginForm.username"}})],1),n("el-form-item",{attrs:{prop:"password"}},[n("span",{staticClass:"svg-container"},[n("svg-icon",{attrs:{"icon-class":"password"}})],1),n("el-input",{key:t.passwordType,ref:"password",attrs:{type:t.passwordType,placeholder:"请输入密码",name:"password",tabindex:"2","auto-complete":"on"},nativeOn:{keyup:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"enter",13,o.key,"Enter")?null:t.handleLogin(o)}},model:{value:t.loginForm.password,callback:function(o){t.$set(t.loginForm,"password",o)},expression:"loginForm.password"}}),n("span",{staticClass:"show-pwd",on:{click:t.showPwd}},[n("svg-icon",{attrs:{"icon-class":"password"===t.passwordType?"eye":"eye-open"}})],1)],1),n("div",{staticClass:"xl-form lf-footer"},[n("el-button",{staticClass:"xl-form-btn",attrs:{loading:t.loading,type:"primary"},nativeOn:{click:function(o){return o.preventDefault(),t.handleLogin(o)}}},[t._v("登录")])],1)],1)],1)},s=[];function i(t,o){o.width=t.clientWidth,o.height=t.clientHeight}function a(t,o){var n=t;return t.x<=0||t.x>=o.width?(n.vx=-n.vx,n.x+=n.vx):t.y<=0||t.y>=o.height?(n.vy=-n.vy,n.y+=n.vy):n={x:n.x+n.vx,y:n.y+n.vy,vx:n.vx,vy:n.vy},n}function r(t){for(var o=null,n=t.canvas,e=0,s=t.count;e<s;e++){t.points[e].maxConn=0;for(var i=0;i<s;i++)e!==i&&(o=Math.round(t.points[e].x-t.points[i].x)*Math.round(t.points[e].x-t.points[i].x)+Math.round(t.points[e].y-t.points[i].y)*Math.round(t.points[e].y-t.points[i].y),o<=t.dist&&t.points[e].maxConn<t.maxConn&&(t.points[e].maxConn++,n.lineWidth=.5-o/t.dist,n.strokeStyle="rgba("+t.stroke+","+(1-o/t.dist)+")",n.beginPath(),n.moveTo(t.points[e].x,t.points[e].y),n.lineTo(t.points[i].x,t.points[i].y),n.stroke()));t.mouse&&(o=Math.round(t.points[e].x-t.mouse.x)*Math.round(t.points[e].x-t.mouse.x)+Math.round(t.points[e].y-t.mouse.y)*Math.round(t.points[e].y-t.mouse.y),o>t.dist&&o<=t.eDist&&(t.points[e].x=t.points[e].x+(t.mouse.x-t.points[e].x)/20,t.points[e].y=t.points[e].y+(t.mouse.y-t.points[e].y)/20),o<=t.eDist&&(n.lineWidth=1,n.strokeStyle="rgba("+t.stroke+","+(1-o/t.eDist)+")",n.beginPath(),n.moveTo(t.points[e].x,t.points[e].y),n.lineTo(t.mouse.x,t.mouse.y),n.stroke()))}}function l(t){var o=t.canvas,n=null;o.clearRect(0,0,t.canvasEl.width,t.canvasEl.height),o.beginPath(),o.fillStyle=t.color;for(var e=0,s=t.count;e<s;e++)n=t.points.length!==t.count?{x:Math.floor(Math.random()*t.canvasEl.width),y:Math.floor(Math.random()*t.canvasEl.height),vx:t.vx/2-Math.random()*t.vx,vy:t.vy/2-Math.random()*t.vy}:a(t.points[e],t.canvasEl),o.fillRect(n.x-t.width/2,n.y-t.height/2,t.width,t.height),t.points[e]=n;r(t),o.closePath()}function c(t){var o=t.el,n=t.vx,e=void 0===n?4:n,s=t.vy,a=void 0===s?4:s,r=t.width,c=void 0===r?2:r,d=t.height,u=void 0===d?2:d,p=t.count,v=void 0===p?200:p,h=t.color,m=void 0===h?"#79a2b9":h,f=t.stroke,y=void 0===f?"130,255,255":f,g=t.dist,x=void 0===g?6e3:g,w=t.eDist,b=void 0===w?2e4:w,k=t.maxConn,C=void 0===k?10:k,M=document.createElement("canvas"),T=M.getContext("2d");if(T){o.appendChild(M),M.style="position: fixed; top: 0; left: 0",i(o,M),window.onresize=function(){i(o,M)};var E=[],F=null;o.onmousemove=function(t){var o=t||window.event;F={x:o.clientX,y:o.clientY}},o.onmouseleave=function(){F=null},setInterval((function(){l({el:o,canvasEl:M,canvas:T,vx:e,vy:a,width:c,height:u,count:v,color:m,stroke:y,dist:x,eDist:b,maxConn:C,points:E,mouse:F})}),40)}else console.error("your browser not support canvas")}var d=c,u={name:"Login",data:function(){var t=function(t,o,n){o.length<4?n(new Error("账户名有误")):n()},o=function(t,o,n){o.length<4?n(new Error("密码有误")):n()};return{loginForm:{username:"",password:""},loginRules:{username:[{required:!0,trigger:"blur",validator:t}],password:[{required:!0,trigger:"blur",validator:o}]},loading:!1,passwordType:"password",redirect:void 0}},watch:{$route:{handler:function(t){this.redirect=t.query&&t.query.redirect},immediate:!0}},mounted:function(){d({el:this.$refs.particle})},methods:{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(o){if(!o)return console.log("error submit!!"),!1;t.loading=!0,t.$store.dispatch("user/login",t.loginForm).then((function(){window.setTimeout((function(){t.$router.push({path:"/"}),t.$router.go(0),t.loading=!1}),1e3)})).catch((function(){t.loading=!1}))}))}}},p=u,v=(n("1ef3"),n("09da"),n("2877")),h=Object(v["a"])(p,e,s,!1,null,"34359db3",null);o["default"]=h.exports}}]);