diff --git a/src/components/login_module.vue b/src/components/login_module.vue index 0b1b108..91a2a81 100644 --- a/src/components/login_module.vue +++ b/src/components/login_module.vue @@ -201,7 +201,11 @@ const handleLogin = async () => { } } catch (error) { console.error('登录失败:', error) - alert(error.response?.data?.message || error.message || '登录失败,请稍后重试') + if (error.response && error.response.status === 401) { + alert('错误的用户名或密码,或未注册') + } else { + alert(error.response?.data?.message || error.message || '登录失败,请稍后重试') + } } } diff --git a/src/views/backend/Dashboard.vue b/src/views/backend/Dashboard.vue index 1b9d43d..c64125a 100644 --- a/src/views/backend/Dashboard.vue +++ b/src/views/backend/Dashboard.vue @@ -257,6 +257,32 @@ html, body, .dashboard-wrapper, .admin-layout { width: 100%; } +.non-admin-view .button-group button { + padding: 10px 20px; + border-radius: 6px; + font-weight: 500; + transition: background-color 0.2s; + border: none; + color: #fff; + cursor: pointer; + margin: 8px; /* Provides spacing around buttons, e.g., 8px top/bottom, 8px left/right */ + min-width: 120px; /* Ensure buttons have a decent minimum width */ +} + +.non-admin-view .button-group .home-button { + background-color: #0ea5e9; /* Sky blue */ +} +.non-admin-view .button-group .home-button:hover { + background-color: #0284c7; /* Darker sky blue */ +} + +.non-admin-view .button-group .logout-button { + background-color: #ef4444; /* Red */ +} +.non-admin-view .button-group .logout-button:hover { + background-color: #dc2626; /* Darker Red */ +} + /* Mobile Header Styles */ .mobile-header { display: none; /* Hidden by default, shown on mobile */