解决冲突

master
chen 2022-08-16 16:57:33 +08:00
commit 2e8aaea60f
1 changed files with 15 additions and 13 deletions

View File

@ -417,22 +417,24 @@
console.log("会员上线",msg);
});
//
if(uni.getStorageSync('ifMessage')){
socket.on('new_msg', (msg)=> {
console.log(msg);
console.log(msg,121212)
// this.offMusic();
if(uni.getStorageSync('ifVoice') || uni.getStorageSync('ifMessage')){
if(uni.getStorageSync('ifVoice')){
console.log('进入接收消息');
uni.showToast({
title:msg
})
this.bofang();
// uni.showToast({
// title:''
// })
this.bofang(msg);
}
});
}
},
bofang(){
bofang(msg){
this.bgmMusic.autoplay = true;//
// this.bgmMusic.loop = true;//
this.bgmMusic.src = 'https://img-cdn2.yespik.com/sound/00/29/33/70/293370_548da270e343f070330174bd880d2e83.mp3';//
this.bgmMusic.src = msg;//
this.bgmMusic.volume = 1;//
this.bgmMusic.play(()=>{
console.log('背景音乐播放中');