Commit c34b6b59 by doszhang

dos

parent 71210cf4
...@@ -96,7 +96,7 @@ const guardian = [ ...@@ -96,7 +96,7 @@ const guardian = [
] ]
$(document).ready(function () { $(document).ready(function () {
audioAutoPlay('music') // audioAutoPlay('music')
$('.bg').css({ $('.bg').css({
'height': fixHeight + 'px' 'height': fixHeight + 'px'
}); });
...@@ -129,26 +129,26 @@ $(document).ready(function () { ...@@ -129,26 +129,26 @@ $(document).ready(function () {
}) })
}); });
function audioAutoPlay(id) { // function audioAutoPlay(id) {
var audio = document.getElementById(id); // var audio = document.getElementById(id);
if (window.WeixinJSBridge) { // if (window.WeixinJSBridge) {
WeixinJSBridge.invoke('getNetworkType', {}, function (e) { // WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
audio.play(); // audio.play();
}, false); // }, false);
} else { // } else {
document.addEventListener("WeixinJSBridgeReady", function () { // document.addEventListener("WeixinJSBridgeReady", function () {
WeixinJSBridge.invoke('getNetworkType', {}, function (e) { // WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
alert(4) // // alert(4)
audio.play(); // audio.play();
}); // });
}, false); // }, false);
} // }
audio.play(); // audio.play();
return false; // return false;
} // }
function showItem() { function showItem() {
if (showItemStatus) { if (showItemStatus) {
......
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