|
@@ -83,6 +83,7 @@
|
|
|
|
|
|
import store from "@/store";
|
|
import store from "@/store";
|
|
import {doEncrypt, doSign} from "@/utils/smutil";
|
|
import {doEncrypt, doSign} from "@/utils/smutil";
|
|
|
|
+import {debounce} from "lodash";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'Login',
|
|
name: 'Login',
|
|
@@ -197,7 +198,7 @@ export default {
|
|
/**
|
|
/**
|
|
* 发送邮箱验证码
|
|
* 发送邮箱验证码
|
|
*/
|
|
*/
|
|
- sendMailCode() {
|
|
|
|
|
|
+ sendMailCode:debounce(function(){
|
|
// 判断账户是否已经输入
|
|
// 判断账户是否已经输入
|
|
if (!this.loginForm.username) {
|
|
if (!this.loginForm.username) {
|
|
this.$message.error('请输入账号')
|
|
this.$message.error('请输入账号')
|
|
@@ -216,22 +217,20 @@ export default {
|
|
).then((res) => {
|
|
).then((res) => {
|
|
this.$message.success('邮件发送成功')
|
|
this.$message.success('邮件发送成功')
|
|
})
|
|
})
|
|
- },
|
|
|
|
|
|
+ },1000),
|
|
// 获取验证码
|
|
// 获取验证码
|
|
- getCaptcha() {
|
|
|
|
- // this.$axios.get('/sysFile/getFileContent',{params:{"path":path,"name":name}}).then
|
|
|
|
-
|
|
|
|
|
|
+ getCaptcha:debounce(function(){
|
|
this.$axios.get('/getVerifyCode').then((res) => {
|
|
this.$axios.get('/getVerifyCode').then((res) => {
|
|
this.verifyuuid = res.data.uuid
|
|
this.verifyuuid = res.data.uuid
|
|
this.captchaUrl = 'data:image/gif;base64,' + res.data.imgBase64;
|
|
this.captchaUrl = 'data:image/gif;base64,' + res.data.imgBase64;
|
|
this.captchaText = res.data.captchaText
|
|
this.captchaText = res.data.captchaText
|
|
})
|
|
})
|
|
- },
|
|
|
|
|
|
+ },1000),
|
|
updateCaptcha() {
|
|
updateCaptcha() {
|
|
// 更新验证码
|
|
// 更新验证码
|
|
this.getCaptcha()
|
|
this.getCaptcha()
|
|
},
|
|
},
|
|
- handleLogin() {
|
|
|
|
|
|
+ handleLogin:debounce(function(){
|
|
this.$refs.loginForm.validate(valid => {
|
|
this.$refs.loginForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -276,7 +275,7 @@ export default {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },1000)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|