Commit 93d23869 authored by 华国豪's avatar 华国豪 🙄

1

parent fc030615
......@@ -13,7 +13,7 @@
</vue-baberrage>
<div style="position: absolute;left: 0;top: 0;padding: 2%;background-color: red;z-index: 10086;" @click="sendMsg()">sendMsg</div>
<!-- style="position: absolute; top: 20%;z-index: 20199" -->
<audio style="position: absolute; top: -20%;z-index: -1" ref="homeAudio" :loop="AudioPlayType ? true : false" :src="url" controls></audio>
<audio style="position: absolute; top: -20%;z-index: -1" ref="homeAudio" :loop="AudioPlayType ? true : false" :src="url" controls></audio>
</div>
</template>
......@@ -98,6 +98,18 @@ export default {
// $this.barrageList.push(barrageObj)
// }, 5000)
//this.sendMsg();
this.$PROXY.on("barrage", data => {
let barrage = data
let barrageObj = {
id: ++this.currentId,
avatar: barrage.p,
msg: barrage.m,
name: barrage.n,
time: 15,
type: MESSAGE_TYPE.NORMAL
}
this.barrageList.push(barrageObj)
})
},
methods: {
setAudioType: function (type) {
......@@ -144,19 +156,6 @@ export default {
},
getMsg () {
var $this = this;
console.log(this.$PROXY)
this.$PROXY.on("barrage", data => {
let barrage = data
let barrageObj = {
id: ++this.currentId,
avatar: barrage.p,
msg: barrage.m,
name: barrage.n,
time: 15,
type: MESSAGE_TYPE.NORMAL
}
this.barrageList.push(barrageObj)
})
}
}
......
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 to comment