data.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. type MapType = {
  13. id: number;
  14. name: string;
  15. x: string;
  16. y: string;
  17. ind: number;
  18. son: TabType[];
  19. };
  20. export const mapData1: MapType[] = [
  21. {
  22. id: 1,
  23. name: "虎门故事",
  24. x: "33%",
  25. y: "7%",
  26. ind: 23,
  27. son: [
  28. {
  29. id: 1.1,
  30. name: "虎门故事",
  31. x: "20%",
  32. y: "10%",
  33. b: "auto",
  34. r: "auto",
  35. type: "底部",
  36. link: "https://www.baidu.com/",
  37. },
  38. {
  39. id: 1.2,
  40. name: "消烟池",
  41. x: "auto",
  42. y: "auto",
  43. b: "40%",
  44. r: "40%",
  45. type: "顶部",
  46. link: "https://www.baidu.com/",
  47. },
  48. ],
  49. },
  50. {
  51. id: 2,
  52. name: "鸦片战争博物馆",
  53. x: "31%",
  54. y: "6%",
  55. ind: 22,
  56. son: [
  57. {
  58. id: 2.1,
  59. name: "22222-1111",
  60. x: "20%",
  61. y: "10%",
  62. b: "auto",
  63. r: "auto",
  64. type: "顶部",
  65. link: "https://www.baidu.com/",
  66. },
  67. ],
  68. },
  69. {
  70. id: 3,
  71. name: "海战馆",
  72. x: "16%",
  73. y: "41%",
  74. ind: 22,
  75. son: [
  76. {
  77. id: 2.1,
  78. name: "22222-1111",
  79. x: "20%",
  80. y: "10%",
  81. b: "auto",
  82. r: "auto",
  83. type: "顶部",
  84. link: "https://www.baidu.com/",
  85. },
  86. ],
  87. },
  88. ];
  89. export const maoData2 = [
  90. {
  91. id: 4,
  92. name: "镇远炮台",
  93. x: "8%",
  94. y: "45%",
  95. b: "auto",
  96. r: "auto",
  97. ind: 21,
  98. type: "left",
  99. link: "https://www.baidu.com/",
  100. },
  101. {
  102. id: 5,
  103. name: "靖远炮台",
  104. x: "11%",
  105. y: "42%",
  106. b: "auto",
  107. r: "auto",
  108. ind: 21,
  109. type: "left",
  110. link: "https://www.baidu.com/",
  111. loc: "顶部",
  112. },
  113. {
  114. id: 6,
  115. name: "南山顶炮台",
  116. x: "12%",
  117. y: "41%",
  118. b: "auto",
  119. r: "auto",
  120. ind: 21,
  121. type: "left",
  122. link: "https://www.baidu.com/",
  123. loc: "顶部",
  124. },
  125. {
  126. id: 7,
  127. name: "威远炮台",
  128. x: "10%",
  129. y: "47%",
  130. b: "auto",
  131. r: "auto",
  132. ind: 21,
  133. type: "left",
  134. link: "https://www.baidu.com/",
  135. },
  136. {
  137. id: 8,
  138. name: "威胜东台",
  139. x: "12%",
  140. y: "46%",
  141. b: "auto",
  142. r: "auto",
  143. ind: 21,
  144. type: "left",
  145. link: "https://www.baidu.com/",
  146. },
  147. // --------------
  148. {
  149. id: 9,
  150. name: "沙角炮台",
  151. x: "auto",
  152. y: "auto",
  153. b: "11%",
  154. r: "26.8%",
  155. ind: 21,
  156. type: "right",
  157. link: "https://www.baidu.com/",
  158. loc: "顶部",
  159. },
  160. {
  161. id: 10,
  162. name: "林则徐纪念馆旧址",
  163. x: "auto",
  164. y: "auto",
  165. b: "11%",
  166. r: "25.4%",
  167. ind: 21,
  168. type: "right",
  169. link: "https://www.baidu.com/",
  170. loc: "顶部",
  171. },
  172. {
  173. id: 11,
  174. name: "捕鱼台",
  175. x: "auto",
  176. y: "auto",
  177. b: "6%",
  178. r: "22.8%",
  179. ind: 21,
  180. type: "right",
  181. link: "https://www.baidu.com/",
  182. loc: "顶部",
  183. },
  184. ];
  185. // 设置图片加载完成的仓库数据
  186. export const imgLodingFu = (id: number) => {
  187. const oldArr = store.getState().A0layout.imgLodingArr;
  188. if (oldArr.includes(id)) {
  189. } else {
  190. store.dispatch({ type: "layout/imgLoding", payload: [...oldArr, id] });
  191. }
  192. };