Commit c0ab2068 by doszhang

dos

parent 1f455d03
......@@ -96,6 +96,7 @@ const guardian = [
]
$(document).ready(function () {
audioAutoPlay('music')
$('.bg').css({
'height': fixHeight + 'px'
});
......@@ -124,6 +125,25 @@ $(document).ready(function () {
$('.btn-retry').on('click', retry)
});
function audioAutoPlay(id) {
var audio = document.getElementById(id);
if (window.WeixinJSBridge) {
WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
audio.play();
}, false);
} else {
document.addEventListener("WeixinJSBridgeReady", function () {
WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
audio.play();
});
}, false);
}
audio.play();
return false;
}
function showItem() {
if (showItemStatus) {
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment