diff --git a/src/router/courseManagement.js b/src/router/courseManagement.js index d1d895c..b2d7c1b 100644 --- a/src/router/courseManagement.js +++ b/src/router/courseManagement.js @@ -1,5 +1,6 @@ import Course from '../views/course-management/Course.vue'; import CourseList from '../views/course-management/CourseList.vue'; +import BackgroundWrapper from "@views/course-management/BackgroundWrapper.vue"; export default [ { @@ -12,5 +13,11 @@ export default [ path: '/courseList', name: 'CourseList', component: CourseList + }, + + { + path: '/backgroundWrapper', + name: 'BackgroundWrapper', + component: BackgroundWrapper } ]; \ No newline at end of file diff --git a/src/views/authentication/Login.vue b/src/views/authentication/Login.vue index 7f6ab70..021dc3f 100644 --- a/src/views/authentication/Login.vue +++ b/src/views/authentication/Login.vue @@ -18,11 +18,12 @@ const login = async () => { const response = await AuthenticationService.login(credentials); if (response.status === 200) { store.commit('authentication/setUser', { token: response.data.token }); + router.push("/profile"); + ElMessage.success('登录成功'); } - router.push("/profile"); } catch (error) { - ElMessage.error('Invalid username or password'); - console.error("Login error:", error); + ElMessage.error('用户名或密码错误'); + console.error("登录错误:", error); } }; @@ -37,10 +38,10 @@ const goToRegister = () => {

用户登录

- + - + 登录 @@ -64,15 +65,29 @@ const goToRegister = () => { .login-container { max-width: 400px; width: 100%; - padding: 20px; + padding: 30px; border: 1px solid #ebeef5; - border-radius: 4px; - box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); - background-color: #fff; + border-radius: 10px; + box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2); + background-color: rgba(255, 255, 255, 0.9); } h1 { text-align: center; + margin-bottom: 30px; + font-size: 24px; + color: #333; +} + +.el-form-item { margin-bottom: 20px; } + +.short-input { + width: 80%; +} + +.el-button { + margin-right: 10px; +} \ No newline at end of file diff --git a/src/views/authentication/Profile.vue b/src/views/authentication/Profile.vue index 74dfcda..d61ce4d 100644 --- a/src/views/authentication/Profile.vue +++ b/src/views/authentication/Profile.vue @@ -1,13 +1,14 @@