From 7b4983738f986bf28cb12c9a30dcbc4d593ad6a5 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 06 六月 2024 10:47:00 +0800
Subject: [PATCH] 班级通知

---
 src/router.js |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/src/router.js b/src/router.js
index 42a63a2..1038fe3 100644
--- a/src/router.js
+++ b/src/router.js
@@ -88,7 +88,8 @@
       {
         path: 'teacher-manage',
         name: 'teacherManage',
-        component: () => import('@/views/Manage/Education/TeacherManage.vue')
+        component: () => import('@/views/Manage/Education/TeacherManage.vue'),
+        meta: { title: '鏁欏笀绠$悊' }
       },
       // 鏁欏笀浠嬬粛
       {
@@ -119,12 +120,21 @@
         path: 'test-paper',
         name: 'TestPaper',
         component: () => import('@/views/Manage/TestPaper/index.vue'),
+        meta: { title: '璇曞嵎绠$悊' }
       },
       // 棰樺簱绠$悊
       {
         path: 'question-bank',
         name: 'QuestionBank',
         component: () => import('@/views/Manage/TestPaper/QuestionBank.vue'),
+        meta: { title: '棰樺簱绠$悊' }
+      },
+      // 绉戠洰绠$悊
+      {
+        path: 'subject',
+        name: 'subject',
+        component: () => import('@/views/Manage/TestPaper/subject.vue'),
+        meta: { title: '绉戠洰绠$悊' }
       },
       // 璇曞嵎鐢熸垚
       {
@@ -141,11 +151,13 @@
           {
             path: '/',
             name: 'ClassManagementIndex',
-            component: () => import('@/views/Manage/ClassManagement/Class.vue')
+            component: () => import('@/views/Manage/ClassManagement/Class.vue'),
+            meta: { title: '鐝骇绠$悊' }
           }, {
             path: 'Class-staff',
             name: 'ClassStaff',
-            component: () => import('@/views/Manage/ClassManagement/ClassStaff.vue')
+            component: () => import('@/views/Manage/ClassManagement/ClassStaff.vue'),
+            meta: { title: '鐝骇鎴愬憳绠$悊' }
           }
         ]
       },
@@ -208,6 +220,14 @@
   routes: constantRoutes
 })
 
+
+router.beforeEach((to,from,next)=>{
+  if(to.meta.title){//鍒ゆ柇鏄惁鏈夋爣棰�
+    document.title = to.meta.title
+  }
+  next()  //鎵ц杩涘叆璺敱锛屽鏋滀笉鍐欏氨涓嶄細杩涘叆鐩爣椤�
+})
+
 export {
   constantRoutes,
   router

--
Gitblit v1.8.0