Showing
2 changed files
with
8 additions
and
2 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2023-06-13 13:26:46 | 2 | * @Date: 2023-06-13 13:26:46 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-30 18:08:59 | 4 | + * @LastEditTime: 2024-02-05 21:13:21 |
| 5 | * @FilePath: /xysBooking/src/route.js | 5 | * @FilePath: /xysBooking/src/route.js |
| 6 | * @Description: 路由列表 | 6 | * @Description: 路由列表 |
| 7 | */ | 7 | */ |
| ... | @@ -19,6 +19,11 @@ export default [ | ... | @@ -19,6 +19,11 @@ export default [ |
| 19 | meta: { | 19 | meta: { |
| 20 | title: '预约须知', | 20 | title: '预约须知', |
| 21 | }, | 21 | }, |
| 22 | + //路由的独享守卫 | ||
| 23 | + beforeEnter: (to,from,next) => { | ||
| 24 | + console.warn(to, from); | ||
| 25 | + next(); | ||
| 26 | + } | ||
| 22 | }, | 27 | }, |
| 23 | { | 28 | { |
| 24 | path: '/booking', | 29 | path: '/booking', | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: hookehuyr hookehuyr@gmail.com | 2 | * @Author: hookehuyr hookehuyr@gmail.com |
| 3 | * @Date: 2022-05-28 10:17:40 | 3 | * @Date: 2022-05-28 10:17:40 |
| 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 5 | - * @LastEditTime: 2024-01-20 08:05:56 | 5 | + * @LastEditTime: 2024-02-06 09:44:43 |
| 6 | * @FilePath: /xysBooking/src/utils/axios.js | 6 | * @FilePath: /xysBooking/src/utils/axios.js |
| 7 | * @Description: | 7 | * @Description: |
| 8 | */ | 8 | */ |
| ... | @@ -32,6 +32,7 @@ axios.interceptors.request.use( | ... | @@ -32,6 +32,7 @@ axios.interceptors.request.use( |
| 32 | // config.data = config.method === 'post' && !strExist(['a=upload', 'upload.qiniup.com'], config.url) ? qs.stringify(config.data) : config.data; | 32 | // config.data = config.method === 'post' && !strExist(['a=upload', 'upload.qiniup.com'], config.url) ? qs.stringify(config.data) : config.data; |
| 33 | // 绑定默认请求头 | 33 | // 绑定默认请求头 |
| 34 | config.params = { ...config.params, timestamp } | 34 | config.params = { ...config.params, timestamp } |
| 35 | + // config.params = config.method === 'get' && !strExist(['a=session'], config.url) ? { ...config.params, timestamp } : {}; | ||
| 35 | return config; | 36 | return config; |
| 36 | }, | 37 | }, |
| 37 | error => { | 38 | error => { | ... | ... |
-
Please register or login to post a comment