同步数据

This commit is contained in:
XGL-THINKPAD-X1\rucky
2024-01-23 16:12:41 +08:00
parent 2ab7f2daab
commit 8db3e50c0f
7 changed files with 134 additions and 69 deletions

View File

@@ -58,6 +58,25 @@ export function createBGM() {
setTimeout(() => {
audioAni.play()
}, 1000)
// ios自动播放音乐
document.addEventListener("DOMContentLoaded", function () {
function audioAutoPlay() {
var audio = document.getElementById("bg-music");
audio.play();
document.addEventListener(
"WeixinJSBridgeReady",
function () {
WeixinJSBridge.invoke("getNetworkType", {}, function (e) {
audio.play();
});
},
false
);
}
audioAutoPlay();
});
}