|
@@ -45,13 +45,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {
|
|
|
- ref,
|
|
|
- computed,
|
|
|
- onUnmounted,
|
|
|
- onMounted,
|
|
|
- nextTick,
|
|
|
-} from "vue";
|
|
|
+import { ref, computed, onUnmounted, onMounted, nextTick } from "vue";
|
|
|
import { useStore } from "vuex";
|
|
|
import browser from "@/utils/browser";
|
|
|
|
|
@@ -111,8 +105,9 @@ const handleMessage = (res) => {
|
|
|
|
|
|
// V4场景本身的背景音乐 (同时可判断场景已经加载完成)
|
|
|
if (event == "fdkkBgmLink") {
|
|
|
- console.log("fdkkBgmLink", params.music);
|
|
|
- store.dispatch("audio/initV4BGM", params.music);
|
|
|
+ const url = params.music || "";
|
|
|
+ console.log("fdkkBgmLink", url);
|
|
|
+ store.dispatch("audio/initV4BGM", url);
|
|
|
// loading完毕
|
|
|
getApp().Scene.emit("ready");
|
|
|
}
|
|
@@ -132,14 +127,9 @@ const handleMessage = (res) => {
|
|
|
console.error("toggleBgmStatus", params);
|
|
|
// debugger;
|
|
|
if (params.status) {
|
|
|
- // if (unref(isHasV4BGM)) {
|
|
|
- // store.dispatch("audio/playBGM", 2);
|
|
|
- // } else {
|
|
|
- // store.dispatch("audio/playBGM", 0);
|
|
|
- // }
|
|
|
- // store.dispatch("audio/resumeBGM");
|
|
|
+
|
|
|
} else {
|
|
|
- // store.dispatch("audio/pauseBGM");
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|