|
|
|
|
@ -1,10 +1,9 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="login-container"> |
|
|
|
|
<div class="login-page"> |
|
|
|
|
<canvas id="login-background"/> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" autocomplete="on" class="login-form" label-position="left"> |
|
|
|
|
<div class="title-container"> |
|
|
|
|
<h3 class="title">进销存管理系统</h3> |
|
|
|
|
</div> |
|
|
|
|
<div class="login-container"> |
|
|
|
|
<div class="title">进销存管理系统</div> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" autocomplete="on" label-position="left"> |
|
|
|
|
<el-form-item prop="username"> |
|
|
|
|
<span class="svg-container"> |
|
|
|
|
<svg-icon icon="user"/> |
|
|
|
|
@ -52,6 +51,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
@ -100,7 +100,8 @@ |
|
|
|
|
success() { |
|
|
|
|
elSuccess('登陆成功') |
|
|
|
|
let redirect = this.$route.query.redirect || '/' |
|
|
|
|
window.location.href = '/#' + redirect |
|
|
|
|
//由于清除消息时会造成卡顿,所以延迟0.5s跳转 |
|
|
|
|
setTimeout(() => window.location.href = '/#' + redirect, 500) |
|
|
|
|
}, |
|
|
|
|
capsLockTip({keyCode}) { |
|
|
|
|
if (keyCode === 20) this.capsTooltip = !this.capsTooltip |
|
|
|
|
@ -116,11 +117,13 @@ |
|
|
|
|
if (loginBackgroundAnimate) { |
|
|
|
|
import('@/plugin/rain') |
|
|
|
|
.then(_ => { |
|
|
|
|
this.rain = new _.default({ |
|
|
|
|
this.rain = new _.default( |
|
|
|
|
{ |
|
|
|
|
rainDropCount: 500, |
|
|
|
|
rainColor: 'rgba(150,180,255,0.8)', |
|
|
|
|
backgroundColor: '#2d3a4b' |
|
|
|
|
}, document.getElementById('login-background')) |
|
|
|
|
}, |
|
|
|
|
document.getElementById('login-background')) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.addCapsLockEvent() |
|
|
|
|
|