|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="ifrcon">
|
|
<div class="ifrcon">
|
|
|
- <Header :bgmUrl="tempBgm" :params="params" />
|
|
|
|
|
|
|
+ <Header :bgmUrl="tempBgm" @toggleBGM="handleBGM" :bgmstatus="bgmstatus" :params="params" />
|
|
|
<iframe allowfullscreen="true" ref="iframe" id="showifr" :src="url" frameborder="0" @load="onIframLoad"></iframe>
|
|
<iframe allowfullscreen="true" ref="iframe" id="showifr" :src="url" frameborder="0" @load="onIframLoad"></iframe>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -14,7 +14,8 @@ export default {
|
|
|
components:{Header},
|
|
components:{Header},
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
- params:''
|
|
|
|
|
|
|
+ params:'',
|
|
|
|
|
+ bgmstatus: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
@@ -39,7 +40,6 @@ export default {
|
|
|
||e.data.params.url.indexOf('https://test.4dkankan.com/spc.html?')>-1
|
|
||e.data.params.url.indexOf('https://test.4dkankan.com/spc.html?')>-1
|
|
|
||e.data.params.url.indexOf('https://test.4dkankan.com/smobile.html?')>-1) {
|
|
||e.data.params.url.indexOf('https://test.4dkankan.com/smobile.html?')>-1) {
|
|
|
let m = browser.urlHasValueFromUrl('m',e.data.params.url)
|
|
let m = browser.urlHasValueFromUrl('m',e.data.params.url)
|
|
|
- console.log(m);
|
|
|
|
|
this.$emit('changeUrl',m)
|
|
this.$emit('changeUrl',m)
|
|
|
} else{
|
|
} else{
|
|
|
this.$emit('otherUrl',e.data.params.url)
|
|
this.$emit('otherUrl',e.data.params.url)
|
|
@@ -47,11 +47,17 @@ export default {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // if (e.data.event == "guide-status") {
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if (e.data.event == "action") {
|
|
if (e.data.event == "action") {
|
|
|
this.$bus.emit('currentMode',e.data.params)
|
|
this.$bus.emit('currentMode',e.data.params)
|
|
|
|
|
+
|
|
|
|
|
+ if (e.data.params.type == "playMusic") {
|
|
|
|
|
+ console.log(e.data.params.data.status,'e.data');
|
|
|
|
|
+ this.bgmstatus = e.data.params.data.status
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (e.data.event == "loaded") {
|
|
if (e.data.event == "loaded") {
|
|
@@ -60,9 +66,27 @@ export default {
|
|
|
source: "mingyuan",
|
|
source: "mingyuan",
|
|
|
event: 'guide-rooms'
|
|
event: 'guide-rooms'
|
|
|
},"*")
|
|
},"*")
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.iframe.contentWindow.postMessage({
|
|
|
|
|
+ source : "mingyuan",
|
|
|
|
|
+ event:"settings",
|
|
|
|
|
+ params:{
|
|
|
|
|
+ playMusic:true
|
|
|
|
|
+ }
|
|
|
|
|
+ },"*")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ handleBGM(status){
|
|
|
|
|
+
|
|
|
|
|
+ this.$refs.iframe.contentWindow.postMessage({
|
|
|
|
|
+ source : "mingyuan",
|
|
|
|
|
+ event:"settings",
|
|
|
|
|
+ params:{
|
|
|
|
|
+ playMusic:status
|
|
|
|
|
+ }
|
|
|
|
|
+ },"*")
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|