lanxin 2 dní pred
rodič
commit
b8b2336973
2 zmenil súbory, kde vykonal 13001 pridanie a 0 odobranie
  1. 12972 0
      CAD/bundle.js
  2. 29 0
      index.html

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 12972 - 0
CAD/bundle.js


+ 29 - 0
index.html

@@ -797,12 +797,41 @@
     <div id="baseBg" ><div id="baseBtn" class="btn"><img src="images/baseBtn.png" alt="" draggable="false"></div></div>
 
     <script>
+// -------------增加访问量--------------------
+
+// 初始接口域名
+const baseUrl = 'https://sit-cctvyunzhan.4dage.com'
+
+
+const requestBody = {
+num: 'SG-84kQCo1GPQn',
+type: 'visit'
+};
+
+fetch(`${baseUrl}/api/visit/add`, {
+method: 'POST',
+body: JSON.stringify(requestBody),
+headers: {
+'Content-Type': 'application/json'
+}
+})
+.then(response => response.json())
+.then(data => console.log('访问量增加'))
+.catch(error => console.error(error));
+</script>
+
+    <script>
       const volumeCustomize = document.querySelector('#volume-Customize');
       const volumeImg = volumeCustomize.querySelector('img');
       const musicPlayer = document.getElementById('backgroundMusic');
       const baseBg = document.getElementById('baseBg');
       const baseBtn = document.getElementById('baseBtn');
 
+      // 检查URL中是否包含‘&firstView’
+      if (window.location.search.includes('firstView')) {
+        baseBg.style.display = 'none';
+      }
+
       baseBtn.addEventListener('click',()=>{
         musicPlayer.play();
         baseBg.style.display = 'none';