支持配置后台页面入口

This commit is contained in:
yml2213
2026-06-11 08:00:13 +08:00
parent 7130135e23
commit 6d61a336d6
27 changed files with 157 additions and 85 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
import { isAdminPath } from '@/shared/utils/adminPath'
export function isMobileHost(hostname = window.location.hostname) {
return hostname === 'm.localhost' || hostname.startsWith('m.')
}
@@ -14,7 +16,7 @@ export function getMobilePath(path: string): string {
if (path === '/' || path === '') {
return '/m'
}
if (path === '/m' || path.startsWith('/m/') || path.startsWith('/admin')) {
if (path === '/m' || path.startsWith('/m/') || isAdminPath(path)) {
return path
}
@@ -44,7 +46,7 @@ export function getMobilePath(path: string): string {
}
export function getPcPath(path: string): string {
if ((path !== '/m' && !path.startsWith('/m/')) || path.startsWith('/admin')) {
if ((path !== '/m' && !path.startsWith('/m/')) || isAdminPath(path)) {
return path
}