From 3ce633c51d54fa3a89c473d8f501a9d4970cf0cf Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 23 九月 2022 14:13:59 +0800
Subject: [PATCH] up12

---
 src/views/home/index.vue   |    6 +++---
 src/router/index.ts        |    9 ++++++---
 src/views/myMine/index.vue |    4 ++--
 src/utils/axios.ts         |    1 -
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index 3eff3f2..5a7184e 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -4,9 +4,9 @@
 import { cancelRequest } from '@/utils/axios'
 
 const routes: Array<RouteRecordRaw> = [
-    { path: '/', name: 'Home', component: () => import('views/home/index.vue')},
-    { path: '/my', name: 'myMine', component: () => import('views/myMine/index.vue')},
-    { path: '/paiban', name: 'paiban', component: () => import('views/paiban/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: '/test', name: 'Test', component: () => import('views/test.vue')}
 ]
 
@@ -17,6 +17,9 @@
 
 router.beforeEach((to, from, next) => {
     cancelRequest()
+    if (to.meta.title){
+        document.title = to.meta.title
+    }
     next()
 })
 
diff --git a/src/utils/axios.ts b/src/utils/axios.ts
index 644e134..18bf3ed 100644
--- a/src/utils/axios.ts
+++ b/src/utils/axios.ts
@@ -108,4 +108,3 @@
     ajaxPatch
 }
 
-// export default instance
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index e2e4720..5433301 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -115,9 +115,9 @@
                 </div>
             </div>
         </div>
-        <van-tabbar v-model="active" route @change="tabChang">
-            <van-tabbar-item name="home" @click="active = 'home'" icon="home-o">首页</van-tabbar-item>
-            <van-tabbar-item name="mydo" @click="active = 'mydo'" icon="manager">我的</van-tabbar-item>
+        <van-tabbar v-model="active" @change="tabChang">
+            <van-tabbar-item name="home" icon="like">首页</van-tabbar-item>
+            <van-tabbar-item name="my" icon="manager">我的</van-tabbar-item>
         </van-tabbar>
     </div>
 </template>
diff --git a/src/views/myMine/index.vue b/src/views/myMine/index.vue
index 2a50bfe..aff4a6c 100644
--- a/src/views/myMine/index.vue
+++ b/src/views/myMine/index.vue
@@ -97,8 +97,8 @@
             </div>
         </div>
         <van-tabbar v-model="active" @change="tabChang">
-            <van-tabbar-item name="home" @click="active = 'home'" icon="home-o">首页</van-tabbar-item>
-            <van-tabbar-item name="my" @click="active = 'my'" icon="manager">我的</van-tabbar-item>
+            <van-tabbar-item name="home" icon="like">首页</van-tabbar-item>
+            <van-tabbar-item name="my" icon="manager">我的</van-tabbar-item>
         </van-tabbar>
     </div>
 </template>

--
Gitblit v1.8.0