data.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. import store from "@/store";
  2. export type TabType = {
  3. id: number;
  4. name: string;
  5. x: string;
  6. y: string;
  7. b: string;
  8. r: string;
  9. type: "底部" | "顶部";
  10. link: string;
  11. };
  12. export type MapType = {
  13. id: number;
  14. imgId:number
  15. name: string;
  16. x: string;
  17. y: string;
  18. ind: number;
  19. filename: string;
  20. son: TabType[];
  21. };
  22. export const mapData1: MapType[] = [
  23. // {
  24. // id: 1,
  25. // imgId:1,
  26. // name: "虎门故事",
  27. // x: "33%",
  28. // y: "7%",
  29. // ind: 23,
  30. // son: [
  31. // {
  32. // id: 1.1,
  33. // name: "虎门故事",
  34. // x: "21%",
  35. // y: "25%",
  36. // b: "auto",
  37. // r: "auto",
  38. // type: "底部",
  39. // link: "/scene/?m=1194",
  40. // },
  41. // {
  42. // id: 1.2,
  43. // name: "鸦片战争博物馆",
  44. // x: "9%",
  45. // y: "30%",
  46. // b: "auto",
  47. // r: "auto",
  48. // type: "底部",
  49. // link: "/scene/?m=1194",
  50. // },
  51. // ],
  52. // },
  53. {
  54. id: 2,
  55. imgId:2,
  56. name: "鸦片战争博物馆",
  57. x: "31.2%",
  58. y: "4%",
  59. ind: 22,
  60. filename: "S1",
  61. son: [
  62. {
  63. id: 2.1,
  64. name: "虎门故事",
  65. x: "21%",
  66. y: "25%",
  67. b: "auto",
  68. r: "auto",
  69. type: "底部",
  70. link: "/scene/?m=1194",
  71. },
  72. {
  73. id: 2.2,
  74. name: "鸦片战争博物馆",
  75. x: "9%",
  76. y: "30%",
  77. b: "auto",
  78. r: "auto",
  79. type: "底部",
  80. link: "/scene/?m=1194",
  81. },
  82. ],
  83. },
  84. {
  85. id: 3,
  86. imgId:3,
  87. name: "海战馆",
  88. x: "18.5%",
  89. y: "39.5%",
  90. ind: 22,
  91. filename: "S2",
  92. son: [
  93. {
  94. id: 2.1,
  95. name: "海战馆",
  96. x: "39.4%",
  97. y: "10%",
  98. b: "auto",
  99. r: "auto",
  100. type: "顶部",
  101. link: "https://www.4dkankan.com/spg.html?m=KJ-I6rH3CfNSQV&lang=zh",
  102. },
  103. ],
  104. },
  105. ];
  106. export const maoData2 = [
  107. {
  108. id: 4,
  109. name: "镇远炮台旧址",
  110. x: "5.8%",
  111. y: "43.4%",
  112. b: "auto",
  113. r: "auto",
  114. ind: 21,
  115. type: "left",
  116. link: "/scene/?m=1194",
  117. },
  118. {
  119. id: 5,
  120. name: "靖远炮台旧址",
  121. x: "9.5%",
  122. y: "42.8%",
  123. b: "auto",
  124. r: "auto",
  125. ind: 21,
  126. type: "left",
  127. link: "/scene/?m=1194",
  128. loc: "顶部",
  129. },
  130. {
  131. id: 6,
  132. name: "南山顶炮台旧址",
  133. x: "12%",
  134. y: "37%",
  135. b: "auto",
  136. r: "auto",
  137. ind: 21,
  138. type: "left",
  139. link: "/scene/?m=1194",
  140. loc: "顶部",
  141. },
  142. {
  143. id: 7,
  144. name: "威远炮台旧址",
  145. x: "14.3%",
  146. y: "43.9%",
  147. b: "auto",
  148. r: "auto",
  149. ind: 21,
  150. type: "left",
  151. link: "https://laser.4dkankan.com/index.html?m=SS-w1y1zhoOa0&lang=zh#/",
  152. },
  153. {
  154. id: 8,
  155. name: "蛇头湾炮台旧址",
  156. x: "3.5%",
  157. y: "40.2%",
  158. b: "auto",
  159. r: "auto",
  160. ind: 21,
  161. type: "left",
  162. link: "/scene/?m=1194",
  163. },
  164. {
  165. id: 12,
  166. name: "定洋炮台旧址",
  167. x: "50%",
  168. y: "40.5%",
  169. b: "auto",
  170. r: "auto",
  171. ind: 21,
  172. type: "center",
  173. link: "/scene/?m=1194",
  174. },
  175. // {
  176. // id: 8,
  177. // name: "威胜东台",
  178. // x: "12%",
  179. // y: "46%",
  180. // b: "auto",
  181. // r: "auto",
  182. // ind: 21,
  183. // type: "left",
  184. // link: "/scene/?m=1194",
  185. // },
  186. // --------------
  187. {
  188. id: 9,
  189. name: "临高台旧址",
  190. x: "auto",
  191. y: "auto",
  192. b: "13.8%",
  193. r: "27.3%",
  194. ind: 21,
  195. type: "right",
  196. link: "/scene/?m=1194",
  197. loc: "顶部",
  198. },
  199. {
  200. id: 10,
  201. name: "滨海台旧址",
  202. x: "auto",
  203. y: "auto",
  204. b: "12%",
  205. r: "26.7%",
  206. ind: 21,
  207. type: "right",
  208. link: "/scene/?m=1194",
  209. loc: "顶部",
  210. },
  211. {
  212. id: 11,
  213. name: "捕鱼台旧址",
  214. x: "auto",
  215. y: "auto",
  216. b: "2.5%",
  217. r: "15%",
  218. ind: 21,
  219. type: "right",
  220. link: "/scene/?m=1194",
  221. loc: "顶部",
  222. },
  223. ];
  224. // 设置图片加载完成的仓库数据
  225. export const imgLodingFu = (id: number) => {
  226. const oldArr = store.getState().A0layout.imgLodingArr;
  227. if (oldArr.includes(id)) {
  228. } else {
  229. store.dispatch({ type: "layout/imgLoding", payload: [...oldArr, id] });
  230. }
  231. };