diff --git a/middleware/auth.global.ts b/middleware/auth.global.ts index 3b7ac0c..d3bea07 100644 --- a/middleware/auth.global.ts +++ b/middleware/auth.global.ts @@ -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); diff --git a/pages/m/index.vue b/pages/mobile/index.vue similarity index 100% rename from pages/m/index.vue rename to pages/mobile/index.vue