data.ts 588 B

1234567891011121314151617
  1. import history from "./history";
  2. export const AppTabList = [
  3. { id: 1, name: "总览", pathUrl: "/", path: "/" },
  4. { id: 2, name: "村落", pathUrl: "/village", path: "/village" },
  5. { id: 3, name: "建筑", pathUrl: "/architec?id=1", path: "/architec" },
  6. { id: 4, name: "构件", pathUrl: "/build", path: "/build" },
  7. ];
  8. // 嵌套 iframe history.go(-1) 返回的问题
  9. export const getUrlHashFu = (id: string) => {
  10. const url = window.location.hash;
  11. if (url && url.includes("#/")) {
  12. const path = url.replace("#", "");
  13. history.push(`/scene?id=${id}&back=${path}`);
  14. }
  15. };