移动端路由路径从/m改为/mobile

This commit is contained in:
wangqiao
2025-09-01 11:33:07 +08:00
parent a0f1ec758e
commit be82375202
2 changed files with 1 additions and 1 deletions

View File

@ -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);