移动端路由路径从/m改为/mobile
This commit is contained in:
@ -6,7 +6,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
||||
// 是否是移动端设备
|
||||
const isMobile = /(Android|webOS|iPhone|iPod|tablet|BlackBerry|Mobile)/i.test(navigator.userAgent)
|
||||
// 是否是手机端路由开头
|
||||
const isRouterMobile = to.path.startsWith('/m')
|
||||
const isRouterMobile = to.path.startsWith('/mobile')
|
||||
|
||||
console.log(isMobile, isRouterMobile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user