import store from "@/store"; export type TabType = { id: number; name: string; x: string; y: string; b: string; r: string; type: "底部" | "顶部"; link: string; }; export type MapType = { id: number; imgId:number name: string; x: string; y: string; ind: number; filename: string; son: TabType[]; }; export const mapData1: MapType[] = [ // { // id: 1, // imgId:1, // name: "虎门故事", // x: "33%", // y: "7%", // ind: 23, // son: [ // { // id: 1.1, // name: "虎门故事", // x: "21%", // y: "25%", // b: "auto", // r: "auto", // type: "底部", // link: "/scene/?m=1194", // }, // { // id: 1.2, // name: "鸦片战争博物馆", // x: "9%", // y: "30%", // b: "auto", // r: "auto", // type: "底部", // link: "/scene/?m=1194", // }, // ], // }, { id: 2, imgId:2, name: "鸦片战争博物馆", x: "31.2%", y: "4%", ind: 22, filename: "S1", son: [ { id: 2.1, name: "虎门故事", x: "21%", y: "25%", b: "auto", r: "auto", type: "底部", link: "/scene/?m=1194", }, { id: 2.2, name: "鸦片战争博物馆", x: "9%", y: "30%", b: "auto", r: "auto", type: "底部", link: "/scene/?m=1194", }, ], }, { id: 3, imgId:3, name: "海战馆", x: "18.5%", y: "39.5%", ind: 22, filename: "S2", son: [ { id: 2.1, name: "海战馆", x: "39.4%", y: "10%", b: "auto", r: "auto", type: "顶部", link: "https://www.4dkankan.com/spg.html?m=KJ-I6rH3CfNSQV&lang=zh", }, ], }, ]; export const maoData2 = [ { id: 4, name: "镇远炮台旧址", x: "5.8%", y: "43.4%", b: "auto", r: "auto", ind: 21, type: "left", link: "/scene/?m=1194", }, { id: 5, name: "靖远炮台旧址", x: "9.5%", y: "42.8%", b: "auto", r: "auto", ind: 21, type: "left", link: "/scene/?m=1194", loc: "顶部", }, { id: 6, name: "南山顶炮台旧址", x: "12%", y: "37%", b: "auto", r: "auto", ind: 21, type: "left", link: "/scene/?m=1194", loc: "顶部", }, { id: 7, name: "威远炮台旧址", x: "14.3%", y: "43.9%", b: "auto", r: "auto", ind: 21, type: "left", link: "https://laser.4dkankan.com/index.html?m=SS-w1y1zhoOa0&lang=zh#/", }, { id: 8, name: "蛇头湾炮台旧址", x: "3.5%", y: "40.2%", b: "auto", r: "auto", ind: 21, type: "left", link: "/scene/?m=1194", }, { id: 12, name: "定洋炮台旧址", x: "50%", y: "40.5%", b: "auto", r: "auto", ind: 21, type: "center", link: "/scene/?m=1194", }, // { // id: 8, // name: "威胜东台", // x: "12%", // y: "46%", // b: "auto", // r: "auto", // ind: 21, // type: "left", // link: "/scene/?m=1194", // }, // -------------- { id: 9, name: "临高台旧址", x: "auto", y: "auto", b: "13.8%", r: "27.3%", ind: 21, type: "right", link: "/scene/?m=1194", loc: "顶部", }, { id: 10, name: "滨海台旧址", x: "auto", y: "auto", b: "12%", r: "26.7%", ind: 21, type: "right", link: "/scene/?m=1194", loc: "顶部", }, { id: 11, name: "捕鱼台旧址", x: "auto", y: "auto", b: "2.5%", r: "15%", ind: 21, type: "right", link: "/scene/?m=1194", loc: "顶部", }, ]; // 设置图片加载完成的仓库数据 export const imgLodingFu = (id: number) => { const oldArr = store.getState().A0layout.imgLodingArr; if (oldArr.includes(id)) { } else { store.dispatch({ type: "layout/imgLoding", payload: [...oldArr, id] }); } };