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 = () => {