统一axios写法

This commit is contained in:
panlinlin
2021-04-12 16:04:04 +08:00
parent 27df8bd84c
commit 4010ed6c23
28 changed files with 243 additions and 218 deletions

View File

@@ -11,7 +11,8 @@ export default {
name: 'rtcPlayer',
data() {
return {
webrtcPlayer: null
webrtcPlayer: null,
timer: null
};
},
props: ['videoUrl', 'error', 'hasaudio'],
@@ -55,7 +56,7 @@ export default {
this.eventcallbacK("OFFER ANSWER ERROR ", "offer anwser 交换失败")
if (e.code ==-400 && e.msg=="流不存在"){
console.log("111111")
setTimeout(()=>{
this.timer = setTimeout(()=>{
this.webrtcPlayer.close();
this.play(url)
}, 100)
@@ -83,6 +84,9 @@ export default {
console.log(message)
}
},
destroyed() {
clearTimeout(this.timer);
},
}
</script>