Commit c0ab2068 by doszhang

dos

parent 1f455d03
...@@ -96,6 +96,7 @@ const guardian = [ ...@@ -96,6 +96,7 @@ const guardian = [
] ]
$(document).ready(function () { $(document).ready(function () {
audioAutoPlay('music')
$('.bg').css({ $('.bg').css({
'height': fixHeight + 'px' 'height': fixHeight + 'px'
}); });
...@@ -124,6 +125,25 @@ $(document).ready(function () { ...@@ -124,6 +125,25 @@ $(document).ready(function () {
$('.btn-retry').on('click', retry) $('.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() { function showItem() {
if (showItemStatus) { if (showItemStatus) {
return false; 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