|
@@ -8,6 +8,12 @@
|
|
|
<div class="pinBottom center">
|
|
|
<div id="view-controllers"></div>
|
|
|
</div>
|
|
|
+ <audio
|
|
|
+ id="musicAudio"
|
|
|
+ src="https://super.4dage.com/data/KJ-d4y5kwj5mvW/edit/20231102_120549642.mp3"
|
|
|
+ autoplay
|
|
|
+ style="display: none"
|
|
|
+ ></audio>
|
|
|
<div class="pinBottom left">
|
|
|
<div>
|
|
|
<div class="viewContainer">
|
|
@@ -45,13 +51,7 @@
|
|
|
<div class="btmText">自动漫游</div>
|
|
|
</div>
|
|
|
<div id="pause" class="ui-icon" style="display: none">
|
|
|
- <a
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- "
|
|
|
- >
|
|
|
+ <a style="width: 100%; display: flex; justify-content: center">
|
|
|
<img
|
|
|
rel="tooltip"
|
|
|
title=""
|
|
@@ -59,7 +59,6 @@
|
|
|
width="24"
|
|
|
height="24"
|
|
|
data-original-title="暂停"
|
|
|
-
|
|
|
/>
|
|
|
</a>
|
|
|
<div class="btmText">自动漫游</div>
|
|
@@ -286,6 +285,7 @@
|
|
|
import axios from "axios";
|
|
|
import HotList from "./components/hotList.vue";
|
|
|
import Share from "./components/share.vue";
|
|
|
+import { version } from "vue-awesome-swiper";
|
|
|
|
|
|
export default {
|
|
|
components: { HotList, Share },
|
|
@@ -305,6 +305,7 @@ export default {
|
|
|
name: 0,
|
|
|
},
|
|
|
],
|
|
|
+ isBg: true,
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -314,6 +315,17 @@ export default {
|
|
|
this.onVisit();
|
|
|
setTimeout(() => {
|
|
|
this.getVisit();
|
|
|
+ const _this = this;
|
|
|
+
|
|
|
+ window.addEventListener("click", function () {
|
|
|
+ if (_this.isBg) {
|
|
|
+ const audio = document.getElementById("musicAudio");
|
|
|
+ audio.play();
|
|
|
+ _this.isBg = false;
|
|
|
+ document.querySelector("#openMusic").style.display = "none";
|
|
|
+ document.querySelector("#closeMusic").style.display = "block";
|
|
|
+ }
|
|
|
+ });
|
|
|
}, 50);
|
|
|
},
|
|
|
methods: {
|
|
@@ -355,12 +367,21 @@ export default {
|
|
|
},
|
|
|
switchBGM(flag) {
|
|
|
this.musicState = flag;
|
|
|
+
|
|
|
if (flag) {
|
|
|
- window.manage.switchBgmState(true);
|
|
|
+ const audio = document.getElementById("musicAudio");
|
|
|
+ audio.play();
|
|
|
+ console.log("音乐打开");
|
|
|
+ // window.manage.switchBgmState(true);
|
|
|
document.querySelector("#openMusic").style.display = "none";
|
|
|
document.querySelector("#closeMusic").style.display = "block";
|
|
|
} else {
|
|
|
- window.manage.switchBgmState(false);
|
|
|
+ const audio = document.getElementById("musicAudio");
|
|
|
+
|
|
|
+ audio.pause();
|
|
|
+ console.log("音乐关闭");
|
|
|
+
|
|
|
+ // window.manage.switchBgmState(false);
|
|
|
document.querySelector("#openMusic").style.display = "block";
|
|
|
document.querySelector("#closeMusic").style.display = "none";
|
|
|
}
|