Kaynağa Gözat

添加unity小游戏;每次访问首页,如果已登录,都查询积分。

任一存 1 yıl önce
ebeveyn
işleme
ae140e8554
76 değiştirilmiş dosya ile 732 ekleme ve 33 silme
  1. 1 1
      game/.env.dev
  2. 1 1
      game/.env.mytest
  3. 1 1
      game/.env.prod
  4. 5 7
      game/README.md
  5. BIN
      game/public/unity/antibody-battle/Build/Build.data.unityweb
  6. BIN
      game/public/unity/antibody-battle/Build/Build.framework.js.unityweb
  7. 1 0
      game/public/unity/antibody-battle/Build/Build.loader.js
  8. BIN
      game/public/unity/antibody-battle/Build/Build.wasm.unityweb
  9. 33 0
      game/public/unity/antibody-battle/ServiceWorker.js
  10. BIN
      game/public/unity/antibody-battle/TemplateData/bg.jpg
  11. BIN
      game/public/unity/antibody-battle/TemplateData/favicon.ico
  12. BIN
      game/public/unity/antibody-battle/TemplateData/progress-bar-empty-dark.png
  13. BIN
      game/public/unity/antibody-battle/TemplateData/progress-bar-empty-light.png
  14. BIN
      game/public/unity/antibody-battle/TemplateData/progress-bar-full-dark.png
  15. BIN
      game/public/unity/antibody-battle/TemplateData/progress-bar-full-light.png
  16. 7 0
      game/public/unity/antibody-battle/TemplateData/style.css
  17. 116 0
      game/public/unity/antibody-battle/index.html
  18. 15 0
      game/public/unity/antibody-battle/manifest.webmanifest
  19. BIN
      game/public/unity/disaster-relief/Build/Build.data.unityweb
  20. BIN
      game/public/unity/disaster-relief/Build/Build.framework.js.unityweb
  21. 1 0
      game/public/unity/disaster-relief/Build/Build.loader.js
  22. BIN
      game/public/unity/disaster-relief/Build/Build.wasm.unityweb
  23. 33 0
      game/public/unity/disaster-relief/ServiceWorker.js
  24. BIN
      game/public/unity/disaster-relief/TemplateData/bg.jpg
  25. BIN
      game/public/unity/disaster-relief/TemplateData/favicon.ico
  26. BIN
      game/public/unity/disaster-relief/TemplateData/icons/unity-logo-dark.png
  27. BIN
      game/public/unity/disaster-relief/TemplateData/icons/unity-logo-light.png
  28. BIN
      game/public/unity/disaster-relief/TemplateData/progress-bar-empty-dark.png
  29. BIN
      game/public/unity/disaster-relief/TemplateData/progress-bar-empty-light.png
  30. BIN
      game/public/unity/disaster-relief/TemplateData/progress-bar-full-dark.png
  31. BIN
      game/public/unity/disaster-relief/TemplateData/progress-bar-full-light.png
  32. 11 0
      game/public/unity/disaster-relief/TemplateData/style.css
  33. BIN
      game/public/unity/disaster-relief/TemplateData/unity-logo-dark.png
  34. BIN
      game/public/unity/disaster-relief/TemplateData/unity-logo-light.png
  35. 105 0
      game/public/unity/disaster-relief/index.html
  36. 15 0
      game/public/unity/disaster-relief/manifest.webmanifest
  37. 12 0
      game/public/unity/disaster-relief/unity.js
  38. BIN
      game/public/unity/enviroment-protection/Build/Build.data.unityweb
  39. BIN
      game/public/unity/enviroment-protection/Build/Build.framework.js.unityweb
  40. 1 0
      game/public/unity/enviroment-protection/Build/Build.loader.js
  41. BIN
      game/public/unity/enviroment-protection/Build/Build.wasm.unityweb
  42. 33 0
      game/public/unity/enviroment-protection/ServiceWorker.js
  43. BIN
      game/public/unity/enviroment-protection/TemplateData/bg.jpg
  44. BIN
      game/public/unity/enviroment-protection/TemplateData/favicon.ico
  45. BIN
      game/public/unity/enviroment-protection/TemplateData/progress-bar-empty-dark.png
  46. BIN
      game/public/unity/enviroment-protection/TemplateData/progress-bar-empty-light.png
  47. BIN
      game/public/unity/enviroment-protection/TemplateData/progress-bar-full-dark.png
  48. BIN
      game/public/unity/enviroment-protection/TemplateData/progress-bar-full-light.png
  49. 7 0
      game/public/unity/enviroment-protection/TemplateData/style.css
  50. 116 0
      game/public/unity/enviroment-protection/index.html
  51. 15 0
      game/public/unity/enviroment-protection/manifest.webmanifest
  52. BIN
      game/public/unity/lost-children/Build/寻找丢失儿童.data.unityweb
  53. BIN
      game/public/unity/lost-children/Build/寻找丢失儿童.framework.js.unityweb
  54. 1 0
      game/public/unity/lost-children/Build/寻找丢失儿童.loader.js
  55. BIN
      game/public/unity/lost-children/Build/寻找丢失儿童.wasm.unityweb
  56. 33 0
      game/public/unity/lost-children/ServiceWorker.js
  57. BIN
      game/public/unity/lost-children/TemplateData/bg.jpg
  58. BIN
      game/public/unity/lost-children/TemplateData/favicon.ico
  59. BIN
      game/public/unity/lost-children/TemplateData/icons/unity-logo-dark.png
  60. BIN
      game/public/unity/lost-children/TemplateData/icons/unity-logo-light.png
  61. BIN
      game/public/unity/lost-children/TemplateData/progress-bar-empty-dark.png
  62. BIN
      game/public/unity/lost-children/TemplateData/progress-bar-empty-light.png
  63. BIN
      game/public/unity/lost-children/TemplateData/progress-bar-full-dark.png
  64. BIN
      game/public/unity/lost-children/TemplateData/progress-bar-full-light.png
  65. 11 0
      game/public/unity/lost-children/TemplateData/style.css
  66. BIN
      game/public/unity/lost-children/TemplateData/unity-logo-dark.png
  67. BIN
      game/public/unity/lost-children/TemplateData/unity-logo-light.png
  68. 104 0
      game/public/unity/lost-children/index.html
  69. 15 0
      game/public/unity/lost-children/manifest.webmanifest
  70. 12 0
      game/public/unity/lost-children/unity.js
  71. 16 16
      game/src/api.js
  72. BIN
      game/src/assets/images/icon-success.png
  73. 1 2
      game/src/components/NotifyComp.vue
  74. 4 4
      game/src/views/GameByUnity.vue
  75. 6 0
      game/src/views/HomeView.vue
  76. 0 1
      game/src/views/ShopView.vue

+ 1 - 1
game/.env.dev

@@ -1,4 +1,4 @@
 VUE_APP_CLI_MODE=dev
 NODE_ENV=development
 PUBLIC_PATH=/
-VUE_APP_API_PREFIX=https://sit-cnzhengquan.4dage.com/
+VUE_APP_DEPLOY_ORIGIN=https://sit-cnzhengquan.4dage.com/

+ 1 - 1
game/.env.mytest

@@ -1,4 +1,4 @@
 VUE_APP_CLI_MODE=test
 NODE_ENV=production
 PUBLIC_PATH=./
-VUE_APP_API_PREFIX=https://sit-cnzhengquan.4dage.com
+VUE_APP_DEPLOY_ORIGIN=https://sit-cnzhengquan.4dage.com

+ 1 - 1
game/.env.prod

@@ -1,4 +1,4 @@
 VUE_APP_CLI_MODE=prod
 NODE_ENV=production
 PUBLIC_PATH=./
-VUE_APP_API_PREFIX=
+VUE_APP_DEPLOY_ORIGIN=

+ 5 - 7
game/README.md

@@ -11,14 +11,12 @@ https://sit-cnzhengquan.4dage.com/game/index.html#/
 ## 还缺资源:
 
 ## todo
-积分达到上限时的提示文字样式,每个游戏都要改,而且新增积分始终为0。
-
-
-
-
-
-
+积分达到上限时的提示文字样式,每个游戏都要改
 
+而且新增积分始终为0。
 
+乡村林场:“请明天再来”要识别各个用户
 
+助农课堂:有bug
 
+抗体大作战,积分?

BIN
game/public/unity/antibody-battle/Build/Build.data.unityweb


BIN
game/public/unity/antibody-battle/Build/Build.framework.js.unityweb


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
game/public/unity/antibody-battle/Build/Build.loader.js


BIN
game/public/unity/antibody-battle/Build/Build.wasm.unityweb


+ 33 - 0
game/public/unity/antibody-battle/ServiceWorker.js

@@ -0,0 +1,33 @@
+const cacheName = "4dage-VirusWar-0.1.0";
+const contentToCache = [
+    "Build/Build.loader.js",
+    "Build/Build.framework.js.unityweb",
+    "Build/Build.data.unityweb",
+    "Build/Build.wasm.unityweb",
+    "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;
+    })());
+});

BIN
game/public/unity/antibody-battle/TemplateData/bg.jpg


BIN
game/public/unity/antibody-battle/TemplateData/favicon.ico


BIN
game/public/unity/antibody-battle/TemplateData/progress-bar-empty-dark.png


BIN
game/public/unity/antibody-battle/TemplateData/progress-bar-empty-light.png


BIN
game/public/unity/antibody-battle/TemplateData/progress-bar-full-dark.png


BIN
game/public/unity/antibody-battle/TemplateData/progress-bar-full-light.png


+ 7 - 0
game/public/unity/antibody-battle/TemplateData/style.css

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

+ 116 - 0
game/public/unity/antibody-battle/index.html

@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html lang="en-us">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>抗体大作战</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="tuanjie-container">
+      <canvas id="tuanjie-canvas" width=960 height=600 tabindex="-1"></canvas>
+      <div id="tuanjie-loading-bar">
+        <div id="tuanjie-logo"></div>
+        <div id="tuanjie-progress-bar-empty">
+          <div id="tuanjie-progress-bar-full"></div>
+        </div>
+      </div>
+      <div id="tuanjie-warning"> </div>
+    </div>
+    <script>
+	  window.getQueryVariable = function getQueryVariable(variable) {
+		var query = window.location.search.substring(1);
+		var vars = query.split("&");
+		for (var i = 0; i < vars.length; i++) {
+			var pair = vars[i].split("=");
+			if (pair[0] == variable) {
+				return pair[1];
+			}
+		}
+		return false;
+		}
+
+	
+      window.addEventListener("load", function () {
+        if ("serviceWorker" in navigator) {
+          navigator.serviceWorker.register("ServiceWorker.js");
+        }
+      });
+
+      var container = document.querySelector("#tuanjie-container");
+      var canvas = document.querySelector("#tuanjie-canvas");
+      var loadingBar = document.querySelector("#tuanjie-loading-bar");
+      var progressBarFull = document.querySelector("#tuanjie-progress-bar-full");
+      var warningBanner = document.querySelector("#tuanjie-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 + "/Build.loader.js";
+      var config = {
+        dataUrl: buildUrl + "/Build.data.unityweb",
+        frameworkUrl: buildUrl + "/Build.framework.js.unityweb",
+        codeUrl: buildUrl + "/Build.wasm.unityweb",
+        streamingAssetsUrl: "StreamingAssets",
+        companyName: "4dage",
+        productName: "VirusWar",
+        productVersion: "0.1.0",
+        showBanner: unityShowBanner,
+      };
+
+      // By default Tuanjie 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 = () => {
+        createTuanjieInstance(canvas, config, (progress) => {
+          progressBarFull.style.width = 100 * progress + "%";
+        }).then((tuanjieInstance) => {
+          loadingBar.style.display = "none";
+        }).catch((message) => {
+          alert(message);
+        });
+      };
+      document.body.appendChild(script);
+    </script>
+  </body>
+</html>

+ 15 - 0
game/public/unity/antibody-battle/manifest.webmanifest

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

BIN
game/public/unity/disaster-relief/Build/Build.data.unityweb


BIN
game/public/unity/disaster-relief/Build/Build.framework.js.unityweb


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
game/public/unity/disaster-relief/Build/Build.loader.js


BIN
game/public/unity/disaster-relief/Build/Build.wasm.unityweb


+ 33 - 0
game/public/unity/disaster-relief/ServiceWorker.js

@@ -0,0 +1,33 @@
+const cacheName = "4dage-RacingCar-0.1.0";
+const contentToCache = [
+    "Build/Build.loader.js",
+    "Build/Build.framework.js.unityweb",
+    "Build/Build.data.unityweb",
+    "Build/Build.wasm.unityweb",
+    "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;
+    })());
+});

BIN
game/public/unity/disaster-relief/TemplateData/bg.jpg


BIN
game/public/unity/disaster-relief/TemplateData/favicon.ico


BIN
game/public/unity/disaster-relief/TemplateData/icons/unity-logo-dark.png


BIN
game/public/unity/disaster-relief/TemplateData/icons/unity-logo-light.png


BIN
game/public/unity/disaster-relief/TemplateData/progress-bar-empty-dark.png


BIN
game/public/unity/disaster-relief/TemplateData/progress-bar-empty-light.png


BIN
game/public/unity/disaster-relief/TemplateData/progress-bar-full-dark.png


BIN
game/public/unity/disaster-relief/TemplateData/progress-bar-full-light.png


+ 11 - 0
game/public/unity/disaster-relief/TemplateData/style.css

@@ -0,0 +1,11 @@
+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 { margin-left: auto; margin-right: auto; 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
game/public/unity/disaster-relief/TemplateData/unity-logo-dark.png


BIN
game/public/unity/disaster-relief/TemplateData/unity-logo-light.png


+ 105 - 0
game/public/unity/disaster-relief/index.html

@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<html lang="en-us">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>应急救灾</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 src="unity.js">//添加 unity.js 的引用</script>
+    <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 + "/Build.loader.js";
+      var config = {
+        arguments: [],
+        dataUrl: buildUrl + "/Build.data.unityweb",
+        frameworkUrl: buildUrl + "/Build.framework.js.unityweb",
+        codeUrl: buildUrl + "/Build.wasm.unityweb",
+        streamingAssetsUrl: "StreamingAssets",
+        companyName: "4dage",
+        productName: "RacingCar",
+        productVersion: "0.1.0",
+        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);
+    </script>
+  </body>
+</html>

+ 15 - 0
game/public/unity/disaster-relief/manifest.webmanifest

@@ -0,0 +1,15 @@
+{
+    "name": "RacingCar",
+    "short_name": "RacingCar",
+    "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"
+    }]
+  }

+ 12 - 0
game/public/unity/disaster-relief/unity.js

@@ -0,0 +1,12 @@
+
+function getQueryVariable(variable) {
+	var query = window.location.search.substring(1);
+	var vars = query.split("&");
+	for (var i = 0; i < vars.length; i++) {
+		var pair = vars[i].split("=");
+		if (pair[0] == variable) {
+			return pair[1];
+		}
+	}
+	return false;
+}

BIN
game/public/unity/enviroment-protection/Build/Build.data.unityweb


BIN
game/public/unity/enviroment-protection/Build/Build.framework.js.unityweb


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
game/public/unity/enviroment-protection/Build/Build.loader.js


BIN
game/public/unity/enviroment-protection/Build/Build.wasm.unityweb


+ 33 - 0
game/public/unity/enviroment-protection/ServiceWorker.js

@@ -0,0 +1,33 @@
+const cacheName = "4dage-EcologicalProtection-0.1.0";
+const contentToCache = [
+    "Build/Build.loader.js",
+    "Build/Build.framework.js.unityweb",
+    "Build/Build.data.unityweb",
+    "Build/Build.wasm.unityweb",
+    "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;
+    })());
+});

BIN
game/public/unity/enviroment-protection/TemplateData/bg.jpg


BIN
game/public/unity/enviroment-protection/TemplateData/favicon.ico


BIN
game/public/unity/enviroment-protection/TemplateData/progress-bar-empty-dark.png


BIN
game/public/unity/enviroment-protection/TemplateData/progress-bar-empty-light.png


BIN
game/public/unity/enviroment-protection/TemplateData/progress-bar-full-dark.png


BIN
game/public/unity/enviroment-protection/TemplateData/progress-bar-full-light.png


+ 7 - 0
game/public/unity/enviroment-protection/TemplateData/style.css

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

+ 116 - 0
game/public/unity/enviroment-protection/index.html

@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html lang="en-us">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>生态保护</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="tuanjie-container">
+      <canvas id="tuanjie-canvas" width=960 height=600 tabindex="-1"></canvas>
+      <div id="tuanjie-loading-bar">
+        <div id="tuanjie-logo"></div>
+        <div id="tuanjie-progress-bar-empty">
+          <div id="tuanjie-progress-bar-full"></div>
+        </div>
+      </div>
+      <div id="tuanjie-warning"> </div>
+    </div>
+    <script>
+	  window.getQueryVariable = function getQueryVariable(variable) {
+		var query = window.location.search.substring(1);
+		var vars = query.split("&");
+		for (var i = 0; i < vars.length; i++) {
+			var pair = vars[i].split("=");
+			if (pair[0] == variable) {
+				return pair[1];
+			}
+		}
+		return false;
+		}
+
+	
+      window.addEventListener("load", function () {
+        if ("serviceWorker" in navigator) {
+          navigator.serviceWorker.register("ServiceWorker.js");
+        }
+      });
+
+      var container = document.querySelector("#tuanjie-container");
+      var canvas = document.querySelector("#tuanjie-canvas");
+      var loadingBar = document.querySelector("#tuanjie-loading-bar");
+      var progressBarFull = document.querySelector("#tuanjie-progress-bar-full");
+      var warningBanner = document.querySelector("#tuanjie-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 + "/Build.loader.js";
+      var config = {
+        dataUrl: buildUrl + "/Build.data.unityweb",
+        frameworkUrl: buildUrl + "/Build.framework.js.unityweb",
+        codeUrl: buildUrl + "/Build.wasm.unityweb",
+        streamingAssetsUrl: "StreamingAssets",
+        companyName: "4dage",
+        productName: "EcologicalProtection",
+        productVersion: "0.1.0",
+        showBanner: unityShowBanner,
+      };
+
+      // By default Tuanjie 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 = () => {
+        createTuanjieInstance(canvas, config, (progress) => {
+          progressBarFull.style.width = 100 * progress + "%";
+        }).then((tuanjieInstance) => {
+          loadingBar.style.display = "none";
+        }).catch((message) => {
+          alert(message);
+        });
+      };
+      document.body.appendChild(script);
+    </script>
+  </body>
+</html>

+ 15 - 0
game/public/unity/enviroment-protection/manifest.webmanifest

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

BIN
game/public/unity/lost-children/Build/寻找丢失儿童.data.unityweb


BIN
game/public/unity/lost-children/Build/寻找丢失儿童.framework.js.unityweb


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
game/public/unity/lost-children/Build/寻找丢失儿童.loader.js


BIN
game/public/unity/lost-children/Build/寻找丢失儿童.wasm.unityweb


+ 33 - 0
game/public/unity/lost-children/ServiceWorker.js

@@ -0,0 +1,33 @@
+const cacheName = "4dkk-Maze-0.1";
+const contentToCache = [
+    "Build/寻找丢失儿童.loader.js",
+    "Build/寻找丢失儿童.framework.js.unityweb",
+    "Build/寻找丢失儿童.data.unityweb",
+    "Build/寻找丢失儿童.wasm.unityweb",
+    "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;
+    })());
+});

BIN
game/public/unity/lost-children/TemplateData/bg.jpg


BIN
game/public/unity/lost-children/TemplateData/favicon.ico


BIN
game/public/unity/lost-children/TemplateData/icons/unity-logo-dark.png


BIN
game/public/unity/lost-children/TemplateData/icons/unity-logo-light.png


BIN
game/public/unity/lost-children/TemplateData/progress-bar-empty-dark.png


BIN
game/public/unity/lost-children/TemplateData/progress-bar-empty-light.png


BIN
game/public/unity/lost-children/TemplateData/progress-bar-full-dark.png


BIN
game/public/unity/lost-children/TemplateData/progress-bar-full-light.png


+ 11 - 0
game/public/unity/lost-children/TemplateData/style.css

@@ -0,0 +1,11 @@
+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 { margin-left: auto; margin-right: auto; 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
game/public/unity/lost-children/TemplateData/unity-logo-dark.png


BIN
game/public/unity/lost-children/TemplateData/unity-logo-light.png


+ 104 - 0
game/public/unity/lost-children/index.html

@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html lang="en-us">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>找回走失儿童</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 src="unity.js"></script>
+    <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 + "/寻找丢失儿童.loader.js";
+      var config = {
+        dataUrl: buildUrl + "/寻找丢失儿童.data.unityweb",
+        frameworkUrl: buildUrl + "/寻找丢失儿童.framework.js.unityweb",
+        codeUrl: buildUrl + "/寻找丢失儿童.wasm.unityweb",
+        streamingAssetsUrl: "StreamingAssets",
+        companyName: "4dkk",
+        productName: "Maze",
+        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);
+    </script>
+  </body>
+</html>

+ 15 - 0
game/public/unity/lost-children/manifest.webmanifest

@@ -0,0 +1,15 @@
+{
+    "name": {{{ JSON.stringify(PRODUCT_NAME) }}},
+    "short_name": {{{ JSON.stringify(PRODUCT_NAME) }}},
+    "start_url": "index.html",
+    "display": "fullscreen",
+    "background_color": "{{{ BACKGROUND_COLOR }}}",
+    "theme_color": "{{{  SPLASH_SCREEN_STYLE.toLowerCase() === 'light' ? '#fff' : '#000' }}}",
+    "description": {{{ JSON.stringify(PRODUCT_DESCRIPTION) }}},
+    "icons": [{
+      "src": "TemplateData/icons/unity-logo-{{{ SPLASH_SCREEN_STYLE.toLowerCase() }}}.png",
+      "sizes": "144x144",
+      "type": "image/png",
+      "purpose": "any maskable"
+    }]
+  }

+ 12 - 0
game/public/unity/lost-children/unity.js

@@ -0,0 +1,12 @@
+
+function getQueryVariable(variable) {
+	var query = window.location.search.substring(1);
+	var vars = query.split("&");
+	for (var i = 0; i < vars.length; i++) {
+		var pair = vars[i].split("=");
+		if (pair[0] == variable) {
+			return pair[1];
+		}
+	}
+	return false;
+}

+ 16 - 16
game/src/api.js

@@ -19,13 +19,13 @@ axios.interceptors.response.use(function (response) {
 // export async function reportVisit() {
 //   const res = await axios({
 //     method: 'get',
-//     url: `${process.env.VUE_APP_API_PREFIX}/api/show/addVisit`,
+//     url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/addVisit`,
 //   })
 // }
 // export async function fetchVisitInfo() {
 //   const res = await axios({
 //     method: 'get',
-//     url: `${process.env.VUE_APP_API_PREFIX}/api/show/getVisit`,
+//     url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/getVisit`,
 //   })
 //   return res.data.data
 // }
@@ -33,7 +33,7 @@ export async function login(account, password) {
   const pwdEncrypted = encodeStr(Base64.encode(password))
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/show/login`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/login`,
     data: {
       userName: account,
       password: pwdEncrypted,
@@ -51,7 +51,7 @@ export async function login(account, password) {
 export async function logout() {
   const res = await axios({
     method: 'get',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/logout`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/logout`,
     headers: {
       token: store.state.token,
     }
@@ -66,7 +66,7 @@ export async function checkLoginStatusAndProcess() {
   if (lastToken && lastUserInfoStr) {
     const res = await axios({
       method: 'get',
-      url: `${process.env.VUE_APP_API_PREFIX}/api/show/checkLogin`,
+      url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/checkLogin`,
       headers: {
         token: lastToken,
       }
@@ -89,7 +89,7 @@ export async function signUp(account, phone, password) {
   const pwdEncrypted = encodeStr(Base64.encode(password))
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/show/register`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/register`,
     data: {
       password: pwdEncrypted,
       phone,
@@ -106,7 +106,7 @@ export async function signUp(account, phone, password) {
 export async function findPassowrd(account, phone) {
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/show/findPass`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/findPass`,
     data: {
       phone,
       userName: account,
@@ -123,7 +123,7 @@ export async function changePassword(newPassword, oldPassword) {
   const pwdOldEncrypted = encodeStr(Base64.encode(oldPassword))
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/update/pass`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/update/pass`,
     data: {
       newPassword: pwdNewEncrypted,
       oldPassword: pwdOldEncrypted,
@@ -142,7 +142,7 @@ export async function changePassword(newPassword, oldPassword) {
 export async function getGameRuleList() {
   const res = await axios({
     method: 'get',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/show/rule/getList?rnd=${Math.random()}`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/rule/getList?rnd=${Math.random()}`,
     params: {
       type: 'game',
     },
@@ -156,7 +156,7 @@ export async function getGameRuleList() {
 export async function getScoreLimit() {
   const res = await axios({
     method: 'get',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/show/rule/getList?rnd=${Math.random()}`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/rule/getList?rnd=${Math.random()}`,
     params: {
       type: 'day',
     },
@@ -170,7 +170,7 @@ export async function getScoreLimit() {
 export async function getScore() {
   const res = await axios({
     method: 'get',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/getPoint?rnd=${Math.random()}`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/getPoint?rnd=${Math.random()}`,
     headers: {
       token: store.state.token,
     }
@@ -184,7 +184,7 @@ export async function getScore() {
 export async function addScore(score) {
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/point/add`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/point/add`,
     data: {
       score,
       type: 'game',
@@ -204,7 +204,7 @@ export async function addScore(score) {
 export async function getExamQuestionList() {
   const res = await axios({
     method: 'get',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/show/question/getList`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/question/getList`,
   })
   if (res.data.code !== 0) {
     throw (`获取答题列表失败:${res.data.msg}`)
@@ -229,7 +229,7 @@ updateTime: "2024-01-09 09:35:10"
 export async function getPrizeList(pageNum, pageSize) {
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/prize/pageList`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/prize/pageList`,
     data: {
       pageNum,
       pageSize,
@@ -247,7 +247,7 @@ export async function getPrizeList(pageNum, pageSize) {
 export async function getBonusPointRecord() {
   const res = await axios({
     method: 'get',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/point/getList`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/point/getList`,
     headers: {
       token: store.state.token,
     }
@@ -261,7 +261,7 @@ export async function getBonusPointRecord() {
 export async function redeem(description, name, phone, prizeId, score) {
   const res = await axios({
     method: 'post',
-    url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/prize/redeem`,
+    url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/prize/redeem`,
     headers: {
       token: store.state.token,
     },

BIN
game/src/assets/images/icon-success.png


+ 1 - 2
game/src/components/NotifyComp.vue

@@ -1,9 +1,8 @@
 <template>
   <div class="notify">
-    <!-- todo -->
     <img
       class="icon"
-      src="@/assets/images/icon-present.png"
+      src="@/assets/images/icon-success.png"
       alt=""
       draggable="false"
     >

+ 4 - 4
game/src/views/GameByUnity.vue

@@ -22,10 +22,10 @@ if (store.state.loginStatus) {
   gameUrlQuery = `?userId=${store.state.userInfo.id}&token=${store.state.token}`
 }
 const gameUrlMap = {
-  AntibodyBattle: `https://app.4dage.com/test/rc/VirusWar/index.html`,
-  DisasterRelief: `http://app.4dage.com/test/rc/Build/index.html`,
-  EnviromentProtection: `https://app.4dage.com/test/rc/EcologicalProtection/index.html`,
-  LostChildren: `https://app.4dage.com/WebGLTestyhz/MiniGame/H5Game-ChinaSecuritiesMuseumMaze/index.html`,
+  AntibodyBattle: `unity/antibody-battle/index.html#/`,
+  DisasterRelief: `unity/disaster-relief/index.html#/`,
+  EnviromentProtection: `unity/enviroment-protection/index.html#/`,
+  LostChildren: `unity/lost-children/index.html#/`,
 }
 
 const gameUrl = gameUrlMap[route.query.gameName] + gameUrlQuery

+ 6 - 0
game/src/views/HomeView.vue

@@ -260,6 +260,12 @@ watch(loginStatus, (vNew) => {
 }, {
   immediate: true,
 })
+if (loginStatus.value) {
+  getScore().then((res) => {
+    store.commit('setScore', res.total)
+    store.commit('setIfScoreLimitReached', res.hasOver)
+  })
+}
 
 const isShowLoading = ref(true)
 let hideLoadingCallback = null

+ 0 - 1
game/src/views/ShopView.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="shop-view">
-    <!-- todo -->
     <img
       class="banner"
       src="@/assets/images/redeem-banner.png"