Commit 540f4277 authored by moonby's avatar moonby

登录页优化

parent 71f558aa
......@@ -210,7 +210,8 @@ import {
getCurrentInstance,
onMounted,
onUpdated,
onBeforeUnmount
onBeforeUnmount,
handleError
} from 'vue';
import { User, Lock } from '@element-plus/icons-vue'
......@@ -290,7 +291,7 @@ function login() {
}
loading.value = true;
userInfo.verificationCode = code.value;
code.value='';
http.post('/api/user/login', userInfo, '正在登录....').then((result) => {
if (!result.success) {
loading.value = false;
......@@ -306,4 +307,11 @@ function login() {
});
}
function handleKeyEvent(event){
if(event.key === 'Enter'){
login();
}
}
window.addEventListener('keydown',handleKeyEvent);
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment