diff --git a/src/components/LoginView.vue b/src/components/LoginView.vue index cac1c37..4f45928 100644 --- a/src/components/LoginView.vue +++ b/src/components/LoginView.vue @@ -22,6 +22,7 @@ import { reactive } from 'vue' import axios from 'axios' import router from '../router' +import { ElMessage } from 'element-plus' const login = reactive({ account: '', @@ -35,9 +36,11 @@ const inputCheck = () => { const sendCaptcha = () => { axios.post('/api/captcha', login, { headers: { 'Content-Type': 'application/json' } }).then(res => { + ElMessage.success('验证码发送成功') console.log(res) login.captcha = res.data }).catch(err => { + ElMessage.error('验证码发送失败') console.log(err) }) } @@ -47,9 +50,11 @@ const loginIn = () => { console.log(res) if (res.data === 200) { sessionStorage.setItem('user', login.account) + ElMessage.success('登录成功') router.push('/') } }).catch(err => { + ElMessage.error('登录失败') console.log(err) }) } diff --git a/src/components/ManageMail.vue b/src/components/ManageMail.vue index 99c306f..951d02e 100644 --- a/src/components/ManageMail.vue +++ b/src/components/ManageMail.vue @@ -1,95 +1,97 @@ diff --git a/src/components/ManageUser.vue b/src/components/ManageUser.vue index 633586f..3f829fd 100644 --- a/src/components/ManageUser.vue +++ b/src/components/ManageUser.vue @@ -1,95 +1,98 @@ diff --git a/src/layout/Index.vue b/src/layout/Index.vue index 7c2e4b9..e0742fe 100644 --- a/src/layout/Index.vue +++ b/src/layout/Index.vue @@ -1,10 +1,11 @@