lanxin 4 hari lalu
induk
melakukan
b8485c5da8
3 mengubah file dengan 33 tambahan dan 8 penghapusan
  1. 18 3
      hot/public/index.html
  2. 12 0
      scene/public/index.html
  3. 3 5
      scene/src/components/welcome/index.vue

+ 18 - 3
hot/public/index.html

@@ -1,9 +1,9 @@
 <!DOCTYPE html>
 <html lang="en">
   <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <meta charset="utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
     <title><%= htmlWebpackPlugin.options.title %></title>
   </head>
   <body>
@@ -12,6 +12,21 @@
     </noscript>
     <div id="app"></div>
     <script src="./data.js"></script>
+    <script>
+      const autoZoom = () => {
+        var t = window.devicePixelRatio;
+        if (t != 1) {
+          document.body.style.zoom = -0.6 * t + 1.55;
+        }
+      };
+      // 判断是windows就使用
+      if (window.navigator.userAgent.indexOf("Windows") !== -1) {
+        window.addEventListener("resize", autoZoom);
+        window.addEventListener("load", autoZoom);
+        window.addEventListener("DOMContentLoaded", autoZoom);
+      }
+    </script>
+
     <!-- built files will be auto injected -->
   </body>
 </html>

+ 12 - 0
scene/public/index.html

@@ -23,6 +23,18 @@
         number = number.substring(0, number.indexOf("#"));
       }
       window.number = "SG-KY3cAw6MWrl";
+      // window.addEventListener("resize", function () {
+      //   var t = window.devicePixelRatio;
+      //   if (t != 1) {
+      //     document.body.style.zoom = -0.6 * t + 1.55;
+      //   }
+      // });
+      // window.addEventListener("DOMContentLoaded", function () {
+      //   var t = window.devicePixelRatio;
+      //   if (t != 1) {
+      //     document.body.style.zoom = -0.6 * t + 1.55;
+      //   }
+      // });
     </script>
   </head>
 

+ 3 - 5
scene/src/components/welcome/index.vue

@@ -7,7 +7,7 @@
       src="https://zzbbh.4dage.com/SWKK/show.html?id=WK1717474784264114176&vr=fd720_Y8cO1d7Fu&lang=zh"
       frameborder="0"
     ></iframe> -->
-    <div class="btn" style="display: none" @click.stop="$emit('close')" @click="changeLanguage('en')">
+    <div class="btn" @click.stop="$emit('close')" @click="changeLanguage('en')">
       <img ref="enBtn" src="../../assets/img/btnBg.png" alt="" />
       <p>English</p>
     </div>
@@ -81,12 +81,10 @@ export default {
     }
   }
   .btn2 {
-    // transform: translateX(-180%);
-    transform: translateX(-110%);
+    transform: translateX(-180%);
   }
   .btn3 {
-    // transform: translateX(80%);
-    transform: translateX(10%);
+    transform: translateX(80%);
   }
   .pcBg {
     width: 100%;