// 提供统一的 Mock 路径前缀判断与路径构建 helpers export function useMockPath() { const isMock = typeof window !== 'undefined' && window.location.pathname.startsWith('/mock') function mockPath(path: string): string { return isMock ? `/mock${path}` : path } return { isMock, mockPath } }