LDF 收口本地页面路由门禁

这个提交包含在:
2026-05-17 10:22:06 +08:00
父节点 ab80d481cb
当前提交 f38592c881
共修改 4 个文件,包含 22 行新增和 1 行删除
+4 -1
查看文件
@@ -11,7 +11,10 @@ import { resolveMobileEquivalentPath, shouldPreferMobileWorkplace } from "../lib
export function AppShellLayout() {
const location = useLocation();
const isMobileRoute = location.pathname.startsWith("/mobile");
const isMobileDeepRoute = /^\/mobile\/(?:reimbursements|approvals|leave|purchase-requests)\/[^/]+$/.test(location.pathname);
const mobileSearchParams = new URLSearchParams(location.search);
const isMobileDeepRoute =
/^\/mobile\/(?:reimbursements|approvals|leave|purchase-requests)\/[^/]+$/.test(location.pathname) ||
(location.pathname === "/mobile/approvals" && mobileSearchParams.has("taskId"));
const showMobileBottomNav = isMobileRoute && !isMobileDeepRoute;
const mobileEquivalentPath = !isMobileRoute && shouldPreferMobileWorkplace()
? resolveMobileEquivalentPath(location.pathname, location.search)