chenlei před 1 rokem
rodič
revize
dc96d69841
64 změnil soubory, kde provedl 533 přidání a 134 odebrání
  1. 0 20
      pc/package-lock.json
  2. binární
      pc/public/S1/Build/gzip1.data.gz
  3. binární
      pc/public/S1/Build/gzip1.framework.js.gz
  4. 1 0
      pc/public/S1/Build/gzip1.loader.js
  5. binární
      pc/public/S1/Build/gzip1.wasm.gz
  6. 33 0
      pc/public/S1/ServiceWorker.js
  7. 1 0
      pc/public/S1/StreamingAssets/UnityServicesProjectConfiguration.json
  8. binární
      pc/public/S1/TemplateData/bg.jpg
  9. binární
      pc/public/S1/TemplateData/favicon.ico
  10. binární
      pc/public/S1/TemplateData/icons/unity-logo-dark.png
  11. binární
      pc/public/S1/TemplateData/icons/unity-logo-light.png
  12. binární
      pc/public/S1/TemplateData/progress-bar-empty-dark.png
  13. binární
      pc/public/S1/TemplateData/progress-bar-empty-light.png
  14. binární
      pc/public/S1/TemplateData/progress-bar-full-dark.png
  15. binární
      pc/public/S1/TemplateData/progress-bar-full-light.png
  16. 8 0
      pc/public/S1/TemplateData/style.css
  17. binární
      pc/public/S1/TemplateData/unity-logo-dark.png
  18. binární
      pc/public/S1/TemplateData/unity-logo-light.png
  19. 109 0
      pc/public/S1/index.html
  20. 15 0
      pc/public/S1/manifest.webmanifest
  21. binární
      pc/public/S2/Build/gzip2.data.gz
  22. binární
      pc/public/S2/Build/gzip2.framework.js.gz
  23. 1 0
      pc/public/S2/Build/gzip2.loader.js
  24. binární
      pc/public/S2/Build/gzip2.wasm.gz
  25. 33 0
      pc/public/S2/ServiceWorker.js
  26. 1 0
      pc/public/S2/StreamingAssets/UnityServicesProjectConfiguration.json
  27. binární
      pc/public/S2/TemplateData/bg.jpg
  28. binární
      pc/public/S2/TemplateData/favicon.ico
  29. binární
      pc/public/S2/TemplateData/icons/unity-logo-dark.png
  30. binární
      pc/public/S2/TemplateData/icons/unity-logo-light.png
  31. binární
      pc/public/S2/TemplateData/progress-bar-empty-dark.png
  32. binární
      pc/public/S2/TemplateData/progress-bar-empty-light.png
  33. binární
      pc/public/S2/TemplateData/progress-bar-full-dark.png
  34. binární
      pc/public/S2/TemplateData/progress-bar-full-light.png
  35. 8 0
      pc/public/S2/TemplateData/style.css
  36. binární
      pc/public/S2/TemplateData/unity-logo-dark.png
  37. binární
      pc/public/S2/TemplateData/unity-logo-light.png
  38. 109 0
      pc/public/S2/index.html
  39. 15 0
      pc/public/S2/manifest.webmanifest
  40. 20 20
      pc/public/staticData.js
  41. binární
      pc/src/assets/img/main/1.png
  42. binární
      pc/src/assets/img/main/1Ac.png
  43. binární
      pc/src/assets/img/main/3.png
  44. binární
      pc/src/assets/img/main/3Ac.png
  45. 9 0
      pc/src/pages/A0Map/Iframe/index.module.scss
  46. 37 0
      pc/src/pages/A0Map/Iframe/index.tsx
  47. 86 61
      pc/src/pages/A0Map/data.ts
  48. 20 9
      pc/src/pages/A0Map/index.module.scss
  49. 14 10
      pc/src/pages/A0Map/index.tsx
  50. 12 13
      pc/src/pages/A2Main/Tab5/index.module.scss
  51. 1 1
      pc/src/pages/A2Main/Tab5/index.tsx
  52. binární
      staticData/map/0.jpg
  53. binární
      staticData/map/icon/1.jpg
  54. binární
      staticData/map/icon/10.jpg
  55. binární
      staticData/map/icon/11.jpg
  56. binární
      staticData/map/icon/12.jpg
  57. binární
      staticData/map/icon/2.jpg
  58. binární
      staticData/map/icon/3.jpg
  59. binární
      staticData/map/icon/4.jpg
  60. binární
      staticData/map/icon/5.jpg
  61. binární
      staticData/map/icon/6.jpg
  62. binární
      staticData/map/icon/7.jpg
  63. binární
      staticData/map/icon/8.jpg
  64. binární
      staticData/map/icon/9.jpg

+ 0 - 20
pc/package-lock.json

@@ -21,7 +21,6 @@
         "gsap": "^3.11.5",
         "react": "^18.2.0",
         "react-dom": "^18.2.0",
-        "react-lazyimg-component": "^1.0.1",
         "react-redux": "^8.0.4",
         "react-router-dom": "5.3",
         "react-scripts": "5.0.1",
@@ -14263,17 +14262,6 @@
       "resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz",
       "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
     },
-    "node_modules/react-lazyimg-component": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/react-lazyimg-component/-/react-lazyimg-component-1.0.1.tgz",
-      "integrity": "sha512-E3RqqLa4m1OO+L5jsiVo8Z8iFH4AkQn+MiZwb3T1J+5yqhd67cnlmjMYgMfa1B63bVecRAI6KNQO9uCVWgU6cg==",
-      "dependencies": {
-        "intersection-observer": "^0.12.0"
-      },
-      "peerDependencies": {
-        "react": ">=16.8.0"
-      }
-    },
     "node_modules/react-redux": {
       "version": "8.0.4",
       "resolved": "https://registry.npmmirror.com/react-redux/-/react-redux-8.0.4.tgz",
@@ -27896,14 +27884,6 @@
       "resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz",
       "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
     },
-    "react-lazyimg-component": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/react-lazyimg-component/-/react-lazyimg-component-1.0.1.tgz",
-      "integrity": "sha512-E3RqqLa4m1OO+L5jsiVo8Z8iFH4AkQn+MiZwb3T1J+5yqhd67cnlmjMYgMfa1B63bVecRAI6KNQO9uCVWgU6cg==",
-      "requires": {
-        "intersection-observer": "^0.12.0"
-      }
-    },
     "react-redux": {
       "version": "8.0.4",
       "resolved": "https://registry.npmmirror.com/react-redux/-/react-redux-8.0.4.tgz",

binární
pc/public/S1/Build/gzip1.data.gz


binární
pc/public/S1/Build/gzip1.framework.js.gz


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
pc/public/S1/Build/gzip1.loader.js


binární
pc/public/S1/Build/gzip1.wasm.gz


+ 33 - 0
pc/public/S1/ServiceWorker.js

@@ -0,0 +1,33 @@
+const cacheName = "4DAGE-TheOpiumWarMuseumx-0.1";
+const contentToCache = [
+    "Build/gzip1.loader.js",
+    "Build/gzip1.framework.js.gz",
+    "Build/gzip1.data.gz",
+    "Build/gzip1.wasm.gz",
+    "TemplateData/style.css"
+
+];
+
+self.addEventListener('install', function (e) {
+    console.log('[Service Worker] Install');
+    
+    e.waitUntil((async function () {
+      const cache = await caches.open(cacheName);
+      console.log('[Service Worker] Caching all: app shell and content');
+      await cache.addAll(contentToCache);
+    })());
+});
+
+self.addEventListener('fetch', function (e) {
+    e.respondWith((async function () {
+      let response = await caches.match(e.request);
+      console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
+      if (response) { return response; }
+
+      response = await fetch(e.request);
+      const cache = await caches.open(cacheName);
+      console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
+      cache.put(e.request, response.clone());
+      return response;
+    })());
+});

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
pc/public/S1/StreamingAssets/UnityServicesProjectConfiguration.json


binární
pc/public/S1/TemplateData/bg.jpg


binární
pc/public/S1/TemplateData/favicon.ico


binární
pc/public/S1/TemplateData/icons/unity-logo-dark.png


binární
pc/public/S1/TemplateData/icons/unity-logo-light.png


binární
pc/public/S1/TemplateData/progress-bar-empty-dark.png


binární
pc/public/S1/TemplateData/progress-bar-empty-light.png


binární
pc/public/S1/TemplateData/progress-bar-full-dark.png


binární
pc/public/S1/TemplateData/progress-bar-full-light.png


+ 8 - 0
pc/public/S1/TemplateData/style.css

@@ -0,0 +1,8 @@
+body { padding: 0; margin: 0 }
+#unity-container { position: fixed; width: 100%; height: 100%; }
+#unity-canvas { width: 100%; height: 100%; background: url('bg.jpg') no-repeat center ;background-size: cover;}
+#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
+#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
+#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; background: url('progress-bar-empty-dark.png') no-repeat center }
+#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
+#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

binární
pc/public/S1/TemplateData/unity-logo-dark.png


binární
pc/public/S1/TemplateData/unity-logo-light.png


+ 109 - 0
pc/public/S1/index.html

@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html lang="en-us">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>Unity WebGL Player | TheOpiumWarMuseumx</title>
+    <link rel="shortcut icon" href="TemplateData/favicon.ico">
+    <link rel="stylesheet" href="TemplateData/style.css">
+    <link rel="manifest" href="manifest.webmanifest">
+  </head>
+  <body>
+    <div id="unity-container">
+      <canvas id="unity-canvas" width=960 height=600 tabindex="-1"></canvas>
+      <div id="unity-loading-bar">
+        <div id="unity-logo"></div>
+        <div id="unity-progress-bar-empty">
+          <div id="unity-progress-bar-full"></div>
+        </div>
+      </div>
+      <div id="unity-warning"> </div>
+    </div>
+    <script>
+      window.addEventListener("load", function () {
+        if ("serviceWorker" in navigator) {
+          navigator.serviceWorker.register("ServiceWorker.js");
+        }
+      });
+
+      var container = document.querySelector("#unity-container");
+      var canvas = document.querySelector("#unity-canvas");
+      var loadingBar = document.querySelector("#unity-loading-bar");
+      var progressBarFull = document.querySelector("#unity-progress-bar-full");
+      var warningBanner = document.querySelector("#unity-warning");
+
+      // Shows a temporary message banner/ribbon for a few seconds, or
+      // a permanent error message on top of the canvas if type=='error'.
+      // If type=='warning', a yellow highlight color is used.
+      // Modify or remove this function to customize the visually presented
+      // way that non-critical warnings and error messages are presented to the
+      // user.
+      function unityShowBanner(msg, type) {
+        function updateBannerVisibility() {
+          warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
+        }
+        var div = document.createElement('div');
+        div.innerHTML = msg;
+        warningBanner.appendChild(div);
+        if (type == 'error') div.style = 'background: red; padding: 10px;';
+        else {
+          if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
+          setTimeout(function() {
+            warningBanner.removeChild(div);
+            updateBannerVisibility();
+          }, 5000);
+        }
+        updateBannerVisibility();
+      }
+
+      var buildUrl = "Build";
+      var loaderUrl = buildUrl + "/gzip1.loader.js";
+      var config = {
+        dataUrl: buildUrl + "/gzip1.data.gz",
+        frameworkUrl: buildUrl + "/gzip1.framework.js.gz",
+        codeUrl: buildUrl + "/gzip1.wasm.gz",
+        streamingAssetsUrl: "StreamingAssets",
+        companyName: "4DAGE",
+        productName: "TheOpiumWarMuseumx",
+        productVersion: "0.1",
+        showBanner: unityShowBanner,
+      };
+
+      // By default Unity keeps WebGL canvas render target size matched with
+      // the DOM size of the canvas element (scaled by window.devicePixelRatio)
+      // Set this to false if you want to decouple this synchronization from
+      // happening inside the engine, and you would instead like to size up
+      // the canvas DOM size and WebGL render target sizes yourself.
+      // config.matchWebGLToCanvasSize = false;
+
+      if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
+        // Mobile device style: fill the whole browser client area with the game canvas:
+        var meta = document.createElement('meta');
+        meta.name = 'viewport';
+        meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
+        document.getElementsByTagName('head')[0].appendChild(meta);
+      }
+
+      loadingBar.style.display = "block";
+
+      var script = document.createElement("script");
+      script.src = loaderUrl;
+      script.onload = () => {
+        createUnityInstance(canvas, config, (progress) => {
+          progressBarFull.style.width = 100 * progress + "%";
+        }).then((unityInstance) => {
+          loadingBar.style.display = "none";
+        }).catch((message) => {
+          alert(message);
+        });
+      };
+      document.body.appendChild(script);
+
+      function unityCallUrl(index) {
+        window.parent.postMessage({
+          index
+        })
+      }
+    </script>
+  </body>
+</html>

+ 15 - 0
pc/public/S1/manifest.webmanifest

@@ -0,0 +1,15 @@
+{
+    "name": "TheOpiumWarMuseumx",
+    "short_name": "TheOpiumWarMuseumx",
+    "start_url": "index.html",
+    "display": "fullscreen",
+    "background_color": "#231F20",
+    "theme_color": "#000",
+    "description": "",
+    "icons": [{
+      "src": "TemplateData/icons/unity-logo-dark.png",
+      "sizes": "144x144",
+      "type": "image/png",
+      "purpose": "any maskable"
+    }]
+  }

binární
pc/public/S2/Build/gzip2.data.gz


binární
pc/public/S2/Build/gzip2.framework.js.gz


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
pc/public/S2/Build/gzip2.loader.js


binární
pc/public/S2/Build/gzip2.wasm.gz


+ 33 - 0
pc/public/S2/ServiceWorker.js

@@ -0,0 +1,33 @@
+const cacheName = "4DAGE-TheOpiumWarMuseumx-0.1";
+const contentToCache = [
+    "Build/gzip2.loader.js",
+    "Build/gzip2.framework.js.gz",
+    "Build/gzip2.data.gz",
+    "Build/gzip2.wasm.gz",
+    "TemplateData/style.css"
+
+];
+
+self.addEventListener('install', function (e) {
+    console.log('[Service Worker] Install');
+    
+    e.waitUntil((async function () {
+      const cache = await caches.open(cacheName);
+      console.log('[Service Worker] Caching all: app shell and content');
+      await cache.addAll(contentToCache);
+    })());
+});
+
+self.addEventListener('fetch', function (e) {
+    e.respondWith((async function () {
+      let response = await caches.match(e.request);
+      console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
+      if (response) { return response; }
+
+      response = await fetch(e.request);
+      const cache = await caches.open(cacheName);
+      console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
+      cache.put(e.request, response.clone());
+      return response;
+    })());
+});

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
pc/public/S2/StreamingAssets/UnityServicesProjectConfiguration.json


binární
pc/public/S2/TemplateData/bg.jpg


binární
pc/public/S2/TemplateData/favicon.ico


binární
pc/public/S2/TemplateData/icons/unity-logo-dark.png


binární
pc/public/S2/TemplateData/icons/unity-logo-light.png


binární
pc/public/S2/TemplateData/progress-bar-empty-dark.png


binární
pc/public/S2/TemplateData/progress-bar-empty-light.png


binární
pc/public/S2/TemplateData/progress-bar-full-dark.png


binární
pc/public/S2/TemplateData/progress-bar-full-light.png


+ 8 - 0
pc/public/S2/TemplateData/style.css

@@ -0,0 +1,8 @@
+body { padding: 0; margin: 0 }
+#unity-container { position: fixed; width: 100%; height: 100%; }
+#unity-canvas { width: 100%; height: 100%; background: url('bg.jpg') no-repeat center ;background-size: cover;}
+#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
+#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
+#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; background: url('progress-bar-empty-dark.png') no-repeat center }
+#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
+#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

binární
pc/public/S2/TemplateData/unity-logo-dark.png


binární
pc/public/S2/TemplateData/unity-logo-light.png


+ 109 - 0
pc/public/S2/index.html

@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html lang="en-us">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>Unity WebGL Player | TheOpiumWarMuseumx</title>
+    <link rel="shortcut icon" href="TemplateData/favicon.ico">
+    <link rel="stylesheet" href="TemplateData/style.css">
+    <link rel="manifest" href="manifest.webmanifest">
+  </head>
+  <body>
+    <div id="unity-container">
+      <canvas id="unity-canvas" width=960 height=600 tabindex="-1"></canvas>
+      <div id="unity-loading-bar">
+        <div id="unity-logo"></div>
+        <div id="unity-progress-bar-empty">
+          <div id="unity-progress-bar-full"></div>
+        </div>
+      </div>
+      <div id="unity-warning"> </div>
+    </div>
+    <script>
+      window.addEventListener("load", function () {
+        if ("serviceWorker" in navigator) {
+          navigator.serviceWorker.register("ServiceWorker.js");
+        }
+      });
+
+      var container = document.querySelector("#unity-container");
+      var canvas = document.querySelector("#unity-canvas");
+      var loadingBar = document.querySelector("#unity-loading-bar");
+      var progressBarFull = document.querySelector("#unity-progress-bar-full");
+      var warningBanner = document.querySelector("#unity-warning");
+
+      // Shows a temporary message banner/ribbon for a few seconds, or
+      // a permanent error message on top of the canvas if type=='error'.
+      // If type=='warning', a yellow highlight color is used.
+      // Modify or remove this function to customize the visually presented
+      // way that non-critical warnings and error messages are presented to the
+      // user.
+      function unityShowBanner(msg, type) {
+        function updateBannerVisibility() {
+          warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
+        }
+        var div = document.createElement('div');
+        div.innerHTML = msg;
+        warningBanner.appendChild(div);
+        if (type == 'error') div.style = 'background: red; padding: 10px;';
+        else {
+          if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
+          setTimeout(function() {
+            warningBanner.removeChild(div);
+            updateBannerVisibility();
+          }, 5000);
+        }
+        updateBannerVisibility();
+      }
+
+      var buildUrl = "Build";
+      var loaderUrl = buildUrl + "/gzip2.loader.js";
+      var config = {
+        dataUrl: buildUrl + "/gzip2.data.gz",
+        frameworkUrl: buildUrl + "/gzip2.framework.js.gz",
+        codeUrl: buildUrl + "/gzip2.wasm.gz",
+        streamingAssetsUrl: "StreamingAssets",
+        companyName: "4DAGE",
+        productName: "TheOpiumWarMuseumx",
+        productVersion: "0.1",
+        showBanner: unityShowBanner,
+      };
+
+      // By default Unity keeps WebGL canvas render target size matched with
+      // the DOM size of the canvas element (scaled by window.devicePixelRatio)
+      // Set this to false if you want to decouple this synchronization from
+      // happening inside the engine, and you would instead like to size up
+      // the canvas DOM size and WebGL render target sizes yourself.
+      // config.matchWebGLToCanvasSize = false;
+
+      if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
+        // Mobile device style: fill the whole browser client area with the game canvas:
+        var meta = document.createElement('meta');
+        meta.name = 'viewport';
+        meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
+        document.getElementsByTagName('head')[0].appendChild(meta);
+      }
+
+      loadingBar.style.display = "block";
+
+      var script = document.createElement("script");
+      script.src = loaderUrl;
+      script.onload = () => {
+        createUnityInstance(canvas, config, (progress) => {
+          progressBarFull.style.width = 100 * progress + "%";
+        }).then((unityInstance) => {
+          loadingBar.style.display = "none";
+        }).catch((message) => {
+          alert(message);
+        });
+      };
+      document.body.appendChild(script);
+
+      function unityCallUrl(index) {
+        window.parent.postMessage({
+          index
+        })
+      }
+    </script>
+  </body>
+</html>

+ 15 - 0
pc/public/S2/manifest.webmanifest

@@ -0,0 +1,15 @@
+{
+    "name": "TheOpiumWarMuseumx",
+    "short_name": "TheOpiumWarMuseumx",
+    "start_url": "index.html",
+    "display": "fullscreen",
+    "background_color": "#231F20",
+    "theme_color": "#000",
+    "description": "",
+    "icons": [{
+      "src": "TemplateData/icons/unity-logo-dark.png",
+      "sizes": "144x144",
+      "type": "image/png",
+      "purpose": "any maskable"
+    }]
+  }

+ 20 - 20
pc/public/staticData.js

@@ -7,26 +7,6 @@ const staticUrl = window.location.href.includes('localhost:') ? 'http://127.0.0.
 
 const staticData = [
   {
-    id: 1,
-    data: [
-      {
-        id: 1,
-        name: "虎门销烟1-1",
-        txt: "&emsp;&emsp;撒大苏打撒旦111111111111111111111111111111111111111111撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦11111",
-      },
-      {
-        id: 2,
-        name: "虎门销烟1-2",
-        txt: "撒大苏打撒旦11111111111111111111111111111111111111111111111",
-      },
-      {
-        id: 3,
-        name: "虎门销烟1-3",
-        txt: "撒大苏打撒旦11111111111111111111111111111111111111111111111",
-      },
-    ],
-  },
-  {
     id: 2,
     data: [
       // {
@@ -62,4 +42,24 @@ const staticData = [
   },
   { id: 4 },
   { id: 5 },
+  {
+    id: 1,
+    data: [
+      {
+        id: 1,
+        name: "虎门销烟1-1",
+        txt: "&emsp;&emsp;撒大苏打撒旦111111111111111111111111111111111111111111撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦撒大苏打撒旦11111",
+      },
+      {
+        id: 2,
+        name: "虎门销烟1-2",
+        txt: "撒大苏打撒旦11111111111111111111111111111111111111111111111",
+      },
+      {
+        id: 3,
+        name: "虎门销烟1-3",
+        txt: "撒大苏打撒旦11111111111111111111111111111111111111111111111",
+      },
+    ],
+  },
 ]

binární
pc/src/assets/img/main/1.png


binární
pc/src/assets/img/main/1Ac.png


binární
pc/src/assets/img/main/3.png


binární
pc/src/assets/img/main/3Ac.png


+ 9 - 0
pc/src/pages/A0Map/Iframe/index.module.scss

@@ -0,0 +1,9 @@
+.MapSon {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 2;
+  border: 0;
+}

+ 37 - 0
pc/src/pages/A0Map/Iframe/index.tsx

@@ -0,0 +1,37 @@
+import { FC, useEffect } from "react";
+import styles from "./index.module.scss";
+
+interface IframePageProps {
+  filename: string;
+  title: string;
+}
+
+const IframePage: FC<IframePageProps> = ({title, filename}) => {
+  useEffect(() => {
+    window.addEventListener("message", unityCallUrl);
+  }, []);
+
+  const unityCallUrl = (e: MessageEvent<any>) => {
+    if (!e.data || !e.data.index) return;
+    switch (e.data.index) {
+      case '3':
+        // 虎门故事陈列
+        window.open('https://www.4dkankan.com/spg.html?m=KJ-7NjKB1ssebo&lang=zh');
+        break;
+      case '2':
+        // 虎门销烟陈列
+        window.open('https://www.4dkankan.com/spg.html?m=KJ-dSR2wuQUDgD&lang=zh');
+        break;
+      default:
+        // 海战馆
+        window.open('https://www.4dkankan.com/spg.html?m=KJ-I6rH3CfNSQV&lang=zh');
+    }
+  }
+
+  return <iframe title={title}
+    className={styles.MapSon}
+    src={`./${filename}/index.html`}
+  />
+}
+
+export default IframePage

+ 86 - 61
pc/src/pages/A0Map/data.ts

@@ -11,54 +11,56 @@ export type TabType = {
   link: string;
 };
 
-type MapType = {
+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: 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:1,
+    imgId:2,
     name: "鸦片战争博物馆",
-    x: "31%",
-    y: "6%",
+    x: "31.2%",
+    y: "4%",
     ind: 22,
+    filename: "S1",
     son: [
       {
         id: 2.1,
@@ -86,9 +88,10 @@ export const mapData1: MapType[] = [
     id: 3,
     imgId:3,
     name: "海战馆",
-    x: "16%",
-    y: "41%",
+    x: "18.5%",
+    y: "39.5%",
     ind: 22,
+    filename: "S2",
     son: [
       {
         id: 2.1,
@@ -98,7 +101,7 @@ export const mapData1: MapType[] = [
         b: "auto",
         r: "auto",
         type: "顶部",
-        link: "/scene/?m=1194",
+        link: "https://www.4dkankan.com/spg.html?m=KJ-I6rH3CfNSQV&lang=zh",
       },
     ],
   },
@@ -107,9 +110,9 @@ export const mapData1: MapType[] = [
 export const maoData2 = [
   {
     id: 4,
-    name: "镇远炮台",
-    x: "8%",
-    y: "45%",
+    name: "镇远炮台旧址",
+    x: "5.8%",
+    y: "43.4%",
     b: "auto",
     r: "auto",
     ind: 21,
@@ -118,9 +121,9 @@ export const maoData2 = [
   },
   {
     id: 5,
-    name: "靖远炮台",
-    x: "11%",
-    y: "42%",
+    name: "靖远炮台旧址",
+    x: "9.5%",
+    y: "42.8%",
     b: "auto",
     r: "auto",
     ind: 21,
@@ -130,9 +133,9 @@ export const maoData2 = [
   },
   {
     id: 6,
-    name: "南山顶炮台",
+    name: "南山顶炮台旧址",
     x: "12%",
-    y: "41%",
+    y: "37%",
     b: "auto",
     r: "auto",
     ind: 21,
@@ -142,34 +145,56 @@ export const maoData2 = [
   },
   {
     id: 7,
-    name: "威远炮台",
-    x: "10%",
-    y: "47%",
+    name: "威远炮台旧址",
+    x: "14.3%",
+    y: "43.9%",
     b: "auto",
     r: "auto",
     ind: 21,
     type: "left",
-    link: "/scene/?m=1194",
+    link: "https://laser.4dkankan.com/index.html?m=SS-w1y1zhoOa0&lang=zh#/",
   },
   {
     id: 8,
-    name: "威胜东台",
-    x: "12%",
-    y: "46%",
+    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: "沙角炮台",
+    name: "临高台旧址",
     x: "auto",
     y: "auto",
-    b: "11%",
-    r: "26.8%",
+    b: "13.8%",
+    r: "27.3%",
     ind: 21,
     type: "right",
     link: "/scene/?m=1194",
@@ -177,11 +202,11 @@ export const maoData2 = [
   },
   {
     id: 10,
-    name: "林则徐纪念馆旧址",
+    name: "滨海台旧址",
     x: "auto",
     y: "auto",
-    b: "11%",
-    r: "25.4%",
+    b: "12%",
+    r: "26.7%",
     ind: 21,
     type: "right",
     link: "/scene/?m=1194",
@@ -189,11 +214,11 @@ export const maoData2 = [
   },
   {
     id: 11,
-    name: "捕鱼台",
+    name: "捕鱼台旧址",
     x: "auto",
     y: "auto",
-    b: "6%",
-    r: "22.8%",
+    b: "2.5%",
+    r: "15%",
     ind: 21,
     type: "right",
     link: "/scene/?m=1194",

+ 20 - 9
pc/src/pages/A0Map/index.module.scss

@@ -195,22 +195,28 @@
 
         .ic2txtBox5{
           top: auto;
-          left: -15px;
-          bottom: 40px;
+          left: -5px;
+          bottom: -150px;
         }
         .ic2txtBox6 {
           top: auto;
-          left: 8px;
+          left: -4px;
           bottom: 40px;
         }
-
-        .ic2txtBox9{
+        .ic2txtBox8 {
           left: -15px;
         }
+        .ic2txtBox9{
+          top: auto;
+          left: -30px;
+          bottom: -120px;
+        }
         .ic2txtBox10{
+          top: auto;
+          bottom: 60px;
           left: 0px;
         }
-        .ic2txtBox9,.ic2txtBox10,.ic2txtBox11{
+        .ic2txtBox11{
           top: auto;
           bottom: 40px;
         }
@@ -221,8 +227,8 @@
         .ic2HoverBox {
           pointer-events: none;
           position: fixed;
-          bottom: 210px;
-          left: 130px;
+          bottom: 320px;
+          left: 330px;
           z-index: 30;
           width: 180px;
           height: 140px;
@@ -258,9 +264,14 @@
 
         .ic2HoverBox2 {
           left: auto;
-          right: 570px;
+          right: 600px;
           bottom: 60px;
         }
+        .ic2HoverBox3 {
+          left: auto;
+          left: 750px;
+          top: 400px;
+        }
 
         &:hover {
           .ic2Img1 {

+ 14 - 10
pc/src/pages/A0Map/index.tsx

@@ -2,12 +2,12 @@ import React, { useEffect, useState } from "react";
 import styles from "./index.module.scss";
 import classNames from "classnames";
 import { envUrl } from "@/utils/env";
-import { imgLodingFu, maoData2, mapData1 } from "./data";
+import { MapType, imgLodingFu, maoData2, mapData1 } from "./data";
 import iconImg1 from "@/assets/img/map/icon1.png";
 import iconImg1Ac from "@/assets/img/map/icon1Ac.png";
 import iconImg2 from "@/assets/img/map/icon2.png";
 import iconImg2Ac from "@/assets/img/map/icon2Ac.png";
-import MapSon from "./MapSon";
+import MapSon from "./Iframe";
 import ImgLoding from "@/components/ImgLoding";
 import { baseURL } from "@/utils/http";
 
@@ -18,7 +18,8 @@ type Props = {
 
 function A0Map({ type, sonChaneType }: Props) {
   useEffect(() => {
-    // console.log(123,type);
+    setSonPage(null);
+    setCheckedData1(null);
 
     // if (type === 3) setMapSon(0);
     if (type !== 2) setMapSon(0);
@@ -30,6 +31,9 @@ function A0Map({ type, sonChaneType }: Props) {
   // 鼠标hover
   const [isHover, setIsHover] = useState(0);
 
+  const [sonPage, setSonPage] = useState<string | null>(null);
+  const [checkedData1, setCheckedData1] = useState<MapType | null>(null);
+
   return (
     <div className={styles.A0Map}>
       {/* 大图片加载中 */}
@@ -44,19 +48,19 @@ function A0Map({ type, sonChaneType }: Props) {
         )}
       >
         {/* 定位大图标 */}
-        {mapData1.map((v) => (
+        {mapData1.map((v, index) => (
           <div
             onMouseEnter={() => setIsHover(v.id)}
             onMouseLeave={() => setIsHover(0)}
             onClick={() => {
-              setMapSon(v.imgId);
-              sonChaneType(2);
+              setCheckedData1(v);
+              setSonPage(v.filename);
             }}
             key={v.id}
             className="A0iconBox"
             style={{ top: v.y, left: v.x, zIndex: v.ind }}
           >
-            <div className="iconNum">{v.id}</div>
+            <div className="iconNum">{index + 1}</div>
 
             <img className="iconImg1" src={iconImg1} alt="" />
             <img className="iconImg2" src={iconImg1Ac} alt="" />
@@ -87,7 +91,7 @@ function A0Map({ type, sonChaneType }: Props) {
         {maoData2.map((v) => (
           <div
             onClick={() => {
-              window.open(baseURL + v.link);
+              window.open(v.link.startsWith('http') ? v.link : baseURL + v.link);
               // setMapSon(v.imgId);
               sonChaneType(3);
             }}
@@ -116,7 +120,7 @@ function A0Map({ type, sonChaneType }: Props) {
             <div
               className={classNames(
                 "ic2HoverBox",
-                v.type === "right" ? "ic2HoverBox2" : ""
+                v.type === "right" ? "ic2HoverBox2" : v.type === "center" ? "ic2HoverBox3" : ""
               )}
             >
               <div className="ic2HoverBoxll">{v.name}</div>
@@ -138,7 +142,7 @@ function A0Map({ type, sonChaneType }: Props) {
       </div>
 
       {/* 二级地图 */}
-      {mapSon ? <MapSon sId={mapSon} /> : null}
+      {(sonPage && checkedData1) ? <MapSon title={checkedData1.name} filename={sonPage} /> : null}
 
       {/* <div className="yunBox">
         <div className="yunSon1"></div>

+ 12 - 13
pc/src/pages/A2Main/Tab5/index.module.scss

@@ -1,7 +1,7 @@
 .Tab5 {
   width: 100%;
   height: 100%;
-  padding: 15px 60px;
+  padding: 68px 40px;
   background-size: 100% 100%;
   position: relative;
 
@@ -33,23 +33,19 @@
     }
 
     .tab5Main {
-      padding-top: 10px;
-      margin-top: 20px;
-      width: 100%;
-      height: calc(100% - 115px);
+      margin: 47px -15px 0;
       display: flex;
       flex-wrap: wrap;
+      align-items: center;
 
       .tab5Row {
-        width: 18.4%;
-        height: 46%;
-        margin-right: 2%;
-        margin-bottom: 2%;
+        flex-shrink: 0;
+        width: calc(20% - 30px);
+        margin: 20px 15px;
+        height: auto;
         cursor: pointer;
-
-        &:nth-of-type(5n) {
-          margin-right: 0;
-        }
+        display: flex;
+        flex-direction: column;
 
         &>div {
           width: 100%;
@@ -58,6 +54,8 @@
         }
 
         p {
+          flex: 1;
+          display: inline-block;
           font-size: 16px;
           text-align: center;
           padding: 0 5px;
@@ -84,6 +82,7 @@
     .tab5Page {
       display: flex;
       justify-content: center;
+      margin-top: 53px;
 
       .ant-pagination-prev button,
       .ant-pagination-next button {

+ 1 - 1
pc/src/pages/A2Main/Tab5/index.tsx

@@ -70,7 +70,7 @@ function Tab5() {
             onClick={() => setInfoId({ id: v.channelId, name: v.name })}
           >
             <div>
-              <ImageLazy src={v.thumb} width="100%" height="100%" noLook />
+              <ImageLazy src={v.thumb} width="100%" height="auto" noLook />
             </div>
             <p>{v.name}</p>
           </div>

binární
staticData/map/0.jpg


binární
staticData/map/icon/1.jpg


binární
staticData/map/icon/10.jpg


binární
staticData/map/icon/11.jpg


binární
staticData/map/icon/12.jpg


binární
staticData/map/icon/2.jpg


binární
staticData/map/icon/3.jpg


binární
staticData/map/icon/4.jpg


binární
staticData/map/icon/5.jpg


binární
staticData/map/icon/6.jpg


binární
staticData/map/icon/7.jpg


binární
staticData/map/icon/8.jpg


binární
staticData/map/icon/9.jpg