Commit 13b6a53aab08780881c5f4c8a26e46ac7301c416
1 parent
71ca44b6
title
Showing
3 changed files
with
42 additions
and
8 deletions
src/main.js
| ... | ... | @@ -101,6 +101,13 @@ Vue.use(LoadingPlugin) |
| 101 | 101 | import { ToastPlugin } from 'vux' |
| 102 | 102 | Vue.use(ToastPlugin) |
| 103 | 103 | |
| 104 | +router.beforeEach((to, from, next) => { | |
| 105 | + if(to.meta.title){ | |
| 106 | + document.title = to.meta.title | |
| 107 | + } | |
| 108 | + next() | |
| 109 | +}) | |
| 110 | + | |
| 104 | 111 | import 'swiper/dist/css/swiper.min.css' // 轮播 |
| 105 | 112 | import 'swiper/dist/js/swiper.min' |
| 106 | 113 | ... | ... |
src/router/index.js
| ... | ... | @@ -6,6 +6,8 @@ import plateNumber from '@/views/parkPay/plateNumber' |
| 6 | 6 | |
| 7 | 7 | Vue.use(Router) |
| 8 | 8 | |
| 9 | + | |
| 10 | + | |
| 9 | 11 | export default new Router({ |
| 10 | 12 | routes: [ |
| 11 | 13 | { |
| ... | ... | @@ -114,7 +116,10 @@ export default new Router({ |
| 114 | 116 | { |
| 115 | 117 | path: '/suggestionBack', |
| 116 | 118 | name: 'suggestionBack', |
| 117 | - component: () => import("@/views/mySelf/feedback/suggestionBack.vue") | |
| 119 | + component: () => import("@/views/mySelf/feedback/suggestionBack.vue"), | |
| 120 | + meta:{ | |
| 121 | + title:'建议反馈' | |
| 122 | + } | |
| 118 | 123 | }, |
| 119 | 124 | |
| 120 | 125 | // ------------------------停车记录 |
| ... | ... | @@ -129,9 +134,24 @@ export default new Router({ |
| 129 | 134 | { |
| 130 | 135 | path: '/binDing', |
| 131 | 136 | name: 'binDing', |
| 132 | - component: () => import("@/views/binding/binDing.vue") | |
| 137 | + component: () => import("@/views/binding/binDing.vue"), | |
| 138 | + meta:{ | |
| 139 | + title:'绑定手机号' | |
| 140 | + } | |
| 133 | 141 | }, |
| 134 | 142 | |
| 143 | + { | |
| 144 | + path: '/myCars', | |
| 145 | + name: 'myCars', | |
| 146 | + component: () => import("@/views/carManage/myCars.vue"), | |
| 147 | + meta:{ | |
| 148 | + title:'我的车辆' | |
| 149 | + } | |
| 150 | + }, | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 135 | 155 | // |
| 136 | 156 | // // ------------------------购买会员卡提示 |
| 137 | 157 | // { |
| ... | ... | @@ -150,11 +170,5 @@ export default new Router({ |
| 150 | 170 | |
| 151 | 171 | |
| 152 | 172 | |
| 153 | - | |
| 154 | - | |
| 155 | - | |
| 156 | - | |
| 157 | - | |
| 158 | - | |
| 159 | 173 | ] |
| 160 | 174 | }) | ... | ... |