|
@@ -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';
|