Commit 383b71e0 by doszhang

dos

parent 00e6dec4
...@@ -98,7 +98,7 @@ const guardian = [ ...@@ -98,7 +98,7 @@ const guardian = [
$(document).ready(function () { $(document).ready(function () {
// var vConsole = new VConsole(); // var vConsole = new VConsole();
// console.log('ok') // console.log('ok')
audioAutoPlay('music') // audioAutoPlay('music')
$('.bg').css({ $('.bg').css({
'height': fixHeight + 'px' 'height': fixHeight + 'px'
}); });
...@@ -131,26 +131,26 @@ $(document).ready(function () { ...@@ -131,26 +131,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