From d664ad16afcee39e2e3e6438f93e7261bcffcd11 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 27 九月 2022 16:17:20 +0800
Subject: [PATCH] up

---
 src/router/index.ts |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index 97e29bb..ae0f7ba 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -4,17 +4,27 @@
 import { cancelRequest } from '@/utils/axios'
 
 const routes: Array<RouteRecordRaw> = [
-    { path: '/', name: 'Home', component: () => import('views/home/index.vue')},
+    { path: '/', name: 'Home', component: () => import('views/home/index.vue'),meta:{title:'首页'}},
+    { path: '/my', name: 'myMine', component: () => import('views/myMine/index.vue'),meta:{title:'我的'}},
+    { path: '/paiban', name: 'paiban', component: () => import('views/paiban/index.vue'),meta:{title:'透析排班'}},
+    { path: '/report', name: 'report', component: () => import('views/report/index.vue'),meta:{title:'检查报告'}},
+    { path: '/reportItem', name: 'reportItem', component: () => import('views/report/item/index.vue'),meta:{title:'报告查看'}},
+    { path: '/prescriptionDrug', name: 'prescriptionDrug', component: () => import('views/prescriptionDrug/index.vue'),meta:{title:'透析医嘱'}},
+    { path: '/record', name: 'record', component: () => import('views/record/index.vue'),meta:{title:'透析记录'}},
     { path: '/test', name: 'Test', component: () => import('views/test.vue')}
 ]
 
 const router = createRouter({
     history: createWebHistory(),
+    base:'',
     routes,
 })
 
 router.beforeEach((to, from, next) => {
     cancelRequest()
+    if (to.meta.title){
+        document.title = to.meta.title
+    }
     next()
 })
 

--
Gitblit v1.8.0