Commit 021ddb87 by 李伟康

commit

1 parent c9b92b9a
......@@ -222,6 +222,10 @@ export default {
videoUrl: ''
}
},
// activated(){
// console.log('--------------------')
// if(window.$AUDIO) window.$AUDIO.toggleBGM()
// },
mounted () {
let _this = this
let jsApiList = ['getLocation', 'openLocation', 'getNetworkType', 'onMenuShareAppMessage', 'launchMiniprogram', 'updateAppMessageShareData']
......@@ -285,7 +289,7 @@ export default {
}
if (data.activityMusic) {
this.$nextTick(() => {
this.audio = new Audio(data.activityMusic, () => {
window.$AUDIO = new Audio(data.activityMusic, () => {
this.musicOff = false
this.audioFlag = true
})
......@@ -353,11 +357,11 @@ export default {
audioAutoPlay (off = false) {
if (off === true) {
this.musicOff = true
this.audio.toggleBGM(true)
window.$AUDIO.toggleBGM(true)
return
}
this.musicOff = !this.musicOff
this.audio.toggleBGM()
window.$AUDIO.toggleBGM()
},
playVideo (index) {
let _this = this,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!